



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Material Type: Assignment; Class: Artificial Intelligence; Subject: (Computer Science); University: University of Houston; Term: Spring 2009;
Typology: Assignments
1 / 5
This page cannot be seen from the preview
Don't miss anything!




Solution for Assignment 1 – COSC 6368 – Artificial Intelligence Spring 2009 Problem 1: A state in this problem can be defined as (X, Y) X: water present in the 4 liter jug {0, 1, 2, 3, 4}; Y: water present in the 3 liter jug {0, 1, 2, 3}; Initial state and goal states: INITIAL: (0, 0) GOAL: (2, 0); (2, 1); (2, 2); (2, 3) The possible operations:
This applies only when the amount of water in both the jugs is greater than or equal to 4 liters. OPR6: If (X+Y) >= 3 and X > 0 This operator is applied to fill the 3 liter jug from the 4 liter jug (X, Y) (X – (3 – Y), 3)) This applies only when the amount of water in both the jugs is greater than or equal to 3 liters. OPR7: If (X+Y) <= 4 and Y > 0 This operator is applied to empty water from the 3 liter jug into the 4 liter jug (X, Y) (X+Y), 0) This operator can be applied only when the amount of water in both the jugs is less than or equal to 4 liters and the amount of water in the 3 liter jug is greater than zero OPR8: If (X+Y) <= 3 and X > 0 This operator is applied to drain water from the 4 liter jug into the 3 liter jug. This operator can be applied only when the amount of water in both the jugs is less than or equal to 3 liters and the amount of water in the 4 liter jug is greater than zero. (X, Y) (0, X + Y) Example for path to the GOAL: (0,0) (0, 3) (3, 0) (3, 3) (4, 2) (0, 2) (2, 0) (0, 0) (4, 0) (1, 3) (1, 0) (0, 1) (4, 1) (2, 3) Problem 2: Answer:
Give reasons for your answer! b. Backtracking only memorizes states that are on the currently explored path. What are the advantages of this approach? What are the disadvantages of this approach? Be specific! Answer: a. Yes! Because: there are finite numbers of states and the algorithm check duplicate in currently exploring. b. Advantages :
At each step it assumes that player B is trying to maximize the chances of B winning while on the next turn player A is trying to minimize the chances of B winning.(i.e. to maximize A’s own chances of winning). b. The approaches to cope with the problem that we can not generate the entire search space are: Cut off Search (Pruning) Limit the depth of the search tree as we do not have time to explore all the nodes and we assume that the test succeeds for all the nodes at or below depth d. Evaluation Function Return an estimate of the expected utility of the game and it should be the one which accurately reflects the chances of winning the game. c. Main difference between minimax and alpha-beta search is: Using pruning (Cut off search tree) alpha-beta can compute the correct minimax decision. d. Because if we proceed backward from the goal we can not reach to the current state.