CS724 Program 3

Missionaries and Cannibals

There are three missionaries and three cannibals on one side of the river. They have a boat that can take one or two people at a time. If the number of cannibals on a side ever out numbers the missionaries, the cannibals will eat the missionaries. The problem is to get all of the cannibals and missionaries to the other side without any snacks in the process. You have been given a working prolog program called crossing.pl. This program solves a related problem of the father and his two sons. You may use any parts of the crossing program to help solve the missionaries and cannibals problem. To run the prolog version of the crossing program you will need to copy the file crossing.pl into your space. Then start the prolog system with the
   prolog
command. Then to bring in the program type
   ['crossing.pl'].
Be sure to include the '.' or nothing will happen. The '.' character indicates the end of the input command. To run the crossing program type
   trip.
There is a considerable amount of tracing included in the program in the form of write statements.

You will find the crossing.pl program under the "tools" section on the class home page.

You are to turn in a image of VRML trace the crossing run. (see notes with the crossing problem descritption).