The MissionariesAndCannibalsApp Java Application The initial state is shown again on the left, whereas the goal state is all the way to the right. 2c represents the action of two cannibals crossing the river. The complete search space is shown in figure 1.įigure 1: Search-space for the Missionaries and Cannibals problemĪrrows in figure 1 represent state transitions and are labelled with actions, e.g. The goal state is effectively a mirror image of the initial state. This problem can be solved by searching for a solution, which is a sequence of actions that leads from the initial state to the goal state. The initial state is shown to the right here, where black triangles represent missionaries and red circles represent cannibals. How can the boat be used to safely carry all the missionaries and cannibals across the river? If the cannibals ever outnumber the missionaries on either of the river’s banks, the missionaries will get eaten. There is one boat available that can hold up to two people and that they would like to use to cross the river. On one bank of a river are three missionaries and three cannibals. The Missionaries and Cannibals problem is a classic AI puzzle that can be defined as follows:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
March 2023
Categories |