|
| 1 | +# Ladder Tournament |
| 2 | + |
| 3 | +A ladder is a ranked list of opponents, weakest first. |
| 4 | +One model (the "climber") plays them one rung at a time and keeps going until it fails to advance. |
| 5 | +Its score is how high it climbs. |
| 6 | + |
| 7 | +## Two commands |
| 8 | + |
| 9 | +Build the ladder once — ranks the human bots by round-robin: |
| 10 | + |
| 11 | +```bash |
| 12 | +uv run codeclash ladder make configs/ladder/make_battlesnake.yaml |
| 13 | +``` |
| 14 | + |
| 15 | +Then send a model up it: |
| 16 | + |
| 17 | +```bash |
| 18 | +uv run codeclash ladder run configs/ladder/battlesnake__opus_4_8.yaml |
| 19 | +``` |
| 20 | + |
| 21 | +Resume an interrupted climb from its log dir (needs `push: True`): |
| 22 | + |
| 23 | +```bash |
| 24 | +uv run codeclash ladder run configs/ladder/battlesnake__opus_4_8.yaml -r logs/<user>/LadderTournament... |
| 25 | +``` |
| 26 | + |
| 27 | +Options: `-c/--cleanup`, `-o/--output-dir`, `-s/--suffix`, `-k/--keep-containers`, `-r/--resume`. |
| 28 | + |
| 29 | +## Minimal run config |
| 30 | + |
| 31 | +```yaml |
| 32 | +tournament: |
| 33 | + rounds: 5 |
| 34 | +ladder_rules: !include ladder/ladder_rules.yaml |
| 35 | +game: |
| 36 | + name: RobotRumble |
| 37 | + sims_per_round: 250 |
| 38 | +player: |
| 39 | + agent: mini |
| 40 | + name: claude-sonnet-4-5 |
| 41 | + branch_init: human/anton/anton3000 |
| 42 | + config: |
| 43 | + agent: !include mini/default.yaml |
| 44 | + model: |
| 45 | + model_name: anthropic/claude-sonnet-4-5-20250929 |
| 46 | + push: True |
| 47 | +prompts: !include ladder/ladder_prompt.yaml |
| 48 | +ladder: !include ladder/rungs/robotrumble.yaml |
| 49 | +``` |
| 50 | +
|
| 51 | +`ladder` is the ranked opponent list; `player` is the climber. |
| 52 | + |
| 53 | +## Advancement settings (`ladder_rules`) |
| 54 | + |
| 55 | +These live in `configs/ladder/ladder_rules.yaml` and decide what it takes to clear a rung. |
| 56 | + |
| 57 | +**`min_round_wins`** (required) |
| 58 | +How many rounds the climber must win to move up a rung. |
| 59 | +Round 0, before any edits, doesn't count. |
| 60 | + |
| 61 | +**`win_last_k`** (required) |
| 62 | +Also require winning the last `k` rounds — `1` means just the final round. |
| 63 | +Set to `0` to turn this off. |
| 64 | + |
| 65 | +**`early_clinch`** (optional) |
| 66 | +Stop a rung early the moment the climber has already won `min_round_wins` rounds. |
| 67 | +Saves time, and the outcome is identical to playing every round. |
| 68 | +Only allowed when `win_last_k` is `0`. |
| 69 | + |
| 70 | +**`fast_forward`** (optional) |
| 71 | +Skip a rung entirely if the climber already crushes it before making any edits. |
| 72 | +It plays only round 0; if the climber wins at least `min_sim_win_rate` of the sims, the rung clears. |
| 73 | + |
| 74 | +## Copy-paste examples |
| 75 | + |
| 76 | +Win 2+ of `n` rounds: |
| 77 | + |
| 78 | +```yaml |
| 79 | +min_round_wins: 2 |
| 80 | +win_last_k: 0 |
| 81 | +``` |
| 82 | + |
| 83 | +Win 2+ rounds, and the final round must be one of them: |
| 84 | + |
| 85 | +```yaml |
| 86 | +min_round_wins: 2 |
| 87 | +win_last_k: 1 |
| 88 | +``` |
| 89 | + |
| 90 | +Fastest eval: |
| 91 | + |
| 92 | +```yaml |
| 93 | +min_round_wins: 2 |
| 94 | +win_last_k: 0 |
| 95 | +early_clinch: true |
| 96 | +fast_forward: |
| 97 | + enabled: true |
| 98 | + min_sim_win_rate: 0.9 |
| 99 | +``` |
| 100 | + |
| 101 | +* Win 2+ of `n` rounds |
| 102 | +* `early_clinch`: If the model wins 2 rounds before playing all `n`, skip remaining rounds |
| 103 | +* `fast_forward`: If the model's current solution beats the next opponent, skip playing that opponent all together. |
| 104 | + |
| 105 | +--8<-- "docs/_footer.md" |
0 commit comments