Commit Graph

8 Commits

Author SHA1 Message Date
scamiv 7bd7d35d92 Add mask-expanding for adaptive corridor refinement
- Introduced a new `MaskExpanding.md` documentation detailing the mask-expanding BFS approach, which enhances pathfinding by allowing corridor expansion without restarting the search.
- Updated `CoarseToFineWaterPath` to utilize the new mask-expanding strategy, improving efficiency by resuming searches instead of clearing state upon corridor tightness.
- Enhanced `MultiSourceAnyTargetBFS` with a new method to support mask expansion, allowing for dynamic adjustment of allowed regions during BFS execution.
- Implemented data structures and core loop adjustments to facilitate both fast and optimal variants of the mask-expanding approach, ensuring soundness and performance improvements in pathfinding.
- Suggested milestones for future enhancements and optimizations in corridor repair and pathfinding strategies.
2025-12-28 15:34:19 +01:00
scamiv aa09240d40 Add local corridor widening for adaptive pathfinding
- Introduced a new approach to local corridor widening in the `CoarseToFineWaterPath` module, allowing for more efficient pathfinding by expanding the search corridor based on visited coarse regions.
- Implemented a mechanism to avoid global radius increases, enhancing performance and reducing unnecessary searches.
- Updated `MultiSourceAnyTargetBFS` to support marking visited coarse regions during BFS, facilitating the local widening process.
- Adjusted parameters for maximum attempts and corridor radius to optimize pathfinding behavior.
2025-12-27 19:49:34 +01:00
scamiv 368f5c5900 Update CoarseToFine documentation 2025-12-27 17:07:26 +01:00
scamiv 2776294220 Enhance game map handling with microGameMap integration
- Added `microGameMap` to support a new resolution level for compact games, allowing for more efficient map loading and pathfinding.
- Updated `createGame` and `GameImpl` to incorporate `microGameMap`, ensuring proper handling of different map resolutions.
- Modified `loadTerrainMap` to always expose the 16x map for coarse heuristics, improving navigation capabilities.
2025-12-27 16:35:10 +01:00
scamiv e08acdf09c Add coarse-to-fine pathfinding for water navigation
- Introduced a new `CoarseToFineWaterPath` module to enhance pathfinding efficiency for boats by utilizing a coarse map to guide fine path searches.
- Implemented a two-stage pathfinding approach: a coarse search on a low-resolution map followed by a refined search on the full-resolution map.
- Updated `TransportShipExecution` and `TransportShipUtils` to leverage the new coarse-to-fine pathfinding method, improving routing decisions and handling of retreat paths.
- Added tests to validate the new pathfinding functionality and ensure robustness in various scenarios.
2025-12-27 16:23:14 +01:00
scamiv 69e422d35e Refactor MultiSourceAnyTargetBFS documentation for clarity and performance
- Updated the design notes to clarify the multi-source, any-target BFS approach for boat routing on a water-only grid.
- Simplified the explanation of the algorithm, focusing on the use of a virtual super-source and super-target.
- Enhanced the API description, detailing the return value structure and movement model.
- Added performance optimizations, including the use of typed arrays and precomputation of water component IDs to improve routing efficiency.
2025-12-27 14:22:59 +01:00
scamiv 65ca00d54f Implement MultiSourceAnyTargetBFS for efficient boat routing
- Add MultiSourceAnyTargetBFS algorithm for water-based pathfinding
- Replace "guess landing tile, then pathfind" with single multi-source search
2025-12-26 22:32:16 +01:00
Evan 92d9f7a93c Create a docs folder, add auth & architecture docs (#2623)
## Description:
Create docs folder
## Please complete the following:

- [x] I have added screenshots for all UI updates
- [x] I process any text displayed to the user through translateText()
and I've added it to the en.json file
- [x] I have added relevant tests to the test directory
- [x] I confirm I have thoroughly tested these changes and take full
responsibility for any bugs introduced

## Please put your Discord username so you can be contacted if a bug or
regression is found:

evan
2025-12-15 09:07:31 -08:00