Question: Either a tiger or goat can move first. After that, the moves are taken alternately. Figure 3 shows the first move where the tiger takes

Either a tiger or goat can move first. After that, the movesare taken alternately. Figure 3 shows the first move where the tigertakes the bottom-middle position. Both can move next at most one positionEither a tiger or goat can move first. After that, the moves are taken alternately. Figure 3 shows the first move where the tiger takes the bottom-middle position. Both can move next at most one position up, down, or side, in any direction, if the next position is empty. Figure 4 shows the goats move. At any time, if the board configuration becomes like figure 5 and the next move is for the tiger, then the tiger can kill the goat by jumping over to the goats position if the next of goats position is empty and the tiger takes the next empty position as shown in figure 6.

If the next position behind the goat is not empty then the tiger cannot kill the goat. The goal of this game is to confine the tiger so that it cannot move to any position. In that case goat wins. If tiger can kill at least one goat and as a result goat cannot confine the tiger then the tiger wins. Do it with python

WAM Figure 3: Tiger's move Figure 4: Goat's move WW Figure 5: A random board position Figure 6: Tiger kills goat WAM Figure 3: Tiger's move Figure 4: Goat's move WW Figure 5: A random board position Figure 6: Tiger kills goat

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!