diff --git a/README.md b/README.md index 6d6bce5..01ec38b 100644 --- a/README.md +++ b/README.md @@ -108,7 +108,7 @@ The path produced in the previous example can be visualized by adding the follow This will generate a visualization of the grid and the path and save it to the file `path_visualization.html` and also open it in your default browser.
- +
## Rerun the Algorithm @@ -135,18 +135,24 @@ General Process: 6. If none of the neighbors are walkable, the algorithm terminates. Otherwise, `check_neighbors` calls `process_node` on each neighbor. It calculates the cost `f` for each neighbor node. This involves computing `g` (the cost from the start node to the current node) and `h` (the estimated cost from the current node to the end node, calculated by `apply_heuristic`). 7. Finally `process_node` updates the open list so `find_path` with new or updated nodes. This allows `find_path` to continue the process with the next node in the subsequent iteration. -flow: +The following diagram illustrates the process: -```pseudo - find_path - init_find # (re)set global values and open list - while open_list not empty: - check_neighbors # for the node with min 'f' value in open list - pop_node # node with min 'f' value - find_neighbors # get neighbors - process_node # calculate new cost for each neighbor +