The code has
???? in the goat movement rule. Replace
???? with
F2 (the new bank), then click
Run to let Prolog discover the complete 7-step crossing sequence!
Notice Step 4: The farmer brings the Goat back to the left bank so the Goat and Cabbage are not left unsupervised on the right bank!