1 / 15

Maze Running in C Minor: A Series of Slides in 5 Parts Movement 4

This is a visual representation of a maze running algorithm implemented in C programming language. The algorithm uses the Best-First search method with a priority queue implemented as a heap. The maze is explored by taking nodes in the order of UP, LEFT, DOWN, RIGHT. The algorithm marks visited nodes as yellow and finds the shortest path from the green start node to the red exit node.

opatel
Download Presentation

Maze Running in C Minor: A Series of Slides in 5 Parts Movement 4

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 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

More Related