Document Sample

Name: ___Solutions__________ SID: ______________________ CSci 538: Artificial Intelligence Midterm Exam, Fall 2007 For official grading use only. Total: ______(+1) / 100 Q1 Q2 Q3 Q4 Q5 Q6 Q7 Q8 ____ / 15 ____ / 15 ____ / 12 ____ / 12 ____ / 10 ____ / 15 ____ / 10 ____ / 10 1. Tree Search (15 points) Consider the tree shown below. The numbers on the arcs are the step costs; the numbers inside states A, L, C, B and R are the heuristic estimates; all other states have a heuristic estimate of 0 (not shown). Perform the indicated searches using X as the starting state, and G as the goal state. X h=1 h=4 A L h=3 h=2 h=1 C M B G R Y T O Q For search methods D use a priority based method, assume that a tie in terms of priority will result in the fall that back method of a child node being selected and expanded based on alphabetical order (e.g. first occurring alphabetically will be taken from queue and expanded first). For search methods that do not use priority, simply assume that expansion will take place from left to right on the page. These two rules should eliminate all ambiguity in terms of the results of your tree search. What order would the states be expanded by each type of search. Write only the sequence of states expanded by each search. Search Type List of states Breadth First Search XALCMBG Depth First Search XACDYMBTLG Iterative Deepening X XALXAC MB LG Csci 538, Midterm 1 Fall 2007 Name: ___Solutions__________ SID: ______________________ Uniform-Cost Search X LA R C B G A* search XALRG Q: If we changed the tie-breaker method for priority-based search to select the node that had first been placed on the queue rather then select alphabetically, would there have been any differences in any of the priority based searches? If so which ones and how would it have differed? Uniform-Cost Search would have differed. In the original specified heuristic, B & G have the same estimated cost (8), therefore by the tie-breaker specified in the problem we choose B because it occurs before G alphabetically. But G was placed on the UCS queue before B (on the expansion of node L), therefore as the question states if we are choosing by first-on-queue in the case of a tie, we would have choosen G before B and thus UCS would have had the expansion sequence: X L A R C G Breadth First, Depth First and Iterative Deepening are not priority based searches (e.g. we do not use a priority queue in the implementation of the search heuristic). Therefore, there is no concept of priority, nor ties based on priority, in these searches. 2. The A* search for this tree also involves a tie of priorities (G & O have an evaluation of 8 in this case), however using either first-on-queue or alphabetical ordering to break the tie results in the same sequence of expansions in this case, thus there is no difference for the A* search.Graph Search (15 points) Consider the graph shown below where the numbers on the links are step costs and the numbers next to the states are heuristic estimates. Note that arcs are undirected (e.g. it is valid to follow the link in either direction). h=0 Let Commerce be the start state and Paris be the goal state. Paris h = 33 Lake (@ Cooper ) h = 40 h = 24 h = 21 Farm Com Sulph Csci 538, Midterm ersvill 2 merc ur Fall 2007 e e Springs Name: ___Solutions__________ SID: ______________________ Simulate A* search with a strict close list on this graph. At each step, show the path to the state of the node that's being expanded (use the first letter of the city name for abbreviation), the length of that path, the total estimated cost of the path (actual + heuristic), and the current value of the close list (as a list of states). You should use the scratch paper provided to show your work on the simulated search for this problem, especially indicating your queue and the addition/removal of partial solutions therein. Please transcribe (only) the information requested into the table given below of your final results (all rows may not necessarily be filled). Path to State Expanded Length of Path Total Estimated Cost Close List C 0 40 {C} F← C 20 41 {CF} S←C 20 44 {C F S } L← C 19 52 {CFSL} P← L← C 46 46 { C FS LP} 3. Heuristics and A* Search (12 points) 1. Is the heuristic given in Problem 2 admissible? Explain? No. One clear example is the path between Lake (L) and Paris (P). The heuristic evaluation of cost to goal at L is 33, but the actual path cost is only 27, so the heuristic function OVERESTIMATES the cost to the goal. In order for a heuristic to be admissible it must always give an estimate equal to or less then (underestimate) the actual cost to goal of the state being evaluated. Greenville is another overestimated cost-to-solution node in the problem. 2. Is the heuristic given in Problem 2 consistent? Explain? No. One example is that the heuristic cost for Greenville to Paris is 72, but the path cost to Commerce (15) plus the heuristics cost of Commerce to Paris (40) is only 65. There are many examples of inconsistency in the given graph. 3. Did the A* algorithm with close list find the optimal path in the previous problem? Is it guaranteed to find the optimal solution? Explain why or why not and how you would fix any problems you detected. 4. The A* algorithm will happen to find the optimal path in this case. However, it is not guaranteed to find the optimal solution since the heuristic is neither Csci 538, Midterm 3 Fall 2007 Name: ___Solutions__________ SID: ______________________ admissible nor consistent. In order to guarantee optimality, both conditions of admissibility and consistency must be met by the heuristics function. Environment Properties (12 points) A robot soccer player has to be able to track a soccer ball, keep track of other players (both opponents and teammates), perform actions such as kicking the ball towards the goal, passing the ball to teammates, track its own location on the field, move to locations on the playing field, etc. For the general problem described above, where we want to field a team of robot soccer players to play a team of real live humans at a game of soccer, determine the properties of the task environment. Choose the property you think the environment has, and give a sentence of explanation. Some of the environment properties below can be argued either way, so your explanation of how the robot players are engaging with the environment will determine if your choice is correct. Some of the environment properties can be argued either way depending on your formulation of the agent or assumptions about the task. The most commonly assumed environmental properties for this problem as stated might be: Fully Observable vs. Partially Observable: Both limitations of the agents sensors, as well as the apparent impossibility of observing the other agent's intentions and goals, would be strong indicators that the problem as stated will only be partially observable. Deterministic vs. Stochastic: Without an assumption of perfect information about initial conditions, even a simple prediction of, for example, the velocity, trajectory and position of the soccer ball for more than a few seconds into the future will become impossible. Therefore an assumption of randomness in the evolution of the physical state of the environment would probably be necessary. Episodic vs. Sequential: Though it might be possible to divide the agents experience into episodes, given real-humans and a need to act in continuous real-time, the environment is most usefully viewed as sequential. Static vs. Dynamic: It is useful to assume that there will be time pressures in this environment. If the agent stands still, the rest of the agents as well as the ball will continue to evolve and move. Discrete vs. Continuous: Similar to an argument of a dynamic environment, with real human opponents it will be difficult to discretize the time dimension of this problem, thus a real, continuous time formulation seems natural. Single Agent vs. Multi Agent: 5. Treating the other players, both your teammates as well as your opponents, as autonomous agents is the simplest formulation of this environment/problem.Search Problem Formulation (10 points) The general case of the robot soccer player, described in problem 4 would not easily be formulated as a standard search problem. Explain why not: Standard search problems require static states with discrete steps between successor states. Some properties such as multiple-agents and stochasticity can be handled by extending standard search formulations (using min-max and ? respectively for example to allow a form of search). However the dynamic and especially fundamentally continuous nature of designing an agent to act in the real-world tend to rule out simple search formulations. Csci 538, Midterm 4 Fall 2007 Name: ___Solutions__________ SID: ______________________ You have to color a planar map using only four colors, in such a way that no two adjacent regions have the same color. Formulate this problem by describing the state space, giving the initial state, goal test, successor function and cost function. Choose a formulation that is precise enough to be implemented. State Space = ri (the color of region i, where i ranges from 1 to the number of regions, and the domain of r is the four colors to be used, for example red, green, blue and yellow). Initial State = {} (the empty, initially start with no regions colored) Goal Test = All ri assigned a color, no adjacent regions assigned the same color (if ri adjacent to rj: ri != rj) Successor Function = For all unassigned variables of the initial state, create four new successor states where we assign the unassigned variable one of the 4 color values and add it to the end of the original state. Cost Function = Use a constant step cost function of 1 for each variable assignment. Path cost is not relevant to this problem as all solutions appear at the same level of the search tree where all variables have been assigned. Say what search technique would be most appropriate for this problem, and why. 6. I had originally intended you to formulate this problem as a standard search problem. Obviously this problem is best formulated as a constraint satisfaction problem for reasons we have discussed. The path to the solution is irrelevant in this case, we only care about finding a correct coloring assignment for the map. If there are N regions in the map, all solutions will occur when all N variables have been assigned, which in this case will happen at level N of the tree. Without the simplifying heuristics of a CSP formulation (only assign one variable at a time, prune inconsistent assignment subtrees as soon as they are detected) in general solving a 4-coloring problem using a standard search will be impractical for N above 10 or so. However, if forced to solve this problem using a standard search, you definitely do not want to do breadth first search (since all solutions occur at the same depth N of the search tree). Iterative Deepening search is also not useful, since we know the depth to solution will be N (and there are no infinite paths in this problem). Therefore the one and only standard search is a straight-forward Depth First search.Constraint Satisfaction Problem (15 points) You are trying to schedule observations on the space telescope. We have m scientists who have each submitted a list of n telescope observations they would like to make. An observation is specified by a target, a telescope instrument, and a time slot. Each scientist is working on a different project so the targets in each scientist’s observations are different from those of other scientists. There are k total time slots, and the telescope has three instruments, but all must be aimed at the same target at the same time. The greedy scientists cannot all be satisfied, so we will try to find a schedule that satisfies the following constraints: C1. Exactly two observations from each scientist’s list will be made (the choice of the two will be part of the solution). C2. At most one observation per instrument per time slot is scheduled. C3. The observations scheduled for a single time slot must have the same target. Note that for some set of requested observations, there may not be any consistent schedule, but that’s fine. Consider the following two formulations of the problem. Csci 538, Midterm 5 Fall 2007 Name: ___Solutions__________ SID: ______________________ A. The variables are the 3k instrument/time slots. B. The variables are the m scientists. For each formulation, specify 1. The value domain for the variables. 2. The size of the domain for the variables (in terms of k, m, and n). 3. Which of the constraints are necessarily satisfied because of the formulation. 4. Whether the constraints can be specified as binary constraints in this formulation. If they can, explain how. If not, provide a counterexample. Formulation A: The variables are the 3k instrument/time slots. 1. Domain: for each instrument/time slot, the set of observations requesting that instrument and time slot and the value “empty” 2. Size of domain: at most m*n+1 per variable 3. Satisfied constraints: C2, since each variable (instrument/time) gets at most one value, an observation. 4. Binary constraints?: C1 is not a binary constraint in this formulation. It requires checking all the variable assignments at once to make sure that exactly two observations from each scientist’s list are made. C3 is a binary constraint in this formulation. Place a constraint between the 3 variables with the same time slot and require that the targets of the assigned observation be equal if they are both non-empty. Formulation B: The variables are the m scientists. 1. Domain: for each scientist, the set of all pairs of observations that scientist requested. n n2 2. Size of domain: 2 , approximately 2 . 3. Satisfied constraints: C1, since we will guarantee that exactly two of the scientist’s observations are scheduled. 4. Binary constraints?: C2 is a binary constraint in this formulation. Place a constraint between every pair of variables and require that the instrument/time slot requests don’t conflict. C3 is a binary constraint in this formulation. Place a constraint between every pair of variables and require that the targets for observations with the same time slot don’t conflict. Problem 6 Work Area 7. Game Search (10 points) Consider the game tree shown below. Assume the top node is a max node. The labels on the arcs are the moves. The numbers in the bottom layer are the values of the different outcomes of the game to the max player. - Max 7 - - Min 1 7 0 Csci 538, Midterm 6 Fall 2007 1 - 5 - Max 0 1 7 Name: ___Solutions__________ SID: ______________________ 1. What is the value of the game to the max player? -7 2. What first move should the max player make? R 3. Assuming the max player makes that move, what is the best next move for the min player, assuming that this is the entire game tree? R 8. Alpha-Beta Pruning (10 points) In the following game tree, are there any alpha-beta cutoffs? Max Min -2 3 1 1 -5 -3 5 1 1. Consider the nodes from left to right, which nodes are cutoﬀ ? Circle the nodes that are not examined and label them with L. (The M5 and R1 nodes of right subtree) 2. Consider the nodes from right to left, which nodes are cutoﬀ ? Circle the nodes that are not examined and label them with R. (The L1 node of middle subtree) Csci 538, Midterm 7 Fall 2007

DOCUMENT INFO

Shared By:

Categories:

Tags:

Stats:

views: | 18 |

posted: | 12/9/2011 |

language: | English |

pages: | 7 |

OTHER DOCS BY q39rEts9

How are you planning on using Docstoc?
BUSINESS
PERSONAL

By registering with docstoc.com you agree to our
privacy policy and
terms of service, and to receive content and offer notifications.

Docstoc is the premier online destination to start and grow small businesses. It hosts the best quality and widest selection of professional documents (over 20 million) and resources including expert videos, articles and productivity tools to make every small business better.

Search or Browse for any specific document or resource you need for your business. Or explore our curated resources for Starting a Business, Growing a Business or for Professional Development.

Feel free to Contact Us with any questions you might have.