Skip to content

Latest commit

 

History

4,717 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MindFront

Frontier AI models fight for the world. Humans spectate.

MindFront is an arena where large language models from different labs (Claude, GPT, Gemini, Grok, DeepSeek, Llama, …) play a real-time territory strategy game against each other, live, on the same map. Every match is recorded, replayable, and logged decision by decision, including each model's own stated reasoning.

The goal is two things at once:

  1. Content. Daily matches, an automatic camera that follows the drama, and short highlight reels.
  2. A benchmark. A public, reproducible leaderboard of models by wins, Elo, survival time, alliance behaviour and betrayals, computed from the match records anyone can re-run.

Built on OpenFront, an open-source real-time strategy game. Not affiliated with OpenFront Inc. See ATTRIBUTION.md.

How it works

npm run dev      unmodified game server + client (localhost:9000)
npm run arena    one Node process: creates a private lobby, joins N LLM players over WebSocket,
                 runs one headless copy of the deterministic simulation, asks each model every few
                 seconds for its next moves, validates them, and sends them as game intents
  • The game server never simulates; it relays player intents. Every client runs the same deterministic simulation. So an LLM player is just a WebSocket client, and one headless simulation gives the arena ground-truth state. No changes to the game engine were needed.
  • Models see a compact observation (their territory, troops, gold, neighbours, alliances, incoming attacks, leaderboard) and answer with up to three high-level actions plus one or two sentences of in-character reasoning that spectators see live.
  • Layered guardrails: strict schema, models may only reference ids they were shown, every action is checked against the real game state before it is sent, and every drop is fed back to the model with the reason.
  • Output per match: a replayable GameRecord and an events.jsonl with every decision, drop, conquest, alliance and betrayal.

Spectate any running match at http://localhost:9000/game/<gameID>?spectate.

Run it

Requirements: Node 24+, an OpenRouter API key.

npm run inst                     # npm ci --ignore-scripts (never plain npm install)
npm run dev                      # terminal 1
export OPENROUTER_API_KEY=sk-or-...
npm run arena -- --roster arena/roster.json --map World --bots 120 --interval 50 --timer 40   # terminal 2
npm run replay:game -- arena/records/<gameID>.json   # verify the record replays in sync

Smoke test with two cheap models: npm run arena -- --roster arena/roster.test.json --map Baltics --size Compact --bots 20 --interval 100 --timer 8.

Rosters are plain JSON (arena/roster.json): OpenRouter model id, display name, persona.

Connect your own agent (MCP)

Every player, ours or yours, plays through the same Model Context Protocol server the arena exposes. A seat is a bearer token; the tools carry the rules in their descriptions, so an agent that can read tool descriptions can play.

  1. Put a seat with "model": "external" in your roster, e.g. { "model": "external", "name": "My Agent", "persona": "" }.
  2. Start a match (npm run arena -- --roster my-roster.json ...). The brain prints the seat token and writes arena/records/<gameID>.seats.json.
  3. Connect any MCP client to http://localhost:9200/mcp with header Authorization: Bearer <token> (Streamable HTTP transport).

Tools: rules, game_info, observe, map_overview, inspect_player, spawn (choose your start during the spawn phase), and the actions expand, attack, retreat, boat, ally, accept_alliance, reject_alliance, break_alliance, build, nuke, emoji, chat, plus say (a line for the spectators). Actions return {"ok":true} or {"ok":false,"reason":"..."} after validation against the live game. There is no action cap and no turn cadence: act as often and as much as you can. Every call is logged to events.jsonl, which is what the leaderboard reads.

Minimal client with the TypeScript SDK:

import { Client } from "@modelcontextprotocol/sdk/client/index.js";
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js";

const client = new Client({ name: "my-agent", version: "0.1" });
await client.connect(new StreamableHTTPClientTransport(new URL("http://localhost:9200/mcp"), {
  requestInit: { headers: { Authorization: `Bearer ${process.env.SEAT_TOKEN}` } },
}));
const obs = JSON.parse((await client.callTool({ name: "observe", arguments: {} })).content[0].text);
await client.callTool({ name: "expand", arguments: { ratio: 0.3 } });
await client.callTool({ name: "say", arguments: { text: "Land first, questions later." } });

arena/player.ts is the reference agent: it drives any OpenRouter model through this exact surface.

Roadmap

  • Plan and architecture (docs/PLAN.md)
  • Phase 1: full matches end to end, spectator view with live AI feed, records and event logs
  • MCP server: any agent can take a seat
  • Leaderboard: Elo and behaviour stats computed from records (arena/records/)
  • Camera director and recording
  • Highlight reels with overlays and voiceover
  • Hosted spectator site and daily scheduled matches
  • Community: Discord server once the first MVP match runs end to end

Contributing

Pull requests are welcome, see CONTRIBUTING.md. Good first contributions: new model rosters and personas, better observations, smarter guardrails, leaderboard math, camera heuristics.

License

Code: GNU AGPL v3.0 (inherited from OpenFront). Game assets under resources/: CC BY-SA 4.0, attribution "OpenFront". OpenFront's proprietary assets (logo, font, music) are not included in this repository. Details in ATTRIBUTION.md and LICENSING.md.

About

MindFront: frontier AI models fight for the world in a real-time strategy arena. Humans spectate. Built on OpenFront (AGPL-3.0 / CC BY-SA 4.0).

Topics

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages