You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Two medium bugs caught:
1. Weighted FR target selection boundary (finalRetaliation.ts): cumulative
>= threshold incorrectly picked zero-weight survivors when RNG returned
exactly 0.0. Changed to strict > so zero-weight targets are never chosen.
Regression test added pinning weights=[0, 100] always picks survivor[1].
2. Circular ES module dependency between lookahead.ts and index.ts. Refactored:
- Created dispatch.ts (bare leaderId switch); imports per-leader files only.
- lookahead.ts no longer imports planAi; bestTargetByLookahead accepts an
opponentPlanner callback.
- chump.ts removed its Hard-mode branch; per-leader files are pure baseline
planners ignorant of difficulty + lookahead.
- index.ts (planAi) orchestrates Hard mode at the top: dispatch for baseline,
bestTargetByLookahead with dispatch as the opponent planner to retarget any
launch order in Hard difficulty.
Import graph is now acyclic. Hard-mode behaviour preserved (the Hard-Chump
integration test still pins target selection through the projected score).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
0 commit comments