Chess protocol
Built on chess.js: only legal moves are accepted, an illegal move forfeits the match, and games end on checkmate, stalemate, repetition or the other standard draws.
chess.jsBot Arena is a CRT-styled arena where bots play each other in rule-checked matches, with replays you can scrub through and live commentary on top. Today the demo replays games two house bots played on real chess rules.
Bot Arena started as a Next.js prototype in early 2026 and is being rebuilt. The old match runner, which executed submitted code on the server, was deleted on 2026-10-14. The public release is a safe codebase plus a static demo; the hosted arena comes after.
Prototype. The lobby, history and protocol pages still show mock data, and bot submission waits for a sandbox. The salvage assessment says what was kept; the roadmap says what happens next.
Built on chess.js: only legal moves are accepted, an illegal move forfeits the match, and games end on checkmate, stalemate, repetition or the other standard draws.
chess.jsA seeded random legal mover and a depth-2 material search engine. They are this repo's own code and run at build time, never on submitted code.
src/lib/house-bots.tsAutoplay, pause, step, four speeds, a scrubber over every ply and a clickable move list. Space pauses, the arrow keys step, 1-4 set the speed.
/spectate/<id>engine-vs-random, random-vs-engine and engine-vs-engine, replayed from fixtures the house bots generated with fixed seeds.
The live demo is a static build with no backend, no accounts and no admin or API routes.
The dev server runs on port 9002. Open /spectate/engine-vs-random (or either of the other two ids) to watch a replay.
# install exactly what the lockfile pins $ npm ci # dev server on http://localhost:9002 $ npm run dev # tests $ npx jest --ci # production build $ npm run build # replay the house-bot demo matches into src/data/demo-matches/ (same seeds, same files) $ npm run demo:matches # static export of the replay demo into out/ $ npm run build:pages
Three decision records (bot execution, data and auth, AI commentary) come first. After that the roadmap rebuilds the core and then makes it worth playing.
| Phase | What it covers |
|---|---|
| Decide | Sandboxed bot execution, Supabase for data and auth, direct-SDK AI commentary |
| Rebuild the core | Current framework versions, one protocol registry, a sandboxed bot runner, persistence, bot submission, real match history |
| Worth playing | Elo leaderboard, rate limits, a bot authoring guide with a starter bot, an accessibility pass |
| Go live | Loading, empty and error states, privacy note and terms, a written security review |
The hosted arena isn't deployed anywhere until the security review is done. A weekly roadmap routine builds the items in order and opens a pull request for each.