Implement Dijkstra-floodfill-based meetingPosition with motion prediction#4159
Draft
Implement Dijkstra-floodfill-based meetingPosition with motion prediction#4159
Conversation
Overhauls the tactical interception logic to use a new Dijkstra floodfill algorithm for efficient reachability analysis. Replaces simple distance checks in `meetingPosition` with predictive "motion snapshots" that account for actor and target movement speeds, allowing the bot to better intercept moving targets or maintain distance while kiting. Key changes: - Added Dijkstra floodfill routines to the C++ pathfinding core and exposed them via XS. - Refactored `meetingPosition` in `Misc.pm` to use score-based selection and time-based position prediction. - Introduced `testNewMeeting` plugin and field files for validating tactical movement scenarios.
Refines tactical movement logic to better handle monsters chasing the player. Instead of relying solely on whether damage has been dealt, the AI now uses movement vectors and aggression state to predict if a target is approaching. - Introduced `isTargetProbablyComingToMe` to detect approaching monsters based on AI state and proximity. - Updated `meetingPosition` to use chase-aware motion snapshots and instability penalties for better spot selection. - Adjusted default attack configurations to favor waiting for aggressive targets and prioritize stable attack positions.
- Added algorithm to determine the cell the target will try to reach to attack the character, now calculates arrival to this cell instead of actor cell - Added occupancy and portal checks to exclude invalid candidate spots. - Ensured deterministic spot selection by sorting coordinate keys during iteration. - Improved selection logic to better handle score ties using distance and time heuristics.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
Contributor
Author
|
I got kinda carried away with this one, There is still somethings to improve upon, a few minor bugs to fix and a lot to clean and move |
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.
Overhauls the tactical interception logic to use a new Dijkstra floodfill algorithm for efficient reachability analysis. Replaces simple distance checks in
meetingPositionwith predictive "motion snapshots" that account for actor and target movement speeds, allowing the bot to better intercept moving targets or maintain distance while kiting.Key changes:
meetingPositioninMisc.pmto use score-based selection and time-based position prediction.testNewMeetingplugin and field files for validating tactical movement scenarios.A bit more technical:
isTargetProbablyComingToMeto detect approaching monsters based on AI state and proximity.meetingPositionto use chase-aware motion snapshots and instability penalties for better spot selection.Draft for now
Video showcases
Video version 1
Video version 2