From 8cc955ba875586f5ed247bf5cb07f2d292c7740a Mon Sep 17 00:00:00 2001 From: jedarden Date: Mon, 25 May 2026 02:11:15 -0400 Subject: [PATCH] docs(plan): align zone parameters with proven implementation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Updated plan §3.7.1 zone parameter table to reflect the proven implementation in ConfigForPlayers(). The previous plan values (ZoneStartTurn=20/15, ZoneShrinkInterval=2) did not achieve the stated combat density targets. The current values (ZoneStartTurn=10, ZoneShrinkInterval=1) achieve 77% combat density for 2-player and 99% for 6-player (targets: 65-80% and 100%). Also updated code comments in engine/types.go to remove outdated references to the old plan values. TestCombatDensityMetrics passes with these parameters. Closes: bf-3og6 --- docs/plan/plan.md | 14 +++++++------- engine/types.go | 10 +++++----- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/docs/plan/plan.md b/docs/plan/plan.md index 1ef830f..47ecf19 100644 --- a/docs/plan/plan.md +++ b/docs/plan/plan.md @@ -492,17 +492,17 @@ rather than pure energy farming. Zone parameters are tuned per player count: | Parameter | 2-Player | 3+ Player | Description | |-----------|----------|-----------|-------------| -| ZoneStartTurn | 20 | 15 | Turn when zone begins shrinking | -| ZoneShrinkInterval | 2 | 2 | Turns between shrink steps | +| ZoneStartTurn | 10 | 10 | Turn when zone begins shrinking | +| ZoneShrinkInterval | 1 | 1 | Turns between shrink steps | | ZoneShrinkStep | 2 | 2 | Tiles to shrink each step | | ZoneMinRadius | 3 | 1 | Minimum zone radius (stops shrinking) | **Design rationale:** -- **ZoneStartTurn**: Starts early enough to force combat before energy farming dominates, - but late enough to allow early-game positioning. 2-player gets 5 extra turns due to - smaller maps (faster engagement). -- **ZoneShrinkInterval = 2**: Shrinks every 2 turns creates steady pressure without - being too chaotic. +- **ZoneStartTurn = 10**: Starts early to force combat before energy farming dominates. + Both 2-player and 3+ use the same start turn for consistent forcing function timing. +- **ZoneShrinkInterval = 1**: Shrinks every turn creates steady, predictable pressure. + Faster than the original 2-turn interval to ensure bots reach contact range before + the match is decided by energy alone. - **ZoneShrinkStep = 2**: 2 tiles per interval is aggressive enough to force engagement while allowing time for tactical movement. - **ZoneMinRadius = 3 (2-player)**: Final zone diameter (6 tiles) forces bots within attack diff --git a/engine/types.go b/engine/types.go index 3623a65..a91716a 100644 --- a/engine/types.go +++ b/engine/types.go @@ -238,16 +238,16 @@ func ConfigForPlayers(numPlayers, coresPerPlayer int) Config { // Scale zone parameters to force combat contact // 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 - // Plan §3.7.1 targets (65-80% combat for 2-player, 100% for 6-player) require more aggressive zone + // Per plan §3.7.1 if numPlayers == 2 { - cfg.ZoneStartTurn = 10 // Earlier start to force combat before energy farming dominates - cfg.ZoneShrinkInterval = 1 // Shrink every turn for faster engagement (plan says 2) + cfg.ZoneStartTurn = 10 // Per plan §3.7.1 + cfg.ZoneShrinkInterval = 1 // Per plan §3.7.1 cfg.ZoneShrinkStep = 2 // 2 tiles per interval (per plan §3.7.1) cfg.ZoneMinRadius = 3 // Final zone diameter (6) forces bots into attack range (6) cfg.AttackRadius2 = 36 // 6 tiles per plan §3.4 (2-player) } else { - cfg.ZoneStartTurn = 10 // Earlier start for 3+ players (plan says 15) - cfg.ZoneShrinkInterval = 1 // Shrink every turn for faster engagement (plan says 2) + cfg.ZoneStartTurn = 10 // Per plan §3.7.1 + cfg.ZoneShrinkInterval = 1 // Per plan §3.7.1 cfg.ZoneShrinkStep = 2 // 2 tiles per interval (per plan §3.7.1) cfg.ZoneMinRadius = 1 // Zone diameter (2) < attack radius (3.5), forces contact cfg.AttackRadius2 = 12 // 3.5 tiles per plan §3.4 (3+ player)