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.
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