Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

This project uses stable-retro, a modern fork of openai gym-retro

🦔 Sonic the Hedgehog AI Agent with Stable Baselines3

Sonic Gameplay Demo
Agent playing Sonic after 1 million training steps

This project trains an AI agent to play Sonic the Hedgehog using Proximal Policy Optimization (PPO) from Stable Baselines3. The agent was trained for 1 million timesteps on the Sonic and Knuckles Genesis game.

A video of an unedited run with three lifes can be found here

📦 Installation

This project uses python 3.10

Using uv

uv venv -p 3.10 # Creates virtual environment (Python 3.10)
source .venv/bin/activate  # Linux/Mac
uv sync

Using requirements.txt

pip install -r requirements.txt

After installing stable-retro, import the rom:

python -m retro.import ./rom

🚀 Usage

Training

python training.py

Recording / Viewing Gameplay

python record.py

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages