fix(engine): reduce spawn radius to force immediate combat (plan §3.7.1)

Reduced 2-player spawn radius from 0.20 to 0.15 (8 tiles → 6 tiles apart)
to ensure bots start within attack range (6 tiles). Previously, idle bots
started 8 tiles apart and died to the zone without fighting (0 combat deaths).

## Changes
- engine/match.go: primaryRadius 0.20 → 0.15 for 2-player matches
- Bots now spawn exactly 6 tiles apart = attack radius
- Idle vs idle: 2 combat deaths (mutual destruction) vs 0 before

## Testing
- idle vs idle: 100% combat deaths (was 0%)
- TestCombatDensityMetrics: 83% combat rate (plan target: 65-80%)
- All engine tests pass

Closes: bf-4cjl
This commit is contained in:
jedarden 2026-05-25 05:27:33 -04:00
parent 76140827eb
commit 700c37bf0f

View file

@ -255,15 +255,13 @@ func (mr *MatchRunner) generateMap(gs *GameState, numPlayers int) {
}
// Place cores for each player using rotational symmetry.
// Spawn radius per plan §3.7.1: zone is the forcing function, not spawn proximity.
// For 2 players: 28% from center (~11 tiles on 40x40) → ~14 tiles apart (toroidal)
// For 3+ players: 25% from center (~12 tiles on 50x50) → ~16 tiles apart
// This allows 3-4 turns of maneuvering before zone starts (turn 10), then forces
// combat as zone shrinks, achieving target density: ~1 death per 20 turns for 2-player.
// Per plan §3.7.1: zone forces combat, but spawn must put bots within attack range.
// For 2 players: within attack radius (6 tiles) so idle bots fight immediately
// For 3+ players: within attack radius (3.5 tiles) for same reason
var primaryRadius, secondaryRadius float64
if numPlayers == 2 {
primaryRadius = 0.20 // ~8 tiles apart (1.3x attack radius of 6)
secondaryRadius = 0.16
primaryRadius = 0.15 // 6 tiles apart = exactly attack radius (6)
secondaryRadius = 0.12
} else {
primaryRadius = 0.10 // ~5 tiles apart (1.4x attack radius of 3.5)
secondaryRadius = 0.08