

















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
Madam Amrita Ahuja took this quiz in class of Artificial Intelligence at Central University of Jammu and Kashmir. This quiz involves: Tree, Search, Arc, Lengths, Sequence, Breadth, Progressive, Search, Graph, Simulate, State, Heuristics, Optimal
Typology: Exercises
1 / 25
This page cannot be seen from the preview
Don't miss anything!


















Consider the tree shown below. The numbers on the arcs are the arc lengths.
Assume that the nodes are expanded in alphabetical order when no other order is specified by the search, and that the goal is state G. No visited or expanded lists are used. What order would the states be expanded by each type of search? Stop when you expand G. Write only the sequence of states expanded by each search. Search Type List of states Breadth First A B C D E G
Depth First A B D F K L E C G
Progressive Deepening Search A A B C A B D E C G
Uniform Cost Search A B D E C F G
Consider the graph shown below where the numbers on the links are link costs and the numbers next to the states are heuristic estimates. Note that the arcs are undirected. Let A be the start state and G be the goal state.
Simulate A* search with a strict expanded list on this graph. At each step, show the path to the state of the node that’s being expanded, the length of that path, the total estimated cost of the path (actual + heuristic), and the current value of the expanded list (as a list of states). You are welcome to use scratch paper or the back of the exam pages to simulate the search. However, please transcribe (only) the information requested into the table given below. Path to State Expanded Length of Path Total Estimated Cost Expanded List A 0 5 (A) C-A 3 4 (C A) B-A 1 5 (B C A) H-C-A 5 6 (H B C A) G-H-C-A 6 6 (G H B C A)
A Mars rover has to leave the lander, collect rock samples from three places (in any order) and return to the lander. Assume that it has a navigation module that can take it directly from any place of interest to any other place of interest. So it has primitive actions go-to-lander, go-to-rock-1, go-to-rock-2, and go-to-rock-3. We know the time it takes to traverse between each pair of special locations. Our goal is to find a sequence of actions that will perform this task in the shortest amount of time.
Let’s look at the problem of scheduling programs on a set of computers as a constraint satisfaction problem. We have a set of programs (jobs) Ji to schedule on a set of computers (machines) Mj. Each job has a maximum running time Ri. We will assume that jobs (on any machines) can only be started at some pre-specified times Tk. Also, there’s a Tmax time by which all the jobs must be finished running; that is, start time + running time is less than or equal to max time. For now, we assume that any machine can execute any job. Let’s assume that we attack the problem by using the jobs as variables and using values that are each a pair (Mj , Tk ). Here is a simple example.
There is a unary constraint on legal values for a single variable: Tk + Ri ≤ Tmax. This is not a binary constraint on pairs of values. The binary constraint is the one that says that jobs on the same machines must not overlap in time. It can be expressed as:
Mj = Mn → Tk + Ri ≤ Tp ∨ Tp + Rm ≤ Tk
So, either the machines are different or the times don’t overlap.
Consider the game tree shown below. 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.
The nodes that are not examined are the left-most node labeled “2” and the node labeled “1.”
Consider the graph shown below. Note that the arcs are undirected. Let A be the start state and G be the goal state.
A
C
B
G
2 5
(^6 )
2
Simulate uniform cost search with a strict expanded list on this graph. At each step, show the state of the node that’s being expanded, the length of that path, and the current value of the expanded list (as a list of states).
State Expanded Length of Path Expanded List A 0 (A)
In the table below, indicate all the combinations that guarantee that A∗ will find an optimal path. Not all rows have to be filled. If multiple values works for any of Heuristic, History and Pathmax, independent of the other choices, you can write the multiple values in one row. So Heuristic History Pathmax A,B C D,E can be used to represent all of: A,C,D; A,C,E; B,C,D; and B,C,E.
Heuristic History Pathmax Admissible None, Non-Strict Use, Don’t Use
Consistent None, Non-Strict, Strict Use, Don’t Use
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.
1 3 2 -1 4 -2 1 -
L (^) R
L R L R
L R (^) L R L (^) R L^ R
Max
Max
Min
In the following game tree, are there any alpha-beta cutoffs?
8 2 6 8
Max
Min
Max
Let’s consider some combinations of CSP methods. For each of the combinations described below say very briefly whether:
In each case, circle Yes or No for each of Well-Defined? and Useful? and give a very brief explanation of your answers. Warning: Please pay careful attention to the definition of the methods being combined, we are refering to the original definition of the methods – in isola- tion. Almost any idea can be made to work with any other idea with sufficient creativity - but that’s not what we are looking for in this problem.
Problem 1 – Search (30 points)
Below is a graph to be searched (starting at S and ending at G). Link/edge costs are shown as well as heuristic estimates at the states. You may not need all the information for every search.
h= 5 S
1 3
h=2 B A
2 2 3 1
h=
h= 0 h=
Draw the complete search tree for this graph. Label each node in the tree with the cost of the path to that node and the heuristic cost at that node. When you need to refer to a node, use the name of the corresponding state and the length of the path to that node. (5 points)
C is path cost, h is heuristic S C=0, h=
C=3, h=2 A^ B C=1, h=
C=5, h= C G (^) C=5, h=0 C
C=6, h=3 (^) B A C=4, h=
C=2, h=
G (^) C=6, h=
S
For each of the searches below, just give a list of node names (state name, length of path) drawn from the tree above. Break ties using alphabetical order. (2 points each)
S0, A3, C5, G5 note that B6 is not expanded because B is on visited list (placed there when S0 was expanded).
S0 (h=5), A3(h=2), G5(h=0)
S0, B1, C2, A3, A4, C5, G5 note that nodes are ordered first by cost then alphabetically when tied for cost.
Is the heuristic in this example
All the h values are less than or equal to actual path cost to the goal and so the heuristic is admissible. The heuristic drops from 5 at S to 3 at B while the path cost between S and B is only 1, and so the heuristic is not consistent.
Problem 1: Search (25 points)
The numbers shown above are link lengths. Pay careful attention to the arrows; some are bi-directional (shown thick) while some are uni-directional.
to G). Each node shows both the total path cost to the node as well as the heuristic value for the corresponding state.
S^ C=0 h=
A C=2 h=3^ B C=3 h=2^ C C=4 h=
B C (^) C=3 h=3 G C=7 h=0 (^) D C=6 h=
C=4 h=
D (^) C=5 h=1 D C=8 h=1 (^) G C=7 h=
G (^) C=6 h=
For each of the searches below, write the sequence of nodes expanded by the search. Specify a node by writing the name of the state and the length of the path (C above), e.g. S0, B3, etc. Break ties using alphabetical order.
S0, A2, B4, C3, D5, G
S0, A2, B3, C4, G
S0, A2, B3, C3, D5, G
S0(+5), A2(+3), B3(+2), B4(+2), C3(+3), D5(+1), G6(+0)