Attol8/balatro-ai

An LLM bot with exact numerical tools that clears Balatro on the real game, including Black Deck on Gold Stake.

Python

11

111 commits

updated Sep 25, 2026

See the code

See what people are saying

SourceMessageScoreDate

Yes, Claude can do nine loops

I don’t know how much you find the use of numerical things or a tailored system an issue vs “here’s balatro let’s go” but this might be of interest https://github.com/Attol8/balatro-ai

0

Sep 25, 2026

README

Balatro AI

Black Deck. Gold Stake. Beaten by a bot.

To our knowledge, the first publicly documented bot to beat Balatro on Black Deck / Gold Stake — widely regarded as the game's toughest deck at its highest difficulty. Two fresh random seeds, two verified wins, both with a hand to spare. Watch the victory and inspect the full traces.

Two Black Deck / Gold Stake wins. Ante 13 in endless. A 134-billion-chip hand.

GPT-6 Astra plays real Balatro: building a deck, buying Jokers, choosing hands, and pushing into endless mode. The model makes the strategic decisions; Python supplies numerical tools and executes legal actions through BalatroBot. It plays from public information, with no access to the seed, hidden draw order or future shops.

Black Deck · Gold StakeEndless · Red / WhitePeak single hand · Red / White
2 fresh-seed winsAnte 13 reached134,231,931,235 chips
Victory tracesThe runScoring evidence

Watch it play · Results · Quick start · How it works · Docs

Watch it play

Time-lapse of Balatro gameplay on the left and the bot's live decision dashboard on the right

One full game in twenty seconds. The game on the left, the live dashboard on the right. This Red Deck / White Stake run cleared Ante 8, reached Ante 11 in endless, and peaked at 7,052,918 chips in one hand. No human gameplay input; one automatic recovery. Watch the MP4 · Read the run trace.

What it does

  • Plays a complete game, with optional continuation into endless mode.
  • Evaluates legal hands, discard options, scoring combinations and upcoming blinds.
  • Uses public game information: the model receives no seed, future shop contents or hidden draw order.
  • Supports headless play, bounded runs, checked resumes and a live status dashboard.
  • Saves decisions and outcomes so each run can be inspected afterwards.

The model makes strategic decisions; Python supplies calculations, validates responses and sends actions to the game. Scoring is exact for supported deterministic situations; random or hidden effects can limit the advice available. How it works.

Results

A win means clearing the Ante 8 boss. These are documented runs from several bot versions, not a measured win rate or a guarantee of reliable wins.

SettingDemonstrated resultEvidence
Red Deck / White StakeFive published Astra Ante 8 clears across earlier versions; highest ante reached: 13Results and run disclosures
Red Deck / White Stake, highest score134,231,931,235 chips in one handAnte 13 run
Black Deck / Gold StakeTwo fresh-seed wins: 435,408 / 400,000 and 420,305 / 400,000, both with one hand unusedFull traces and rules audit
Non-model baselinesBest policies won 3 of 20 games on a fixed Red/White seed panelBenchmark tables

The coached runs are not a matched comparison with the baseline panel. Development included losses, some earlier games used fixes between segments, and the two Black/Gold wins do not establish a success rate. The reports retain failures, restarts, policy versions and scoring discrepancies.

Black Deck. Gold Stake. One hand to spare.

Native Balatro victory screen: Black Deck on Gold Stake, 420,305 chips against 400,000, with one hand remaining

The recorded Black/Gold win. Both fresh-seed wins cleared the Ante 8 boss with one hand unused. Full traces and cumulative stake-rule audit.

How far did each policy get?

Ante reached by non-model baseline policies and individual model-coached runs

Red Deck / White Stake: dots show baseline games; stars show individual model runs. The best baseline policies won 3 of 20 games on the fixed seed panel. The Astra runs demonstrate deeper endless play, but use different policy versions and mostly different seeds; this is not a matched win-rate comparison. Complete benchmark tables.

Keeping up with the blinds

Best single-hand score per blind against the growing chip requirement in the archived Astra runs

Dots show the best single hand in each blind; the grey steps show the chip requirement. A blind can take multiple hands to clear. These are the archived Red/White runs; the Black/Gold wins are reported separately above. Scoring details and run disclosures.

Quick start

Requires Python 3.11+, macOS or Linux, your own copy of Balatro with BalatroBot installed, and access to the configured model through a signed-in Codex CLI. This repository includes no game assets. Run these commands from a local checkout:

python3 -m venv .venv
source .venv/bin/activate
pip install -e .
codex login

Start the game server headlessly in one terminal:

BALATROBOT_ALL_UNLOCKED=1 uvx balatrobot serve --fast --headless --logs-path runs/logs

In another terminal with the same virtual environment activated:

balatro doctor
balatro play --output runs/game-001

The default is Red Deck / White Stake, stopping after the Ante 8 win. To play Black Deck / Gold Stake instead:

balatro play --deck BLACK --stake GOLD --output runs/black-gold-001

Use --endless to continue after Ante 8. Each run uses model calls and records its result and action history. Run one game instance at a time. Run limits, resumes, supervision and inspection.

Scope and limitations

The published runs use the native game with BalatroBot automation and an all-unlocked profile. This bypasses content unlock progression; it is a modded setup, not a fresh-account achievement run. The Black/Gold report checks every cumulative stake rule against the recorded game state.

The bot uses numerical assistance rather than vision alone. Its decisions can be suboptimal, scoring advice has coverage limits, and model-service timeouts can interrupt runs. Reliability across a representative seed set remains unmeasured. Evaluation methodology.

Development

Tests use recorded observations and fake transports; they do not start the game or spend model calls.

pip install -e '.[dev,bench]'
pytest -q
ruff check .
python -m benchmarks

For small checks before a full run, see decision probes. See CONTRIBUTING.md for validation and evidence requirements, and the documentation index for technical details.

License

Code is licensed under the GNU Affero General Public License v3.0 or later (LICENSE). Documentation, evidence and generated results are CC BY 4.0 (LICENSE-DOCS). Balatro is a game by LocalThunk, published by Playstack; this project is unaffiliated and includes no game assets. BalatroBot is MIT licensed by Coder. See NOTICE. To cite, use CITATION.cff.

balatro
codex
game-ai
llm-agents

Contributors

Attol8

111 commits

Attol8/balatro-ai

An LLM bot with exact numerical tools that clears Balatro on the real game, including Black Deck on Gold Stake.

Python

11

111 commits

updated Sep 25, 2026

See the code

See what people are saying

SourceMessageScoreDate

Yes, Claude can do nine loops

I don’t know how much you find the use of numerical things or a tailored system an issue vs “here’s balatro let’s go” but this might be of interest https://github.com/Attol8/balatro-ai

0

Sep 25, 2026

README

Balatro AI

Black Deck. Gold Stake. Beaten by a bot.

To our knowledge, the first publicly documented bot to beat Balatro on Black Deck / Gold Stake — widely regarded as the game's toughest deck at its highest difficulty. Two fresh random seeds, two verified wins, both with a hand to spare. Watch the victory and inspect the full traces.

Two Black Deck / Gold Stake wins. Ante 13 in endless. A 134-billion-chip hand.

GPT-6 Astra plays real Balatro: building a deck, buying Jokers, choosing hands, and pushing into endless mode. The model makes the strategic decisions; Python supplies numerical tools and executes legal actions through BalatroBot. It plays from public information, with no access to the seed, hidden draw order or future shops.

Black Deck · Gold StakeEndless · Red / WhitePeak single hand · Red / White
2 fresh-seed winsAnte 13 reached134,231,931,235 chips
Victory tracesThe runScoring evidence

Watch it play · Results · Quick start · How it works · Docs

Watch it play

Time-lapse of Balatro gameplay on the left and the bot's live decision dashboard on the right

One full game in twenty seconds. The game on the left, the live dashboard on the right. This Red Deck / White Stake run cleared Ante 8, reached Ante 11 in endless, and peaked at 7,052,918 chips in one hand. No human gameplay input; one automatic recovery. Watch the MP4 · Read the run trace.

What it does

  • Plays a complete game, with optional continuation into endless mode.
  • Evaluates legal hands, discard options, scoring combinations and upcoming blinds.
  • Uses public game information: the model receives no seed, future shop contents or hidden draw order.
  • Supports headless play, bounded runs, checked resumes and a live status dashboard.
  • Saves decisions and outcomes so each run can be inspected afterwards.

The model makes strategic decisions; Python supplies calculations, validates responses and sends actions to the game. Scoring is exact for supported deterministic situations; random or hidden effects can limit the advice available. How it works.

Results

A win means clearing the Ante 8 boss. These are documented runs from several bot versions, not a measured win rate or a guarantee of reliable wins.

SettingDemonstrated resultEvidence
Red Deck / White StakeFive published Astra Ante 8 clears across earlier versions; highest ante reached: 13Results and run disclosures
Red Deck / White Stake, highest score134,231,931,235 chips in one handAnte 13 run
Black Deck / Gold StakeTwo fresh-seed wins: 435,408 / 400,000 and 420,305 / 400,000, both with one hand unusedFull traces and rules audit
Non-model baselinesBest policies won 3 of 20 games on a fixed Red/White seed panelBenchmark tables

The coached runs are not a matched comparison with the baseline panel. Development included losses, some earlier games used fixes between segments, and the two Black/Gold wins do not establish a success rate. The reports retain failures, restarts, policy versions and scoring discrepancies.

Black Deck. Gold Stake. One hand to spare.

Native Balatro victory screen: Black Deck on Gold Stake, 420,305 chips against 400,000, with one hand remaining

The recorded Black/Gold win. Both fresh-seed wins cleared the Ante 8 boss with one hand unused. Full traces and cumulative stake-rule audit.

How far did each policy get?

Ante reached by non-model baseline policies and individual model-coached runs

Red Deck / White Stake: dots show baseline games; stars show individual model runs. The best baseline policies won 3 of 20 games on the fixed seed panel. The Astra runs demonstrate deeper endless play, but use different policy versions and mostly different seeds; this is not a matched win-rate comparison. Complete benchmark tables.

Keeping up with the blinds

Best single-hand score per blind against the growing chip requirement in the archived Astra runs

Dots show the best single hand in each blind; the grey steps show the chip requirement. A blind can take multiple hands to clear. These are the archived Red/White runs; the Black/Gold wins are reported separately above. Scoring details and run disclosures.

Quick start

Requires Python 3.11+, macOS or Linux, your own copy of Balatro with BalatroBot installed, and access to the configured model through a signed-in Codex CLI. This repository includes no game assets. Run these commands from a local checkout:

python3 -m venv .venv
source .venv/bin/activate
pip install -e .
codex login

Start the game server headlessly in one terminal:

BALATROBOT_ALL_UNLOCKED=1 uvx balatrobot serve --fast --headless --logs-path runs/logs

In another terminal with the same virtual environment activated:

balatro doctor
balatro play --output runs/game-001

The default is Red Deck / White Stake, stopping after the Ante 8 win. To play Black Deck / Gold Stake instead:

balatro play --deck BLACK --stake GOLD --output runs/black-gold-001

Use --endless to continue after Ante 8. Each run uses model calls and records its result and action history. Run one game instance at a time. Run limits, resumes, supervision and inspection.

Scope and limitations

The published runs use the native game with BalatroBot automation and an all-unlocked profile. This bypasses content unlock progression; it is a modded setup, not a fresh-account achievement run. The Black/Gold report checks every cumulative stake rule against the recorded game state.

The bot uses numerical assistance rather than vision alone. Its decisions can be suboptimal, scoring advice has coverage limits, and model-service timeouts can interrupt runs. Reliability across a representative seed set remains unmeasured. Evaluation methodology.

Development

Tests use recorded observations and fake transports; they do not start the game or spend model calls.

pip install -e '.[dev,bench]'
pytest -q
ruff check .
python -m benchmarks

For small checks before a full run, see decision probes. See CONTRIBUTING.md for validation and evidence requirements, and the documentation index for technical details.

License

Code is licensed under the GNU Affero General Public License v3.0 or later (LICENSE). Documentation, evidence and generated results are CC BY 4.0 (LICENSE-DOCS). Balatro is a game by LocalThunk, published by Playstack; this project is unaffiliated and includes no game assets. BalatroBot is MIT licensed by Coder. See NOTICE. To cite, use CITATION.cff.

balatro
codex
game-ai
llm-agents

Contributors

Attol8

111 commits

Languages

Python

94.6%

HTML

4.3%