You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -108,10 +108,10 @@ All pathfinding algorithms in this library are inheriting the Finder class. It h
108
108
109
109
The normal process works like this:
110
110
1. You call `find_path` on one of your finder implementations
111
-
1. `init_find` instantiates open-listand resets all values and counters.
112
-
1. The main loop starts on the open-list. This list gets filled withall nodes that will be processed next (e.g. all nodes that are walkableandnot the end in the). For this you need to implement `check_neighbors`in your own finder implementation.
113
-
1. For example in A*s implementation of `check_neighbors` you first want to get the next node closest from the current starting point from the openlist. the `next_node` method in Finder does this by giving you the node with a minimum `f`-value from the openlist, it closes it and removes it from the openlist.
114
-
1. if this node isnot the end node we go on and get the neighbors of the node we just picked from the grid by calling `find_neighbors`. This just calls `grid.neighbors`.
111
+
1. `init_find` instantiates `open_list`and resets all values and counters.
112
+
1. The main loop starts on the `open_list`. This list gets filled withall nodes that will be processed next (e.g. all neighbors that are walkable). For this you need to implement `check_neighbors`in your own finder implementation.
113
+
1. For example in A*s implementation of `check_neighbors` you first want to get the next node closest from the current starting point from the openlist. the `next_node` method in Finder does this by giving you the node with a minimum `f`-value from the openlist, it closes it and removes it from the `open_list`.
114
+
1. if this node isnot the end node we go on and get its neighbors by calling `find_neighbors`. This just calls `grid.neighbors`for most algorithms.
115
115
1. If none of the neighbors are the end node we want to process the neighbors to calculate their distances in`process_node`
116
116
1. `process_node` calculates the cost `f`from the start to the current node using the `calc_cost` method and the cost after calculating `h`from`apply_heuristic`.
117
117
1. finally`process_node` updates the openlist so `find_path` can run `check_neighbors` on it in the next node in the next iteration of the main loop.
0 commit comments