Reference Links:
Https://www.cnblogs.com/yangyxd/articles/5447889.html
I. Principle
1. Simplify the scene and divide it into square squares called nodes, and the distance from one node to another is called cost. The cost of a node and a horizontal/vertical adjacent node is 1, and the cost of the diagonal node is 1.4. Here the reference formula F = g + H,f represents the total cost of the node, G represents the cost of the node and the previous path node, h represents the cost of the node and the target node.
2. Requires two lists, open list (openlist) and close list (closelist). The open list is used to record the grids that need to be considered, and the closed list is used to record squares that are no longer considered.
3. Add the current position in the close list and add the accessible grid adjacent to the current position to the open list
[Unity Algorithm] A Star pathfinding (i): Basic version