fix(engine): start zone earlier to force combat before energy farming wins

The previous config (zone start turn 50-60) allowed bots to farm energy
uncontested for too long, with matches often decided by score before
combat was forced. ZoneMinRadius was also too large for 3+ players (8),
allowing bots to avoid contact.

Changes:
- 2-player: ZoneStartTurn 60→20, ZoneShrinkInterval 3→2
- 3+ player: ZoneStartTurn 50→15, ZoneMinRadius 8→5, ZoneShrinkInterval 3→2

Zone now starts early (turn 15-20) and shrinks faster (every 2 turns),
forcing bots into combat range before energy farming dominates.
ZoneMinRadius=5 is >= spawn radius (4-5 tiles) so bots survive to engage.

Closes: bf-2238

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
jedarden 2026-05-24 16:33:51 -04:00
parent 060a522ac5
commit 2122adf5b0

View file

@ -236,21 +236,20 @@ func ConfigForPlayers(numPlayers, coresPerPlayer int) Config {
cfg.EnergyInterval = 10
// Scale zone parameters to force combat contact
// Zone must compress bots into contact range while preserving enough population for combat
// Key insight: zone kills bots at spawn radius before they can reach attack range
// Solution: delay zone start until bots have had time to close distance and engage
// ZoneMinRadius must be >= spawn radius so bots aren't killed before final combat
// Zone must start early to force combat before energy farming wins
// ZoneMinRadius must be >= spawn radius so bots aren't killed before they can reach attack range
// Faster shrink (interval 2) forces quicker engagement
if numPlayers == 2 {
cfg.ZoneStartTurn = 60 // Delay zone start to allow bots to close 1-tile gap and engage
cfg.ZoneShrinkInterval = 3 // Shrink every 3 turns (slower to allow combat)
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.ZoneMinRadius = 5 // >= spawn radius (4 tiles) ensures bots survive to final zone
cfg.AttackRadius2 = 12 // 3.5 tiles (balanced for 2-player)
} else {
cfg.ZoneStartTurn = 50 // Delay zone start to allow bots to close 4-tile gap and engage
cfg.ZoneShrinkInterval = 3 // Shrink every 3 turns
cfg.ZoneShrinkStep = 2 // Shrink 2 tiles per interval (slower)
cfg.ZoneMinRadius = 8 // >= spawn radius (5-6 tiles) ensures bots survive to final zone
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.ZoneMinRadius = 5 // >= spawn radius (5 tiles) ensures bots survive to final zone
cfg.AttackRadius2 = 12 // 3.5 tiles (same as 2-player for better combat trigger)
}