Presentation is loading. Please wait.

Presentation is loading. Please wait.

A Series of Slides in 5 Parts Movement 4. Best-First

Similar presentations


Presentation on theme: "A Series of Slides in 5 Parts Movement 4. Best-First"— Presentation transcript:

1 A Series of Slides in 5 Parts Movement 4. Best-First
Maze Running in C Minor A Series of Slides in 5 Parts Movement 4. Best-First

2 AT: AA HEAP: AB – 5 Nodes are taken in the order: UP, LEFT, DOWN, RIGHT The heap is emptied in a FIFO order when it comes to duplicates. KEY: GREEN – Start RED – Exit YELLOW – Visited

3 AT: AB HEAP: CA – 4 BB – 4 Since we know that keeping track of where we’ve visited makes for a more efficient search, we’ll only insert nodes we’ve not visited into the heap. Nodes are taken in the order: UP, LEFT, DOWN, RIGHT The heap is emptied in a FIFO order when it comes to duplicates. KEY: GREEN – Start RED – Exit YELLOW – Visited

4 AT: CA HEAP: BB – 4 Nodes are taken in the order: UP, LEFT, DOWN, RIGHT The heap is emptied in a FIFO order when it comes to duplicates. KEY: GREEN – Start RED – Exit YELLOW – Visited

5 AT: BB HEAP: BA – 5 CB – 3 Nodes are taken in the order: UP, LEFT, DOWN, RIGHT The heap is emptied in a FIFO order when it comes to duplicates. KEY: GREEN – Start RED – Exit YELLOW – Visited

6 AT: CB HEAP: BA – 5 DB – 2 Nodes are taken in the order: UP, LEFT, DOWN, RIGHT The heap is emptied in a FIFO order when it comes to duplicates. KEY: GREEN – Start RED – Exit YELLOW – Visited

7 AT: DB HEAP: BA – 5 DA – 3 DC – 1 EB – 3 Nodes are taken in the order: UP, LEFT, DOWN, RIGHT The heap is emptied in a FIFO order when it comes to duplicates. KEY: GREEN – Start RED – Exit YELLOW – Visited

8 AT: DC HEAP: BA – 5 DA – 3 EB – 3 CC – 2 Nodes are taken in the order: UP, LEFT, DOWN, RIGHT The heap is emptied in a FIFO order when it comes to duplicates. KEY: GREEN – Start RED – Exit YELLOW – Visited

9 AT: CC HEAP: BA – 5 DA – 3 EB – 3 BC – 3 CD – 1 Nodes are taken in the order: UP, LEFT, DOWN, RIGHT The heap is emptied in a FIFO order when it comes to duplicates. KEY: GREEN – Start RED – Exit YELLOW – Visited

10 AT: CD HEAP: BA – 5 DA – 3 EB – 3 BC – 3 Nodes are taken in the order: UP, LEFT, DOWN, RIGHT The heap is emptied in a FIFO order when it comes to duplicates. KEY: GREEN – Start RED – Exit YELLOW – Visited

11 AT: DA HEAP: BA – 5 EB – 3 BC – 3 CA – 4 Nodes are taken in the order: UP, LEFT, DOWN, RIGHT The heap is emptied in a FIFO order when it comes to duplicates. KEY: GREEN – Start RED – Exit YELLOW – Visited

12 AT: EB HEAP: BA – 5 BC – 3 CA – 4 EA – 4 EC – 2 Nodes are taken in the order: UP, LEFT, DOWN, RIGHT The heap is emptied in a FIFO order when it comes to duplicates. KEY: GREEN – Start RED – Exit YELLOW – Visited

13 AT: EC HEAP: BA – 5 BC – 3 CA – 4 EA – 4 ED – 1 Nodes are taken in the order: UP, LEFT, DOWN, RIGHT The heap is emptied in a FIFO order when it comes to duplicates. KEY: GREEN – Start RED – Exit YELLOW – Visited

14 AT: ED HEAP: BA – 5 BC – 3 CA – 4 EA – 4 DD – 0 Nodes are taken in the order: UP, LEFT, DOWN, RIGHT The heap is emptied in a FIFO order when it comes to duplicates. KEY: GREEN – Start RED – Exit YELLOW – Visited

15 AT: DD HEAP: BA – 5 BC – 3 CA – 4 EA – 4 Nodes are taken in the order: UP, LEFT, DOWN, RIGHT The heap is emptied in a FIFO order when it comes to duplicates. KEY: GREEN – Start RED – Exit YELLOW – Visited


Download ppt "A Series of Slides in 5 Parts Movement 4. Best-First"

Similar presentations


Ads by Google