| --- |
| license: mit |
| pretty_name: OpenFront.io game-state snapshots |
| tags: |
| - reinforcement-learning |
| - games |
| --- |
| |
| # OpenFront.io game-state snapshots |
|
|
| 250 bot/nation-only games of [OpenFront.io](https://openfront.io) (25 games on |
| each of 10 maps), played headless on the real deterministic game engine |
| ([openfrontio/OpenFrontIO](https://github.com/openfrontio/OpenFrontIO)) and |
| snapshotted every 10 ticks / 1s of game time (~375k snapshots total). |
|
|
| Generated by and documented at |
| **[github.com/djmango/openfront-ai](https://github.com/djmango/openfront-ai)** — |
| see the repo for loaders, training code, and results. |
|
|
| **Format v3**: every snapshot captures the *complete* game state — the tile |
| grid plus all entities (players, diplomacy, units, attacks in flight) — so a |
| single snapshot is enough to reconstruct everything an agent could observe. |
| The 10-tick cadence means a typical nuke flight (20-60 ticks) spans 2-6 |
| snapshots, and units in transit carry their destination. |
|
|
| One tar per map. Each game directory contains: |
|
|
| - `terrain.bin` — uint8[w*h] immutable terrain (bit 7 land, bit 6 shoreline, |
| bit 5 ocean, bits 0-4 magnitude; magnitude 31 = impassable) |
| - `states/t<tick>.bin.gz` — gzipped little-endian uint16[w*h] mutable tile |
| state: owner smallID in bits 0-11 (0 = unowned), fallout bit 13, defense |
| bonus bit 14 |
| - `states/t<tick>.json.gz` — gzipped JSON with full entity state: |
| - `players`: id (smallID), name, type, troops, gold, tiles, alive, traitor, |
| disconnected, targets, embargoes, pending alliance requests (in/out), |
| sparse relation list |
| - `alliances`: `[playerA, playerB, expiresAtTick]` for each active alliance |
| - `units`: type (city, port, warship, transport, silo, SAM, nukes in |
| flight, ...), owner, x, y, target tile tx/ty (null if idle — for nukes |
| this is the impact point), samLock (a SAM is intercepting), level, |
| health, constructing, cooldown, troops |
| - `attacks`: from, to (0 = terra nullius), troops, retreating, srcX/srcY |
| (boat-landing origin, null for land attacks) |
| - `meta.json` — format version, map, dims, snapshot tick list, winner |
| |
| A game evolving (each color a player, Onion map, ticks 3175 and 12375): |
|
|
|   |
|
|
| Generated by [djmango/openfront-ai](https://github.com/djmango/openfront-ai) |
| for training observation encoders for RL agents. |
|
|