Crossing (Missionaries and Cannibals) Home Page

 
 
 

Abstract

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.

  Return to top
 



Quick description on how to run Crossing Program

Virtual Reality Modelling Language (VRML) is used for visualizing the Crossing Problem. The student can use this visualizing tool to generate the VRML world out of the output of the Crossing program. The user should copy the perl script and put it in the same directory in which the output resides.The output of the crossing program which comes by running the script command should be saved in a file named "typescript". The perl script takes the output from the file named "typescript" and generates the VRML world into a file named "temp.wrl". There are also several view points setup to view the results in different directions. The user can switch between the viewpoints by selecting them from the viewpoint menu in the VRML world. This program represents the blocks in a 3D world which helps the user in understanding the problem more clearly. The positive directions of the x, y and z axes can be obtained by applying the right hand thumb rule. The negative z axis goes into the screen and the positive z axis comes out of the screen. The positive y axis goes up and the negative y axis goes down. The positive x axis goes to the right and the negative x axis goes goes to the left.

Note: look at the FAQ's for more details.

  Return to top
 



VRML worlds of Crossing Problem
 
 

  Return to top
 



Frequently asked questions:
 

Return to top
 


Resources used for this visualization
   

Students taking the NDSU CS 724 course do not need to understand the internals of the visualization operation. These links are to help if you are interested in the internals of the visualization process. They also should help if you want to use these visualizations in other environment


The files used for this system are as follows:
 

  • to-vrml.pl : This file generate temp.wrl with the help of findtext.pl and tocross.pl file
  • crossing4.pl: This is the cprolog file
  • findtext.pl: This file helps in generating the temp.wrl file with the help of to-vrml.pl and tocross.pl file
  • tocross.pl: This file helps in generating the temp.wrl with the help of findtext.pl and to-vrml.pl file
  • to-vrml.sh: This file combine the to-vrml.pl, findtext.pl and tocross.pl files togather.If we run this from the command line,       it will generate temp.wrl file.
  • temp.wrl: The VRML world
     

      Return to top