[GH-ISSUE #6324] Mindless pursuit chooses cheaper detours instead of the shortest route #3531

Closed
opened 2026-10-21 06:04:01 +07:00 by bsakaguchi · 2 comments
Owner

Originally created by @SpicyMarinara on GitHub (Sep 18, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/6324

Originally assigned to: @SpicyMarinara on GitHub.

Problem

Mindless Tactical units are required to pursue by the fewest legal spatial steps, while paying terrain/weather costs when moving. The weather-aware pursuit change made route selection cost-weighted for every profile, so Mindless units now prefer a longer cheap route in some layouts.

Reproduction

The existing combat AI regression puts a Mindless beast at (1,1), its only opponent at (5,1), and forest on (2,1) and (3,1). Adding forest at (4,1) makes the three-step direct route more expensive than a five-step plains detour. Before the fix, pursueOpponent returns (3,0); the required three-step route should advance to (2,1) within its movement budget.

The previous fixture only tied the two routes' total costs, so it could not distinguish the policies.

Expected change

Use step count for Mindless route ranking. Continue using actual terrain/weather costs during movement, and retain cost-aware pursuit for other profiles. Keep the English and translated weather handoffs aligned with this distinction.

Implementation owner: @SpicyMarinara (Codex), in the existing staging sweep PR #6319. No open issue or PR with this subject or matching branch was found. Project-board lookup was unavailable because the CLI token lacks read:project; the linked PR will provide normal repository status tracking.

Originally created by @SpicyMarinara on GitHub (Sep 18, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/6324 Originally assigned to: @SpicyMarinara on GitHub. ## Problem Mindless Tactical units are required to pursue by the fewest legal spatial steps, while paying terrain/weather costs when moving. The weather-aware pursuit change made route selection cost-weighted for every profile, so Mindless units now prefer a longer cheap route in some layouts. ## Reproduction The existing combat AI regression puts a Mindless beast at (1,1), its only opponent at (5,1), and forest on (2,1) and (3,1). Adding forest at (4,1) makes the three-step direct route more expensive than a five-step plains detour. Before the fix, `pursueOpponent` returns (3,0); the required three-step route should advance to (2,1) within its movement budget. The previous fixture only tied the two routes' total costs, so it could not distinguish the policies. ## Expected change Use step count for Mindless route ranking. Continue using actual terrain/weather costs during movement, and retain cost-aware pursuit for other profiles. Keep the English and translated weather handoffs aligned with this distinction. Implementation owner: @SpicyMarinara (Codex), in the existing staging sweep PR #6319. No open issue or PR with this subject or matching branch was found. Project-board lookup was unavailable because the CLI token lacks read:project; the linked PR will provide normal repository status tracking.
bsakaguchi 2026-10-21 06:04:01 +07:00
Author
Owner

@SpicyMarinara commented on GitHub (Sep 18, 2026):

Reproduced and fixed in PR #6319, commit 119de3f03e1dfb100789234f0d4d54d741da3fe8. The old two-forest-tile fixture tied route costs; a third tile demonstrates the wrong cheaper detour. The existing route calculation now ranks Mindless pursuit by spatial steps while execution still charges terrain/weather costs.

The strengthened combat AI regression fails before the change and passes afterward. The real AI entry point and snow-limited movement checks pass, as do combat conditions and pnpm check. Local CodeRabbit reported zero findings on this follow-up. The English weather guidance and all ten translated packs are aligned. Proof logs. Required GitHub checks are running before the staging merge.

<!-- gh-comment-id:5731588020 --> @SpicyMarinara commented on GitHub (Sep 18, 2026): Reproduced and fixed in PR #6319, commit `119de3f03e1dfb100789234f0d4d54d741da3fe8`. The old two-forest-tile fixture tied route costs; a third tile demonstrates the wrong cheaper detour. The existing route calculation now ranks Mindless pursuit by spatial steps while execution still charges terrain/weather costs. The strengthened combat AI regression fails before the change and passes afterward. The real AI entry point and snow-limited movement checks pass, as do combat conditions and `pnpm check`. Local CodeRabbit reported zero findings on this follow-up. The English weather guidance and all ten translated packs are aligned. [Proof logs](https://gist.github.com/SpicyMarinara/00d8d5922a70ac1a113152fe83a19ad1). Required GitHub checks are running before the staging merge.
Author
Owner

@SpicyMarinara commented on GitHub (Sep 18, 2026):

Fixed in #6319 and merged into staging. Mindless units choose the route with the fewest legal spatial steps; terrain and weather still consume their actual movement budget. The strengthened forest fixture reproduces the old cheaper detour, and the fixed AI/conditions regressions pass, including snow-limited movement. English and all ten translated weather guides now state the same policy.

<!-- gh-comment-id:5732816331 --> @SpicyMarinara commented on GitHub (Sep 18, 2026): Fixed in #6319 and merged into `staging`. Mindless units choose the route with the fewest legal spatial steps; terrain and weather still consume their actual movement budget. The strengthened forest fixture reproduces the old cheaper detour, and the fixed AI/conditions regressions pass, including snow-limited movement. English and all ten translated weather guides now state the same policy.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#3531
No description provided.