/M-C-State-Space-Problem-Solver

State space problem solver for the classic "Missionaries and Cannibals" problem.

Primary LanguageCommon LispGNU General Public License v3.0GPL-3.0

The problem

(From Wiki) "In the missionaries and cannibals problem, three missionaries and three cannibals must cross a river using a boat which can carry at most two people, under the constraint that, for both banks, if there are missionaries present on the bank, they cannot be outnumbered by cannibals (if they were, the cannibals would eat the missionaries). The boat cannot cross the river by itself with no people on board. And, in some variations, one of the cannibals has only one arm and cannot row."

The goal of the problem is to get all three missionaries, all three cannibals and the boat from the left bank (where they all start) to the right bank.

The Algorithm

The Missionaries and Cannibals state space problem solver uses a state space search algorithm to find a solution.