# Army-wide coordination and development experiment

## Scope and authority

**Status: experimental; gameplay acceptance FAILED. The current runtime is not a verified replacement for the preserved winning binary.**

The user approved army-wide coordination (not just Tank coordination), a complete scout lifecycle, productive multi-base expansion, composition planning, air/late-tech development and coherent investment allocation. The existing native runtime remains the only issuer of game orders. The coach makes bounded program/development judgments; it never controls individual units. The presentation-owned HUD and coach-strip rendering are unchanged.

`ArmyCoordinator.h` allocates exclusive unit assignments: local base defense, main pressure/regroup, reinforcement, support escort and conditional worker harassment. Splitting is conditional on weapon capability, travel, enemy power and the main force's remaining coverage. The fighting body is an actual concentration of units, not a potentially empty global centroid. Formation-slot helpers were tested but destination-offset formations were removed from main travel after regressions; global routes use engine pathfinding, with local micro separation and covered lane-yield handoffs. These are explicit Jev execution hypotheses, not a trained optimal team policy.

Scout states are OUTBOUND → RETURN → MINING. Threat, a completed observation or mission deadline triggers a latched return, rather than resuming a suicidal route as soon as immediate exposure falls to zero. Stale intelligence can create a subsequent mission; a dead scout is not treated as alive.

Expansion planning clusters mineral lines, scores placements, tracks rejected sites and transfers unloaded miners incrementally after bases complete. If no safe site remains, clearing a contested mining site becomes a tactical objective. Production, tech, supply and worker funding share native resource accounting. Gas planning must cover the investment horizon, not only one next unit.

The coach has an independent GROUND / ANTI_AIR / SUPPORT / AIR_HARASS / CAPITAL judgment, with probabilities retained in telemetry. This adds a capability to the existing ground composition rather than replacing the opening. Native prerequisite traversal uses BWAPI data for buildings and addons. Comsat scan, Science Vessel escort/Matrix and Battlecruiser/Yamato paths have execution code; they require separate live validation. Transport/drop missions are not offered as an executable capability.

## Research versus hypotheses

- Blizzard's [Tank guide](https://classic.battle.net/scc/terran/ut.shtml) supports screening, spotting, separation and advancement under covering fire. It does not validate Jev's formation or allocation algorithm.
- Blizzard's [Science Vessel guide](https://classic.battle.net/scc/terran/us.shtml) supports mobile detection and specialized protective abilities. A support unit must accompany useful combat forces, not receive an ordinary solo attack order.
- Blizzard's [Battlecruiser guide](https://classic.battle.net/scc/terran/ub.shtml) describes the production chain, gas-intensive force, Yamato and repair/retreat considerations. Capital ships are not an automatic TvP upgrade over a winning ground army.
- Costs, prerequisites, weapons, ranges and legal commands are read from the local BWAPI version. Research-backed capabilities are distinct from Jev's utility weights, investment heuristics and uncertainty margins.

## Early experiment findings

The prior `focused-resume-02` winning build and its sources remain preserved under `runtime/evidence/`.

1. `army-coordination-01`: genuine loss at frame 14,356, clean exit. Scout returned at full HP, expansion completed and seven worker transfers occurred. A new gas-budget bug starved Factory growth: the gas allocator stopped after funding a single unit while infrastructure growth waited for a larger bank. It stayed on one Factory and peaked at 1,985 minerals. Fixed by including planned infrastructure, research and recurring production in the investment horizon. An overly restrictive friendly-proximity deployment veto was removed.
2. `army-coordination-02`: manually interrupted; **not a natural match result**, regardless of the subsequent engine loss callback/exit 0. Diagnostic evidence only; see its `INVALIDATED.md`. It reached two mining bases and a much larger force, but failed to convert pressure before mining out. Identified firing-target path checks incorrectly requiring access to target footprints, inadequate contested-site objectives and formation/routing stalls. Added a regression test that an in-range shot needs no walking path through its target.

The harness now supports a wall-clock experiment timeout. A timeout/interruption cannot be reported as a verified win. Subsequent run outcomes must be appended to this document before any readiness claim.

## Complete run ledger

All runs used real autonomous Steamhammer, normal fog, UI enabled, accelerated wall-clock simulation and at most four paid coach calls. These are changing-development-build experiments, **not a controlled win-rate estimate**. Start locations/randomness were not pinned. Opponent BOSS assertions continue to occur; the opponent binary SHA remained identical to the earlier winning evidence.

| Run suffix (`army-coordination-`) | Result | Frame / last sampled frame |
|---|---|---:|
| 01 | Loss | 14,356 |
| 02 | Manually interrupted; invalidated, not a natural loss | 118,098 callback |
| 03 | 180-second timeout; no match win | 105,120 |
| 04 | Loss | 32,708 |
| 05 | Loss | 24,276 |
| 06 | Loss | 12,713 |
| 07 | Loss | 31,344 |
| 08 | Loss | 34,227 |
| 09 | Loss | 17,487 |
| 10 | Loss | 24,803 |
| 11 | Loss | 17,053 |
| 12 | Loss | 33,793 |

Separate control `army-control-baseline-01` loaded the preserved winning binary explicitly (SHA `929c5e73ffc5f6715b75bb064c6a13529d1f11c15ff877700e7c287dd5cdd9da`). It also timed out, last sample frame 94,368, without a match-end result. It traded substantially better than several experimental builds. This does **not** erase its previous engine-confirmed win at frame 17,394 and does not excuse the new build's regressions.

Total measured paid traffic across these experiments and the control: 50 requests, 74,129 input tokens, 5,044 output tokens. Native gameplay continued after each request cap; no API-credit termination was observed.

## What was materially exercised

- Latest run: first scout returned to mining at frame 3,860 with all 60 HP; 27 worker transfers; two simultaneous squad IDs; 19 lane-clear, 28 lane-yield, 134 siege and 92 unsiege accepted ability events; 16 accepted scan events. Events prove execution, **not optimal positioning or combat**.
- Latest run: 13 materialized Depots and 7 materialized Factories completed. One expansion completed; another materialized but did not complete before destruction/end. Two failed CC placements and one failed Factory placement remain. The audit saw no continuously unchanged incomplete shell for 960 sampled frames, which is narrower than proving every construction completed.
- Intermediate run 03: four simultaneous squad IDs, 59 worker transfers, six expansion completions over the run and six bases simultaneously sampled. This run nevertheless stalled and timed out, with 6,276 blocked frames and late idle workers. It is evidence for multi-base execution, **not sound six-base play**.
- Goliaths, Armory, Academy and Comsat materialized in live runs. Wraith, Science Vessel and Battlecruiser production/abilities did **not** receive live match proof. Their prerequisite chains are engine-data-tested; that is not equivalent to air-unit mastery.

## Latest build / acceptance

Native UI/runtime SHA: `9ff27edf287e7d3828f0d6c6d318fef369d56e7a6de45bb043208f83799fd8ca` (run 12; source/build hashes stable). The full experiment manifest is under `runtime/evidence/army-coordination-12/manifest.json`.

Engine result: **winner:false at frame 33,793**, cleanup exit 0. Native metrics: 76 supply-blocked frames, 1,272 mineral peak, 18,759 observed damage, 169 worker damage, **0 production damage**, 99 enemy destroy callbacks versus 294 own losses (counts include workers/buildings; not an army-only K/D). Peak workers 40. The latest available macro sample before elimination was frame 33,600: no surviving bases/workers, 41 minerals, 718 gas.

Validation: 103 Python tests and three native test targets pass. The native targets cover property-based micro/coordination/economy, five BWAPI tech-prerequisite chains and socket cleanup. Both native builds compile. The HUD/coach-strip rendering was not overwritten; no new visual-quality claim is made. After the last match, runner-only cleanup tests were added for isolated process-group termination on timeout/interrupt; no native behavior changed.

### Nine-layer assessment

1. World model: physical telemetry and weapon properties integrated; uncertainty and projectile-delivery models remain incomplete.
2. Scouting: return-to-mining lifecycle proven; safe information renewal under changing threats is not fully validated.
3. Phase: labels now reflect completed infrastructure/multi-base/air capabilities rather than merely whether a Tank survives.
4. Strategy: bounded independent development judgment implemented; actual air/capital selection not proven.
5. Tactics: exclusive multi-squad assignments execute, but force allocation, cohesion and objective conversion still fail acceptance.
6. Macro: latest supply blocking improved; expansion placement failures, resource allocation and protection of the new economy remain inconsistent.
7. Mechanics: unpaid construction reservations and explored-site approach are explicit; invalid accepted pads expire rather than endlessly reassigning workers.
8. Micro/camera: attack/path legality, whole-engagement shield/health efficiency, friendly-splash avoidance and lane yielding are tested; actual trades remain poor. Existing camera/HUD retained.
9. Evaluation: all losses/interrupted runs retained, hashes recorded, timeouts cannot count as wins. No new winning or demo-ready claim.

The next implementation should isolate defensive squad sufficiency, engagement/execution losses and opponent delivery threats under repeatable scenarios. Do not add more strategic menu options to hide the failed combat acceptance. Preserve `focused-resume-02` as the known winning artifact and compare against it explicitly.
