You are a farmer tasked with getting goats and wolves across a river for some reason.

Description
Project Description

You are a farmer tasked with getting goats and wolves across a river for some reason. If the wolves ever outnumber the goat on either side of the river, the wolves will overpower and eat the goat. You have a boat, which can only take one or two animals in it at a time, and must have at least one animal in it. How do you move all the animals from one side of the river to the other?

 

There were initially 3 goat and 3 wolves; here, your agent should be able to solve the problem for an arbitrary number of initial goat and wolves. You may assume that the initial state of the problem will follow those rules (e.g. we won’t give you more wolves than goat to start). However, not every initial state will be solvable; there may be combinations of goat and wolves that cannot be solved.

 

You will return a list of moves that will solve the problem, or an empty list if the problem is unsolvable based on the initial set of Goat and Wolves. You will also submit a brief report describing your approach.

 

Starter Code

Here is your starter code: mini-project1.zip. The starter code contains two files: SemanticNetsAgent.py and main.py. You will write your agent in SemanticNetsAgent.py. You may test your agent by running main.py. You may add more initial test cases in main.py for to ensure the program works on arbitrary number of goats and wolves.

 

In SemanticNetsAgent.py, your solve() method will have two parameters: the number of goat and the number of wolves. We would call your agent with your agent.solve(3, 3). You may assume that the initial state is valid (there will not be more Wolves than Goat in the initial state).

 

Returning Your Solution

Your solve() method should return a list of moves that will result in the successful solving of the problem. These are only the moves your agent ultimately selected to be performed, not the entire web of possible moves. Each item in the list should be a 2-tuple where each value is an integer representing the number of goat (the first integer) or wolves (the second integer) to be moved; we assume the moves are alternating. So, if your first move is (1, 1), that means you’re moving one goat and one wolf to the right. If your second move is (0, 1), that mea