Set ZoneEnabled: true in DefaultConfig() to activate the forcing
function that compresses bots into contact. Test matches now show
combat_death events (focus-fire kills) where previously all matches
had 0 combat deaths.
- Zone starts at turn 50, shrinks every 5 turns by 2 tiles
- Bots outside the safe zone die each turn
- Combined with 40x40 maps and center-weighted energy, forces
bots to fight over central territory
Test results:
- Before: 0 combat_death events across all replays
- After: 2-8 combat_death events per match (swarm/hunter matchup)
Closes: bf-2up4
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Reduce default 2-player map size from 60x60 to 40x40 (from 3600 to 1600
tiles) to increase encounter frequency and combat density. Add -skirmish
flag to acb-mapgen for generating even smaller dense maps (32x32, 0.20
wall density, 15 energy nodes) with "skirmish_" ID prefix.
Changes:
- engine/types.go: DefaultConfig() returns 40x40, ConfigForPlayers()
uses 800 tiles/player for 2-player (40x40) and 2000 tiles/player for
3+ players
- cmd/acb-matchmaker/tickers.go: gridForPlayers() returns 40x40 for 2
players
- cmd/acb-map-evolver/main.go: gridForPlayers() returns 40x40 for 2
players
- cmd/acb-mapgen/main.go: defaults to 40x40, adds -skirmish flag for
32x32 high-density maps
- cmd/acb-matchmaker/tickers_test.go: update test expectations for new
40x40 default
Closes: bf-39wt
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
Each player now starts with 2 cores and a bot at each, placing forces
mid-map from turn 1 and creating earlier conflict.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Bot responses send direction as a string ("N","E","S","W") but the
engine Direction type is int with no custom JSON handling. json.Unmarshal
was failing silently, leaving Direction=0 (DirNone) for every move —
bots never moved and every match ended in stalemate.
MarshalJSON serializes as string; UnmarshalJSON accepts both forms.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add MapID field to engine Config struct for inclusion in replay JSON
- Add map_id to TypeScript Config interface
- Add map voting panel to replay viewer sidebar with:
- Map metadata display (dimensions, wall density, energy node count)
- Thumbs up/down vote buttons wired to POST /api/vote/map
- One vote per visitor enforcement (disables after voting)
- Net vote count display with positive/negative coloring
- Graceful fallback when map_id unavailable (local replays)
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Replace random 2-player pairing with the full §6.1 algorithm:
- Seed selection: bot with oldest last-match timestamp (tiebreak: lowest bot ID)
- Format selection: seed's least-played player count among {2, 3, 4, 6}
- Opponent selection: Pareto 80%/16-rank skill proximity + oldest last-pairing
with seed + fewest 24h games for game-count balance
- Map selection: least-recently-used active map for the chosen player count,
with map_scores.last_used_at updated after each match
- Random player slot assignment for all participant counts
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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>