Skip to content

Jonathanace/Balatro-Gym

Repository files navigation

Balatro-Gym

A Gymnasium environment for the game Balatro for use with reinforcement learning (RL) libraries such as TorchRL and Stable Baselines3. Also includes RL training and evaluation scripts.

Demonstration

In these videos, the policy is performing rollouts of game hands to learn from. All gameplay is completely automated on a live game client using the balatrobot API and requires no human input. Full training speed (512x) to accelerate rollouts is accomplished using the HandyBalatro mod.

Human Speed Training Loop

MedalTVBalatro20251201100130899.mp4

Full Speed Training Loop

MedalTVBalatro20251201101800555.mp4

Evaluation

Coming soon

Installation

Coming soon

Usage

Coming soon

Requirements

Todo

  • Improve observation space definition to account for complex hand space embedding.
  • Add engineered features to observation space such as has_flush.
  • Add basic features to observation space such as hands_left.
  • Refactor network architecture to include multi-head output for shop decisions.
  • Improve README Evaluation, Installation, Usage, and Requirements sections.

The project has an associated feature board that you can view here.

About

A Gymnasium environment for the game Balatro

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages