Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

what settings to tweak in order to reduce the pathfinding latency the most? #4652

Open
Paladynee opened this issue Feb 16, 2025 · 1 comment
Labels
question Further information is requested

Comments

@Paladynee
Copy link

What do you need help with?

i am looking for a way to just pathfind faster, not looking for optimal paths, but deciding on a path and getting to work faster.

in other words, i dont want the "most optimal path that is the shortest way", i want a path that "works but isn't the optimal", in a shorter amount of time

what settings should i be tweaking? which features could i completely disable in order to make the pathfind faster?

secondary question: what about the other way around? what if i want baritone to spend, lets say, 5x more time on pathfinding but find more optimal paths?

@Paladynee Paladynee added the question Further information is requested label Feb 16, 2025
@ZacSharp
Copy link
Collaborator

ZacSharp commented Feb 17, 2025

You can always play with timeouts (primaryTimeoutMS, failureTimeoutMS, failureTimeoutMS, planAheadFailureTimeoutMS) to make it spend more or less time on finding a path all the way to the goal. Reducing the timeouts will force it to guess which segment is best more often and hence lead to worse paths (or looping in really difficult terrain) while being faster for obvious reasons.
By default any segment is guaranteed to be a shortest path from its start to its end (barring a very unlikely edge case where the optimal path goes through unknown terrain but a suboptimal path can be found without hitting more than 50 dead ends caused by unknown terrain)
If you want to actually mess with that guarantee you can increase costHeuristic, making A* more greedy and potentially faster if the path actually goes more or less straight towards the goal. Increasing that setting will bias search towards the goal, but also allow for suboptimal paths. (iirc increasing the setting by some factor allows path length to increase by roughly the same factor).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants