Skip to content

Commit 381cdfa

Browse files
committed
Minor config tweaks
1 parent 4d1ab9d commit 381cdfa

3 files changed

Lines changed: 4 additions & 5 deletions

File tree

codeclash/tournaments/ladder.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,8 @@ def resolve_ladder_rules(ladder_rules: dict, rounds: int) -> tuple[int, int]:
4545
- ``win_last_k``: the player must win the last ``win_last_k`` round(s). ``1`` means just the final
4646
round; ``0`` disables the trailing-rounds requirement entirely. Must be ``<= min_round_wins``.
4747
48-
The baseline round 0 (identical, un-edited codebases) is excluded from the count — it reflects
49-
game variance, not the agent — so wins are counted over the ``rounds`` rounds the agent actually
50-
edits (rounds 1..``rounds``).
48+
Round 0 (before any edits against this opponent) is excluded — identical codebases at the first
49+
rung, the agent's carried-over codebase at later rungs — so only rounds 1..``rounds`` count.
5150
5251
Raises:
5352
ValueError: if either key is missing or fails validation.

configs/ladder/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ ladder_rules:
5454
win_last_k: 0 # ...and must win the last K rounds (1 == just the final round, 0 == disabled)
5555
```
5656
57-
Both keys are **required** — there are no defaults; a config that omits either one errors out. `min_round_wins` is a whole number: the player advances when `player_wins >= min_round_wins`. The baseline round 0 (identical, un-edited codebases) is excluded, so with `tournament.rounds: 5` there are 5 scored agent rounds (rounds 1–5). Validation:
57+
Both keys are **required** — there are no defaults; a config that omits either one errors out. `min_round_wins` is a whole number: the player advances when `player_wins >= min_round_wins`. Round 0 (before any edits against the opponent — identical codebases at the first rung, carried-over at later rungs) is excluded, so with `tournament.rounds: 5` there are 5 scored agent rounds (rounds 1–5). Validation:
5858

5959
- `min_round_wins` must be an integer with `1 <= min_round_wins <= tournament.rounds`.
6060
- `win_last_k` must be an integer with `0 <= win_last_k <= min_round_wins`. `0` **disables** the trailing-rounds requirement; `1` means "just win the final round".

configs/ladder/ladder_prompt.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ game_description: |-
99
review how earlier rounds went (past match logs are in `/logs/`) and make your bot stronger.
1010
1111
{{working_dir}} is your codebase, which contains both your bot and supporting assets, and all of your
12-
commands will be executed in the {{working_dir}} directory (see notes below).
12+
commands will be executed in the {{working_dir}} directory.
1313
1414
Your goal is to beat the opponent. The game's rules and your bot's entry point are documented in the
1515
codebase (`docs/`).

0 commit comments

Comments
 (0)