Docsity

Abstraction - Artificial Intelligence - Solved Quiz, Exercises of Artificial Intelligence

Toggle sidebar
bg1
CS-271, Intro to A.I., Winter Quarter, 2013 — Quiz # 1 — 20 minutes
1. NAME:
YOUR ID: ID TO RIGHT: ROW: NO. FROM RIGHT:
2. (30 pts total, 2 pts each) AGENT/SEARCH CONCEPTS. For each of the following terms on the left,
write in the letter corresponding to the best answer or the correct definition on the right. The first one is
done for you as an example.
A
Agent
A
Perceives environment by sensors, acts by actuators
K
Percept
B
All states reachable from the initial state by a sequence of actions
P
Performance Measure
C
Guaranteed to find a solution if one is accessible
L
Rational Agent
D
Process of removing detail from a representation
B
State Space
E
Maximum number of successors of any node
I
Search Node
F
Set of all leaf nodes available for expansion at any given time
N
Link between nodes
G
Estimates cost of cheapest path from current state to goal state
J
Path
H
Guaranteed to find lowest cost among all accessible solutions
D
Abstraction
I
Represents a state in the state space
H
Optimal Search
J
Sequence of states connected by a sequence of actions
C
Complete Search
K
Agent’s perceptual inputs at any given instant
M
Expand a state
L
Agent that acts to maximize its expected performance measure
F
Frontier
M
Apply each legal action to a state, generating a new set of states
O
Search Strategy
N
Represents an action in the state space
E
Branching Factor
O
How a search algorithm chooses which node to expand next
G
Heuristic Function
P
Evaluates any given sequence of environment states for utility
3. (5 pts total, -2 pts each wrong answer, but not negative) TASK ENVIRONMENT. A task
environment is a set of four things, with acronym PEAS. Fill in the blanks with the PEAS components.
Performance measure Environment Actuators Sensors
4. (15 pts total, -2 each wrong answer, but not negative) SEARCH PROPERTIES.
Fill in the values of the four evaluation criteria for each search strategy shown. Assume a tree search where
b is the finite branching factor; d is the depth to the shallowest goal node; m is the maximum depth of the
search tree; C* is the cost of the optimal solution; step costs are identical and equal to some positive ε; and
in Bidirectional search both directions use breadth-first search.
Note that these conditions satisfy all of the footnotes of Fig. 3.21 in your book.
Criterion
Complete?
Time complexity
Space complexity
Breadth-First
Yes
O(b^d)
O(b^d)
Uniform-Cost
Yes
O(b^(1+floor(C*/ε)))
O(b^(d+1)) also OK
O(b^(1+floor(C*/ε)))
O(b^(d+1)) also OK
Depth-First
No
O(b^m)
O(bm)
Iterative Deepening
Yes
O(b^d)
O(bd)
Bidirectional
(if applicable)
Yes
O(b^(d/2))
O(b^(d/2))
**** TURN PAGE OVER AND CONTINUE ON THE OTHER SIDE ****
See Section 2.3.1
See Figure 3.21
pf3

Partial preview of the text

Download Abstraction - Artificial Intelligence - Solved Quiz and more Exercises Artificial Intelligence in PDF only on Docsity!

CS-271, Intro to A.I., Winter Quarter, 2013 — Quiz # 1 — 20 minutes

1. NAME:

YOUR ID: ID TO RIGHT: ROW: NO. FROM RIGHT:

2. (30 pts total, 2 pts each) AGENT/SEARCH CONCEPTS. For each of the following terms on the left, write in the letter corresponding to the best answer or the correct definition on the right. The first one is done for you as an example.

A Agent A Perceives environment by sensors, acts by actuators K Percept B All states reachable from the initial state by a sequence of actions P Performance Measure C Guaranteed to find a solution if one is accessible L Rational Agent D Process of removing detail from a representation B State Space E Maximum number of successors of any node I Search Node F Set of all leaf nodes available for expansion at any given time N Link between nodes G Estimates cost of cheapest path from current state to goal state J Path H Guaranteed to find lowest cost among all accessible solutions D Abstraction I Represents a state in the state space H Optimal Search J Sequence of states connected by a sequence of actions C Complete Search K Agent’s perceptual inputs at any given instant M Expand a state L Agent that acts to maximize its expected performance measure F Frontier M Apply each legal action to a state, generating a new set of states O Search Strategy N Represents an action in the state space E Branching Factor O How a search algorithm chooses which node to expand next G Heuristic Function P Evaluates any given sequence of environment states for utility

3. (5 pts total, -2 pts each wrong answer, but not negative) TASK ENVIRONMENT. A task environment is a set of four things, with acronym PEAS. Fill in the blanks with the PEAS components.

Performance measure Environment Actuators Sensors

4. (15 pts total, -2 each wrong answer, but not negative) SEARCH PROPERTIES. Fill in the values of the four evaluation criteria for each search strategy shown. Assume a tree search where b is the finite branching factor; d is the depth to the shallowest goal node; m is the maximum depth of the search tree; C* is the cost of the optimal solution; step costs are identical and equal to some positive ε; and in Bidirectional search both directions use breadth-first search. Note that these conditions satisfy all of the footnotes of Fig. 3.21 in your book.

Criterion Complete? Time complexity Space complexity Optimal? Breadth-First Yes O(b^d) O(b^d) Yes

Uniform-Cost Yes O(b^(1+floor(C*/ε))) O(b^(d+1)) also OK

O(b^(1+floor(C*/ε))) O(b^(d+1)) also OK

Yes

Depth-First No O(b^m) O(bm) No

Iterative Deepening Yes O(b^d) O(bd) Yes

Bidirectional (if applicable)

Yes O(b^(d/2)) O(b^(d/2)) Yes

**** TURN PAGE OVER AND CONTINUE ON THE OTHER SIDE ****

See Section 2.3.

See Figure 3. 21

5. (50 pts total, 10 pts each) Execute Tree Search through this graph (i.e., do not remember visited nodes, so repeated nodes are possible). It is not a tree, but pretend that you don’t know that. Step costs are given next to each arc. Heuristic values are given next to each node (as h=x). The successors of each node are indicated by the arrows out of that node. Successors are returned in left-to-right order. (Note: C is a successor of itself). For each search strategy below, show the order in which nodes are expanded (i.e., to expand a node means that its children are generated), ending with the goal node that is found. Show the path from start to goal, or write “None”. The first one is done for you as an example.

5.a. DEPTH FIRST SEARCH.

Order of node expansion: S A D G

Path found: S A D G 5.b. (10 pts) UNIFORM COST SEARCH.

Order of node expansion: S C B A F C E D F C G

Path found: S A D G 5.c. (10 pts) GREEDY (BEST-FIRST) SEARCH.

Order of node expansion: S C C C C C C C C C C etc.

Path found: None 5.d. (10 pts) ITERATED DEEPENING SEARCH.

Order of node expansion: S S A B C S A D B E C F C S A D G

Path found: S A D G 5.e. (10 pts) A SEARCH.*

Order of node expansion: S C B A F C E G

Path found: S B E G 5.f. (10 pts, -3 for each wrong answer, but not negative) OPTIMALITY.

Did Uniform Cost Search find the optimal goal? Yes Why or why not? Step costs are ≥ ε > 0

Did A* Search find the optimal goal? No Why or why not? heuristic is not admissible (at D)

S

A (^) B

D E^ F

G1 G2 G

h=13 C

h=16 h=11 h=

h=

h=

h=

Question 5.f will be graded based on your answers to 5.b (for UCS) and 5.e (for A).*

OK to say “Heuristic overestimated” or “Heuristic is too high.

Wrong answers are counted by minimum edit distance using operators insert-char, delete-char, and change-char.