Survey

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Document related concepts

no text concepts found

Transcript

Bahria University CSC-470:Artificial Intelligence Department of Computer Science Semester 07 (Spring 2015) ASSIGNMENT 01 Marks: 05 PROBLEM FORMULATION Read Carefully: This assignment has 10 questions that you have to answer and submit in HANDWRITTEN form. The deadline for this assignment is before or on Tuesday March 10, 2015. WARNING: This is an individual assignment; you must solve it by yourself. Any form of plagiarism will result in receiving zero in the assignment. WARNING: Late submission will not be accepted. Any assignment submitted after the cutoff time will receive zero. Problem No. 1 (Missionaries and Cannibals) Three missionaries and three cannibals come to a river. There is a boat on their side of the river that can be used by either 1 or 2 persons. The problem is to figure out how to use this boat to cross the river in such a way that the cannibals never outnumber the missionaries on either side of the river. a) Define the problem: Description of the states o Initial state o Goal Transitions (actions) Constriants Cost function b) Build the states space (only with possible states). c) What happens when there are 4 cannibals and 4 missionaries? Problem No. 2 (Farmer and Boat) A farmer wishes to carry a wolf (i.e., the family pet), a goat and a cabbage across a river, from the south to the north shore. The farmer is the proud owner of a small rowing boat called Bounty which he feels is easily up to the job. Unfortunately the boat is only large enough to carry at most the farmer and one other item. Worse again, if left unattended the wolf will eat the goat and the goat will 1|Page BU, CS Department CSC-470: Artificial Intelligence 2/5 Semester 7 (Spring 2015) Assignment 01 eat the cabbage. How can the farmer safely transport the wolf, the goat and the cabbage to the opposite shore? a) Define the problem: Description of the states o Initial state o Goal Transitions (actions) Constriants Cost function b) Build the states space for the above problem (only with possible states). Problem No. 3 (8 Puzzle) Draw the state space for the following 8-puzzle problem. a) Define the problem: Description of the states o Initial state o Goal Transitions (actions) Constriants Cost function b) Build the states space (only with possible states). BU, CS Department CSC-470: Artificial Intelligence 3/5 Semester 7 (Spring 2015) Assignment 01 Problem No. 4 (N-Queens) The n‐queens problem is a popular problem originally proposed by a chess player in 1848. It requires putting n queens on an n x n chess board such that none of the queens is attacking any of the other queens. In case you’re unfamiliar with chess, a queen can move in any direction for any number of squares: Concretely, the picture on the right, above, shows a solution to the 8‐queens problem. Find a solution to the n‐queens problem thought a search space. a) Define the problem: Description of the states o Initial state o Goal Transitions (actions) Constriants Cost function b) Build the states space (only with possible states). Problem No. 5 (Tower of Hanoi) 1) The initial state contains three rings on the leftmost pole. These rings must be moved to the rightmost pole as illustrated in the goal state. At most one ring can be moved at a time. A larger ring cannot be placed on top of a smaller ring. Rings can be placed on all three poles. 2) Determine the sate space that must be performed to get from the initial state to the goal state. BU, CS Department CSC-470: Artificial Intelligence 4/5 Semester 7 (Spring 2015) Assignment 01 Problem No. 6 (Indiana Jones Bridge) Four persons have to cross a bridge that an only support two persons at the same time. It is night, and they need to carry a torch while crossing the bridge. The time needed by each person is respectively: 1, 2, 5 and 10 minutes. Is it possiblethat they cross the bridge within 17 minutes? a) Define the problem: Description of the states o Initial state o Goal Transitions (actions) Cost function b) Draw the states sapce space for the above problem Problem No. 7 (Sliding Puzzle) Consider the following sliding-blocks puzle, consisting of three black tiles, three white tiles, and an empty space. The initial configuration for the puzzle consists of all the black tiles to the left, all of the white tiles to the right, and the empty space in the middle. For example, the following shows the initial configuration: B B B W W W The goal is to reverse the locations of the tiles, i.e., have all white tiles to the left and all black tiles to the right, with the space in the middle. There are two types of moves allowed. A tile can move into an adjacent empty space, or it can jump over one or two adjacent tiles into the empty space. a) Define the problem: Description of the states o Initial state o Goal Transitions (actions) Cost function b) Draw the states sapce space for the above problem Problem No. 8 (Fathers and Children) Three fathers with 3 children (A and his child CA, B and his child CB, and C and his child CC) are standing on side North of a river. The three fathers want to cross the river (go to side South) with their children, but there is only one boat, which can hold a maximum of two persons (a child is considered a person). Furthermore, no child can stay with other fathers without the presence of his father. a) Give a suitable representation of a state. b) According to the previous representation, what is the initial state? What is the goal state? c) What are the possible actions on a state? d) Draw the state space using a tree structure up to goal. BU, CS Department CSC-470: Artificial Intelligence 5/5 Semester 7 (Spring 2015) Assignment 01 Problem No. 09 (Tic Tac Toe) Starting with an empty board, the first player can place a X on any one of nine places. Each move yields a different board that will allow the opponent 8 possible responses and so on. a) b) c) Give a suitable representation of a state. i. what is the initial state? ii. What is the goal state? What are the possible actions on a state? Draw the state space using a tree structure up to goal. Problem No. 10 (Water Jugs) You have 3 water jugs whose capacities are 10, 7 and 3 liters respectively. The first jug is full and the other 2 jugs are empty. It is required to put 5 liters in the first and 5 liters in the second. (Note: no additional source of water is available). a) Define the initial and goal states, state variables, and operators. b) Draw the state space tree for this problem.