Skip to content

A learning experiment exploring how to teach an AI model how to play the game Tetris for GameBoy using StableBaselines3 and PyBoy.

License

Notifications You must be signed in to change notification settings

jrlouis21/tetris_training

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tetris Training (Game Boy) — Gymnasium + Stable-Baselines3 + PyBoy

Train reinforcement learning agents to play Tetris for Game Boy using Gymnasium, Stable-Baselines3, and the PyBoy emulator.

This repo is a learning/experiment sandbox focused on reproducible SB3 training, parallel environments, and normalized rewards/observations.


Getting Started

Obtaining a ROM

Before training the model, you will need to have legally obtained a ROM of the Tetris game. The file should have a suffix of .gb. Once you have acquired this file you will need to move the file and name it to match the path ./roms/tetris.gb.

Running the Model (WIP)

# 1) install project dependencies
uv sync

# 2) train
uv run -m tetris_training.train

# 3) watch logs
tensorboard --logdir ./tetris_v2/training_data/tboard

References

  • Gymnasium - An API standard for reinforcement learning with a diverse collection of reference environments.
  • Stable-Baselines3 - a set of reliable implementations of reinforcement learning algorithms in PyTorch.
  • PyBoy - A Game Boy emulator written in Python.
  • uv - An extremely fast Python package and project manager, written in Rust.

License

MIT. See LICENSE

About

A learning experiment exploring how to teach an AI model how to play the game Tetris for GameBoy using StableBaselines3 and PyBoy.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages