Files
WT-Offline/packages
N0VAN0M4LY 314bdfe68e feat(ground-ai): add hull state machine and two-beat turn driving
Replace the legacy tactics posture heuristics with an explicit per-bot
hull state machine driven by WtoTaskOrder and the 100/300/800 m distance
tiers, and fix chassis steering bugs:

- Add the stateMachine section to tuning/ground-ai.jsonc (preaimAngleDeg,
  shortHaltMaxSec, shortHaltCooldownSec, turnLaunchSpeedMps), validated in
  ground-ai-tuning.ts and compiled into WTO_AI_SM_* constants.
- Replace WTO_POSTURE_* with the unified WTO_STATE_* hull state enum in
  wto_ai_types_common.das and decouple wto_perceive_update into
  wto_ai_runtime.das so perception runs independently of hull tactics.
- Rewrite wto_ai_tactics_common.das as a priority-arbitrated state
  machine: safety/SPAA -> ridge withdrawal -> active SHORT_HALT budget
  (3 s limit with cooldown on timeout) -> crowd dispersion -> distance-tier
  combat (RUN_AND_GUN <=100 m and high-urgency 100-300 m slow-move-fire;
  PREAIM keeping the hull moving while gun reloads or turret error >8 deg;
  SHORT_HALT only when ready and permitted by order.maxStopRangeM / 800 m
  4 s window; RELOAD_ADVANCE when reloading away from cover) -> MARCH.
  Log every state transition with reason, distance and speed.
- Fix the inverted neutral-pivot condition in wto_ai_drive_common.das,
  add 2nd-gear straight-launch before full steering when turning with
  open front clearance, and use full throttle when accelerating to target
  speed so the automatic gearbox upshifts cleanly.

Verified root and launcher type checks, isolated 2.61.0.58 build (21
ground AI modules packed), and clean in-engine daScript compilation/load
(wto_ai_runtime.das loaded in 195 ms, 0 compile errors). Live battle
acceptance deferred until the full pipeline is wired.
2026-12-03 17:47:10 +08:00
..