Skip to content

Latest commit

 

History

History
7 lines (6 loc) · 1005 Bytes

README.md

File metadata and controls

7 lines (6 loc) · 1005 Bytes

Cannibals-and-missionaries

This a 3rd year Artificial intelligence project for Athens University of Economics and Business project (AUEB). The task is to implement the cannibals and missinaries riddle using an A star search algorithm(meaning finding the proper heuristic function) with a closed set. The number of missinaries, the number of cannibals and the boat size are all parameters that can be given by the user. To run the program you need to give 3 command line parameters in the following order: first the number of cannibals and missionaries(they must be the same number), second the boat size and third the max step that the algorithm can execute. There is actually a fourth parameter which test all the possible combinations of N(cannibals and missionaries number),M(boat size),K(max travels) up to the limits given.We have found it works quite well even with large numbers: image