For this question, you will be programming Prolog to solve a planning problem, much like the monkey and banana problem. You should use the general planner code that we used in class, and add goal_state, initial_state, legal_move, and any other predicates you believe are necessary in order to solve the problem.
The Problem:
Three foxes and three geese need to cross a river. They have 1 rowboat. (We will assume that we are in a fairytale world in which foxes and geese can intelligently plan, communicate, and row boats.)
However, the rowboat is small and can only hold up to two animals at a time (but it needs to have at least one so that it can be rowed; it can’t move across the river by itself). Additionally, if at any time one of the sides of the river has more foxes than geese, then the foxes will eat the geese.
How can all three foxes and all three geese safely reach the other side of the river?
Hint: the shortest correct answer contains exactly 11 moves. There is more than one correct solution of length 11.
Create a Prolog program that will solve this question.