Skip to content

Commit c16a9c2

Browse files
committed
Merge branch 'main' into john/abclash
2 parents d148180 + 5835b2e commit c16a9c2

80 files changed

Lines changed: 4512 additions & 970 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.env.example

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,9 @@ OPENAI_API_KEY=
1111
GEMINI_API_KEY=
1212
XAI_API_KEY=
1313
DASHSCOPE_API_KEY=
14+
15+
# Optional: Claude via a custom Anthropic-compatible endpoint (mini_anthropic_model.AnthropicModel).
16+
# Used by the *_llama.yaml ladder configs. Set all three to route Claude through your endpoint.
17+
LLAMA_API_KEY=
18+
LLAMA_BASE_URL=
19+
LLAMA_MODEL=

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Project specific
22

3+
# macOS
4+
.DS_Store
5+
36
.vscode/**
47
*.ipynb
58
*.traj.json
@@ -230,3 +233,6 @@ docs/visualization/*.jsonl
230233
docs/visualization/*.png
231234
docs/visualization/code_org
232235
docs/visualization/elo_plots
236+
237+
# Per-model llama endpoint configs — kept local only (obscures internal API details)
238+
configs/mini/models/

.pre-commit-config.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
ci:
22
autoupdate_commit_msg: "chore: update pre-commit hooks"
33

4-
exclude: '\.ipynb\.py$'
4+
# Skip notebooks-as-py and committed sample logs (raw game data + imported bot source).
5+
exclude: '\.ipynb\.py$|^logs/'
56

67
repos:
78
- repo: https://github.com/pre-commit/pre-commit-hooks

CONTRIBUTING.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,13 +101,13 @@ CodeClash/
101101
│ ├── agents/ # AI agent implementations (MiniSWEAgent, etc.)
102102
│ ├── arenas/ # Game arena implementations
103103
│ ├── analysis/ # Post-tournament analysis tools
104+
| ├── cli/ # CLI entrypoint
104105
│ ├── tournaments/ # Tournament orchestration
105106
│ ├── viewer/ # Web-based results viewer
106107
│ └── utils/ # Shared utilities
107108
├── configs/ # Tournament configuration files
108109
├── docs/ # Documentation (MkDocs)
109-
├── tests/ # Test suite
110-
└── main.py # Main entry point
110+
└── tests/ # Test suite
111111
```
112112

113113
## Types of Contributions
@@ -170,7 +170,7 @@ Analysis tools live in `codeclash/analysis/`. We're particularly interested in:
170170
| Preview docs | `uv run mkdocs serve` |
171171
| Build wheel | `uv build --wheel` |
172172
| Build wheel + sdist | `uv build` |
173-
| Run a tournament | `uv run python main.py <config>` |
173+
| Run a tournament | `uv run codeclash run <config>` |
174174
| View results | `uv run python scripts/run_viewer.py` |
175175

176176
### Building Distributions

README.md

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ uv sync --extra dev
5454
cp .env.example .env # Then edit .env with your GITHUB_TOKEN
5555

5656
# Run a test battle
57-
uv run python main.py configs/test/battlesnake.yaml
57+
uv run codeclash run configs/test/battlesnake.yaml
5858
```
5959

6060
> [!TIP]
@@ -66,14 +66,14 @@ uv run python main.py configs/test/battlesnake.yaml
6666

6767
```bash
6868
pip install -e '.[dev]'
69-
python main.py configs/test/battlesnake.yaml
69+
codeclash run configs/test/battlesnake.yaml
7070
```
7171
</details>
7272

7373
Once this works, you should be set up to run a real tournament!
7474
To run *Claude Sonnet 4.5* against *o3* in a *BattleSnake* tournament with *5 rounds* and *1000 competition simulations* per round, run:
7575
```bash
76-
uv run python main.py configs/examples/BattleSnake__claude-sonnet-4-5-20250929__o3__r5__s1000.yaml
76+
uv run codeclash run configs/examples/BattleSnake__claude-sonnet-4-5-20250929__o3__r5__s1000.yaml
7777
```
7878

7979
## ⚔️ How It Works
@@ -82,7 +82,7 @@ uv run python main.py configs/examples/BattleSnake__claude-sonnet-4-5-20250929__
8282
<img src="docs/assets/flowchart.jpg" style="width: 70%" />
8383
</p>
8484

85-
In CodeClash, 2+ LM agents compete in a **code arena** over the course of a multi-round tournament.
85+
In CodeClash, 2+ coding agents compete in a **code arena** over the course of a multi-round tournament.
8686

8787
For the duration of the tournament, each agent is iteratively improving their own codebase to win a high-level, competitive objective (e.g., accumulate resources, survive the longest, etc).
8888

@@ -100,18 +100,6 @@ The winner is the LM agent who wins the most rounds.
100100
CodeClash includes competitive programming games and simulation-backed arenas, including BattleSnake,
101101
Bomberland, CoreWar, CybORG, Halite, HuskyBench, RoboCode, RobotRumble, and SCML.
102102

103-
Bomberland is a Bomberman-style grid arena based on Coder One's Bomberland competition. Agents edit
104-
a Python `bomberland_agent.py` implementation and compete to maximize average score across seeded
105-
simulations through survival, damage, kills, and destructible-block control.
106-
107-
SCML is a supply-chain negotiation arena based on the ANAC Supply Chain Management League OneShot
108-
track. Agents edit a Python `scml_agent.py` implementation and compete to maximize average profit
109-
across multiple simulated supply-chain worlds.
110-
111-
CybORG is a simulated cyber-defense arena based on the CAGE Challenge 3 DroneSwarm scenario. Agents
112-
edit a Python `cyborg_agent.py` implementation and compete to maximize blue-team reward across
113-
simulated episodes.
114-
115103
## 🚀 Get Involved
116104

117105
- Check out our [docs](https://docs.codeclash.ai/) for more details on running different arenas, configuring tournaments, etc.

0 commit comments

Comments
 (0)