Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/msosav/zelda-reinforcement-learning
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.
https://github.com/msosav/zelda-reinforcement-learning
gameboy reinforcement-learning the-legend-of-zelda
Last synced: about 2 months ago
JSON representation
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.
- Host: GitHub
- URL: https://github.com/msosav/zelda-reinforcement-learning
- Owner: msosav
- License: mit
- Created: 2024-06-22T14:56:49.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2024-11-06T19:42:32.000Z (2 months ago)
- Last Synced: 2024-11-06T20:33:24.370Z (2 months ago)
- Topics: gameboy, reinforcement-learning, the-legend-of-zelda
- Language: Python
- Homepage:
- Size: 119 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# 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
```bash
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.```bash
python3.11 -m venv venv
source venv/bin/activate
```Install the requirements
```bash
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:
```bash
python main.py train
```### Testing
To test the agent, run the following command:
```bash
python main.py test ./checkpoints/.zip
```Example:
```bash
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