CS 3600 - Introduction To Intelligent Systems: 1. Missionaries and Cannibals
CS 3600 - Introduction To Intelligent Systems: 1. Missionaries and Cannibals
Operators are:
• MM: 2 missionaries cross the river
• CC: 2 cannibals cross the river
• MC: 1 missionary and 1 cannibal cross the river
• M: 1 missionary crosses the river
• C: 1 cannibal crosses the river
Draw a diagram showing all the legal states and transitions from states corresponding to
all legal operations. See Figure 3.3 in Russell & Norvig (p. 65) for an example of what
your diagram should look like.
2. Answer the following question.
Hint: think about branching factor of states near the initial state and goal state, as
compared to the branching factor of states in the “middle” of the state space.
3. Breadth-first search
Solve the Missionaries and Cannibals problem by implementing the BFS algorithm given
in class. Implement the BFS algorithm to show the open list and closed list at every
iteration of the algorithm until the goal is visited. Use the format below. I have given the
first two iterations.
open: 33L
closed: nil
open: 30R
closed: 32L, 32R, 22R, 31R, 33L
open: 31L
closed: 30R, 32L, 32R, 22R, 31R, 33L
open: 11R
closed: 31L, 30R, 32L, 32R, 22R, 31R, 33L
open: 22L
closed: 11R, 31L, 30R, 32L, 32R, 22R, 31R, 33L
open: 02R
closed: 22L, 30R, 11R, 31L, 30R, 32L, 32R, 22R, 31R, 33L
open: 03L
closed: 02R, 22L, 30R, 11R, 31L, 30R, 32L, 32R, 22R, 31R, 33L
open: 03L
closed: 11R, 02R, 22L, 30R, 11R, 31L, 30R, 32L, 32R, 22R, 31R, 33L
open: 01R
closed: 03L, 11R, 02R, 22L, 30R, 11R, 31L, 30R, 32L, 32R, 22R, 31R, 33L
open: 33L
closed: nil