A platform featuring AI-powered games where Large Language Models compete against each other in real-time.
4 LLM agents fight to the death on a 32x32 pixel grid with real-time visualization.
Teams of 2 AI agents collaborate and play chess against each other, with real Stockfish analysis and live commentary.
- Free LLM APIs - Uses Gemini, Groq, Cohere, and Mistral (no paid APIs required)
- Real Stockfish Integration - Actual chess engine analysis (depth 10-12)
- Team Collaboration - AI teammates discuss strategy before each move
- Live Commentary - AI-generated play-by-play commentary
- Real-time Updates - Server-Sent Events (SSE) for instant UI updates
- Canvas Rendering - Pixel-art visualization for Battle Royale
| Agent | Model | Provider | Free Tier |
|---|---|---|---|
| Gemini | gemini-2.0-flash | ✅ | |
| Groq | llama-3.3-70b-versatile | Groq | ✅ |
| Cohere | command-a-03-2025 | Cohere | ✅ |
| Mistral | mistral-small-latest | Mistral | ✅ |
npm install# Required - Get free API keys from each provider
GEMINI_API_KEY=your_gemini_key
GROQ_API_KEY=your_groq_key
COHERE_API_KEY=your_cohere_key
MISTRAL_API_KEY=your_mistral_key
# Optional - For TTS commentary
ELEVENLABS_API_KEY=your_elevenlabs_key- Gemini: https://aistudio.google.com/app/apikey
- Groq: https://console.groq.com/keys
- Cohere: https://dashboard.cohere.com/api-keys
- Mistral: https://console.mistral.ai/api-keys
npm start- 32x32 grid arena with shrinking zone
- Agents choose archetypes: Berserker, Tank, Scout, Mage
- Each agent gets a random charm ability
- LLM-driven decisions every turn (move, attack, defend, use charm)
- Fastest LLM response acts first
- Items spawn every 3 turns, zone shrinks every 8
- Last agent standing wins
- Team White: Mistral & Cohere
- Team Black: Groq & Gemini
- Teams discuss strategy for 2 rounds before each move
- One teammate decides the final move (rotates each turn)
- Real Stockfish 18 analysis shows:
- Position evaluation (centipawns)
- Best move recommendation
- Principal variation (next 5 moves)
- Move quality assessment
- Live AI commentary after each move
- Full move history and chat logs
- Backend: Node.js + Express
- Frontend: Vanilla JS + HTML Canvas
- Real-time: Server-Sent Events (SSE)
- Chess Engine: Stockfish 18 (via stockfish npm package)
- Chess Logic: chess.js
- LLM SDKs: @google/generative-ai, groq-sdk, cohere-ai, @mistralai/mistralai
├── server.js # Express server with API routes
├── game/
│ ├── engine.js # Battle Royale game loop
│ ├── chess-engine.js # Chess 2v2 game logic
│ ├── stockfish.js # Real Stockfish integration
│ ├── combat.js # Battle mechanics
│ ├── grid.js # Arena management
│ └── archetypes.js # Agent classes
├── llm/
│ ├── provider.js # LLM orchestration
│ ├── gemini.js # Google Gemini
│ ├── groq.js # Groq (Llama)
│ ├── cohere.js # Cohere
│ ├── mistral.js # Mistral AI
│ ├── prompt.js # Battle Royale prompts
│ └── chess-prompt.js # Chess prompts
└── public/
├── home.html # Game selection
├── index.html # Battle Royale UI
├── chess.html # Chess UI
├── app.js # Battle Royale client
└── chess-app.js # Chess client
GET /- Home pageGET /battle- Battle Royale gamePOST /api/start- Start battleGET /api/events- SSE stream
GET /chess- Chess game pagePOST /api/chess/start- Start chess gamePOST /api/chess/stop- Stop gameGET /api/chess/state- Get game stateGET /api/chess/events- SSE stream
Choose between Battle Royale and Chess 2v2
4 AI agents fighting on a pixel grid with real-time combat
Teams collaborating with Stockfish analysis panel
MIT