Spaces:
Paused
Paused
Commit History
-
Correct three bench detectors that the fixes turned into false positivesβ
Claude +1: Claude Opus 5Unverified signatureScaling the AI up changed what its healthy behaviour looks like, and three of the five health checks kept measuring the old shape. A detector that fires on behaviour the design intends is worse than no detector, because the tuning loop optimises against it β so each is rewritten and pinned with a test: - production-stall now needs EVERY Barracks idle, and excludes strategies that deliberately cap their standing army. An "any Barracks idle while holding 400" test fired on 42 of 44 HEALTHY runs once surplus opened six of them, and idle Barracks are the literal point of Economic / Force Parity. - hoarding now needs a large FINAL bank with a frozen army, not a transient peak. A working economy peaks high and spends straight back down; the peak-based test scored it the same as the AI that banked 30,000 and stopped. - supply-deadlock now needs the AI to be blocked with no Habitat on the way. A busy AI lives close to its cap and is momentarily blocked all the tiβ¦b63da6d -
Fix the five Odyssey AI defects the bench found, TDDβ
Claude +1: Claude Opus 5Unverified signatureEvery change below is red-first: the failing test states the contract, the engine change makes it pass. Full suite 1209 green, typecheck clean. engine/aiWorkers.js + engine/aiEconomy.js β the supply deadlock (review Β§2.2). The Habitat trigger fired at a flat `used >= cap - 2`, a margin sized for a 2-supply unit, while the Odyssey roster has 4- and 8-supply ones and pickNextUnitType retries the SAME mix entry until it succeeds. It is now sized from maxSupplyDemand(): the biggest supply cost the AI could actually try to pay. Clearing that surfaced two more freezes with the same signature, both fixed here: supply already under construction is now credited (so one Habitat per 10s no longer throttles a scaled-up line), and Habitats are placed at ANY of the AI's Command Centers β measured, a 70-building capital had no valid spot left while its own expansions had room to spare. engine/aiIndustry.js + engine/ai.js β the industry bootstrap reserve (Β§2.4). runAI runs production before industryβ¦42d791d -
Add an AI bench for Odyssey, and a measured review of the opponentβ
Claude +1: Claude Opus 5Unverified signatureThe engine suite guards invariants (determinism, purity, "a skirmish resolves to a winner") and says nothing about AI QUALITY, which in a play-forever mode is a curve over 40+ minutes rather than an assertion. So several real defects were sitting in a fully green suite. tools/ailab.js is a headless bench: it runs the real sim (a 40-sim-minute world costs ~7s), drives the player side with scripted sparring bots, samples an AI-quality metric set, and prints a scoreboard plus a named-defect list. Subcommands: probe / sweep / compare / search / check. The key seam is that ARCHETYPES, STRATEGIES and DIFFICULTY_OPTIONS are plain exported tables read through defensive `|| 1` accessors, so a candidate AI is JSON injected via --overrides, not an engine patch β the search space is already a data document. Nothing under engine/ changed here. docs/odyssey-ai-review.md carries the review and the tuning loop, with a reproduction command per finding. A full-roster soak (11 worlds x 4 strategies, 4β¦953e69e -
Remove the Refinery/Foundry/Arsenal forward drop-off capabilityβ
Claude +1: Claude Sonnet 5Unverified signatureThey no longer double as decentralized resource collection points β the Command Center is the only drop-off. Removes the now-dead finite-intake buffer branches in gather/haul, the AI's forward-Refinery placement logic, and updates HUD/docs/tests accordingly. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HW46d81A9V6VumZWqw7XZU4ed9122
-
Add the player's field manual as a standalone HTML referenceβ
Claude +1: Claude Sonnet 5Unverified signatureA comprehensive, self-contained handbook covering units, buildings, economy, combat mechanics, doctrines, worlds, the AI opposition, and the Odyssey meta-game β compiled from the game's own rules for players to read outside the in-app help overlay. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019D2T1qjQtkfAgLRAgrKL2vfa00e75
-
Make an explicit home-base assignment a hard zone boundaryβ
Claude +1: Claude Sonnet 5Unverified signatureA player-assigned home base (unit.homeCC) fell back to a global search just like the default nearest-CC guess whenever its zone came up empty -- meaning a hauler pinned to one Command Center could still get poached into another base's territory, defeating the point of assigning it in the first place. zoneFirst now tracks whether its home zone came from a valid override or the default distance guess, and only widens to the whole empire in the latter case. A unit pinned to a Command Center now cycles through whatever other jobs that zone has to offer and simply waits when it has none, until the player reassigns it to a different CC or clears the override -- while a building-level manual assignment (service/repair/ ferry) keeps behaving as the single, hard-locked target it already was. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SYFtYzV8C6Scdpz5dMJpoWee2f17b -
Add player-assigned home base override and worker repair of wounded unitsβ
Claude +1: Claude Sonnet 5Unverified signatureCloses the two items flagged as future work in the previous zone-affinity commit: a home-base override, and repairing mobile units. engine/gather.js zoneFirst now takes an optional homeId that, when it resolves to a live owned Command Center, wins over the usual nearest-CC distance guess. Right-clicking a completed own CC with eligible units selected (worker, Mender, freighter) pins unit.homeCC to it (issueSetHomeBase) β a passive assignment that only changes the unit's next idle job search, never its current order. A stale override (its CC destroyed) is ignored and falls back to the distance guess. Threaded through every zone-first call site in haul.js and repair.js's pickRepairTarget, so it covers haul/service/ferry job search and both the worker repair job and the Mender's own autoRepairRoam. assignRepair no longer restricts itself to buildings: a worker can now be assigned to chase down and patch a wounded mobile unit the same way it patches a turret, walking toward the target's β¦06de929 -
Add Command Center zone affinity for haulers, plus a worker repair jobβ
Claude +1: Claude Sonnet 5Unverified signatureHaulers/servers/ferriers used to pick jobs by raw nearest-distance across the whole empire, with no notion of "which base do I belong to." Once a busy base's own β€2-per-target caps filled up, idle labour got routinely poached across the map by another base's job. engine/gather.js zoneFirst now restricts each search to the worker's own Command Center zone first, only widening to the whole empire when the home zone has nothing to offer (byte-identical to before on any single-CC game). The auto-repair Mender's roam target-pick adopts the same zone-first logic via a shared pickRepairTarget helper (engine/repair.js). Buildings could previously only be healed passively by a Mender in range. Workers can now be assigned a repair job (auto, zone-first, after ferry/haul/service in priority; or manual via right-click, issueRepairBuilding), patching a damaged own building at a flat rate, capped per building like the existing haul/service caps. Both changes are pure functions of state and reused β¦32d2559
-
Implement Phase 4 of battle wreckage: growing battles + deposit gatingβ
ClaudeUnverified signatureA new contribution to an already-pending wreck site now refreshes its spawnAt (a raging fight over the same ground keeps enriching the eventual deposit), capped at WRECK_MAX_DELAY total from the site's first death so it can't defer maturation forever. The 80% base return is now gated to commodities this world actually has (isNaturalDeposit) -- a genuine map-generated node, never a wreck or crater node itself, so one slipped-through foreign commodity can't unlock itself for every kill after it. Battle-intensity value still counts everything regardless of local availability, and the Phase-2 bonus is deliberately left ungated (it's meant to synthesize something that wouldn't otherwise be here). This protects aiWorkers.js's "surface commodity set is constant for the match" assumption, and as a real consequence, Strategic-tier costs (ai/antimatter/plasmatorp) are now only ever recoverable through the capped bonus roll, never the base return, on any world.865aea3 -
Mark Phase 3 done in the battle-wreckage design doc
ClaudeUnverified signatureb49e143 -
Implement Phase 2 of battle wreckage: battle-intensity bonus materialsβ
ClaudeUnverified signatureA wreck site now tracks the un-scaled sum of every contributing death's cost (site.value). Once that clears WRECK_BONUS_THRESHOLD, the site forges a modest, capped amount of one higher-tier commodity (metals, electronics, or relics) on top of its normal 80% base return -- bigger consolidated battles have a real shot at denser materials a raw unit's own cost never pays in. Deterministic (same hashStr technique the crater's own commodity roll uses), and persisted so a save/load mid-battle can't reset a site's bonus-eligibility progress.b4afb1c -
Add design doc: battle wreckage as consolidated minable depositsβ
ClaudeUnverified signatureBrainstorm + phased plan for destroyed ships/workers/buildings leaving delayed, minable wreckage (80% of construction cost + a battle-intensity bonus of denser materials), reusing the Helium Bomb crater mechanic's pending-timer -> mature-into-ResourceNode pipeline.8dce8c8
-
Let workers load/unload freighters and add an AI-logistics freighter modeβ
Claude +1: Claude Sonnet 5Unverified signatureWorkers can now physically ferry cargo to and from a landed freighter (right-click it, like assigning a worker to service a building) β the freighter becomes a mobile collection point for nearby production instead of every load detouring through the Command Center. Also adds a new Datacenter research, Autonomous Freight AI, that lets a freighter join the local haul/service logistics chain on its own, like a worker but at its own much larger cargo capacity. Running autonomously burns AI Cores from the treasury while active; out of AI Cores it just pauses in place instead of losing its job or cargo. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AdsYZQyGk32n8x3UBiPGup6f39bc5
-
AI logistics: true symmetry β the AI hauls its own industry, no more free treasuryβ
Claude +1: Claude Opus 4.8Unverified signatureResolves the AI-logistics asymmetry from the architecture review. The AI's factories/rigs used to run off an owner==="ai" abstraction β inputs drawn straight from the treasury, outputs banked straight back, no buffers, no workers, no stalls β so the finite-storage/ haulage system (the headline Odyssey reshape) was a labour tax only the human paid, and the two economies weren't comparable. Now the AI runs the SAME finite-buffer + worker-haulage model as the player: - Deleted the abstract branches in industry.js/rig.js. updateProduction/updatePlasmaRig are owner-agnostic again: a factory only produces once workers fill its input larder and keep its output buffer clear (else it stalls), and a rig's finite buffer must be hauled off. - engine/ai.js assignAiLogistics: dedicates a BOUNDED share of idle workers (<= half the pool, so gathering never starves) to service factories / haul the rig, reusing the exact owner-generic machinery the player's workers use (assignService/assignHaulβ¦8cd6f2e
-
AI industry (1/N): abstracted AI logistics β factories & rigs run off the treasuryβ
Claude +1: Claude Opus 4.8Unverified signatureThe finite-storage/haulage economy is player-only: sim.js auto-assigns haul/service work only to player workers, so an AI-built factory never gets inputs carried in or outputs carried off, and an AI rig's output buffer never drains β they'd produce nothing. This blocks the AI from ever using the new Odyssey industry. Enabling change: the player does logistics by hand (finite input/store buffers + worker haulage β a skill differentiator); the AI's logistics are ABSTRACTED. For an owner==="ai" building, updateProduction draws inputs straight from the treasury and banks output straight back, and the Plasma Rig banks its dig straight to the treasury β no haulage, no buffer to fill and stall on. The power throttle still applies, so Reactors stay a real constraint and the grid still matters. Gated on owner==="ai": the player path (buffers + haulage) is byte-for-byte unchanged, and a skirmish never instantiates a factory/rig so its replay is untouched. This is the one core change; later phaβ¦50f1d44 -
Logistics Phase C: finite forward drop-offs + gather reroute (player-only)β
Claude +1: Claude Opus 4.8Unverified signatureThe last piece: collection buildings get finite storage too. A PLAYER's forward drop-offs (Refinery/Foundry/Arsenal) now have a finite intake buffer (storeCap 100). A gatherer banks its haul into that buffer; when it's full, nearestGatherDrop skips it so the gatherer reroutes to the next collection point β and the Command Center, the bottomless treasury/warehouse, never fills. Phase A haulage clears a forward buffer to the CC automatically. Goods now flow strictly through the warehouse: gather β forward drop-off buffer β haul β CC treasury β supply β factory β haul β CC. Haulage delivers and supply picks up at the nearest Command Center (nearestCommandCenter), never sideways between drop-offs. Factories are excluded from gather drop-offs (isGatherDropOff): their `store` is refined output, not a raw-intake bin. - entities.js: storeCap on refinery/foundry/arsenal; isGatherDropOff helper. - gather.js: player forward-drop-off banks to the building's buffer (capped, leftover reroutes); β¦89beffa -
Logistics Phase B: factory input larders + a real supply networkβ
Claude +1: Claude Opus 4.8Unverified signatureFactories stop sipping from an infinite global pool: each now draws its inputs from a FINITE local larder (building.input) and banks output into a finite buffer (building.store), both capped at 80 by default for any building with a recipe (storeCapOf/inputCapOf). updateProduction runs a factory only while it's been supplied AND has output room β it stalls starved or backed-up, exactly like the Plasma Rig. Worker haulage gains a supply leg (engine/haul.js): an idle player worker picks the nearest own factory low on an input the treasury can provide, carries a cargo from the Command Center into its larder. Output is cleared by the Phase A haul path, which now covers factories automatically. Idle workers try haul first (clear backlogs, refill the treasury) then supply (feed the starving). Both capped at 2 per building, deterministic nearest-by-id, player-only. The industry chain is now a genuine network routed through the treasury: raws β CC β supply β smelter β metals β haul β CC β supβ¦832f494 -
Logistics Phase A: finite rig output buffer + worker haulageβ
Claude +1: Claude Opus 4.8Unverified signatureStorage stops being an infinite sink and workers get a job that lasts to the end of the game. The Plasma Rig (a leaf producer of raw goods β the safest surface to prove the mechanic, since its output feeds no other factory) now banks each dig into a FINITE local buffer (building.store, capped at def.storeCap 120) and stalls the moment it's full. Those goods aren't spendable until hauled to a Command Center. New worker haulage (engine/haul.js): an idle PLAYER worker auto-assigns to the nearest own producer whose buffer is β₯34% full (β€2 haulers per producer, ties broken by id), walks there, loads a cargo, carries it to the nearest drop-off, and banks it into the treasury 1:1 β no gather multiplier, since the rig already extracted it. Run short on haulers and the buffer fills and the rig stalls: logistics is now a live demand on labour, exactly as intended. - entities.js: storeCapOf / storeTotal / storeRoom helpers; storeCap on the rig def. - rig.js: bank to store (top off the final digβ¦91ad84b -
Docs: logistics overhaul brainstorm + phased finite-storage/haulage designβ
Claude +1: Claude Opus 4.8Unverified signatureCaptures the plan of record for the finite-storage + worker-haulage half of the logistics request. Records the energy grid-efficiency feature that shipped, then lays out why per-building storage is a core-economy reshape (one global player.resources pool feeds gather/industry/rig/market/costs/wonder/AI/HUD), the forgotten aspects the brainstorm surfaced (AI deadlock, what counts as spendable, determinism, save coercion, auto-haulage, balance), and a three-phase plan β A: production output buffers + auto-haulage (player-only, safe first slice); B: factory input buffers + a real supply network; C: finite collection storage (touches the AI, highest risk) β each its own determinism-verified merge. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AEQUVetLk31Jj7niDQAsXL6dbb379