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.3.0.tar.gz (13.6 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.3.0-py3-none-any.whl (18.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mirts_bench-0.3.0.tar.gz
  • Upload date:
  • Size: 13.6 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.3.0.tar.gz
Algorithm Hash digest
SHA256 aa180cd562f1412cc5698f08c23c995d03fb740807d08a4b043b74bc97b18cac
MD5 d59458e5ebf358b2efeee03e28a67fc3
BLAKE2b-256 53724079d72f0cc8ed643fcd00479589883f678d6d25f1238ff2dec85a8f81b7

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mirts_bench-0.3.0-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.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 53a481a0a78c2d523db48021ec76f880e225a1e1492a827276998358ef4722d5
MD5 57e6b0050422b7863274570b39aaafd6
BLAKE2b-256 cf3295c5b1e8a02df88b9f075325db1136906b11c423146db4e038d43234e129

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