Nothing Special   »   [go: up one dir, main page]

Skip to content

This project applies Reinforcement Learning to the classic game The Legend of Zelda: Link's Awakening (Game Boy version) to create an AI capable of autonomously navigating and solving the challenges within the game.

License

Notifications You must be signed in to change notification settings

msosav/zelda-reinforcement-learning

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Banner

The Legend of Zelda: Reinforcement Learning

This repository contains the code for the project "The Legend of Zelda: Reinforcement Learning", it's purpose is to train an agent to play the game "The Legend of Zelda: Link's Awakening" for GameBoy using Reinforcement Learning.

Installation

Clone the repository

git clone https://github.com/msosav/zelda-reinforcement-learning
cd zelda-reinforcement-learning

Create a virtual environment and activate it

Note

You need to have python 3.11 installed in your machine.

python3.11 -m venv venv
source venv/bin/activate

Install pytorch

pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu

Install the requirements

pip install -r requirements.txt

Usage

The program is divided into two main parts: the training and the testing.

Note

You need to create a folder called roms in the root of the project and put the rom of the game "The Legend of Zelda: Link's Awakening" for GameBoy in it and name it ZeldaLinksAwakening.gb.

Training

To train the agent, run the following command:

python main.py train

Testing

To test the agent, run the following command:

python main.py test ./checkpoints/<checkpoint>.zip

Example:

python main.py test ./checkpoints/best_model_5000.zip

Reward System (WIP)

The reward system is based on the following rules:

  • +1 for each item in the inventory

About

This project applies Reinforcement Learning to the classic game The Legend of Zelda: Link's Awakening (Game Boy version) to create an AI capable of autonomously navigating and solving the challenges within the game.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages