Rules
-
RULE 01
The father kills a daughter if the mother is not there. Never leave the father with either daughter on a bank without the mother.
-
RULE 02
The mother kills a son if the father is not there. Never leave the mother with either son on a bank without the father.
-
RULE 03
The dog kills the whole family if the servant is not there. Never leave the dog with any family member without the servant. The dog and the servant alone are fine.
-
RULE 04
The boat seats two. Only the father, the mother and the servant can row it, and one of them must be aboard on every trip — going across and coming back.
How to play
- 1. Tap (or click) anyone standing on the bank where the boat is to put them aboard. Tap again to take them back out.
- 2. Once someone who can row — the father, mother or servant, marked with a vermilion border — is aboard, the Cross button becomes available.
- 3. Press Cross and the boat sails over. Anyone in the boat counts as being off the bank, and both banks are checked for safety the moment the boat departs.
- 4. Break a rule and you get an incident. Undo and Restart are right there in the dialog, so feel free to experiment.
On the shortest solution
The puzzle can be solved in 17 crossings, and that is the theoretical minimum — a breadth-first search over the whole state space confirms no solution of 16 or fewer exists.
There are only 512 states in total (28 = 256 arrangements of the eight characters, times two positions for the boat), and the search walks the legal ones exhaustively.
Implementation notes
- Rule checking: a single pure function takes the set of people on a bank and returns the violations. Both the game itself and the hint solver call it, so there is exactly one definition of what "safe" means and one place to change if the rules change.
- Solver: the eight characters are packed into a bitmask with one more bit for the boat, and the 512 states are searched breadth-first. It resolves instantly in the browser.
- Animation: boarding and disembarking use FLIP — measure the position before and after, apply the inverse transform, then animate it away. In the DOM it is just a matter of moving the element from the bank's container into the boat's, so the visual state can never drift from the game state.
- Characters: plain SVG silhouettes. Adults and children differ in height, skirts and trousers do the rest, and the servant gets an apron and a bow tie. The three who can row are outlined in vermilion.
- Everything else: fully keyboard playable, with a live region for screen readers, respect for the OS "reduce motion" setting, and a personal best stored locally.
Origins
This is a classic river-crossing puzzle, known variously as the "jealous husbands" problem or, in Japanese, 猛獣家族の川渡り.
It extends the familiar wolf, goat and cabbage riddle: eight characters instead of three, and only some of them can row, which is what makes it genuinely hard.