Lab_05_AI
Lab_05_AI
Figure 0-1. Uniform-cost search on a graph use of a priority queue and the addition of an extra check in case a shorter path to a
frontier state is discovered.
Modify the code of Breadth First Search implemented in LAB 04 to Uniform Cost Search. Display the order
in which nodes are added to the explored set, with start state S and goal state G. Path costs are mentioned
on the arcs. Break ties in alphabetical order. What is the total cost of path found using UCS?
Exercise 5.2.
An alternative method that many people know for traversing a maze is to start with your hand on the left
side of the maze (or the right side, if you prefer) and to follow the maze around, always keeping your left
hand on the left edge of the maze wall. In this way, you are guaranteed to find the exit. Implement the
UCS algorithm to find the shortest path in the following maze.