Generate a complete retro reinforcement-learning project built around Stable
Retro and the datenwissenschaften training toolkit.
The generated project includes:
- a runnable
Airstriker-Genesis-v0example - YAML-based paths and training configuration
- a state-machine Gymnasium wrapper
- typed RAM decoding and reward shaping
- a reduced discrete action space
- recurrent PPO with random network distillation
- local training telemetry and controls
- Poetry, Black, Ruff, and pre-commit configuration
Install Cookiecutter and generate a project:
pipx install cookiecutter
cookiecutter https://github.com/datenwissenschaften/retro-arena
cd your-project-name
poetry install
poetry run python app.pyThe generated Airstriker example uses the redistributable game and Level1
savestate shipped with Stable Retro. A commercial ROM is not required for the
first run.
your-project/
├── app.py
├── config.yaml
├── pyproject.toml
├── roms/
└── src/
├── game/
│ ├── actions.py
│ └── wrapper.py
├── ram/
│ └── airstriker.py
└── states/
└── survive.py
app.py connects the Airstriker wrapper, recurrent RND model, and trainer.
config.yaml is the single source for game selection, savestate, paths,
training budget, uploads, logging, and the local UI. Generated paths are
relative, so a project can be moved without editing machine-specific values.
The example wrapper converts the Genesis controller to ten useful discrete movement-and-fire actions. It emits 96×96 RGB observations plus typed score, lives, and game-over RAM. The training state rewards score and survival, penalizes lost lives, and limits episode length.
To train another game:
- Change
training.gameandtraining.savestateinconfig.yaml. - Replace the controller mapping in
src/game/actions.py. - Define verified RAM offsets in
src/ram/. - Implement game-specific rewards and termination in
src/states/. - Register those types in
src/game/wrapper.py.
Place legally obtained ROMs in roms/. Stable Retro imports them when the
training process starts. Do not commit commercial ROMs or API credentials.
| Variable | Purpose |
|---|---|
project_name |
Human-readable project name |
project_slug |
Distribution and directory name |
version |
Initial project version |
description |
Project summary |
author_name |
Package author |
author_email |
Package author email |
license |
SPDX license expression |
python_requires |
Supported Python range |
python_classifier |
Python classifier version |
python_target |
Black and Ruff target |
development_status |
PyPI development status |
GPL-3.0-only
