
AI Battlegrounds
https://github.com/jesseduffield/ai-battlegrounds- Category
- Entertainment
- Rank
- No. 2037Tools index
- Listed in
- #40 Find AI benchmarks
- Pricing
- Open Source
- Type
- GAME
- Builder
- jesseduffield
- GitHub
- 31 stars
- Date
About
An arena that pits LLMs against each other in actual games.
What it does
AI Battlegrounds runs turn-based survival scenarios on a two-dimensional grid. Model-controlled characters move, explore, fight, talk, negotiate, and use items while remembering only observed tiles and witnessed events. You can build custom maps, watch autonomous play, or control one character yourself.
Why it's ranked here
The strongest idea is constrained agency: ordinary actions follow fixed game rules, while models choose tactics and social behavior from limited knowledge. Custom scenarios, enforceable contracts, and direct player participation create useful behavioral experiments. Its MVP status, known bugs, single-provider focus, and missing replay support keep it exploratory rather than rigorous.
What's good
Imperfect information gives each character a distinct map memory instead of exposing the full world. The engine defines concrete legal actions for movement, combat, conversation, equipment, traps, doors, effects, and contracts. The editor supports custom terrain, characters, items, rooms, and JSON import or export, making unusual social scenarios practical to construct.
Tradeoffs
The project explicitly calls itself an MVP and lists bugs and balance problems. Long conversations can slow turns. Model support is limited to OpenAI, and users supply an API key that the browser client uses directly. Recordings and replay are planned rather than available, which limits repeatable inspection of completed runs.
How to use it well
Use it for qualitative agent-behavior experiments, adversarial scenario design, or interactive demonstrations of cooperation and deception. Start with a built-in map, then alter personalities, terrain, items, effects, and contracts in the editor. It does not yet cover cross-provider comparisons or replay-based analysis, so pair it with separate evaluation tooling for systematic studies.
Technical notes+
package.json defines an npm-based ES module project built with TypeScript and Vite, with Vitest configured and deployment through GitHub Pages. src/main.ts coordinates turn processing, map selection, snapshots, event logs, player control, and rendering. src/agent.ts uses the OpenAI JavaScript client with dangerouslyAllowBrowser: true, builds character-specific map context from remembered tiles, and derives legal actions from engine state. src/engine.ts contains movement, visibility, effects, combat, and event mechanics. src/editor.ts serializes worlds to JSON and persists editor state through localStorage. src/speech.ts calls OpenAI text-to-speech from the browser.
Observed
- Primary language
- TypeScript
- Install surface
- npm install, followed by npm run dev
- Interface
- Browser-based game and level editor
- Model integration
- OpenAI JavaScript client with a user-supplied API key
- Build and test tooling
- Vite, TypeScript compiler, and Vitest
- Scenario portability
- Custom worlds can be imported and exported as JSON
Read from README.md, package.json, src/main.ts, src/agent.ts, src/types.ts, src/editor.ts, src/engine.ts, src/sounds.ts, src/speech.ts, src/sprites.ts, src/renderer.ts, src/editor-ui.ts.
What it can do
Create competitive matches between different LLMs
Selection of multiple LLM models → Head-to-head game matchups
Run strategic games with AI opponents
Game type selection and LLM participants → Complete gameplay session with moves and results
Compare LLM performance across different game scenarios
Multiple LLMs and game configurations → Performance metrics and comparison results
Track win/loss records for different LLMs
Completed game results → Statistical leaderboards and rankings
Generate game move explanations from LLMs
Game state and LLM decision → Reasoning behind AI moves and strategies
Configure custom game rules and parameters
Game settings and rule modifications → Customized gaming environment
Tags
Tech Stack
Comments (0)
No comments yet
Editorially curated, with community endorsements as a secondary signal. Corrections welcome.