Skip to content

Clean up ladder configs, agent observations, and BattleSnake validation#116

Merged
john-b-yang merged 19 commits into
mainfrom
john/clean-configs
Jul 7, 2026
Merged

Clean up ladder configs, agent observations, and BattleSnake validation#116
john-b-yang merged 19 commits into
mainfrom
john/clean-configs

Conversation

@john-b-yang

@john-b-yang john-b-yang commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Non-SCML improvements split out from the john/scml-ladder branch. Mostly a config reorg plus a few functional fixes.

Config reorganization (most of the diff)

  • configs/main/ → configs/pvp/ (all 1v1 head-to-head runs)
  • configs/ablations/ladder/ → configs/ladder/ (it's an eval mode, not an ablation)
  • configs/models.yaml → configs/mini/model_roster.yaml
  • Updated all !include paths and code/docs/scripts references to match.

Ladder

  • Centralize win conditions: extract the duplicated ladder_rules block into a shared configs/ladder/ladder_rules.yaml (min_round_wins: 2,
    win_last_k: 0) included by every run config; adds the min_round_wins/win_last_k schema + validation in _resolve_ladder_rules.
  • Give ladder climbers an adversarial task prompt (ladder_prompt.yaml): tells the model it's writing code to beat an opponent (previously just
    "BattleSnake ladder" + a cooperative-relay framing). Arena specifics inject via a new {{arena_description}} template var, exposed from the
    arena's static description through GameContext.
  • Echo the advancement rule to the console at run start.

Fixes

  • Validate BattleSnake submissions keep their if name == "main" entrypoint: a main.py that drops it passed validation but failed to start at runtime (silent forfeit).
  • Image-construction lock in arena.py.
  • Fix a stale single_player.md doc reference.

Cleanup

  • Remove configs/ablations/vs_human/ and 7 redundant/stale example configs; repoint docs (quickstart, etc.) at real pvp/ configs.
  • Add matplotlib to the dev extra (analysis/elo).

john-b-yang and others added 19 commits July 7, 2026 02:25
Add a global observation_template in configs/mini/default.yaml with a
[Step n/limit used - k left] banner, and thread it onto the model via a
ClashAgentConfig field pushed in ClashAgent.__init__. Applies to every model
backend, tournament type, and arena; models otherwise learn the step limit only
once at round start with no running counter.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
validate_code was a pure function-def check, so a main.py that drops the
'if __name__ == "__main__": run_server(...)' block passed validation but
failed to start at runtime (forfeit). Require the entrypoint statically.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Every ladder run config duplicated the same ladder_rules block. Extract it to
configs/ablations/ladder/ladder_rules.yaml (min_round_wins: 2, win_last_k: 0)
and include it from all run configs so the win condition lives in one place.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Required by codeclash.analysis (elo plots + ranking).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Unify with scml-ladder's behavior: echo the advancement rule to stdout (in
addition to logging it) at the start of a ladder run.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Ladder run configs only set game_description to e.g. 'BattleSnake ladder', so a
climbing model was never told it's writing code to defeat an opponent (the shared
instance template even frames rounds as a cooperative relay). Add a shared
ladder_prompt.yaml with an arena-agnostic prompt that states the adversarial task
and pulls in arena specifics via a new {{arena_description}} template var (exposed
from the arena's static description through GameContext). All 19 run configs
include it; make_* build configs are unaffected.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@john-b-yang john-b-yang merged commit 9d36a75 into main Jul 7, 2026
5 checks passed
@john-b-yang john-b-yang deleted the john/clean-configs branch July 7, 2026 04:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant