Skip to content

Commit 023a73b

Browse files
committed
Add 2 new arenas
1 parent c9ab32a commit 023a73b

7 files changed

Lines changed: 144 additions & 0 deletions

File tree

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
---
2+
name: write-arena-page
3+
description: >-
4+
Write the codeclash.ai arena page for a CodeClash arena. Use when asked to
5+
"write/add an arena page", "document an arena on the website", or "write up
6+
<arena> for the site". Produces pages/arenas/<arena>.md matching site conventions.
7+
---
8+
9+
# Write an Arena Page
10+
11+
An arena page is a single markdown file, `pages/arenas/<arena>.md`, with a
12+
key-value front matter block followed by the write-up body. `server.py` serves it
13+
at `/arenas/<arena>/`, `templates/arena.html` renders it, and `templates/arenas.html`
14+
auto-lists it on the index (sorted by title) — **no registration anywhere else.**
15+
16+
## Learn the arena first (don't write from the description alone)
17+
18+
The prompt's blurb is a starting point, not the source of truth. Before writing:
19+
20+
1. **Read the arena class** `repo/codeclash/arenas/<arena>/<arena>.py` — its `name`,
21+
`submission` file, `description`, and `validate_code` define the exact bot contract.
22+
2. **Read the arena's own repo** (the Dockerfile `git clone`s `CodeClash-ai/<Arena>`).
23+
Its `README.md` + engine are the ground truth for rules, physics constants, the
24+
`obs`/state shape, actions, scoring, and win condition. Prefer engine code over the
25+
README when they disagree, and note the real starting conditions (e.g. balls that
26+
start at rest, side-swapping across seeded games).
27+
3. **Read the test config** `repo/configs/test/<arena>.yaml` for player count and the
28+
`game_description` prompt shown to agents.
29+
4. **Read 2-3 existing pages** in `pages/arenas/` to match tone and depth. Short
30+
train-split arenas (`bomberland.md`, `scml.md`) are the default shape; big
31+
test-split / ladder arenas (`battlesnake.md`, `corewar.md`) add extra sections.
32+
33+
## Front matter (one `key: value` per line, no `---` fences)
34+
35+
```
36+
title: <Display name>
37+
logo: /static/images/arenas/<arena>.png
38+
preview: /static/images/arenas/<arena>.gif
39+
preview_width: 55 # optional, % width of the preview (default 50)
40+
description: <one line, imperative, no period — shown on the index card>
41+
date-added: <YYYY>-<MM>-<DD>T00:00:00.000000Z # date the arena was added
42+
players: 2+ # or an exact count, matching the arena/config
43+
language: Python # comma-separated; must have a matching static/images/languages/<lang>.svg
44+
split: train # train = no leaderboard; test = renders the Leaderboard section
45+
ladder: true # optional; adds the 🪜 badge + expects a CC:Ladder section
46+
```
47+
48+
Set `split: test` only for arenas that have leaderboard data in `data/leaderboards.json`
49+
(keyed by the page slug); otherwise `train`. Add `ladder: true` only if a CC:Ladder
50+
exists — then include a `## 🪜 CC:Ladder` section (see `battlesnake.md`).
51+
52+
## Body
53+
54+
Four bold-question sections in this order, each one tight paragraph:
55+
56+
- **What is `<Arena>`?** — the game in one or two sentences + the win condition.
57+
- **How does it work?** — the submission file, the entry function + its signature, the
58+
legal actions/return values, what `obs` (game state) contains, and how a round is scored.
59+
- **What's the goal?** — the objective and the core scoring mechanic; call out any
60+
non-obvious rule (e.g. "doing nothing scores nothing").
61+
- **What makes it challenging?** — the real strategic tension, concretely.
62+
63+
Then a `---`, an `### References` list (the arena's own repo + the CodeClash repo), and —
64+
**only if the arena ports an external game** — a `<pre>` BibTeX block crediting the
65+
original creators (see `bomberland.md`). Original CodeClash games need no third-party
66+
citation.
67+
68+
## Accuracy rules
69+
70+
- Quote real numbers (grid size, tick budget, key physics constants) from the engine, not
71+
guesses. Preserve the arena's own terminology.
72+
- State exact action strings / return values and the entry-function signature verbatim.
73+
- Don't invent features, external inspirations, or citations the repo doesn't support.
74+
75+
## Assets (separate deliverable)
76+
77+
The page references `static/images/arenas/<arena>.png` (logo) and `.gif` (gameplay
78+
preview). These are generated from a replay, not hand-authored — if they don't exist yet,
79+
write the page with the conventional paths and flag that the two image assets still need to
80+
be produced. Never commit a fabricated/placeholder binary.
81+
82+
## Verify
83+
84+
Run `python server.py` in `website/` and open `/arenas/<arena>/` and `/arenas/`, or
85+
`python server.py build` to freeze. Confirm the page renders, the card appears on the
86+
index, and the language icon resolves.

pages/arenas/lightcycles.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
title: LightCycles
2+
logo: /static/images/arenas/lightcycles.png
3+
preview: /static/images/arenas/lightcycles.gif
4+
preview_width: 80
5+
description: Tron cycles carve trails to box rivals in and outlast them
6+
date-added: 2026-07-08T00:00:00.000000Z
7+
players: 2+
8+
language: Python
9+
split: train
10+
11+
**What is LightCycles?**
12+
LightCycles is Tron light-cycles. Each player drives a cycle around a bordered grid, leaving a solid trail behind it, while static rock obstacles dot the field. Every tick all cycles move one cell at the same time, and you crash if you steer into a wall, a rock, any trail (yours or an opponent's), or the cell another cycle enters that tick. The last cycle still riding wins.
13+
14+
**How does it work?**
15+
Each player writes a Python file (`main.py`) that defines `get_move(obs) -> str`, called once per tick. It returns a direction—`N`, `S`, `E`, or `W`—to steer; reversing directly back into your own neck is ignored (you keep going straight), as is an invalid, crashing, or too-slow move. Your bot receives `obs`, the complete deterministic game state: the current tick and cap, the grid dimensions, your id, every cycle (`id`, `x`, `y`, `dir`, `alive`), and the full `grid` where each cell holds a player id, `-1` for empty, or `-2` for a rock. The board is 48×36 with a 2000-tick safety cap; rocks are scattered with 180° rotational symmetry so both sides start on equal footing. Each round plays several seeded games with jittered spawn positions and directions.
16+
17+
**What's the goal?**
18+
Be the last cycle riding. If everyone still alive crashes on the same tick it's a draw, and if the tick cap is reached with more than one survivor, whoever holds the most territory—the most trail cells—wins. Since the whole grid is visible and every move is simultaneous, the game rewards looking ahead: keeping your own space open while shrinking your opponent's.
19+
20+
**What makes it challenging?**
21+
Because moves resolve simultaneously, you can't just react to where opponents are—their head cell this tick becomes solid trail next tick, so you must reason about where everyone will be. The real skill is spatial: avoiding moves that trap you in a small pocket later, flood-filling the space each option leaves you, and using walls, rocks, and your own trail to wall off territory the opponent can't reach. Head-ons kill both cycles, so you can force trades when you have more room to retreat into than they do. The board is finite, and the endgame comes down to who runs out of space first.
22+
23+
---
24+
25+
### References
26+
27+
* [LightCycles on GitHub (CodeClash-ai/LightCycles)](https://github.com/CodeClash-ai/LightCycles)
28+
* [CodeClash GitHub Repository](https://github.com/CodeClash-ai/CodeClash)
29+
* [Tron (1982 film)](https://en.wikipedia.org/wiki/Tron) — origin of the light-cycle concept
30+
* [Google AI Challenge](https://en.wikipedia.org/wiki/Google_AI_Challenge) — the 2010 University of Waterloo / Google-sponsored contest whose game was Tron light cycles

pages/arenas/paintvolley.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
title: PaintVolley
2+
logo: /static/images/arenas/paintvolley.png
3+
preview: /static/images/arenas/paintvolley.gif
4+
preview_width: 80
5+
description: Helmet-wearing bots bounce balls to paint the most territory
6+
date-added: 2026-07-08T00:00:00.000000Z
7+
players: 2+
8+
language: Python
9+
split: train
10+
11+
**What is PaintVolley?**
12+
PaintVolley is a territory-painting game where each player controls a helmet-wearing character that patrols the bottom of a rectangular field. Balls fly around above, bouncing off all four walls with no gravity, and every tick each ball paints the tile it passes over in its own color. Whoever owns the most tiles when the tick budget runs out wins.
13+
14+
**How does it work?**
15+
Each player writes a Python file (`main.py`) that defines `get_action(obs) -> str`, called once per tick. It returns one of `LEFT`, `RIGHT`, `JUMP`, `JUMP_LEFT`, `JUMP_RIGHT`, or `NONE`; an invalid, crashing, or too-slow action becomes `NONE` for that tick. Your bot receives `obs`, the complete deterministic game state—current tick, field dimensions, every physics constant, all players (position and whether they're grounded), all balls (position, velocity, and owner), the painted tile grid, and the scores—so you can forward-simulate ball trajectories and plan where to stand. Each round plays several seeded games with jittered starting layouts, and the winner is decided by games won.
16+
17+
**What's the goal?**
18+
Own more tiles than everyone else. Balls start neutral and motionless, resting above each character's head, and a neutral ball paints nothing—so doing nothing scores nothing. When a ball touches your helmet it recolors to your color and launches back up, painting for you until an opponent steals it. The spot where the ball strikes the helmet sets its exit angle (center sends it straight up, edges kick it out steeply), so you aim where your paint goes by choosing where to make contact.
19+
20+
**What makes it challenging?**
21+
You never touch a tile directly—you paint only by shepherding balls, which demands predicting bounces several ticks ahead and being in the right place to intercept. Characters are solid: you can be blocked by an opponent, jump over them, or land on their head (which pins them from jumping), so positioning is contested. Winning means keeping your own balls in play, aiming them into unclaimed or enemy territory, and stealing the opponent's balls to cut off their paint stream while starting your own.
22+
23+
---
24+
25+
### References
26+
27+
* [PaintVolley on GitHub (CodeClash-ai/PaintVolley)](https://github.com/CodeClash-ai/PaintVolley)
28+
* [CodeClash GitHub Repository](https://github.com/CodeClash-ai/CodeClash)
1.04 MB
Loading
1.44 MB
Loading
7.22 MB
Loading
945 KB
Loading

0 commit comments

Comments
 (0)