Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- open list = [S]; closed list = []
- open list = [A,B]; closed list = [S]
- whats next?
- it 0: open list = [S]; closed list = []
- it 1: in this iteration we will have closed list = [S] and a PQ of open nodes with,
- open list =
- | (B, 6) | (g = 3 + h = 3)
- | (A, 7) | (g = 2 + h = 5)
- it 2: closed list = [S,B];
- open list =
- | (A, 7) | (g = 2 + h = 5)
- | (D, 10) | (g = 6 + h = 4)
- | (C, 11) | (g = 8 + h = 3)
- it 3: closed list = [S,B,A];
- open list =
- | (C, 9) | (g = 6 + h = 3) <-- new path found with lower g-value, we update the node
- | (D, 10) | (g = 6 + h = 4)
- it 4: closed list = [S,B,A,C];
- open list =
- | (F, 9) | (g = 8 + h = 1)
- | (D, 10) | (g = 6 + h = 4)
- | (E, 13) | (g = 10 + h = 3)
- it 5: closed list = [S,B,A,C,F];
- open list =
- | (G, 9) | (g = 9 + h = 0)
- | (D, 10) | (g = 6 + h = 4)
- | (E, 13) | (g = 10 + h = 3)
- it 6: we expand the goal node G.
Add Comment
Please, Sign In to add comment