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>
The TestSpawnPriority_LowerIDBreaksTie test declared core1 but never
referenced it, causing a compile error. Added an assertion that
core1.LastSpawnedTurn remains 0 (confirming it didn't spawn).
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Remove the lenient fallback that accepted bot responses missing the
X-ACB-Signature header. Missing or invalid signatures now cause the
response to be discarded and count toward the crash threshold (§4.5).
Add tests for missing-header, bad-signature, and crash-after-10 cases.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Collect GameState snapshots during match execution (one per turn), then
run 100 random-play rollouts per snapshot post-match to compute per-turn
win probabilities and detect critical moments (|delta| > 0.15). Results
are stored in the replay JSON as win_prob and critical_moments fields.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Add Go implementations of 5 strategy bots directly into the engine:
- GathererBot: prioritizes energy collection, avoids combat
- RusherBot: aggressively rushes enemy cores
- GuardianBot: defends cores with cautious expansion
- SwarmBot: formation-based coordinated movement
- HunterBot: targets isolated enemy units
Update acb-local with bot selection flags:
- -bot0/-bot1: select bot strategies
- -list-bots: list available strategies
- Default to gatherer vs rusher for interesting gameplay
Enables demo replays with real strategic behavior without K8s infrastructure.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace broken Taylor series sin/cos approximations with math.Sin/math.Cos
in both engine/match.go and cmd/acb-mapgen. The Taylor series produced
incorrect results for angles > π, causing wrong positions in 3+ player maps.
Upgrade map generator wall placement from random scatter to cellular
automata (B5/S4 rule, 4 iterations) with rotational symmetry enforcement
and connectivity validation. Add comprehensive mapgen tests and dominance
win condition tests.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add connectivity.go: BFS-based map connectivity validation with retry
- Update mapgen to use connectivity checking by default
- Add determinism_test.go: property-based tests for reproducibility
- Same seed produces identical replays
- Turn execution is deterministic
- Grid operations are deterministic
- Combat resolution is deterministic
- Full 500-turn match validation
- All 32 tests pass
- Update PROGRESS.md: Phase 1 complete
Co-Authored-By: Claude Opus 4.6 <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>