feat(ground-ai): add task order, mode-aware commander v1, and world fixes

Replace the per-bot greedy cap scorer (wto_ai_macro_common.das) with a
whole-team commander and explicit task order contract, and fix the world,
spec, and navigation bugs found during the codebase audit:

- Classify ground battle modes (bttl, conq, dom) in multiplayer-missions
  v5 from mislist.blk categories (with suffix fallback for event maps) and
  emit wtoGroundMode in customRules/customBots.
- Add the commander section to tuning/ground-ai.jsonc with range and sum
  validation, compiled into WTO_AI_CMD_* constants.
- Split zone/mode/spawn refresh into wto_ai_world_zones_common.das and fix
  four world snapshot bugs: stop double-recording deaths in wreck scans
  and deduplicate with a ring cursor, refresh units before spawn fallback
  while retrying real respawn points, fall back battleCenter to spawns
  when capCount is 0, and relax cap radius clamping to 10..180 m.
- Fix limited-traverse yaw overwrite in wto_ai_specs_common.das and
  compute pivot turn angle against wishDir in wto_ai_nav_common.das.
- Introduce WtoTaskOrder (wto_ai_order_common.das) and whole-team
  commander v1 (wto_ai_commander_common.das +
  wto_ai_commander_anchors_common.das): mode-aware role quotas (Bttl,
  Conq, Dom), deterministic distance + vehicle-suitability matching,
  20-second role hysteresis, separate total-assigned vs cap-insider
  counters, frontline-relative SPAA anchors, EventZoneCaptured immediate
  rebalance, and per-team WTO_AI|CMD telemetry.

Verified root and launcher type checks, multiplayer-missions v5 dataset
extraction (1140 missions with Bttl/Conq/Dom classification), isolated
2.61.0.58 build (18 ground AI modules packed), and clean in-engine
daScript compilation/load (wto_ai_runtime.das loaded in 155 ms, 0 compile
errors). Live battle tuning and acceptance deferred until the full
pipeline is wired.
This commit is contained in:
N0VAN0M4LY committed 2026-12-03 17:20:17 +08:00
1 parent 73bae4785f
commit 7e5eb99696
18 files changed
+863 -340

No files matched your search

@@ -21,6 +21,22 @@ export interface GroundAiConfig {
readonly tacticsTickSec: number;
readonly navTickSec: number;
};
readonly commander: {
readonly rebalanceSec: number;
readonly roleHoldSec: number;
readonly bttlAssaultPct: number;
readonly bttlFlankPct: number;
readonly bttlOverwatchPct: number;
readonly conqAssaultPct: number;
readonly conqFlankPct: number;
readonly conqHoldDefendPct: number;
readonly conqHoldOverwatchPct: number;
readonly domAssaultPct: number;
readonly domMaxDefendersPerCap: number;
readonly overwatchStandOffM: number;
readonly flankStandOffM: number;
readonly spaaFollowOffsetM: number;
};
readonly macro: {
readonly openingSplitSec: number;
readonly capMaxInsiders: number;
@@ -138,6 +154,20 @@ function collectConfigEntries(c: GroundAiConfig): readonly DasEntry[] {
['WTO_AI_MACRO_TICK_SEC', 'float', c.cadence.macroTickSec],
['WTO_AI_TACTICS_TICK_SEC', 'float', c.cadence.tacticsTickSec],
['WTO_AI_NAV_TICK_SEC', 'float', c.cadence.navTickSec],
['WTO_AI_CMD_REBALANCE_SEC', 'float', c.commander.rebalanceSec],
['WTO_AI_CMD_ROLE_HOLD_SEC', 'float', c.commander.roleHoldSec],
['WTO_AI_CMD_BTTL_ASSAULT_PCT', 'int', c.commander.bttlAssaultPct],
['WTO_AI_CMD_BTTL_FLANK_PCT', 'int', c.commander.bttlFlankPct],
['WTO_AI_CMD_BTTL_OVERWATCH_PCT', 'int', c.commander.bttlOverwatchPct],
['WTO_AI_CMD_CONQ_ASSAULT_PCT', 'int', c.commander.conqAssaultPct],
['WTO_AI_CMD_CONQ_FLANK_PCT', 'int', c.commander.conqFlankPct],
['WTO_AI_CMD_CONQ_HOLD_DEFEND_PCT', 'int', c.commander.conqHoldDefendPct],
['WTO_AI_CMD_CONQ_HOLD_OVERWATCH_PCT', 'int', c.commander.conqHoldOverwatchPct],
['WTO_AI_CMD_DOM_ASSAULT_PCT', 'int', c.commander.domAssaultPct],
['WTO_AI_CMD_DOM_MAX_DEFENDERS', 'int', c.commander.domMaxDefendersPerCap],
['WTO_AI_CMD_OVERWATCH_STANDOFF_M', 'float', c.commander.overwatchStandOffM],
['WTO_AI_CMD_FLANK_STANDOFF_M', 'float', c.commander.flankStandOffM],
['WTO_AI_CMD_SPAA_FOLLOW_OFFSET_M', 'float', c.commander.spaaFollowOffsetM],
['WTO_AI_MACRO_OPENING_SPLIT_SEC', 'float', c.macro.openingSplitSec],
['WTO_AI_MACRO_CAP_MAX_INSIDERS', 'int', c.macro.capMaxInsiders],
['WTO_AI_MACRO_RECAP_MIN_BOTS', 'int', c.macro.recaptureMinBots],