xaya / taurion_gsp

Taurion - A Fully Decentralised MMO built for the Xaya Platform.
https://taurion.io
GNU General Public License v3.0
23 stars 10 forks source link

Avoid unnecessary turns in path finder #196

Open domob1812 opened 3 years ago

domob1812 commented 3 years ago

This updates the logic in the path finder for stepping the path once the distance map has been computed. Instead of always choosing the next direction based on a fixed order of all six principal directions, we try to stick to the previous direction as long as possible. This is a greedy approach to minimise the number of turns taken, and thus the number of waypoints and sizes of moves. The resulting paths are still of optimal length.

This does not affect consensus (nor would future tuning of the algorithm), since path finding is no longer part of consensus since #145).