# Reproduce the chip-race examples

These are three fixed, constructed teaching cases, not observed poker play or random simulations. Rules and product sources were accessed September 14, 2026.

Download all files in this directory together. With Python 3.10 or later and no third-party packages, run:

```text
python generate.py
python verify.py
python -O verify.py
```

The generator reads `inputs.json` and writes `results.json` beside itself. It sorts all assigned cards and skips players who already received an ordinary award. The verifier independently ranks each player's highest card, checks the known final stacks and totals, then checks invalid/excluded inputs. No seed or sample count applies: the cards are fixed inputs. Compare file bytes against `SHA256SUMS` before and after generation to identify this release.

The base case starts with A 675, B 75, C 550. Eight leftover 25-value chips fund two 100-value race awards to A and C. B has no other chips and receives 100 protection. Final stacks are A 700, B 100, C 600: the 100 increase is exactly the protection award. If B began with another 100, there is no protection; if B wins an ordinary race chip, there is also no protection. All three cases are in the JSON files.

## Scope

Only the declared 25-to-100 profile with exactly divisible pooled remainders is supported. The initial stacks are complete, 100 is the lowest denomination still in play, and no designated player buys others' chips before the race. The examples have distinct card ranks. The implementation orders equal ranks by spades, hearts, diamonds, clubs as an explicit fallback; no published example depends on it. This is not a general input validator or tournament ruling engine. Fractional pooled awards, alternative round-up procedures, discovered-later chips, disputed counts, chip consolidation, stack equity, betting decisions and profit effects are outside the calculation.

## Rule sources

- [Official TDA 2026 release announcement and document package](https://www.pokertda.com/forum/index.php?topic=1759.0): version 1.0, September 6, 2026, Rule 26. The general TDA web rules page still showed 2024 when checked; use the package linked by the official announcement.
- [2026 WSOP Tournament Rules](https://assets.wsopcdn.com/wsop/1a72ba28-781c-409d-a9c3-5ca13c4c5718.pdf): Rule 77, page 18. Independently supports capped awards, last-chip protection and the distinct discovered-later policy.
- [Ace Poker League](https://acepokerleague.com/apl-tda/): General Procedures 2 supports card-per-chip allocation and highest-card award capped at one per player. Its other house procedures are not imported into this calculation.
- [Nuts Poker League](https://www.thenutspokerleague.com/go/rules): D2 distinguishes racing from a director-selected round-up alternative and states all cards per player before moving on; D9 gives the suit ordering. These are operator-specific provisions.

`walkthrough.html` is an original offline four-stage rehearsal. Open it in a browser. Previous, Next and Reset revisit the fixed example; Show all steps exposes every stage. With JavaScript disabled, all stages remain visible. Printing includes all stages. No data is submitted or persisted. The complete article is at [GTO Gecko](https://gtogecko.com/blog/poker-chip-race).
