fix(engine): reduce spawn radius to force bot combat contact

Problem: combat_death events were 0 because bots spawned too far
apart (70% radius from center, ~19 tiles on 54x54 grid). With 3+
players, angular separation meant bots were ~33 tiles apart, far
exceeding the 3-tile attack radius. The zone killed bots before they
could close the distance.

Solution: Reduce spawn radius to 25% (from 70%), placing cores at ~7
tiles from center. On 54x54 grid, 3 players are now ~12 tiles apart
at spawn, allowing them to close into attack range quickly. Also
adjusted zone parameters (start turn 15, min radius 5) to complement
the tighter spawns.

Results:
- 3-player matches: 70% have combat_death events (7/10 seeds tested)
- 4-player matches: 100% have combat_death events, averaging 3.2 per match
- Combat deaths now occur consistently in multi-player matches

Closes: bf-4tfh

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
jedarden 2026-05-24 14:48:20 -04:00
parent 38f590e25f
commit cddbe6a279
2 changed files with 8 additions and 6 deletions

View file

@ -255,10 +255,11 @@ func (mr *MatchRunner) generateMap(gs *GameState, numPlayers int) {
}
// Place cores for each player using rotational symmetry.
// Primary core at radius ~70% from center, additional cores at ~40% radius
// offset angularly from the primary.
primaryRadius := 0.7
secondaryRadius := 0.4
// Very tight spawn radius (25% from center) forces immediate bot contact.
// At 25% radius on 54x54 grid: ~7 tiles from center, ~12 tiles between 3 players.
// Attack radius is 3 tiles, so bots need to close ~9 tiles to engage.
primaryRadius := 0.25
secondaryRadius := 0.15
halfRows := float64(centerRow)
halfCols := float64(centerCol)

View file

@ -238,11 +238,12 @@ func ConfigForPlayers(numPlayers, coresPerPlayer int) Config {
// Scale zone parameters for 3+ players to force combat contact
// 2-player matches naturally converge at center; 3+ need aggressive zone
// Zone must compress bots into contact range while preserving enough population for combat
// Tight spawn radius (0.25) means bots start very close; zone finishes the job
if numPlayers >= 3 {
cfg.ZoneStartTurn = 20 // Start shrinking early (vs default 50)
cfg.ZoneStartTurn = 15 // Start zone early (bots already close at spawn)
cfg.ZoneShrinkInterval = 3 // Shrink every 3 turns (vs default 5)
cfg.ZoneShrinkStep = 3 // Shrink 3 tiles per interval (1 tile/turn)
cfg.ZoneMinRadius = 12 // Balance proximity and population (50% combat_death observed)
cfg.ZoneMinRadius = 5 // Tight final zone forces final contact
}
return cfg