Skip to content

Conversation

@agent-q1
Copy link
Contributor

@agent-q1 agent-q1 commented Jun 19, 2020

Simplified incorporation of slopes into costs.

This PR includes a very simple way of making the pathfinding algorithm include information about how steep the terrain is. If one of the paths has a route which goes uphill or downhill a lot, it will have a higher associated cost and hence will be less likely to be chosen. Thus, a path with a smoother terrain will be preferred over one which takes one which is more uneven.
For example, consider going up a hill. Generally, the path chosen will be one that goes in circles round and round untill the top. However, the previous algorithm would just choose a straight line uphill path from the foot to the top. This is not very realistic.

TODO

Use Facets such as surfaceHeightFacet or SurfaceSteepnessFacet in order to ascertain slopes at different places
Optimise the value of beta (in HAStar currently set to 1) to obtain realistic paths. (Weighing how much going uphill or downhill actually matters. For example, it would matter a lot to a tank but not to a monkey)
Write tests

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant