Repository navigation
Retain weighted predecessors in many-to-many path queries - #197
Merged
HexDecimal merged 1 commit intoOct 17, 2026
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #197 +/- ##
=======================================
Coverage 86.09% 86.09%
=======================================
Files 29 29
Lines 7597 7597
=======================================
Hits 6541 6541
Misses 1056 1056 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
HexDecimal
approved these changes
Oct 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The many-to-many branch of
path2dcomputes weighted predecessors, then discards them and calls unweightedhillclimb2d. With cardinal cost 1 and diagonal cost 3, this can replace two cheap cardinal steps with an expensive diagonal.Return
pf.path_from(best_ij)after choosing the nearest start. Keep endpoint selection and unreachable handling. Equal-cost routes may choose different tied predecessors.The regression covers four diagonal settings. An independent heap solver on the bundled sample dungeon confirms all 59 previously incorrect many-to-many queries, with all 1,680 single-endpoint path controls unchanged. A separate automatic-heuristic correction handles another 60 single-endpoint failures; composing both fixes matches all 2,240 queries.
Full headless tests pass (325 passed, 95 skipped), using the pinned resource submodule and SDL dummy audio driver. Mypy and applicable project formatting/hooks pass.