The farmer wants to move the wolf the goose and the corn across the river, from the west bank to the east, where the grass is greener.

The farmer, the wolf the goose and the corn, can each be either on the west bank, in the boat, or on the east bank. This gives 34 = 81 possible states, represented by the 81 coloured dots.

If you click on a coloured dot you will see the state it represents.

You can drag the states around to re-arrange them.

If the goose is left with the corn or the wolf, without the farmer, it will eat or be eaten. Such conflict must be avoided.

The boat can carry the farmer and at most one cargo. It must not be overloaded.

The cargo cannot travel solo. Without the farmer the boat may drift downstream and be lost.

States that violate one or more of these conditions are coloured red. The safe states are green. If you hover over a coloured dot you can see which state it represents, and which conditions it violates.

The links represent transitions between safe states corresponding to the cargo getting in or out of the boat, with or without the farmer.