A browser-based, classic-rules strategy wargame based on the gameplay of Empire: Wargame of the Century (Interstel DOS version 2.05).
Play the current development build · Classic rules specification · Implementation status · Development roadmap
A classic computer unit that takes a step keeps stepping while it still has move points. The order tick still runs once for that activation. A stay does not take another step. Armies still move one square.
A new unit takes the lowest free DOS slot. When a ship is overloaded, cargo in higher slots stays aboard and a unit that reused a low slot is lost first. A human classic city still stops the scan once the ship is full.
A human classic move that overloads a ship on a city square keeps every army aboard once capacity is filled. The scan stops instead of destroying lower slots. CvC and computer moves still drop surplus cargo.
A classic computer fighter burns its unused move points as loiter fuel at the end of its activation, not only when the turn ends. Human turns and Skip still settle unused moves at end of turn. An owned city and a carrier still skip the burn.
A fighter that leaves a carrier for a city it does not own is removed. The city is not captured. A square that already holds a unit is still refused. An owned city still refills the tank.
A fighter that moves or stays on a city it does not own is removed. The city is not captured. An owned city still refills the tank.
An army captures a city when its combat efficiency is at least the draw modulo 100. A remainder of 0 is a capture even at efficiency 0. The computer grade factor is not part of this roll.
A grade 2 ship checks the neighbor masks before it looks two steps into uncharted water. A hit takes that step. A miss can still look, and it does not check the masks again. A ship sailing home still skips the attack. Grade 1 still looks first.
An army that has already boarded is activated with the transport glyph. Open sea keeps it aboard. Next to land, the same city task and uncharted-land wander can step it onto the shore.
A loaded transport still looks at Chebyshev distance first. The city it keeps is the one whose sea path is no longer than that running best, and the best becomes the path length minus one. A nearby city behind a wall loses to a farther city with a short lane.
A ship that already has a heading checks that heading's family first. The first sea step whose square two steps farther is still uncharted becomes the move, and the usual attack or turn-away does not run. A ship sailing home, a transport on a city sail, and a carrier that has not yet counted a fighter keep the heading they already had.
An army waiting for a transport leaves that wait when a transport is on its square. The chart glyph there is a transport. Out at sea, with no land or city beside it, the army stays put and does not claim the transport again. Next to land it looks for a city, and it wanders only when uncharted land is still two steps away.
A full fuel tank still misses the empty 10-slot list and draws rand() % 3. Remainder 2 wanders. Remainder 0 flies to the first remembered enemy army inside the halved fuel radius. Remainder 1 looks for a carrier and a city first, and takes that army only when both miss. A tank under 20 skips the draw, and it takes a remembered army only after the carrier and the city both miss.
Selecting a unit draws its route. In the lab, Order paths on the map key also marks every visible destination, and it starts on. Computer vs computer keeps the selected route when that destinations box is off. Changing the selection drops the previous route immediately.
A city that is already building something other than an army switches to an army when a remembered enemy army can reach it and a new army would be done first. A build that is closer to finished than a fresh army stays on its current unit. An army that is already in the factory stays there.
A classic city switches to army production when any square in its remembered-army list has a land path to that city. The list is the twenty squares where enemy armies were charted. A charted ship or fighter does not count. The square still counts after that army has moved on, until the list drops it.
When the land path to a waiting transport fails, the army still takes one step toward that ship if the chart allows it. A straight step onto charted sea tries the two neighboring compass points, and that try uses one random draw. An adjacent ship on charted sea still leaves the army where it is. The wait is dropped either way, and the transport still sails to the army.
An empty transport searches its own cities that are building armies and have no charted sea beside them. It sails to the closest one it can reach, unless a remembered enemy army is already close to that city. When none qualify, it picks a new wander heading every turn.
An army that has claimed a transport steps toward it across charted land. It stays put when it is already on that square. When the ship is on charted sea, or no land path reaches it, the army drops the wait and looks for other work next turn. The transport still sails to the army.
A carrier that has reached its station stays there while a city it has charted is within 6 squares. A city it has always owned does not count. When none are close enough, it leaves and looks for new work.
Charting an enemy army stores that square in a list of twenty. The list fills from the end. A square already stored is left alone, and a full list drops the oldest square to make room at the front. An army with no city to take walks to the first remembered square within 12 that it can reach. Standing on a remembered square forgets it.
A loaded transport that cannot find a city and cannot find an uncharted square sets sail order 3 and a wander heading. The next time both searches miss, it keeps that heading and keeps wandering. Charting a foreign city within 10 squares still clears the wander.
Each classic player keeps a word for every city. The word stays 0 until that player charts the city while someone else holds it, and then it becomes 1. Charting it again does not reset exploring transports. Capturing the city sets the capturer's word back to 0, so the next time it is seen in foreign hands the reset runs again. Another player's word is left alone.
Grade 2 will not send another army once the word reaches (120 − combat efficiency) / 10. A send that is accepted adds 1. A loaded transport uses 120 − combat/10 for a neutral city and 180 − combat/10 for an enemy city, and a successful sail adds the armies aboard. Grade 1 has no cap. Each later turn adds 1 again for an army still on that city order, and adds the cargo again for a transport still sailing there. The next assignment is what the cap turns away.
A ship sailing to a known city skips a city whose word is still 0. A city this player has always owned stays at 0, so that scan no longer heads for it.
A classic carrier whose station probe and ship hunt both miss, and a classic warship whose hunt misses on an odd coin flip, sail to a known city that is not neutral. Grade 2 still flips that coin. Its ship mask will not enter the coastal water beside a city, so the call usually finds nothing. The scan walks cities from the last toward the first. A nearer city replaces the choice only when a charted sea square sits beside it and the sea path is no longer than the best so far. The ship's own city is dropped when it is still more than 10 squares away. Any city is dropped once the ship is next to it. Until then the ship keeps the heading.
A classic fighter that is choosing a new order can home onto an own carrier. The carrier's count word, which starts at -1, becomes 0 for the first fighter and goes up from there. The fighter remembers that carrier. While the carrier is still ours and the fuel covers the distance, the fighter flies toward it and lands when the step reaches the carrier's square. Landing does not lower the count.
A full tank flips a coin (rand() % 3) first. Remainder 2 wanders instead. The other remainders, and any tank under 20, look for a carrier. Grade 2 looks before it looks for a city, and it will not stay with a carrier that is repairing or whose count is already above the carrier's remaining hit points. Grade 1 looks for an own city first. A city it can reach clears the home and lowers the carrier's count. A full tank ignores an own city that is 5 or closer.
The remembered enemy lists a full tank would search are still empty, so that coin is the only stand-in.
A classic carrier that is choosing a new order looks for an own city set to build fighters (E06 == 1). The scan walks cities from the last toward the first and keeps the strictly nearer one. When that city is more than 10 squares away, the carrier draws up to 20 sea tiles in a 21 by 21 window around it (0x1D452, n=10) and sails to the first one it can reach. Reaching that tile makes the carrier hold. A charted land tile or a city at the goal makes it choose again. If the window misses, it hunts a remembered enemy ship and sails there the same way.
Until a fighter homes to the carrier, the 180C word stays at its spawn value of -1, so the city scan runs. On grade 2 the next activation clears that order and the carrier chooses again. Grade 1 keeps the order.
Not in this pass: the fighter actually storing the carrier's index, and the untraced call 0x1DC3C that DOS tries after the hunt misses.
On grade 2, a battleship, a loaded transport, or a carrier that is choosing a new order calls DOS 0x1D6AA. The nearest own destroyer, submarine, or cruiser that is idle, wandering, or sailing a loaded-transport order is told to escort that ship. A tie keeps the later ship. Each assignment adds that escort's remaining hit points to a tally that never goes back down. A battleship or loaded transport stops at 2. A carrier stops at 5.
Grade 1 does not call this. A carrier that is already wandering, a transport that is already sailing, and an empty transport do not either. The carrier's station order is still not in this pass.
A classic ship at half strength or worse, other than a loaded transport, sails for the nearest friendly city (1D09:07B2, DOS order 8). That city stays the destination. A closer city that appears later does not replace it. The ship keeps the order while it is in port, repairing one point each turn, and only chooses a new order on the turn after it is fully repaired.
An empty transport no longer drops that repair order at the start of its activation. Fighter fuel and a human Return Home order still head for the nearest friendly city without pinning one.
A classic player keeps the five most recent places it saw each enemy ship type (DOS 0x1EB32). When a destroyer, submarine, cruiser, or battleship is choosing a new order, it sails toward the remembered square its hunt mask accepts that it can reach by the shortest sea path (0x1DE2A). A destroyer or submarine hunts a destroyer, transport, or submarine. A cruiser also hunts cruisers and carriers. A battleship hunts every ship type. The same path length does not replace an earlier choice.
The hunt is checked before the grade-1 escort attachment. On grade 2 an escort that is already underway is left alone. Reaching the square ends that order, and the ship chooses again.
Not in this pass: the carrier's own hunt, which DOS turns into a station order after the carrier's station search. Armies and fighters are not stored in this list.
On grade 1, a destroyer, submarine, cruiser, or battleship that is choosing a new order runs DOS 0x1DD44. It draws one random unit slot and takes the first own transport it can reach by sea, then escorts that ship for the turn. The escort does not stick: grade 1 throws the order away on the next activation and chooses again. A warship that is already wandering keeps wandering until that heading leaves the map.
On grade 2 the computer does not call 0x1DD44. An escort it already has lasts until that transport is gone.
Not in this pass: 0x1D6AA, which assigns a nearby idle destroyer, submarine, or cruiser to guard a transport or carrier up to a strength limit.
A classic ship that already has a step now checks the DOS contact masks (0x4A2A, table DS:4BD0 / DS:4BDC). An attack hit replaces the step: a destroyer closes on a fighter, destroyer, transport, or submarine; a cruiser or battleship closes on anyone; a carrier closes on a transport. A turn-away hit faces that neighbor and then turns three to five compass steps away (rand % 3 + 3) before the move is legalized. Grade 1 is the default. On grade 2 a ship sailing home does not take the attack step.
A transport never attacks. It veers away from anything that is not another transport. Ships still ignore a fighter sitting on land.
Not in this pass: the eight-direction helper 0x1DF56 and the explore probe that DOS can run before these masks on grade 1.
A classic army that sent a transport to pick it up stays on Sentry only while that ship is still its own, empty, and waiting (DOS 0x3E7C). If the transport is destroyed, loaded by someone else, or sent on another order, the army goes back to its city task or wander on that same turn.
The first time a player charts a neutral or enemy city, own transports that are exploring within 10 squares (DOS order 0xD, and order 3 when it is used) drop that sailing order and choose again (0x1E901). An objective order (0xB) is left alone.
The army still waits where it is: DOS would also path it toward the ship (0x45E4), and that picker is not modelled. The transport still comes to the army. Grade-2 caps and the per-city tally are still not modelled.
A classic army that has no city task now does what DOS 0x1F6AA does: it picks a random unit slot, scans all units once for an empty own transport within 10 squares, sends that transport to the army's square and goes on Sentry. The transport sails to the army, loads it with Load Ship, and then continues with its cargo. A loaded transport with no sailing order flips a coin (DOS 0x1D114) between heading for the nearest known neutral or enemy city and exploring a random uncharted square. This replaces the old rule that an army could only board a transport already adjacent in port.
Staged: the claim release if the transport is lost, grade-2 caps and the per-city tally are not modelled. In 3-seed runs continents are mixed and islands are still weaker than before, because each sortie carries one army that lands alone. Trace: agents/alg-ai-001-transport-boarding-trace-2026-11-27.md.
- Reports now hide developer notes (computer-player objectives and lab descriptions). Tick Lab messages above the list to show them; the choice is remembered in this browser.
- The map and view are rebuilt once per action instead of twice, and redraws wait for the next frame.
npm startserves SVG files with the right type, andHOST=0.0.0.0 npm startallows testing from another device.
- Bug fix: at maximum zoom the terrain disappeared and only units and cities were drawn. The cached terrain layer was sized to the current zoom and passed the browser's canvas size limit.
- The terrain layer is now built once at the atlas's native 32 px per tile (3200×1920, about 6.1 megapixels, inside iPad limits) and drawn scaled: crisp when zoomed in, smoothed when zoomed out. Zooming no longer rebuilds it.
- When your knowledge of the map changes, only the changed squares and their neighbours are redrawn, instead of the whole layer on every refresh.
- Fog is a 100×60 image scaled up instead of up to 6,000 rectangles; the grid is one path over the visible squares.
Classic computer armies now follow the DOS army routine instead of heading for any known enemy city:
- City tasks. On alternate turns per army, the computer picks a random starting city and sends the army to the first known neutral city within 12 squares (20 on grade 2) that it can reach over land or unexplored ground. The task ends when the city is taken or becomes unreachable.
- Every move an army first steps into an adjacent city that is not its own, then toward uncharted land two squares out, then onto an adjacent enemy army, fighter, destroyer or transport. Otherwise it follows its task or keeps wandering.
- Enemy cities are attacked when an army is next to one; armies no longer path across the map toward them.
In 3-seed computer-vs-computer runs this expands faster on continents. On islands it can stall until transports carry armies, because DOS-style transport boarding within 10 squares is not modelled yet. Trace: agents/alg-ai-001-army-reissue-trace-2026-11-26.md.
A classic computer offers to resign only when its cities plus neutral cities number fewer than a quarter of all cities, rounded down (floor(n / 4)). Previously neutral cities were ignored and a fractional quarter was used, so a computer could offer to resign while most of the map was still unclaimed. This matches DOS 0xDF58, which zeroes the neutral tally and adds it in (agents/alg-ai-004-resign-accept-effects-trace-2026-11-25.md). The other conditions (one human, two sides left, after round 100, offered once) are unchanged.
- Visible, cancellable orders. Move To, Go Direction, Patrol and Escort show a banner on the map with Confirm and Cancel. The first tap previews the path; tapping the same square again, or Confirm, gives the order. Escape also cancels.
- Undo. ↶ Undo (or
U, ⌘/Ctrl+Z) reverses your moves, orders and production changes within the turn. Anything that rolls dice (combat) clears the undo history. Starting a new game or scenario no longer asks for confirmation: Undo restores the previous game. - Reports name things and link to them. Reports show unit and city names, never internal IDs (lost cargo is now named too). Tap a name to select the unit or city and centre the map on it.
- Feedback near the map. Messages appear in a strip under the map instead of the page footer. Recent combat is marked on the map, and cities producing nothing get a dashed ring.
- Awaiting orders. The Overview shows how many units and cities need orders; Next ▸ (or
N) steps through them. - Layout. 44 px touch targets for orders and map controls; the most common orders come first; the Reports list fills the sidebar; the Game menu puts Start campaign under its settings and the Lab scenarios last; computer-vs-computer games hide the controls that do not apply.
getPlayerView now builds a cell → city index once per call instead of scanning the city list for each of the map's cells. Same results: the first city listed at a cell still wins, and saves and RNG draws are byte-identical (golden parity check, seed 17, 150 rounds). Measured on a 2-vCPU VM (Node 22, mean of 2 runs): classic AI games 2.3–2.4× faster, modern AI 1.3–1.4× faster.
An idle classic ship or fighter that is still following its wander heading now takes the DOS order 3 tick (0x3F64 → 0x3F0C) before the legal-direction sweep: one rand() per move, and on % 16 == 0 the heading turns one step around the compass ring (direction set by unit parity). The move that first rolls a heading takes no tick; an off-map neighbor skips the draw and rolls a fresh heading; a fighter at or below its fuel threshold takes no draw. Armies are unchanged. Trace: agents/alg-ai-001-order3-45a2-trace-2026-11-24.md.
The terrain sprite atlas (terrain-atlas.svg) is rasterized to a bitmap canvas once when it loads. Tiles and coast overlays are stamped from that bitmap instead of re-rasterizing the SVG's vector paths on every drawImage, and the per-tile save()/restore() is replaced by toggling only imageSmoothingEnabled. A full terrain layer rebuild drops from seconds to tens of milliseconds; artwork is pixel-identical. No gameplay change.
Classic AI direction sweeps, blocked-bearing turns and Random turns now rotate around the DOS compass ring (E, NE, N, NW, W, SW, S, SE from table 2E32:6300), not Empirata's row-major directions order. The top-rim "start south" heuristic from v0.6.10 is removed: DOS 0x4C52 has no rim special case.
Units with None no longer march north. Matching DOS (0x3E00 → 0x4462 → 0x44EA), an idle army garrisons its city unless uncharted land lies two squares out (0x485E), and otherwise wanders with a DOS-weighted random heading that hugs walls (0x4836, 0x4542). Idle ships and fighters roll a heading the same way. Saves gain an optional classicWander unit field. Traces: agents/alg-ai-001-compass-order-trace-2026-11-24.md, agents/alg-ai-001-none-order-trace-2026-11-24.md.
classicEscortStationCandidates runs up to 20 probes in a 7×7 window (n=3 at 0x46C2): two rand15 draws per probe, first reachable chart tile wins (1A9E:006C). Trace: agents/alg-ai-001-03c2-rand-tile-2026-11-23.md.
classicEscortStationCandidates walked eight chart directions and picked the first reachable neighbor (1A9E:006C), replacing the prior [T] lexicographic rank.
Adjacent fresh enemy contact clears sentry, patrol, and skip (wait) to none, matching DOS wake-set [D].
Documented accept/decline elimination bookkeeping vs 0xDF58; regression lock on gameOutcome after resign accept.
Classic escort ranks chart-passable tiles beside the target (behind bearing, sea openness) via classicEscortStationCandidates.
Within Chebyshev 3 of the escort target, classic escort pathing follows the target’s standing order (move-to, go-home, etc.) before generic station-ring routing.
Held-out save tests/fixtures/islands-rim-round-376.json (seed 3898486421) asserts classic AI unstucks east-rim none warships after lab rounds.
Ships with none / random on the playable border rotate bearing when all neighbors are blocked; top-rim none defaults bias south instead of illegal north steps.
Classic route step and legal direction use PlayerView chart cells + mask bytes (classicTilePassableChart), not omniscient terrain.
ALG-AI-002: 0x30EB inventory, 0x3B45 / 0x393A production tree ([D] Raiden #163). 0x3ADC stale+fresh threats (#161). ALG-AI-001: 34-byte passability masks in pathfinding (#163). ALG-AI-003: classic 840 combat factors. Handoff: agents/local-agent-handoff-dos-ai.md.
Invasion-threat slots are stale + fresh chart coordinates (~20 ring). Raiden static pass: agents/alg-ai-002-3adc-slot-trace-2026-11-17.md.
Computer-vs-computer observer mode defaults to Blue + Red intelligence (union of both private charts on one map). Per-round viewpoint alternation removed.
Classic armies, fighters, and ships reissue Move-To before direction pick per DOS step 4 staging.
Classic transports stage at friendly ports, sail toward charted neutrals/enemies that armies cannot reach over land, and disembark for existing conquest logic (classic-amphibious.ts).
Classic armies path to charted neutral/enemy cities (ALG-AI-001 expansion staging) instead of wandering with None forever.
Classic AI no longer assigns ships at inland cities (which aborted CvC Play when the first transport was ordered). Spectator autoplay recovery from v0.6.1 remains.
Computer-vs-computer Play resumes correctly after an interrupted turn (for example tab switch or pause mid-round) and no longer stops silently on the next round.
New campaigns default to Classic DOS grade 1; Modern (experimental) remains in the Game menu. Saves and rules-lab fixtures without aiPolicy still use modern (legacy compatibility).
Classic DOS city production checks path-reachable enemy locations on the faction chart and commissions army when an invasion corridor exists (slice D / ALG-AI-002).
Computer-vs-computer observer mode with “show entire map beneath fog” now rebuilds the 75% / 52% fog overlay when units move (visibility still follows the selected faction).
Classic DOS activation pass: escort stationing, ship-B coastal-sea mask (grade 2), empty-transport order cleanup, load-ship units hold still for loading.
New campaigns can choose Modern (experimental) or Classic DOS with grade 1 / 2 in the Game menu. The choice is stored on Game.aiPolicy and in JSON saves.
Classic-policy games can show a resignation accept/decline dialog; accepting transfers computer cities and removes their units. Staged classic DOS AI is the default campaign opponent (v0.6.0); choose Modern (experimental) in the Game menu to use the frozen modern executor.
The Game menu can start campaigns with preset, custom, or random-on-start seeds. Copy / export / import a small map recipe JSON to reuse a layout+generator+density+seed without a mid-game save. Full Export JSON still saves the entire game (filenames include the seed when present).
Campaign games can opt into organic-v1 seed-deterministic worlds (noise coasts + playability checks) alongside the legacy ellipse-v1 study generator. City density may be sparse (~12) or standard (~64). Close Quarters remains the default interactive skirmish.
Close Quarters uses actual randomized encounters, not buttons that prescribe who wins. Its layout is an original, intentionally compact fixture rather than a historical Interstel opening.
- Combat: select a blue unit, then tap an adjacent red unit. Each hit is assigned by the probability described in the Interstel 2.05 manual; damaged units retain their damage, and a fight destroys one participant. Unit type determines damage per hit.
- Conquest: select a blue army, then tap a nearby neutral city. At normal combat efficiency, the capture attempt has a 50% chance of success. A victorious army becomes the city garrison and is removed from active units; a defeated army is also removed.
- More armies: two additional blue armies are positioned within assault range of the frontier city, allowing retry/testing without immediately rebuilding or restarting the world.
- Naval combat: a blue destroyer is adjacent to a red submarine. Destroyers detect submarines; submarines inflict 3 damage per hit.
- Opponent response: after you select Next round, a preliminary red computer opponent makes legal moves and may attack/capture. It sees only its own faction's visible or remembered information; its strategy is not a claim of original AI parity.
- Production and saves: city unit production, fog of war, local saves, JSON import/export, map pan/zoom, keyboard and iPad touch control remain available.
- Open https://funkatron.github.io/empirata/ in Safari.
- Press New skirmish to replace an older saved scenario (export your save first if needed).
- The blue army is selected. Tap the adjacent red A to fight, or select one of the other blue armies and tap the nearby gold city to attempt capture.
- Select the blue D, then the adjacent red S, for naval combat.
- Press Next round to give the computer opponent a turn and reset your own units' movement.
There are no scripted win/loss buttons. The combat results are random but reproducible from saved game state, which is valuable for diagnosing bugs.
The Interstel 2.05 manual explicitly explains that damage is awarded by repeated weighted hit rolls, with equal (50/50) hit allocation for two normal-efficiency opponents. Cities use the attacker's combat efficiency to determine capture, which is 50% at the ordinary setting. Higher efficiency weights combat-hit allocation; hit damage remains unit-specific.
We follow those documented odds, but the original DOS PRNG, seeding, and sequence of calls have not been verified from the executable. Empirata uses a local seeded xorshift RNG, so its random outcomes are not guaranteed to match the original executable turn-for-turn. This is a known fidelity gap, not a gameplay-enhancement rule.
Other remaining limits: simplified red AI; unfinished troop transport/carrier loading, automatic standing orders, and victory conditions; historical maps not imported; exact production timing and some submarine detection details still need executable confirmation. The old “Original test map” remains available as a passive rules test fixture.
Campaign games can use two seed-deterministic generators (Game menu):
- ellipse-v1 — legacy random ellipses; default for frozen evaluation baselines.
- organic-v1 — value-noise fBm with domain-warped coasts, playability validation (land fraction, ocean connectivity, lake-port ban), and city density sparse (~12) or standard (~64).
Seeds may be a custom integer or random on start. Deterministic study maps (layout × seeds 17 / 83 / 211, ellipse · sparse) and lab fixtures live under Game → Test scenarios. Use Copy map seed / Export map recipe to reuse a world; import a recipe to fill the menu without auto-starting.
Organic maps are Empirata lab geography, not Interstel .MAP / editor parity. See playability checklist and .MAP research note.
npm run build && node scripts/preview-organic-maps.mjsThe source now contains troop transport embarkation/landing and carrier fighter boarding/launching, including cargo movement with ships, friendly-port unloading/refueling and cargo losses on ship destruction. Close Quarters has friendly transport/army and carrier/fighter pairs for hands-on use once the latest browser bundle is deployed.
To try the controls in an updated build: select an army and tap an adjacent friendly T to board; select the T, then a listed embarked army and tap adjacent land to disembark. For aircraft, select a fighter and tap an adjacent friendly V to board; select its cargo fighter and tap an empty adjacent square to launch.
Verification note: These mechanics and their tests have been committed to the source repository, but the current GitHub Pages build has not been independently confirmed to include them. Original-DOS loading-order, fuel timing and carrier cargo-loss selection still need reference comparisons.
The site is entirely static. CI builds and smoke-tests the standalone index.html, packages that exact file, and deploys it to GitHub Pages only after verification succeeds on main. Pull requests test and package the site without deploying. The checked-in root bundle is not the deployment source.
Hosting setup: In repository Settings → Pages → Build and deployment, set Source to GitHub Actions. This replaces branch-based publishing. After merging, confirm both the verify and deploy jobs succeed before treating the live site as updated. A manual workflow run on main can retry deployment; it reruns verification first.
To work locally:
npm run build
npm test
node scripts/build-single-file.cjs
npm startThe root index.html embeds all JS and CSS. All engine code is in src/engine, UI in src/ui, tests in tests, and original rules/specification in docs. No proprietary Empire code, artwork or map assets are distributed.
Manual research: source and section index, strategy, and implementation findings.
Close Quarters' Red opponent now selects army or transport production based on its existing forces, loads nearby friendly armies into transports, and can land troops near non-Red cities it has actually discovered. Loaded transports avoid reflexively unloading at their own ports. These are intentionally basic deterministic heuristics, not a claim of reconstructing the original Interstel AI.
The regular test suite includes focused no-omniscience and production-transition tests. Long campaigns or DOS emulation are not required for ordinary CI. Naval route-finding, genuine inter-island invasions and opponent balance remain works in progress.
Select Computer vs computer · clean start in the Game menu. Each faction begins with one city, no mobile units, fresh city-only intelligence and zero production progress. The AI chooses production on its turn; advance rounds to watch units finish and begin exploring. The map remains the fixed lab terrain, and exact original DOS start placement is not verified.
Computer skirmish · staged test retains the prepared Close Quarters forces for tactical regression checks. Both modes use the same provisional strategy and ordinary movement, combat, production and fog-of-war rules. Choose 1, 10, 50, or 100 rounds per advance, then use Advance for one step or Play / Pause for repeated advances. Next round always advances a single round. A spinner and completed-round count appear while a step runs. Pause remains available between individual rounds, including during a 100-round step. Changing speed applies to the next advance. Observe defaults to Alternate each round, switching the map between Blue's and Red's private intelligence after each simulated round. You can instead lock the map to Blue or Red. Compact scorecards show both players' city and unit totals simultaneously; the map never merges private terrain knowledge or reveals the entire world. Changing the viewpoint does not change the game state. Playback pauses when the tab is hidden. Save/export and import work between rounds.
Optional real-browser observer checks run with npm run test:observer after
installing Playwright and WebKit (npm install --no-save --package-lock=false playwright, then npx playwright install --with-deps webkit). They exercise
exact step counts, progress visibility, pause, speed changes and scenario
cancellation. Browser downloads are not part of normal CI.
These are deterministic experimental AI modes, not reconstructions of the original DOS opponent. The staged fixture intentionally places forces near combat; the clean opening evaluates development from production. The game does not run in the background when the tab is hidden.
For broader, optional campaign evaluation, run npm run evaluate:ai. It runs
200 rounds on each of six generated maps: continents, islands and archipelago,
with two terrain/combat seeds per layout. Each starts with one city per faction,
no units, no production progress and only city sight. The generator supplies no
guaranteed invasion routes or scouting memory. It is an evaluation tool, not an
original-DOS map generator or a new in-game map option.
Current experimental AI policy keeps every owned factory producing. A city without a stationed defensive army prioritizes armies; otherwise it produces needed ships or more armies. City defenders are protected from AI transport loading. Ship targets scale with troops and city count, with no fixed fleet ceiling. Hostile-city missions can receive multiple transports, and nearby transports coordinate larger landing waves within available safe beach space. Large expeditions may drop a reconnaissance army at a distant apparently unguarded coast while retaining three armies for their city mission. These are strategy choices; city capture probabilities and human loading rules are unchanged.
The JSON report includes city totals, exploration, production, boarding,
landings, stalled missions and rounds since city ownership last changed.
ROUNDS, SEEDS (comma-separated), LAYOUTS and SWAP=1 control the sweep;
EMPIRATA_ENGINE can point to another built engine for paired comparisons.
Long sweeps remain outside ordinary CI. Generated-map clean-start and replay
checks run with the normal tests. Campaign counts are observations, not pass/fail
targets or evidence of strategic superiority.
CI run 40366834046 passed 146/146 tests on 2026-10-26, including a
20-round autonomous endurance test, hidden-objective checks, and exact
save/reload replay. Standalone bundle build and smoke test also passed.
Every unit has a stable military-style display name in inspection, cargo selection, orders, and event reports. Names use conventional-era US-inspired patterns; Blue, Red, and Green remain fictional factions.
| Unit | Naming pattern | Example |
|---|---|---|
| Army | Numbered infantry division | Blue 1st Infantry Division |
| Fighter | Numbered fighter squadron with nickname | Blue 1st Fighter Squadron “Eagles” |
| Destroyer | Naval personnel; DD hull designation | BNS Fletcher (DD-1) |
| Transport | Historic troop transport names; AP designation | BNS Harris (AP-1) |
| Submarine | Fish and sea life; SS designation | BNS Gato (SS-1) |
| Cruiser | Cities; CA designation | BNS Baltimore (CA-1) |
| Carrier | Historic carrier names; CV designation | BNS Enterprise (CV-1) |
| Battleship | States; BB designation | BNS Iowa (BB-1) |
BNS, RNS, and GNS mean Blue, Red, and Green Navy Ship. The Naval History and Heritage Command’s naming history informs the naval patterns. These are presentation conventions, not claims of historical hull assignments, original DOS naming, or the number of soldiers/aircraft represented by a counter.
Names derive from faction, type, and permanent unit ID without consuming random draws or changing the save format. Production serials are shared across types, so formation and hull numbers can have gaps. Long campaigns reuse the finite ship-name lists with distinct hull numbers. Scenario IDs receive deterministic fallback designations. Internal IDs remain in logs for diagnostics. Enemy names use only the same identity information already present in sightings, including remembered contacts.
Cities have stable fictional place names independent of ownership. Inspection and observer reports show names rather than diagnostic IDs. Save files and order targets retain their internal identities.
The laboratory uses explicit elimination: a faction survives while it has any city or unit, including embarked troops or airborne fighters. A sole surviving faction wins; no surviving factions is a draw. This is a lab rule, not a verified reproduction of DOS surrender thresholds (which remain unresolved in the rules specification). Losing all cities alone does not eliminate a faction that still has units.
The derived result survives export/import without extra save fields. Finished games stop round advancement and orders in the UI. Observer batches stop early at the result. The final map and cargo inspection remain available; export the final game or choose New game (with the existing replacement confirmation). Automatic surrender and continuing a finished match are not implemented.