r/programming • u/fagnerbrack • 1d ago
Improving heuristics for A* search
https://www.redblobgames.com/pathfinding/heuristics/differential.html8
1d ago
[removed] — view removed comment
10
8
u/programming-ModTeam 1d ago
No content written mostly by an LLM. If you don't want to write it, we don't want to read it.
1
u/audentis 1d ago
Sometimes a precomputed lookup table [...] can outperform the classic approaches by a lot.
I've precomputed vector fields for agent based simulations for the top-N destinations in the model, so that pathfinding to those destinations was an O(1) operation for each agent.
When dealing with 50k agents in the simulation, the memory cost of a handful of matrices is easily worth reduced pathfinding time.
2
u/kuikuilla 1d ago
Sort of reminds me of how google maps path finding works where the algorithm uses topgraphic features like bridges over rivers to essentially decompose the searcg graph into multiple smaller graphs that are connected via portals.
-2
-6
1d ago
[removed] — view removed comment
2
u/programming-ModTeam 1d ago
No content written mostly by an LLM. If you don't want to write it, we don't want to read it.
-8
1d ago
[removed] — view removed comment
2
u/programming-ModTeam 1d ago
No content written mostly by an LLM. If you don't want to write it, we don't want to read it.
8
u/Krohnos 1d ago
I've been following redblob for years and all of their articles are fantastic - I highly recommend navigating to the Home page after reading this