Watch Campaign Koomba mission 2 update (5 October 2026)
- Defenders respond to attacks on the whole base. Ordinary paid construction
  retains a working Store and food economy while completing the mission.
- Six completed first-five runs retain Koomba M1 and win M2 with exact repeat
  outcomes, ticks and scores. Fresh isolated shipping-source validation also
  wins M2 against Original Classic opponents without cheats.
- The working Watch list has 30 missions, including 28 of the first 40:
  Tyrano 1-7; Kanoose 1,2,4; Romack 1,3,5; Masai 1,2,4,5;
  Moospell 1,2,4,5; Koomba 1,2; Radumba 1-5; Koaka 1,2.
- All completed outcomes and scores are retained in CampaignResults.
  Scores are advisory. Unvalidated strategies remain private.
- Product v1.11E; file version 1.12.17.0; protocols C036 and C033.

Watch Campaign Tyrano mission 2 update (5 October 2026)
- Tyrano M2 preserves visible routes around ordinary paid construction,
  reserves working space and purchases a second Store through normal production.
  Actual food collection and deposits fund the mission buildings.
- Two completed first-five screens agree on outcomes, ticks and best/final
  scores. The isolated shipping source has a fresh Native M2 victory with
  neutral Original Classic controls. Scores remain advisory.
- The working Watch list has 29 missions, including 27 of the first 40:
  Tyrano 1-7; Kanoose 1,2,4; Romack 1,3,5; Masai 1,2,4,5;
  Moospell 1,2,4,5; Koomba 1; Radumba 1-5; Koaka 1,2.
- All completed full-run and stopped-screen outcomes and scores are retained
  in CampaignResults. Unvalidated strategies remain private.
- Product v1.11E; file version 1.12.17.0; protocols C036 and C033.

Watch Campaign Romack mission 5 update (5 October 2026)
- Romack M5 uses ordinary earned training, safe food/rest, a Ranger-led party,
  local Mapping and legal Space Shift orders. Canonical remembered terrain
  guides routes while actual own-sight memory continues to drive search.
  Hidden actors/items are not revealed; resources and stats are not granted.
- The first-five screen and exact repeat retain M1/M3 victories and every
  other outcome/score. M2's proved construction stop remains separate from
  full Native runs. The isolated shipping source has a fresh Native M5 win
  with neutral Original Classic controls. Scores are advisory.
- The working Watch list has 28 missions, including 26 of the first 40:
  Tyrano 1,3,4,5,6,7; Kanoose 1,2,4; Romack 1,3,5; Masai 1,2,4,5;
  Moospell 1,2,4,5; Koomba 1; Radumba 1-5; Koaka 1,2.
- Current UI and personal INI are preserved. Failed or untested AI stays
  private. All full-run and stopped-screen outcomes/scores are in CampaignResults.
- Product v1.11E; file version 1.12.17.0; protocols C036 and C033.

Watch Campaign Koaka mission 2 update (5 October 2026)
- Koaka M2 builds its first paid Barracks before its Store and permits the
  existing paid recruit loop until two actual fighters exist. Native recipes,
  prices, budget reservations, combat and withdrawal rules are preserved.
  Only exact original Koaka M2, Normal campaign, Modern Hard and selected
  Watch owner receive these edits. Resources and stats are unchanged.
- The full first-five prototype and exact repeat retain every outcome and
  score. The isolated shipping source requires a fresh Native M2 victory
  with neutral Original Classic controls. Scores remain advisory.
- The working Watch list has 27 missions, including 25 of the first 40:
  Tyrano 1,3,4,5,6,7; Kanoose 1,2,4; Romack 1,3; Masai 1,2,4,5;
  Moospell 1,2,4,5; Koomba 1; Radumba 1-5; Koaka 1,2.
- Recent UI changes and personal INI are preserved. Failed or untested AI
  stays private. Full-run outcomes and best/final scores are in CampaignResults;
  early stops and single-mission validation remain separate.
- Product v1.11E; file version 1.12.17.0; protocols C036 and C033.

Watch Campaign Kanoose mission 4 update (5 October 2026)
- Attack waves retain the actual assigned home guards when the base is quiet
  and the existing risk estimate is below 40 or covered by those guards.
  The rule is restricted to the original Kanoose mission 4, Normal campaign,
  Modern Hard and the selected Watch owner. Resources and stats are unchanged.
- The full first-five prototype and exact repeat recorded every outcome and
  score. The isolated shipping rule won a fresh Native mission 4 test with
  neutral Original Classic controls. Scores remain advisory.
- The working Watch list has 26 missions, including 24 of the first 40:
  Tyrano 1,3,4,5,6,7; Kanoose 1,2,4; Romack 1,3; Masai 1,2,4,5;
  Moospell 1,2,4,5; Koomba 1; Radumba 1-5; Koaka 1.
- Recent UI changes and personal INI are preserved. Failed or untested AI
  experiments stay private. Every full-run outcome and best/final score is
  retained in CampaignResults. Early stops are reported separately.
- Product v1.11E; file version 1.12.17.0; protocols C036 and C033.

Watch Campaign Moospell mission 4 update (4 October 2026)
- Wizards recover to 80 percent health before joining a mission 4 attack wave.
  This is guarded by the exact original Moospell mission, Normal campaign,
  Modern Hard and the selected Watch owner. Resources and stats are unchanged.
- The complete five-mission prototype run reproduced all outcomes and scores.
  The isolated shipping rule also won in a fresh Native mission 4 check with
  paired, neutral Original Classic controls. Scores remain advisory.
- The working Watch list now has 25 missions, including 23 of the first 40:
  Tyrano 1,3,4,5,6,7; Kanoose 1,2; Romack 1,3; Masai 1,2,4,5;
  Moospell 1,2,4,5; Koomba 1; Radumba 1-5; Koaka 1.
- Recent UI changes and personal INI are preserved. Failed or untested AI
  experiments stay private. All full-run outcomes and best/final scores are
  recorded in CampaignResults. Early stops are reported separately.
- Product v1.11E; file version 1.12.17.0; protocols C036 and C033.

Earlier four-mission AI update (4 October 2026)
- Mission-specific Modern AI policies are included for Romack mission 1,
  Masai mission 2, and Radumba missions 2 and 3. They use normal paid
  recruitment, earned equipment and authored campaign resources.
- The Watch mission list follows genuine production Watch victories:
  Tyrano 1,3,4,5,6,7; Kanoose 1,2; Romack 1,3; Masai 1,2,4,5;
  Moospell 1,2,5; Koomba 1; Radumba 1-5; Koaka 1.
  This is 24 missions, including 22 of the first 40 campaign missions.
- Qualified settings are Modern Hard and Normal campaign difficulty.
  Original Classic opponents retain their own strategy and orders.
  Mission outcomes determine availability; displayed scores are advisory.
  Failed and untested experimental policies remain private.
- The existing Watch mission grid shows the working mission list.
  The extra AI test results button has been removed.
- Historical results below describe their own earlier tested builds.
  Current full runs, stopped screens and focused tests are saved separately;
  an early QA stop is never counted as a retail victory or a full run.
- Product version 1.11E; file version 1.12.17.0; TCP 0x0110C036;
  spectator compatibility 0x0110C033. Personal setup and INI are preserved.

Modern AI campaign validation (v1.11E, 1 October 2026)
- Hard single-capture missions use a healthy supported patrol, current sight,
  known terrain and ordinary scouting. Four army members assemble locally;
  the assigned patrol continues its objective when an unrelated old raid
  group withdraws. Current injuries, wildlife danger and defense keep priority.
- Native food-delivery recovery retains its watch through normal move/idle
  transitions, then uses an ordinary Store perimeter route after a real wait.
  Combat, cargo and progress checks remain active. No stats, XP, food, actors,
  ownership, map data, opponents or mission objectives are granted or changed.
- Fresh full twelve-mission runs against Original Classic opponents validated
  victories 1,2,3,4,5,6,7,8: eight victories, three timeouts and one QA stop,
  with zero invalid cases. Mission 6 won natively at tick 176031.
  Every other mission retained its paired baseline outcome, ticks and score.
  Scores for missions 1-12: 100,100,100,100,100,100,100,100,20,42,4,3. Scores are advisory.
  All twelve native victories remain an open goal: missions 9,10,11,12 remain.
- The accepted AI was rebuilt with current production sources and tested in
  another fresh full-campaign pair. Each build passed twelve Original control
  missions; only the actual test player received Modern Hard orders. Seed 1,
  uniform 194,400-tick limit, unchanged QA stop policy, no cheats or grants.
- The exact production build passed audit, replay, language, spectator and
  launch checks, and actual Classic matches on all twenty authored maps.
  The previous installed peer was rejected; a matching peer passed ordered
  TCP transfer and clean terminal handling. Personal setup and INI are kept.
- Product version 1.11E; file version 1.12.7.0; TCP and
  spectator compatibility 0x0110C030. Peers must use matching builds.
  Original AI remains the default. Unvalidated AI policies remain private.

Modern AI campaign validation (v1.11E, 30 September 2026)
- The installed Hard planner now dispatches ready hunting helpers before
  filling its remaining helper slots. This applies to public wildlife-hunting
  objectives, retains the existing party limit of eight, and keeps normal sight,
  route and combat-safety checks. Food, stats and XP are earned by normal play.
- One valid full twelve-mission Tyrano run at a uniform 194,400-tick limit
  won missions 1,2,3,4,5,7,8: seven victories, four timeouts and one QA stop
  after the original retail loss condition became unavoidable. No invalid cases.
  Modern Hard controlled only the test player; opponents used Original Classic.
  Seed 1, no cheats, grants, changed opponents or altered mission objectives.
- Scores for missions 1-12: 100,100,100,100,100,0,100,100,20,42,4,3.
  Mission 7 won at tick 155,519. Every other mission retained the prior
  validated outcome, result byte, elapsed ticks and score. Scores are advisory.
  All twelve native victories remain an open goal: missions 6,9,10,11,12 remain.
- The production executable passed audit, replay, language, spectator and
  launch checks, with live Classic matches verified on all 20 authored maps.
  Nineteen passed in the main suite; map 14 passed a fresh-profile retry after
  a pre-match readiness timeout. The original failed test evidence is retained.
- Product version remains 1.11E, file version 1.12.2.0. TCP and spectator
  protocol identity is C02E; multiplayer peers must use matching builds.
  Original AI remains the default. Further experimental policies stay private.

Modern AI release update (25 September 2026)
- The funded hunt muster policy is included. On wildlife-objective maps with a
  stocked food store, trained fighters can assemble near a visible required
  critter while workers keep supplying food. The normal sight, route, and
  fight-safety rules still apply. Original AI remains the default and its
  orders are unchanged. Campaign tuning is ongoing; this update does not
  complete every mission. The campaign autoplay used to evaluate the planner
  is a private testing harness. In the released game Modern AI commands only
  computer-controlled tribes; the player always controls their own tribe.

Modern AI armory policy (v1.11E)
- Only Masai, Koomba and Radumba may commission their original armory and
  legal recipes. Capturing another tribe's armory does not unlock its recipes.
- Build an armory after the food workforce and essential buildings are ready,
  with at least 6/5/4 basic fighters on Easy/Normal/Hard and real equipment demand.
  Keep rebuilding savings, four recruits and an initial equipment batch affordable.
- Pay for recruitment before new equipment. Spend at most 20/25/33 percent of
  the remaining surplus per planning pass, for at most 1/2/3 orders by difficulty.
- Use retail weapon damage/shield tables and actual food prices, not item IDs as
  quality levels. Equipped, carried, visible ground and queued items count.
- No shield purchases for bow users, no equipment pile for distant armies,
  and no new luxury orders while rebuilding or defending a threatened base.
- An incompatible armory in an old authored map does not prevent commissioning
  the tribe's legal armory. Nearby recipients must be able to reach its grounds.

JURASSIC WAR: AI GUIDE AND ORIGINAL AI AUDIT
Native Windows port of the original game (not the Unreal remake)
Modern planner updated and tested: 19 September 2026
Original engine reference audited: 12 September 2026

Modern AI reliability repairs (1.11E)
------------------------------------
Post-combat guard states remain eligible for new work, including food returns.
All managed paid Constructors receive separate reachable sites. Failed or
blocked placement orders can be retried without discarding the Constructor.
Route checks use the acting unit's connected terrain, visible building
footprints, and the existing flying-unit exception. Moving units are not
permanent terrain obstacles. Discovery can cancel an impossible ground march.
Workers overlapping a building in authored starts can use its adjacent exit.
Unseen terrain and hidden enemy positions still cannot inform decisions.

Hunters reserve real drops, including those already being collected, and
assess nearby available support before attacking wildlife. Hunting exploration
uses nearby shared destinations and ordinary movement. Weapon pickups use
the actual unclaimed item location. Wounded troops retain their resting state.

Food collection weighs walking distance around known obstacles against nearby
safe hunting and its combat effort. A ground pile's amount is unknown until
pickup, including whether it is empty; a large hidden amount cannot attract
hunters across the map. Local food searches cover up to 12 route steps on Easy,
18 on Normal and 24 on Hard. Training gives hunting a modest preference.
Hunters avoid observed hostile guards, reserve separate drops, and can abandon
an old distant pickup trip when a clearly better local opportunity appears.
Unassigned starting troops establish a hunting group before scouting for
enemy tribes. Hunters already exploring reconsider newly visible wildlife;
nearby walking companions count as available hunting support. Specialist
tribes rebuild a small hunting group when their workforce is missing.

Critters attacking a live AI building trigger a bounded local defense,
including attacks on an outlying food store. Nearby scouting, marching and
collecting units can respond. Peaceful wildlife and attacks on another tribe's
buildings do not trigger this alarm. Threats still require the AI's own sight.

Wildlife fights are reassessed using the currently engaged local animals,
remaining HP and nearby reachable help. A manageable second animal does not
automatically cause retreat. Easy can call at most one extra helper, Normal
two and Hard three. Distant help counts less toward immediate survival.
Wounded hunters can withdraw while healthy helpers cover them; a clearly
overpowered party withdraws together. Saved movement/rest orders preserve
recovery until 80 percent HP, without the original automatic retaliation
routine cancelling the retreat. Safety checks run more often than spending
decisions, with slower responses on Easy. Hidden wildlife never informs them.
All active AI tribes receive their opening and later full planning turns
together, every 32/24/16 simulation ticks on Easy/Normal/Hard. At the original
simulation speed this is about 1.8/1.3/0.9 seconds, instead of the old rotating
14/7/3.5-second gaps per tribe. Idle hunters without visible prey explore
together immediately; they no longer wait for a separate 512-tick window.

A jammed Constructor now selects a complete nearby construction site with a
clear approach. It no longer discards its assignment for a temporary waypoint
and then walks back toward the same obstructed site. Active construction
approaches are checked even while the builder keeps moving, so back-and-forth
movement cannot evade recovery by continually resetting the waiting counter.
It waits if no legal nearby replacement is currently accessible.

Recruitment falls back to recipes the tribe can use. Armories can choose a
cheaper available weapon when the preferred tier is unaffordable. Active,
paused, and new jobs share a food budget. A missing first store may use the
reserve so an equal start with exactly its price can establish its economy.
No free food, units, or combat stats are granted by these repairs.

Remote combat does not exhaust the local defense roster. Outgoing expedition
caps remain unchanged. Original (Classic) AI retains
its original code paths. Save/load reconstructs the planner from engine state;
there is no unsaved AI clock or random state. All network peers need 1.11E.
Use the same build fingerprint on every computer; the public version name
remains v1.11E while internal build and compatibility identifiers advance.

Modern AI balance and starting options (1.11E)
--------------------------------------------
Modern AI limits outgoing response groups to 4 units on Easy, 5 on Medium,
and 8 on Hard. Units already marching or fighting count toward that limit;
losing one scout does not dispatch the entire idle army. Multiple enemies
invading the AI's base can draw additional defenders.

Equal AI start is available in skirmish and multiplayer setup for Modern AI.
It uses the same Starting units count and ordinary tribe starting stats as
the human players, without the map's authored AI forces or prebuilt base.
Tribes retain their own unit types. Difficulty changes the planner's behavior,
not those equal starting stats. Turn the option off to keep authored AI forces.
Original (Classic) AI keeps its original forces and behavior; this option is
disabled for it. Campaign authored starts are retained.

Fog of war in the lobby controls players' view: Classic uses original exploration,
On uses modern line-of-sight fog, and Off reveals the whole map to players.
Modern AI always needs its own faction's sight, even with Fog Off or an observer.
Previously explored areas do not provide live updates after its scouts leave.
Targeted allied attacks/spells and victory
repairs are general game fixes and apply with either AI mode.

Using the optional new AI (native port 1.11E)
-------------------------------------------
Open MENU (F10), Option, Advanced. Select AI difficulty and press Save:
  Original AI (default)
  Modern AI - Easy
  Modern AI - Normal
  Modern AI - Hard
The selector shares the in-game Advanced screen with language and item stats.
New installations and settings without an AiMode key use Original AI.
The Advanced selector supplies the default for newly created skirmish and
multiplayer games. It does not take over an ongoing campaign. Loading a save
restores that match's AI choice; old unmarked saves use Original AI.

Campaigns choose AI on the original difficulty wheel. Each of the three
stone wedges now has two parts. Inner Easy/Medium/Hard use Original AI with
the original campaign difficulty. Outer Easy/Normal/Hard select Modern AI
Easy/Normal/Hard for eligible computer-controlled tribes and the corresponding
campaign difficulty. It never takes control of the player. Cancel is still
the centre button. The selected AI persists through retries, JUMP and later
missions; it is stored in saves. In co-op, the host uses the same wheel and
both players receive that choice. Continue co-op also retains the saved AI.
Both humans share the campaign tribe; scripted allies and enemies
retain the existing campaign eligibility rules described below. A departure
ends co-op instead of transferring the shared tribe to AI.
In the new 2-8 player
TCP lobby, the host can select the match's AI difficulty directly. All peers
simulate that same choice; local language and AI preferences may differ.
Its six choices are Original AI - Easy/Medium/Hard and Modern AI -
Easy/Medium/Hard. A fresh lobby with Original AI defaults to Medium.
Changing the choice clears Ready for everyone. Both the AI mode and the
original engine difficulty are synchronized before loading the map.
The host activates AI individually with each slot's controller selector.
Unoccupied Open slots and Closed slots stay inactive. A departing client's
tribe transfers to the match AI. Human-controlled tribes are excluded from
the planner. With eight humans, no tribe runs AI until someone leaves.
Classic two-player mode negotiates the host's saved choice at connection;
reconnect after changing that preference. Use matching 1.11E builds and game
content on every peer. See MULTIPLAYER-README.txt for the updated lobby.

Starting food and exploration (1.10Q)
------------------------------------
Modern AI starts each newly loaded scenario with the same food as the human
tribe. Skirmish uses Starting food; the eight-player lobby uses its shared
food choice. Saved games retain their saved economy. Original AI keeps the
original starting food and original difficulty adjustments.
The modern planner uses the actual original rounded VP sight stencils, not
a square approximation. Enemy units, prey and dropped items must be visible
to inform decisions. Unseen terrain is treated as unknown when planning a
route; movement discovers obstacles. Every construction footprint cell must
be currently visible. Scouting discovers suitable destinations through play;
the planner does not inspect the entire map's terrain or enemy positions.
Campaign scripted faction permissions still apply.
Skirmish setup explicitly offers Original AI Easy/Medium/Hard and Modern AI
Easy/Medium/Hard, and saves/restarts retain that selection. Medium is the
original engine's Normal difficulty value; only its menu wording changed.

Eight-player team support (1.10J)
-------------------------------
Humans and AI can join numbered teams; Solo remains independent. Modern AI
filters its enemy searches through the synchronized alliance mask. Original
AI's strategic target choice, ordinary auto-acquisition, retaliation, and
hostile spell searches use scoped alliance comparisons. The original tribe
to owner table stays intact, so units, recruitment, food, buildings and player
commands remain independently owned. Winning is evaluated by surviving team.
These comparisons retain exact original owner equality outside an eight-player
match, including Classic and authored co-op campaign relationships. There is
no shared fog, economy or unit control between separate team tribes, and targeted allied attacks are blocked by the shared match rules.

The three Modern settings use the same planner with these decision budgets:
                              Easy       Normal       Hard
  Replan each AI owner        256 ticks  128 ticks    64 ticks
  Desired hunting party        4          6            8
  Recruitment soft limit      24         34           44
  Minimum assault force       10          8            6
  Food reserve               600        800         1000
  Extra-store ceiling          3          4            5
These are logical simulation ticks, not seconds. Authored starting armies,
already queued jobs and retained renewable replacements can exceed the soft
recruitment limit. Difficulty changes decisions and equipment preferences;
the new planner does not award free food, units or extra combat stats.
The original campaign's own Easy/Normal/Hard starting adjustments still apply.

What the new planner does
------------------------
* Recruits through real Barracks and the tribe's available specialist trainers.
  It admits only recipes enabled in that scenario, budgets their full food
  cost, reserves food committed to existing jobs, and checks entity capacity.
  It resumes production paused by a food shortage when food becomes available.
* Assigns idle shared infantry to hunting parties and replaces missing hunters.
  Parties seek visible wildlife they can overpower, collect visible dropped
  food, and return cargo through the real transfer command. Return thresholds
  are max HP * 4, clamped to 128..512 food; the nearest reachable complete
  store is selected. Individual inventory, consumption and combat still use
  the retained engine routines.
* Builds missing stores, Barracks, an available Armory and available specialist
  facilities through paid Sanctuary recipes. A Constructor walks to a clear
  footprint and the original engine completes construction. Additional stores
  can be placed near seen hunting grounds. Searches are bounded; the planner
  does not conjure buildings or invent a base for a base-less scripted force.
* Produces available weapons/shields for unequipped common infantry, then
  sends nearby infantry to collect and equip those real ground items.
* Scores visible enemies, preferring economic/production buildings, remembers
  the selected target's last seen position, gathers a sufficient army near
  its base, and issues attack-move orders. Undersized forces regroup; nearby
  threats receive defensive orders. Wounded troops retreat toward their base
  and rest. Scouts explore deterministic, reachable map destinations.

Each owner builds its own current visibility from living units/buildings.
Hidden enemies are not tracked by reading their changing positions. Ground
reachability and placement checks use the map's walkable terrain and building
footprints. Actual movement/collision is still the original game's pathfinder.
The new planner retains original individual attacks, spells, relic behavior,
wildlife, damage reactions and renewable replacements. It replaces strategic
group orders for the factions and units it is allowed to manage.

Campaign precautions and limits
------------------------------
Only factions with active authored strategy states 1, 4 or 5 are managed.
Human factions remain human. Campaign independent role-zero actors keep their
mission-authored behavior; newly recruited AI units enter the managed army.
Inactive strategy states and mission victory/defeat scripts are retained.
This deliberately does not turn every non-player mission actor into a general
purpose enemy. Missions without an active tribe strategy can look unchanged.

This is a new strategic planner for the existing game, not a replacement of
every engine subsystem. It has no new formation/pathfinding engine, learned
opponent model, naval planner, or mission-specific solution planner. Original
combat and pathfinding limitations can still affect it. Long-match balance
and every possible campaign outcome require further playtesting.

Implementation and saved state
------------------------------
win11_port/native/modern_ai.h contains the bounded deterministic planner.
modern_ai_hooks.inc adapts the verified retail call sites. Original AI takes
the original strategic call path. The first GI word, unused in all 116 shipped
scenarios and by the inspected retail code, stores A1D1/A1D2/A1D3 for the three
new settings. Zero or an unknown tag means Original. Orders, group goals,
production and economy use the ordinary saved GI/OB fields. No hidden timer,
local random generator, local language setting or UI state drives decisions.
The original skirmish starting-location save bytes are separate and unchanged.

The rest of this README explains the ORIGINAL AI in detail.

Scope and evidence
------------------
This describes the retained retail v1.05e engine, reconstructed from its
relocated x86 image and checked against the 96 campaign and 20 multiplayer
map records shipped with this installation. Addresses below are offsets in
that image, not Windows process addresses. Native-port fixes already present
in this installation can affect timing, storage accounting and map setup.

This is an explanation of executable behavior, not recovered original source
or the original developers' design documentation. The names "group A" and
"group B" are descriptive names for numbered groups. They are not official
tribe personalities. Some assembly jump tables defeat the decompiler; the
bounded disassembly is the authority where the generated C disagrees.

1. There are not eight independent AI implementations
----------------------------------------------------
Every tribe uses the same strategic dispatcher and unit state machines.
The maps provide different entities, starting stats, equipment preferences,
home positions, activity rectangles, group membership and target lists.
Tribe identity and controlling owner are separate fields. A captured entity
can keep its tribe identity while changing owner. Ownership must therefore
not be inferred from tribe art or from the first two multiplayer slots.

Tribe-specific recruitment facilities and specialists:
  Tyrano:   Velociraptor, Triceratops, Dilophosaurus trainers.
  Kanoose:  Elf trainer.
  Romack:   Ranger trainer.
  Masai:    conventional troops and its available Armory recipes.
  Moospell: Wizard and Warlock trainers.
  Koomba:   conventional troops and its available Armory recipes.
  Radumba:  conventional troops and its available Armory recipes.
  Koaka:    Carnotaurus and Rhamphorhynchus trainers.
Commoner, Muscleman, Warrior and Constructor are shared primitives.
Armory availability is data-driven; a tribe name alone does not prove that
every recipe is available in every mission.

2. What happens on a simulation tick
-----------------------------------
The logical update at 0x17E3B increments the simulation counter, consumes
player/network orders (0x13F4C), rebuilds group power totals (0x15F86), and
walks the active entity list. Type-specific handlers update units, wildlife,
buildings and other objects. Effects and ground-item bookkeeping follow.
Finally, 0x17F09 calls the tribe-level dispatcher at 0x15634.

The logical cadence is controlled by the engine speed divisor. Timer ticks
alone are not a reliable unit of real-world AI reaction time.
  - A slow strategy update runs every 32 logical ticks for one tribe.
    The low byte of the tick selects tribes 0..7 in rotation. Each tribe
    receives this update every 256 logical ticks.
  - Group goals update every 16 logical ticks, also staggered by tribe.
    Each tribe receives a group-goal update every 128 logical ticks.
  - Every 128 ticks the dispatcher also services ground-item lifetime.
  - Every 8192 ticks it revisits eligible independent non-player troops
    and orders them back toward their recorded home positions.
This staggering limits work per frame but also makes strategic reactions slow.

3. Tribe strategy and the two groups
------------------------------------
0x32AE4 holds eight tribe-to-owner entries. 0x32AEC holds eight strategy
states. Strategies are not the same as the eight tribe identities:
  0: no tribe-level strategy dispatch.
  1: preparation/defense. Group B's power is tested against an attack threshold.
  4: attacking. Group B seeks targets from its authored priority list.
  5: special state: the fast path sends both groups through attack selection;
     the slow path returns it to state 1.
  2, 3 and 6: the inspected dispatcher entries return without strategic work.
Do not turn these dormant states into attackers just because units exist.

Unit role byte +8 is 0 for independent behavior, 1 for group A and 2 for
group B. Group A is often the local hunting/defense group in authored maps;
group B is the force used by the ordinary attack transition. These roles
describe behavior, not a universal guarantee that a unit is currently hunting.

Group totals use max HP + max MP and OP + DP, rather than a prediction of
actual damage, weapon range, shields, terrain or current health. The totals
are accumulated separately for roles 1 and 2. Desired counts, baseline
power, and counters for waiting/idle members are kept in GI state.

Each group has a ten-byte goal record:
  byte 0: state (0, 4, 8 or 12)
  byte 1: retry counter
  dword 2: target entity
  words 6, 8: destination coordinates
State 0 waits for enough idle members; state 4 follows a live target; state
8 searches; state 12 delays before retrying. The unit-level controller
consults its group's record and queues ordinary engine movement/attack orders.

4. How attacks are chosen
-------------------------
The map supplies four eight-entry target permutations per tribe at 0x32D2C.
Initialization randomly selects one permutation. The cursor cycles through
positions 1..7, selecting the next owner when a target is exhausted.

When group B's summed power reaches the threshold, strategy 1 becomes 4.
When sufficient members are waiting again, a random branch either adds a
replacement group-B record or increases the threshold by 100, capped against
the authored baseline power. The group is sent home and strategy returns to 1.

Local target search at 0x15C07 scans the active list inside the tribe's
authored rectangle, excludes its controlling owner and dead/inactive entries,
and checks simple HP/MP and OP/DP comparisons. It accepts the first suitable
entry. This is not a scored assessment of economy, threat or terrain.
The strategic scans do not consult a separate per-AI fog-of-war map.

Two suspicious attack-search paths deserve particular attention:
  - 0x15CA1 filters its reference group member using flags == 1, compares
    the smaller axis distance, and retains scratch target/distance fields
    at 0x369FC/0x36A00 without resetting them inside the routine. The complete
    direct/indexed reference scan found no ordinary reset of these fields.
  - 0x15B20's building/unit preference scan contains unusual list-termination
    branches and a Y-coordinate shift where the X path aligns a coordinate.
These are confirmed instruction patterns. Their complete effect for every
map and runtime state has not been demonstrated; they should not be described
as universally reproducible crashes. Original AI compatibility retains them.

5. Individual combat, reactions and recovery
--------------------------------------------
0x18154 consumes pending commands when a unit is aligned to the tile grid.
The pending command at +0x46 is FF when empty; target and coordinates follow
at +0x47/+0x4B/+0x4D. Movement, attacks, collecting, transferring, dying and
magic use their own substates. Keeping this queue intact matters: repeatedly
writing the current animation state can strand units or corrupt combat.

Ordinary guard behavior searches nearby occupied tiles using VP-dependent
neighborhood tables. Units can engage nearby enemies and react to being hit.
Local decisions at 0x163E4 also handle relic MP regeneration, recovery,
group goals and spell/escape selection. Low-health assessment compares
current HP, the opponent and OP/DP; it is not a full army threat estimate.
Spell users use engine ability checks and scores rather than a separate
Wizard, Warlock, Elf or Ranger strategy planner.

When an AI building is attacked, the damage path near 0x1EB94 counts nearby
enemy power and gathers nearby friendly defenders, ordered by distance.
Difficulty adds power/count margins: 0/400/1000 power and 0/3/6 units for
the three original difficulty values. It stops when both required totals
are exceeded. Constructors are excluded from that defender selection.

Movement and collision remain the original tile-based routines. There is no
general army formation planner, influence map or global economic path planner.

6. Hunting, food and equipment
------------------------------
Idle/guard troops can acquire nearby enemies, including wildlife. Dead
creatures and dropped items provide food/items through the ground-item system.
0x170F6 scans nearby item-marked tiles, then the ground-item linked list,
and checks the unit's available inventory categories. Collection uses the
0x40 state family. A unit's carried food is separate from tribe storage.

After collecting, a playable unit compares carried food with max HP * 64.
At capacity, 0x17361 finds a food store, locates a food item in inventory
slots 6..8 and queues a transfer command. The 0x50 state family performs
movement and transfer; it is not an instant credit to the tribe's food total.

The Armory path at 0x173A3 sells eligible unequipped items, seeks preferred
weapon/shield IDs recorded on the unit, and fills consumable slots. Desired
items, recipe flags, prices and carried food govern the transactions.
0x1763C writes the purchased item into an inventory slot and calls the food
debit helper. An unusual detail is that the debit operand is the loaded
carried-food value after the affordability comparison. This needs runtime
verification before claiming conventional shop pricing in this AI path.
The static audit establishes this code path's instructions, but does not
establish how frequently ordinary original-AI gameplay reaches it.

Wildlife has separate autonomous wandering and item collection behavior at
0x172C5, with authored activity rectangles and respawn positions. It is not
one of the eight competing tribe planners.

7. Recruitment and rebuilding are largely replacement-driven
-------------------------------------------------------------
Authored renewable records use flag bit 1 (value 2) at entity +0x5B.
Death can preserve such a record as inactive instead of unlinking it.
0x18058 increments the inactive record's +0x4F timer and dispatches a
type-specific replacement handler when its delay expires. Examples in the
base delay table: Commoner 360 ticks; Muscleman/Warrior 540; Constructor
720; specialist infantry 540; tribe dinosaurs 1080. Wildlife has separate,
usually longer delays, with additional per-type death counters.

For tribe units/buildings, 0x1CED8 looks for a living, idle production building
with matching tribe and owner. It checks food, reserves that building by
linking the inactive record at building +0x23, sets production state 7F and
records the recipe. If no suitable building exists, the record retries later.
If food is insufficient, it can promote independent troops into group A,
up to the original additional-group limit, to increase its local workforce.

Building processing at 0x1871C spends food incrementally, advances progress
and completes the recipe. Insufficient food pauses production. The 7E/7F
command paths pause/resume/cancel and can refund accumulated expenditure.
Production completes through the actual Sanctuary, Barracks, Armory, food
store or specialist-trainer handlers. This is not simply free timed spawning.

The Sanctuary produces Constructors for building recipes. For a reserved
replacement building, the Constructor is sent toward its saved site. At
0x1D1CF, a Constructor becomes the selected building type, registers its
footprint and grows its construction HP/progress. Food-storage counts are
updated when it becomes a store. New player-created Constructors also carry
their chosen building recipe, but their placement command is separate.

This explains an important limit: the original system can rebuild authored
assets, but it does not maintain a general desired-base layout, choose new
resource outposts, or grow a balanced army from an economic plan.

8. Campaign, multiplayer, skirmish and saves
--------------------------------------------
Campaign scenarios carry authored AI state and group data in their 7072-byte
GI records. The campaign outcome dispatcher at 0x17861 indexes mission-specific
code by stage * 8 + player tribe. Campaign objectives are not the ordinary
multiplayer elimination rules. AI-disabled factions and scripted actors must
not automatically be conscripted by an optional planner.

Original campaign difficulty initialization at 0x1545A changes starting unit
stats/resources. Normal skips that adjustment. Easy helps the player and
reduces other entries' stats; Hard boosts non-player troops and adds food to
non-player owners. Strategic attack thresholds are also initialized according
to difficulty. These campaign settings are distinct from a replacement AI's
decision-making difficulty.

Multiplayer consumes synchronized commands and compares engine RNG state.
Both peers simulate the same world. Independent use of wall-clock time,
local language/options, mouse state or a process-local random generator for
AI decisions would risk divergence. Human ownership comes from the lobby
masks and owner mapping, not fixed tribe numbers.

The native skirmish layer loads the original multiplayer maps, filters human
and AI tribes and assigns authored sites. Its local mode is 2; campaign is
0 and multiplayer is 1. Hidden AI start markers affect only the preview.
They do not change the original strategic AI's knowledge of the world.

GI and OB serialize original group/strategy state, counters, orders, food and
entities. A replacement needs equally persistent settings and decisions;
reading a different local INI after loading is not a valid multiplayer policy.

Audit artifacts and limits
--------------------------
win11_port/analysis/modern_ai_20260912/ contains the read-only scenario census,
indexed/direct reference scan, bounded disassemblies and decompiler exports.
No claim is made that every instruction in the game or every possible mission
outcome has been formally verified. Campaign scripting, original pathfinding
and low-level combat remain substantial engine systems; the audit identifies
their connections to AI and the boundaries a new planner must respect.

Historical validation of the initial Modern AI release
-------------------------------------
The implementation was built with MSVC /W4 /WX. The released executable is
1.10E, file version 1.10.4.0, SHA-256:
EF5363958324351EDB51A99FE77AB001D94F3E175C418C4237EBA5AE98248048

Evidence is under win11_port/analysis/modern_ai_20260912/:
* 116 shipped scenarios inspected for the original AI audit (96 campaign,
  20 multiplayer). This is a data/code audit, not 116 completed playthroughs.
* 40 deterministic planner assertions: default/no-op behavior, human and
  campaign-script protection, unavailable recipes, food and entity limits,
  visibility, remembered targets, completed-assault recovery, construction,
  recruitment, cargo return, and saved-state reproducibility.
* Campaign starts and ten seconds of live simulation for all eight tribes,
  using stages 6 or 12. Stage 12 with Kanoose was repeated on the final build.
* Live skirmish checks for Original and all three Modern difficulties, with
  every tribe exercised as an AI opponent across the runs. Snapshots show
  increased armies, hunter assignments, new Constructors, finished stores,
  food transfers and combat. A controlled live transfer deposited 950 food
  and left 50 carried food; this is an actual engine credit, not just a queued
  planner command. Natural transfers also appear in the skirmish snapshots.
* All eight Advanced-menu languages exercised and visually inspected. English
  additionally exercised fullscreen, repeated reopening with stable GDI object
  counts, Save/Cancel, current-match isolation and save/load mode restoration.
  A legacy-format zero-tag save loaded as Original with local Hard selected.
  Restart Scenario then applied the selected Hard AI to the restarted match.
* Final-build TCP match: two human peers, six AI tribes, host Hard and joining
  preference Original, different local languages/item-stat settings. Both
  negotiated A1D3, advanced 1909 logic ticks at about 18.18 ticks/second, and
  ended the sampled match at equal tick 238146 and RNG 30FDC1CE. Opening
  Advanced on one peer did not pause or desynchronize the match. Both peers
  then left through the normal game UI with no communication error.
* 36 language-pack tests passed. Original campaign/map/help archives and the
  user's root INI were checked unchanged.
* Native archive/hook audit, compiled gameplay repair checks, localization
  persistence, platform and spectator self-tests passed on the final build.

Some earlier evidence files intentionally retain failed test attempts and
the defects they exposed. The release_* logs and successful verdicts identify
the final integration checks. Long multiplayer campaigns, complete mission
playthroughs, Internet latency behavior and long-match difficulty balance are
not established by these bounded tests. Original remains the default.

Advanced AI fixes (1.10X, 14 September 2026)
All eight tribes now receive the same periodic hunter scouting opportunity
on each Advanced difficulty. Constructor placement searches every nearby
ring through radius 27, including off-axis and adjacent sites, with a maximum
of 3024 footprint checks per decision. Visibility, occupancy and reachability
rules still apply. No additional persistent planner state or random calls
are introduced; Original AI remains unchanged and is the default.

MODERN AI UPDATE - v1.11E (19 September 2026)
Modern Easy/Normal/Hard now use progressively larger detour searches and recover
blocked movement through normal orders. They leave access space around new
buildings and avoid known enemy/large-critter danger when placing food stores.
If no preferred site exists, essential first-base/recovery buildings can use
a less exposed fallback, still outside immediate attack distance.
Distant hunting areas can receive stores; Normal/Hard can reinforce them with
an outlying barracks. Essential rebuilding takes priority over expansion.
One, two or three hunters are protected from routine defense assignments by
difficulty. A surviving specialist can take over gathering when needed, and a
surviving barracks can recruit a worker before nonessential spending.
Normal/Hard reassess poor fights and injured armies; unit production responds
to healing needs and visible enemy roles. Easy uses simpler diversity choices.
Food savings and affordable recruits remain part of rebuilding decisions.
Modern casters use the original tribe/class and maximum-MP spell thresholds;
normal mana costs and spell execution still belong to the original engine.
These strategy changes do not change Original/Classic AI. No free recovery
units or food are granted: loss of every viable unit and production route can
still result in defeat. All multiplayer peers need this same build.
