sholloway / agents-playground

MIT License
4 stars 0 forks source link

Path Finding: Pruning Unreachable Cells #9

Open sholloway opened 2 years ago

sholloway commented 2 years ago

A* finds an optimal path, but it has a high space complexity because it looks at a large amount of the potential space. To keep things performant, different strategies can be used to reduce the potential space. Reducing the explore-able space is rather crucial for having a large number of agents running around.

For a large world, going to needs zones. Paths will need to navigate from one zone to another. When a new zone is entered, a new path will need to be calculated.

Todo

Possible Strategies

Potentially use this to introduce the concept of a navigation mesh. There could be a terrain the has a rich set of data for various aspects of the simulation, but then an algorithm (flood fill, scan line) could be used to select the traversable cells and create a lighter data structure for just navigation.