A solution to the Missionaries and Cannibals problem using a classic state-space problem solving approach.
Graph of state-space solution. Normal states in brown, feast states in red,
goal state in blue. Each arrow represents an operation, such as
stands for “1 missionary and 1 cannibal moved to right-bank”, or
stands for “2 cannibals moved to left-bank”. The operations taken to reach
solution state are colored blue.