Skip to main content

MiniRTS LLM Benchmark

Project description

MiniRTS LLM Benchmark

Deterministic 11x11 grid RTS benchmark for LLMs.
No OCR, no UI automation, fast and reproducible.
Strict 30 action cap.

Install

pip install mirts-bench

Run

polybench run --difficulty hard --opponents 7 --games 1

LLM command (stdin prompt → stdout JSON):

polybench run --difficulty hard --opponents 7 --games 1 --llm-cmd "python examples\\echo_llm.py"

OpenAI-compatible HTTP endpoint:

polybench run --difficulty hard --opponents 7 --games 1 --llm-host http://localhost:8000 --llm-model your-model --llm-api-key YOUR_KEY

Env alternative:

$env:POLYBENCH_LLM_HOST = "http://localhost:8000"
$env:POLYBENCH_LLM_MODEL = "your-model"
$env:POLYBENCH_LLM_API_KEY = "YOUR_KEY"
polybench run --difficulty hard --opponents 7 --games 1

Kaggle (local, no ngrok)

Run inside a Kaggle notebook with kaggle-benchmarks available.

!pip -q install kaggle-benchmarks mirts-bench

!polybench run --difficulty hard --opponents 7 --games 1 --llm-provider kaggle --llm-model google/gemini-2.5-flash

If --llm-model is omitted, the default Kaggle LLM is used.

Python API

import polybench

cfg = polybench.RunConfig(
    difficulty="easy",
    opponents=1,
    games=1,
    llm_host="http://localhost:8000",
    llm_model="your-model",
    llm_api_key="YOUR_KEY",
)
polybench.run_benchmark(cfg)

How it works

  • Generates a deterministic 11x11 grid with cities, resources, and blockers.
  • Builds a prompt from the current state.
  • LLM returns a JSON action.
  • The engine applies the action and advances the turn.
  • Stops after 30 actions and scores the result.

Action schema

Allowed action types:

  • end_turn
  • move
  • attack
  • train
  • build
  • research

Unit and city identifiers are grid coordinates:

{ "type": "move", "unit_id": { "x": 3, "y": 5 }, "to": { "x": 4, "y": 5 } }

Output

Each run writes:

  • runs/<timestamp>_<difficulty>_<opponents>/game_###/turn_###_prompt.txt
  • runs/<timestamp>_<difficulty>_<opponents>/game_###/turn_###_response.txt
  • runs/<timestamp>_<difficulty>_<opponents>/game_###/turn_###_action.json
  • runs/<timestamp>_<difficulty>_<opponents>/summary.json

Options

polybench run supports:

  • --difficulty easy | normal | hard | crazy
  • --opponents 1 | 7 | 15
  • --games (default 1)
  • --llm-cmd external command that reads prompt on stdin and returns JSON on stdout
  • --llm-provider openai | kaggle
  • --llm-host HTTP base URL (OpenAI-compatible /v1/chat/completions)
  • --llm-model model name for HTTP LLM
  • --llm-api-key API key for HTTP LLM (or set POLYBENCH_LLM_API_KEY)
  • --k-factor ELO K (default 32)
  • --opponent-elo (default 1000)
  • --start-elo (default 1000)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mirts_bench-0.4.1.tar.gz (15.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mirts_bench-0.4.1-py3-none-any.whl (18.0 kB view details)

Uploaded Python 3

File details

Details for the file mirts_bench-0.4.1.tar.gz.

File metadata

  • Download URL: mirts_bench-0.4.1.tar.gz
  • Upload date:
  • Size: 15.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.0

File hashes

Hashes for mirts_bench-0.4.1.tar.gz
Algorithm Hash digest
SHA256 b489918bab1849c4a7a9ad7090a23676090a754b2c6d1b789c74e6ae6950e34e
MD5 e2b351a3b37752cfc5720af278e07555
BLAKE2b-256 bdc8d0c20f8c7cd4ba7751167b1929696bd2bf074e645da178a7e0b31452df35

See more details on using hashes here.

File details

Details for the file mirts_bench-0.4.1-py3-none-any.whl.

File metadata

  • Download URL: mirts_bench-0.4.1-py3-none-any.whl
  • Upload date:
  • Size: 18.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.0

File hashes

Hashes for mirts_bench-0.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a56840e035a474f742dd48c7679b9104344ecdae594aca36b55389f6f6fdfe58
MD5 6b2652a56564de59d54f464eba6dfdf4
BLAKE2b-256 84f7b09c8f96a779419ac9626f99be342d1118bd730c8695afb9314a1954b94a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page