r/MachineLearning • u/Jetwash787 • 6d ago
Project BalatroNET: JAX-Native Reimplementation of Balatro's Mechanics for Reinforcement Learning [P]
I've been working on this for a few months now and finally got to a full recreation of the base game (antes 1-8 any deck or stake, but no endless or challenge runs). The main artifact is the environment: jitted, vmapped implementation that can run in parallel on GPUs. I have also worked on a simple agent and a pygame front end where you can step through a run and observe the agent's choices.
I've done some training on an RTX 2070S, the agent can pass white stake red deck about 50% of the time after 6.6 billion training moves. This approach is faster than other implementations such as balatro-gym, which can only run on a CPU, and in my testing (AMD 9800X3D), hits about 1,700 steps/s (per core) while running random actions. On this 2019 GPU, training runs at 16,000 steps/s, all while holding the environment, observation, and performing the network's forward pass and gradient updates.
I'm now opening this up to the public to share progress and see what insights people are willing to give.
1
u/GlennMatlin 2d ago
Eager to see AI on balatro
1
u/Spragueboy 6d ago
Seems like this has been independently worked on in a few place this repo is citing high 90s in white stake and approx 10% in gold stake. I recently also cooked up a run That gets around a 30% winrate on gold stake