Guest User

Untitled

a guest
Jan 16th, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. open list = [S]; closed list = []
  2. open list = [A,B]; closed list = [S]
  3. whats next?
  4.  
  5. it 0: open list = [S]; closed list = []
  6.  
  7. it 1: in this iteration we will have closed list = [S] and a PQ of open nodes with,
  8. open list =
  9. | (B, 6) | (g = 3 + h = 3)
  10. | (A, 7) | (g = 2 + h = 5)
  11.  
  12. it 2: closed list = [S,B];
  13. open list =
  14. | (A, 7) | (g = 2 + h = 5)
  15. | (D, 10) | (g = 6 + h = 4)
  16. | (C, 11) | (g = 8 + h = 3)
  17.  
  18. it 3: closed list = [S,B,A];
  19. open list =
  20. | (C, 9) | (g = 6 + h = 3) <-- new path found with lower g-value, we update the node
  21. | (D, 10) | (g = 6 + h = 4)
  22.  
  23. it 4: closed list = [S,B,A,C];
  24. open list =
  25. | (F, 9) | (g = 8 + h = 1)
  26. | (D, 10) | (g = 6 + h = 4)
  27. | (E, 13) | (g = 10 + h = 3)
  28.  
  29. it 5: closed list = [S,B,A,C,F];
  30. open list =
  31. | (G, 9) | (g = 9 + h = 0)
  32. | (D, 10) | (g = 6 + h = 4)
  33. | (E, 13) | (g = 10 + h = 3)
  34.  
  35. it 6: we expand the goal node G.
Add Comment
Please, Sign In to add comment