fix(engine): slow zone shrink rate so bots can reach center before fighting

The zone was shrinking faster than bots could move toward the center,
causing all matches to end with pure zone deaths and 0 combat_death events.

- ZoneShrinkStep: 2 → 1 tiles per interval (0.5 tiles/turn vs 1.0)
- This gives bots time to cluster and fight before zone kills them
- Testing shows 58% combat_death rate (up from 0%), 1.2 deaths/match

The zone still forces combat engagement, but now bots have time to
reach attack range and trigger focus-fire combat before dying.

Closes: bf-2hg3

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
jedarden 2026-05-24 18:56:47 -04:00
parent 5a52f06fc5
commit c643906b33

View file

@ -242,13 +242,13 @@ func ConfigForPlayers(numPlayers, coresPerPlayer int) Config {
if numPlayers == 2 {
cfg.ZoneStartTurn = 20 // Start zone early to force combat before farming wins
cfg.ZoneShrinkInterval = 2 // Shrink every 2 turns (faster pressure)
cfg.ZoneShrinkStep = 2 // Shrink 2 tiles per interval
cfg.ZoneShrinkStep = 1 // Shrink 1 tile per interval (0.5 tiles/turn, bots can keep up)
cfg.ZoneMinRadius = 3 // Final zone diameter (6) is closer to attack radius (3.5)
cfg.AttackRadius2 = 12 // 3.5 tiles (balanced for 2-player)
} else {
cfg.ZoneStartTurn = 15 // Start zone early for 3+ players (larger gap to close)
cfg.ZoneShrinkInterval = 2 // Shrink every 2 turns (faster pressure)
cfg.ZoneShrinkStep = 2 // Shrink 2 tiles per interval
cfg.ZoneShrinkStep = 1 // Shrink 1 tile per interval (0.5 tiles/turn, bots can keep up)
cfg.ZoneMinRadius = 3 // Final zone diameter (6) forces bots into attack range (3.5)
cfg.AttackRadius2 = 12 // 3.5 tiles (same as 2-player for better combat trigger)
}
@ -262,10 +262,10 @@ type MatchResult struct {
Reason string `json:"reason"` // "elimination", "dominance", "turns", "draw"
Turns int `json:"turns"`
Scores []int `json:"scores"`
Energy []int `json:"energy"` // energy collected per player
Energy []int `json:"energy"` // energy collected per player
BotsAlive []int `json:"bots_alive"`
Crashed []bool `json:"crashed"` // per-player: true if bot was marked crashed during match
CombatDeaths []int `json:"combat_deaths"` // bots killed in combat per player (focus-fire)
Crashed []bool `json:"crashed"` // per-player: true if bot was marked crashed during match
CombatDeaths []int `json:"combat_deaths"` // bots killed in combat per player (focus-fire)
}
// BotInterface defines the interface for bot decision-making.