How goodhart-labs/beat-stockfish works
This repository packages a chess-playing evaluation: the runner creates isolated episodes, sets up the task, lets a model act through a bash tool, then runs the shipped grader and records a score. Within an episode, the agent uses the arena client to communicate with the authoritative match service; that service tracks the game and can relay UCI engine traffic. Grading checks the service-written state against a shared contract. The graph focuses on runtime behavior, not image construction. Some runner-to-episode details are documented rather than fully visible in the excerpts.
Main entry points: rollout.py Episode runner · matchd.py Match service · task.py Task setup · run_grader.py Grader launcher
Components 16
Evaluation runner
- Episode runner
run/rollout.py - Variant manifest
generated/runtime-variants.json
Episode interaction
- Playing agent
- Task setup
task.py - Arena client
task_assets/arena.py - Bash tool
run/rollout.py
Match services
- Match service
task_assets/matchd.py - Authoritative match state
- Opponent engine
- UCI engine relay
task_assets/matchd.py
Grading
- State contract
grader/submission_contract.py - Grader launcher
bases/inspect-runner/shim-src/run_grader.py - Episode grader
grader/grader.py - Recorded grade
Other components
- Evaluation operator
- Model provider
Connections 21
- Evaluation operator → Episode runner: starts runs
README.md - Episode runner → Variant manifest: reads variants
run/rollout.py - Episode runner → Model provider: requests completions
run/rollout.py - Episode runner → Task setup: runs setup
run/rollout.py - Task setup → Match service: starts service
task.py - Task setup → Playing agent: renders prompt
task.py - Episode runner → Bash tool: provides tool
run/rollout.py - Playing agent → Bash tool: issues commands
README.md - Playing agent → Arena client: uses client
- Arena client → Match service: requests game actions
task_assets/arena.py - Match service → Authoritative match state: writes state
- Match service → State contract: uses state shape
task_assets/matchd.py - Match service → Opponent engine: runs opponent
task_assets/matchd.py - Match service → UCI engine relay: serves UCI relay
task_assets/matchd.py - UCI engine relay → Opponent engine: starts engine
task_assets/matchd.py - Episode runner → Grader launcher: runs grading
run/rollout.py - Grader launcher → Episode grader: invokes grader
bases/inspect-runner/shim-src/run_grader.py - Episode grader → State contract: imports contract
grader/grader.py - Episode grader → Authoritative match state: reads state
grader/grader.py - Grader launcher → Recorded grade: writes grade
bases/inspect-runner/shim-src/run_grader.py - Episode runner → Recorded grade: reads score
run/rollout.py