Per plan §3.7, the shrinking zone is a forcing function that should
force combat engagement. Previously, bots could not see the current
zone state (center, radius, active) and would move away from the zone
center, dying without understanding why.
Changes:
- Add Zone field to VisibleState (types.go)
- Populate zone bounds in GetVisibleState() when zone enabled (game.go)
This allows HTTP and local bots to see the zone and react strategically
(e.g., move toward center to avoid zone death while engaging enemies).
Test: zone bounds now appear in VisibleState JSON with correct values.
Closes: bf-tfyy
Add CombatDeaths []int field to MatchResult to track combat density
per player. This enables monitoring of focus-fire combat across all
matches and helps verify that the zone forcing function is working.
Changes:
- Add CombatDeaths []int to MatchResult struct
- Add CombatDeaths []int to GameState for tracking during match
- Increment combat death count for each killer in executeCombat
- Populate combat_deaths in final match result
- Update tests to include CombatDeaths in MatchResult
Verified: 6-player match shows combat_deaths: [1,1,1,1,1,1] (each
player killed 1 bot in mutual combat).
Closes: bf-4fez
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Add configurable active zone that contracts toward map center on an interval,
forcing bots together to trigger focus-fire engagements. Bots outside the zone
die with reason "zone", and zone bounds are recorded in replay turns.
Config fields:
- ZoneEnabled: enable/disable the zone
- ZoneStartTurn: turn when zone starts shrinking (default 50)
- ZoneShrinkInterval: turns between shrink steps (default 5)
- ZoneShrinkStep: tiles to shrink each step (default 2)
- ZoneMinRadius: minimum zone radius (default 10)
Turn sequence update: MOVE → COMBAT → ZONE → CAPTURE → COLLECT → SPAWN → ENERGY_TICK
Zone phase inserted after COMBAT, uses toroidal distance calculation,
and emits bot_died events with reason "zone" for killed bots.
Replay update: ZoneBounds struct added to ReplayTurn to record center,
radius, and active state per turn for visualization.
Determinism verified: all tests pass, engine remains deterministic.
Closes: bf-2g96
Add crash_strikes and cooldown_until columns to bots table. Worker
increments strikes on crash (cooldown at 3), resets on success.
Matchmaker excludes cooldown bots from pairing, series scheduling,
and championship brackets. Fix erroneous cooldown filter on series
table in finalizeCompletedSeries (column only exists on bots).
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- Add engine package with toroidal grid, game state, turn execution
- Implement focus-fire combat resolution with simultaneous deaths
- Add fog of war visibility filtering for bot state
- Implement energy collection (contested resources denied)
- Add bot spawning at active cores
- Implement win conditions: elimination, draw, dominance, turns
- Add replay JSON writer for match recording
- Add match runner with concurrent bot communication
- Add CLI tools: acb-local (match runner), acb-mapgen (map generator)
- Add comprehensive unit tests (26 tests passing)
Exit criteria met: can run complete 500-turn matches and produce valid replays
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>