A process model for Missionaries-Cannibals and other river-crossing problems