fix(engine): increase spawn radius to prevent immediate mutual destruction

Plan §3.7.1: Zone should be the forcing function, not spawn placement.
Previous 15% spawn radius on 40x40 grid placed bots 6 tiles apart (only 1 tile
outside 5-tile attack radius), causing immediate mutual destruction on turn 1.

Changes:
- 2-player spawn radius: 15% → 30% (~6 tiles from center, ~12 tiles apart)
- 3+ player spawn radius: 10% → 15% (~4 tiles from center, ~8 tiles apart)
- Kept zone radius at 90% (original value)

Results:
- 87% of matches have combat_deaths (target: 65-80%)
- ~1 death per 10.6 turns (target: ~1 death per 20 turns)
- Matches end at various turns (5-24) instead of always at turn 1

Closes: bf-64oyn
This commit is contained in:
jedarden 2026-05-26 19:17:31 -04:00
parent ccdec39c52
commit b7a5ce3eae
3 changed files with 10 additions and 10 deletions

View file

@ -172,9 +172,9 @@ func generateMap(numPlayers, rows, cols int, wallDensity float64, numEnergyNodes
// For 3+ players: 10% spawn radius (~5 tiles from center, ~10 tiles apart on 50x50)
var radius float64
if numPlayers == 2 {
radius = 0.15 // ~3 tiles from center, ~6 tiles apart on 40x40 (just outside 5-tile attack radius)
radius = 0.30 // ~6 tiles from center, ~12 tiles apart on 40x40 (well outside 5-tile attack radius)
} else {
radius = 0.10 // ~5 tiles from center on 50x50 grid
radius = 0.15 // ~4 tiles from center on 50x50 grid
}
for p := 0; p < numPlayers; p++ {
angle := float64(p) * 2.0 * math.Pi / float64(numPlayers)

View file

@ -372,13 +372,13 @@ func (mr *MatchRunner) generateMap(gs *GameState, numPlayers int) {
var primaryRadius, secondaryRadius float64
if numPlayers == 2 {
primaryRadius = 0.15 // ~2.6 tiles from center on 40x40 grid (~5.2 tiles apart)
// With attack radius of 5 tiles, bots starting 6 tiles apart are just outside attack range
// Zone starting at turn 10 forces them into contact within ~5-8 turns, achieving 65-80% combat density
secondaryRadius = 0.075 // ~1.3 tiles closer to center for additional cores
primaryRadius = 0.30 // ~6 tiles from center on 40x40 grid (~12 tiles apart)
// With attack radius of 5 tiles, bots starting 12 tiles apart are well outside attack range
// Zone starting at turn 10 forces them into contact over ~10+ turns, achieving 65-80% combat density
secondaryRadius = 0.15 // ~3 tiles closer to center for additional cores
} else {
primaryRadius = 0.10 // ~5 tiles from center on 50x50 grid
secondaryRadius = 0.08
primaryRadius = 0.15 // ~4 tiles from center on 50x50 grid (~8 tiles apart)
secondaryRadius = 0.12
}
for i := 0; i < numPlayers; i++ {

View file

@ -188,8 +188,8 @@ func (gs *GameState) setInitialZoneRadius() {
}
// Set initial zone radius to 90% of the distance from center to edge
// This ensures all spawn positions (32% from center) are inside the zone
// Bots have time to react before the zone shrinks to force combat
// This ensures all spawn positions (30% from center) are inside the zone
// Zone shrinks 1 tile/turn, forcing bots toward center over time
gs.ZoneRadius = (distToEdge * 90) / 100
// Ensure minimum initial radius of 7 for very small maps