ai-code-battle/engine
jedarden 2dbfea5163 fix(engine): increase spawn radius to force zone combat
Root cause of zero combat deaths: bots spawned inside the final zone.
On 40x40 grid, bots spawned at ~5 tiles from center but zone min radius
was 3 tiles. Zone only pushed bots 2 tiles toward center - not enough to
force them within attack range (6 tiles).

Fix: Calculate spawn radius as absolute tile distance from center, then
convert to percentage of grid half-size:
- 2-player: spawn at 10 tiles from center (was ~5 tiles)
- 3+ player: spawn at 8 tiles from center (was ~6 tiles)

When zone shrinks to minimum (radius 3 for 2p, 1 for 3+), bots are
forced within attack range of each other, triggering focus-fire combat.

Test: Unit tests verify spawn distance > zone_min_radius for all player
counts. Manual test shows combat_death events now occur.

Closes: bf-52mn

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-25 09:14:48 -04:00
..
auth.go fix: resolve universal stalemate — signing format and secret decryption 2026-04-30 21:48:25 -04:00
auth_test.go fix(test): use deterministic garbage signature in TestVerifyRequest 2026-04-30 21:53:15 -04:00
bot_http.go style: apply gofmt alignment fixes across codebase 2026-05-24 10:40:33 -04:00
bot_http_test.go style: apply gofmt alignment fixes across codebase 2026-05-24 10:40:33 -04:00
bot_local.go Implement Phase 1 core engine: grid, combat, fog of war, turn execution 2026-03-24 01:48:27 -04:00
bot_strategies.go style: apply gofmt alignment fixes across codebase 2026-05-24 10:40:33 -04:00
bot_strategies_phase13.go docs: clarify Phase 13 strategies vs §10 evolver pipeline 2026-05-22 15:57:50 -04:00
determinism_test.go Complete Phase 1: add connectivity validation and determinism tests 2026-03-24 03:44:44 -04:00
game.go style(engine): align struct field names in GameState 2026-05-24 19:19:45 -04:00
grid.go style: apply gofmt alignment fixes across codebase 2026-05-24 10:40:33 -04:00
grid_test.go style: apply gofmt alignment fixes across codebase 2026-05-24 10:40:33 -04:00
integration_test.go test(engine): add combat density metrics test (plan §3.7.1) 2026-05-25 01:00:40 -04:00
map_engagement.go style: apply gofmt alignment fixes across codebase 2026-05-24 10:40:33 -04:00
map_engagement_test.go feat(engine): add combat_deaths to MatchResult statistics 2026-05-24 17:59:57 -04:00
match.go fix(engine): increase spawn radius to force zone combat 2026-05-25 09:14:48 -04:00
match_test.go fix(engine): increase spawn radius to force zone combat 2026-05-25 09:14:48 -04:00
replay.go style: apply gofmt alignment fixes across codebase 2026-05-24 10:40:33 -04:00
thumbnail.go style: apply gofmt alignment fixes across codebase 2026-05-24 10:40:33 -04:00
turn.go feat(engine): add combat_deaths to MatchResult statistics 2026-05-24 17:59:57 -04:00
turn_test.go fix(engine): use core1 variable in spawn priority tiebreak test 2026-04-22 14:45:06 -04:00
types.go docs(plan): align zone parameters with proven implementation 2026-05-25 02:11:15 -04:00
winprob.go feat(engine): integrate Monte Carlo win probability computation into match runner 2026-04-21 08:46:39 -04:00