Skip to content

Commit 266d811

Browse files
committed
Updated the README
1 parent 4657dea commit 266d811

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,14 @@ It comes with a `test_a_star.py` snippet to test the algorithm in a simple weigh
1818
<img src="./doc/sample.png">
1919
</p>
2020

21+
The first diagram represents where each point came from. Starting in the E ( standing for ENDING POINT) we backtrack each arrow untill we reach the S ( standing for STARTING POINT). This path is the shortest path. And you know what?
22+
23+
**This is also true for every point in the diagram!!!**
24+
25+
The arcane forces of A* make that if you start in a visited point and backtrack using the arrows you will get the shortest path.
26+
27+
The second diagram is the cost to reach each point from the START (S).
28+
2129
# Can you EXPLAIN the algorithm?
2230

2331
Yeah! The idea of the A* algorithm is that starting from the start point we visit the points that are cheaper to visit. The cost of visiting a neighbor point depends on how costly is to go from the current point to a neighbor. So we check for all the points what is the neighbor that is cheaper to visit and we visit it.

0 commit comments

Comments
 (0)