Problem solving by search II - cw.fel.cvut.cz€¦ · Problem solving by search II Tom a s Svoboda...
Transcript of Problem solving by search II - cw.fel.cvut.cz€¦ · Problem solving by search II Tom a s Svoboda...
![Page 1: Problem solving by search II - cw.fel.cvut.cz€¦ · Problem solving by search II Tom a s Svoboda Vision for Robots and Autonomous Systems,Center for Machine Perception Department](https://reader033.fdocuments.in/reader033/viewer/2022060311/5f0ad59b7e708231d42d91cc/html5/thumbnails/1.jpg)
Problem solving by search II
Tomas Svoboda
Vision for Robots and Autonomous Systems, Center for Machine PerceptionDepartment of Cybernetics
Faculty of Electrical Engineering, Czech Technical University in Prague
June 18, 2019
1 / 27
![Page 2: Problem solving by search II - cw.fel.cvut.cz€¦ · Problem solving by search II Tom a s Svoboda Vision for Robots and Autonomous Systems,Center for Machine Perception Department](https://reader033.fdocuments.in/reader033/viewer/2022060311/5f0ad59b7e708231d42d91cc/html5/thumbnails/2.jpg)
Outline
I Graph search
I Heuristics (how to search faster)
I Greedy
I A∗. A-star search.
2 / 27
![Page 3: Problem solving by search II - cw.fel.cvut.cz€¦ · Problem solving by search II Tom a s Svoboda Vision for Robots and Autonomous Systems,Center for Machine Perception Department](https://reader033.fdocuments.in/reader033/viewer/2022060311/5f0ad59b7e708231d42d91cc/html5/thumbnails/3.jpg)
Recap: Search
3 / 27
![Page 4: Problem solving by search II - cw.fel.cvut.cz€¦ · Problem solving by search II Tom a s Svoboda Vision for Robots and Autonomous Systems,Center for Machine Perception Department](https://reader033.fdocuments.in/reader033/viewer/2022060311/5f0ad59b7e708231d42d91cc/html5/thumbnails/4.jpg)
A tree search recap
function tree search(problem) return a solution or failureinitialize the frontier the initial state of the problemloop
if the frontier is empty then return failureelse choose a node from frontier and remove from frontierend ifif the node contains a goal state then return the solutionend ifExpand the node and add the resulting nodes to frontier
end loopend function
4 / 27
![Page 5: Problem solving by search II - cw.fel.cvut.cz€¦ · Problem solving by search II Tom a s Svoboda Vision for Robots and Autonomous Systems,Center for Machine Perception Department](https://reader033.fdocuments.in/reader033/viewer/2022060311/5f0ad59b7e708231d42d91cc/html5/thumbnails/5.jpg)
A tree search recap
function tree search(problem) return a solution or failureinitialize the frontier the initial state of the problemloop
if the frontier is empty then return failureelse choose a node from frontier and remove from frontierend ifif the node contains a goal state then return the solutionend ifExpand the node and add the resulting nodes to frontier
end loopend function
4 / 27
![Page 6: Problem solving by search II - cw.fel.cvut.cz€¦ · Problem solving by search II Tom a s Svoboda Vision for Robots and Autonomous Systems,Center for Machine Perception Department](https://reader033.fdocuments.in/reader033/viewer/2022060311/5f0ad59b7e708231d42d91cc/html5/thumbnails/6.jpg)
A tree search recap
function tree search(problem) return a solution or failureinitialize the frontier the initial state of the problemloop
if the frontier is empty then return failureelse choose a node from frontier and remove from frontierend ifif the node contains a goal state then return the solutionend ifExpand the node and add the resulting nodes to frontier
end loopend function
4 / 27
![Page 7: Problem solving by search II - cw.fel.cvut.cz€¦ · Problem solving by search II Tom a s Svoboda Vision for Robots and Autonomous Systems,Center for Machine Perception Department](https://reader033.fdocuments.in/reader033/viewer/2022060311/5f0ad59b7e708231d42d91cc/html5/thumbnails/7.jpg)
A tree search recap
function tree search(problem) return a solution or failureinitialize the frontier the initial state of the problemloop
if the frontier is empty then return failureelse choose a node from frontier and remove from frontierend ifif the node contains a goal state then return the solutionend ifExpand the node and add the resulting nodes to frontier
end loopend function
4 / 27
![Page 8: Problem solving by search II - cw.fel.cvut.cz€¦ · Problem solving by search II Tom a s Svoboda Vision for Robots and Autonomous Systems,Center for Machine Perception Department](https://reader033.fdocuments.in/reader033/viewer/2022060311/5f0ad59b7e708231d42d91cc/html5/thumbnails/8.jpg)
A tree search recap
function tree search(problem) return a solution or failureinitialize the frontier the initial state of the problemloop
if the frontier is empty then return failureelse choose a node from frontier and remove from frontierend ifif the node contains a goal state then return the solutionend ifExpand the node and add the resulting nodes to frontier
end loopend function
4 / 27
![Page 9: Problem solving by search II - cw.fel.cvut.cz€¦ · Problem solving by search II Tom a s Svoboda Vision for Robots and Autonomous Systems,Center for Machine Perception Department](https://reader033.fdocuments.in/reader033/viewer/2022060311/5f0ad59b7e708231d42d91cc/html5/thumbnails/9.jpg)
A tree search recap
function tree search(problem) return a solution or failureinitialize the frontier the initial state of the problemloop
if the frontier is empty then return failureelse choose a node from frontier and remove from frontierend ifif the node contains a goal state then return the solutionend ifExpand the node and add the resulting nodes to frontier
end loopend function
4 / 27
![Page 10: Problem solving by search II - cw.fel.cvut.cz€¦ · Problem solving by search II Tom a s Svoboda Vision for Robots and Autonomous Systems,Center for Machine Perception Department](https://reader033.fdocuments.in/reader033/viewer/2022060311/5f0ad59b7e708231d42d91cc/html5/thumbnails/10.jpg)
A tree search recap
function tree search(problem) return a solution or failureinitialize the frontier the initial state of the problemloop
if the frontier is empty then return failureelse choose a node from frontier and remove from frontierend ifif the node contains a goal state then return the solutionend ifExpand the node and add the resulting nodes to frontier
end loopend function
4 / 27
![Page 11: Problem solving by search II - cw.fel.cvut.cz€¦ · Problem solving by search II Tom a s Svoboda Vision for Robots and Autonomous Systems,Center for Machine Perception Department](https://reader033.fdocuments.in/reader033/viewer/2022060311/5f0ad59b7e708231d42d91cc/html5/thumbnails/11.jpg)
A Maze, what could possibly go wrong?
0
0
1
1
2
2
3
3
4
4
0 0
1 1
2 2
3 3
4 4
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
5 / 27
Analyze the demo run. What happened? Why did it take that long?
![Page 12: Problem solving by search II - cw.fel.cvut.cz€¦ · Problem solving by search II Tom a s Svoboda Vision for Robots and Autonomous Systems,Center for Machine Perception Department](https://reader033.fdocuments.in/reader033/viewer/2022060311/5f0ad59b7e708231d42d91cc/html5/thumbnails/12.jpg)
Tree search the maze
function tree search(env) return asolution or failure
initialize the frontierwhile frontier do
node = frontier.pop()if goal in node then
breakend ifnodes = env.expand(node.state)Add nodes to frontier
end whileend function
0
0
1
1
2
2
3
3
4
4
0 0
1 1
2 2
3 3
4 4
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
6 / 27
Make a frontier and expand columns on a paper and follow the algo-
rigthm by putting and removing (scratching out) nodes from the list.
![Page 13: Problem solving by search II - cw.fel.cvut.cz€¦ · Problem solving by search II Tom a s Svoboda Vision for Robots and Autonomous Systems,Center for Machine Perception Department](https://reader033.fdocuments.in/reader033/viewer/2022060311/5f0ad59b7e708231d42d91cc/html5/thumbnails/13.jpg)
A graph searchfunction graph search(env) return a solution or failure
init frontier by the start stateinitialize the explored set to be emptywhile frontier do
node = frontier.pop()if goal in node then breakend ifnodes = env.expand(node.state)add node to exploredfor all nodes do
if node not in explored (or in frontier) thenadd nodes to frontier
end ifend for
end whileend function
Do not forget: node is not the same as state!7 / 27
Think about what is node and what state. What is main difference? Howare they connected? Where do they appear? What is node/state in themaze problem?
The main idea: Do not expand a state twice.
![Page 14: Problem solving by search II - cw.fel.cvut.cz€¦ · Problem solving by search II Tom a s Svoboda Vision for Robots and Autonomous Systems,Center for Machine Perception Department](https://reader033.fdocuments.in/reader033/viewer/2022060311/5f0ad59b7e708231d42d91cc/html5/thumbnails/14.jpg)
A graph searchfunction graph search(env) return a solution or failure
init frontier by the start stateinitialize the explored set to be emptywhile frontier do
node = frontier.pop()if goal in node then breakend ifnodes = env.expand(node.state)add node to exploredfor all nodes do
if node not in explored (or in frontier) thenadd nodes to frontier
end ifend for
end whileend function
Do not forget: node is not the same as state!7 / 27
Think about what is node and what state. What is main difference? Howare they connected? Where do they appear? What is node/state in themaze problem?
The main idea: Do not expand a state twice.
![Page 15: Problem solving by search II - cw.fel.cvut.cz€¦ · Problem solving by search II Tom a s Svoboda Vision for Robots and Autonomous Systems,Center for Machine Perception Department](https://reader033.fdocuments.in/reader033/viewer/2022060311/5f0ad59b7e708231d42d91cc/html5/thumbnails/15.jpg)
A graph searchfunction graph search(env) return a solution or failure
init frontier by the start stateinitialize the explored set to be emptywhile frontier do
node = frontier.pop()if goal in node then breakend ifnodes = env.expand(node.state)add node to exploredfor all nodes do
if node not in explored (or in frontier) thenadd nodes to frontier
end ifend for
end whileend function
Do not forget: node is not the same as state!7 / 27
Think about what is node and what state. What is main difference? Howare they connected? Where do they appear? What is node/state in themaze problem?
The main idea: Do not expand a state twice.
![Page 16: Problem solving by search II - cw.fel.cvut.cz€¦ · Problem solving by search II Tom a s Svoboda Vision for Robots and Autonomous Systems,Center for Machine Perception Department](https://reader033.fdocuments.in/reader033/viewer/2022060311/5f0ad59b7e708231d42d91cc/html5/thumbnails/16.jpg)
A graph searchfunction graph search(env) return a solution or failure
init frontier by the start stateinitialize the explored set to be emptywhile frontier do
node = frontier.pop()if goal in node then breakend ifnodes = env.expand(node.state)add node to exploredfor all nodes do
if node not in explored (or in frontier) thenadd nodes to frontier
end ifend for
end whileend function
Do not forget: node is not the same as state!7 / 27
Think about what is node and what state. What is main difference? Howare they connected? Where do they appear? What is node/state in themaze problem?
The main idea: Do not expand a state twice.
![Page 17: Problem solving by search II - cw.fel.cvut.cz€¦ · Problem solving by search II Tom a s Svoboda Vision for Robots and Autonomous Systems,Center for Machine Perception Department](https://reader033.fdocuments.in/reader033/viewer/2022060311/5f0ad59b7e708231d42d91cc/html5/thumbnails/17.jpg)
A graph searchfunction graph search(env) return a solution or failure
init frontier by the start stateinitialize the explored set to be emptywhile frontier do
node = frontier.pop()if goal in node then breakend ifnodes = env.expand(node.state)add node to exploredfor all nodes do
if node not in explored (or in frontier) thenadd nodes to frontier
end ifend for
end whileend function
Do not forget: node is not the same as state!7 / 27
Think about what is node and what state. What is main difference? Howare they connected? Where do they appear? What is node/state in themaze problem?
The main idea: Do not expand a state twice.
![Page 18: Problem solving by search II - cw.fel.cvut.cz€¦ · Problem solving by search II Tom a s Svoboda Vision for Robots and Autonomous Systems,Center for Machine Perception Department](https://reader033.fdocuments.in/reader033/viewer/2022060311/5f0ad59b7e708231d42d91cc/html5/thumbnails/18.jpg)
A graph searchfunction graph search(env) return a solution or failure
init frontier by the start stateinitialize the explored set to be emptywhile frontier do
node = frontier.pop()if goal in node then breakend ifnodes = env.expand(node.state)add node to exploredfor all nodes do
if node not in explored (or in frontier) thenadd nodes to frontier
end ifend for
end whileend function
Do not forget: node is not the same as state!7 / 27
Think about what is node and what state. What is main difference? Howare they connected? Where do they appear? What is node/state in themaze problem?
The main idea: Do not expand a state twice.
![Page 19: Problem solving by search II - cw.fel.cvut.cz€¦ · Problem solving by search II Tom a s Svoboda Vision for Robots and Autonomous Systems,Center for Machine Perception Department](https://reader033.fdocuments.in/reader033/viewer/2022060311/5f0ad59b7e708231d42d91cc/html5/thumbnails/19.jpg)
The BFS graph search
function BFS graph search(env) return a solution or failurenode ← env.observe()frontier ← FIFOqueue(node)explored ← set()while frontier not empty do
node ← frontier.pop()explored.add(node.state) . adding state not node!child nodes ← env.expand(node.state)for all child nodes do
if child node.state not in explored or in frontier thenif child node contains Goal then return child nodeend iffronter.insert(child node)
end ifend for
end whileend function
8 / 27
Why adding/checking state and note node in expanded data structure?
Can I do the simple presence check for all kind of graph search algorithms?
![Page 20: Problem solving by search II - cw.fel.cvut.cz€¦ · Problem solving by search II Tom a s Svoboda Vision for Robots and Autonomous Systems,Center for Machine Perception Department](https://reader033.fdocuments.in/reader033/viewer/2022060311/5f0ad59b7e708231d42d91cc/html5/thumbnails/20.jpg)
The BFS graph search
function BFS graph search(env) return a solution or failurenode ← env.observe()frontier ← FIFOqueue(node)explored ← set()while frontier not empty do
node ← frontier.pop()explored.add(node.state) . adding state not node!child nodes ← env.expand(node.state)for all child nodes do
if child node.state not in explored or in frontier thenif child node contains Goal then return child nodeend iffronter.insert(child node)
end ifend for
end whileend function
8 / 27
Why adding/checking state and note node in expanded data structure?
Can I do the simple presence check for all kind of graph search algorithms?
![Page 21: Problem solving by search II - cw.fel.cvut.cz€¦ · Problem solving by search II Tom a s Svoboda Vision for Robots and Autonomous Systems,Center for Machine Perception Department](https://reader033.fdocuments.in/reader033/viewer/2022060311/5f0ad59b7e708231d42d91cc/html5/thumbnails/21.jpg)
The BFS graph search
function BFS graph search(env) return a solution or failurenode ← env.observe()frontier ← FIFOqueue(node)explored ← set()while frontier not empty do
node ← frontier.pop()explored.add(node.state) . adding state not node!child nodes ← env.expand(node.state)for all child nodes do
if child node.state not in explored or in frontier thenif child node contains Goal then return child nodeend iffronter.insert(child node)
end ifend for
end whileend function
8 / 27
Why adding/checking state and note node in expanded data structure?
Can I do the simple presence check for all kind of graph search algorithms?
![Page 22: Problem solving by search II - cw.fel.cvut.cz€¦ · Problem solving by search II Tom a s Svoboda Vision for Robots and Autonomous Systems,Center for Machine Perception Department](https://reader033.fdocuments.in/reader033/viewer/2022060311/5f0ad59b7e708231d42d91cc/html5/thumbnails/22.jpg)
The BFS graph search
function BFS graph search(env) return a solution or failurenode ← env.observe()frontier ← FIFOqueue(node)explored ← set()while frontier not empty do
node ← frontier.pop()explored.add(node.state) . adding state not node!child nodes ← env.expand(node.state)for all child nodes do
if child node.state not in explored or in frontier thenif child node contains Goal then return child nodeend iffronter.insert(child node)
end ifend for
end whileend function
8 / 27
Why adding/checking state and note node in expanded data structure?
Can I do the simple presence check for all kind of graph search algorithms?
![Page 23: Problem solving by search II - cw.fel.cvut.cz€¦ · Problem solving by search II Tom a s Svoboda Vision for Robots and Autonomous Systems,Center for Machine Perception Department](https://reader033.fdocuments.in/reader033/viewer/2022060311/5f0ad59b7e708231d42d91cc/html5/thumbnails/23.jpg)
The BFS graph search
function BFS graph search(env) return a solution or failurenode ← env.observe()frontier ← FIFOqueue(node)explored ← set()while frontier not empty do
node ← frontier.pop()explored.add(node.state) . adding state not node!child nodes ← env.expand(node.state)for all child nodes do
if child node.state not in explored or in frontier thenif child node contains Goal then return child nodeend iffronter.insert(child node)
end ifend for
end whileend function
8 / 27
Why adding/checking state and note node in expanded data structure?
Can I do the simple presence check for all kind of graph search algorithms?
![Page 24: Problem solving by search II - cw.fel.cvut.cz€¦ · Problem solving by search II Tom a s Svoboda Vision for Robots and Autonomous Systems,Center for Machine Perception Department](https://reader033.fdocuments.in/reader033/viewer/2022060311/5f0ad59b7e708231d42d91cc/html5/thumbnails/24.jpg)
The BFS graph search
function BFS graph search(env) return a solution or failurenode ← env.observe()frontier ← FIFOqueue(node)explored ← set()while frontier not empty do
node ← frontier.pop()explored.add(node.state) . adding state not node!child nodes ← env.expand(node.state)for all child nodes do
if child node.state not in explored or in frontier thenif child node contains Goal then return child nodeend iffronter.insert(child node)
end ifend for
end whileend function
8 / 27
Why adding/checking state and note node in expanded data structure?
Can I do the simple presence check for all kind of graph search algorithms?
![Page 25: Problem solving by search II - cw.fel.cvut.cz€¦ · Problem solving by search II Tom a s Svoboda Vision for Robots and Autonomous Systems,Center for Machine Perception Department](https://reader033.fdocuments.in/reader033/viewer/2022060311/5f0ad59b7e708231d42d91cc/html5/thumbnails/25.jpg)
The BFS graph search
function BFS graph search(env) return a solution or failurenode ← env.observe()frontier ← FIFOqueue(node)explored ← set()while frontier not empty do
node ← frontier.pop()explored.add(node.state) . adding state not node!child nodes ← env.expand(node.state)for all child nodes do
if child node.state not in explored or in frontier thenif child node contains Goal then return child nodeend iffronter.insert(child node)
end ifend for
end whileend function
8 / 27
Why adding/checking state and note node in expanded data structure?
Can I do the simple presence check for all kind of graph search algorithms?
![Page 26: Problem solving by search II - cw.fel.cvut.cz€¦ · Problem solving by search II Tom a s Svoboda Vision for Robots and Autonomous Systems,Center for Machine Perception Department](https://reader033.fdocuments.in/reader033/viewer/2022060311/5f0ad59b7e708231d42d91cc/html5/thumbnails/26.jpg)
What about actual costs graph search?
a
S
b
c
d
e
f
G
1
3
1.2
1
2
1
0.5
11.2
0.5
1
1
1
1.5S,0
a,1
b,2
e,3 f,4
e,2.5
f,3
c,1.2
f,2.4
G,2.9
d,2.2
G,3.2
b,1.7
e,2.7 f,3.7
d,3
9 / 27
When following the algorithm (animation) use the paper list of frontier
and expanded
![Page 27: Problem solving by search II - cw.fel.cvut.cz€¦ · Problem solving by search II Tom a s Svoboda Vision for Robots and Autonomous Systems,Center for Machine Perception Department](https://reader033.fdocuments.in/reader033/viewer/2022060311/5f0ad59b7e708231d42d91cc/html5/thumbnails/27.jpg)
What about actual costs graph search?
a
S
b
c
d
e
f
G
1
3
1.2
1
2
1
0.5
11.2
0.5
1
1
1
1.5S,0
a,1
b,2
e,3 f,4
e,2.5
f,3
c,1.2
f,2.4
G,2.9
d,2.2
G,3.2
b,1.7
e,2.7 f,3.7
d,3
9 / 27
When following the algorithm (animation) use the paper list of frontier
and expanded
![Page 28: Problem solving by search II - cw.fel.cvut.cz€¦ · Problem solving by search II Tom a s Svoboda Vision for Robots and Autonomous Systems,Center for Machine Perception Department](https://reader033.fdocuments.in/reader033/viewer/2022060311/5f0ad59b7e708231d42d91cc/html5/thumbnails/28.jpg)
What about actual costs graph search?
a
S
b
c
d
e
f
G
1
3
1.2
1
2
1
0.5
11.2
0.5
1
1
1
1.5S,0
a,1
b,2
e,3 f,4
e,2.5
f,3
c,1.2
f,2.4
G,2.9
d,2.2
G,3.2
b,1.7
e,2.7 f,3.7
d,3
9 / 27
When following the algorithm (animation) use the paper list of frontier
and expanded
![Page 29: Problem solving by search II - cw.fel.cvut.cz€¦ · Problem solving by search II Tom a s Svoboda Vision for Robots and Autonomous Systems,Center for Machine Perception Department](https://reader033.fdocuments.in/reader033/viewer/2022060311/5f0ad59b7e708231d42d91cc/html5/thumbnails/29.jpg)
What about actual costs graph search?
a
S
b
c
d
e
f
G
1
3
1.2
1
2
1
0.5
11.2
0.5
1
1
1
1.5S,0
a,1
b,2
e,3 f,4
e,2.5
f,3
c,1.2
f,2.4
G,2.9
d,2.2
G,3.2
b,1.7
e,2.7 f,3.7
d,3
9 / 27
When following the algorithm (animation) use the paper list of frontier
and expanded
![Page 30: Problem solving by search II - cw.fel.cvut.cz€¦ · Problem solving by search II Tom a s Svoboda Vision for Robots and Autonomous Systems,Center for Machine Perception Department](https://reader033.fdocuments.in/reader033/viewer/2022060311/5f0ad59b7e708231d42d91cc/html5/thumbnails/30.jpg)
What about actual costs graph search?
a
S
b
c
d
e
f
G
1
3
1.2
1
2
1
0.5
11.2
0.5
1
1
1
1.5S,0
a,1
b,2
e,3 f,4
e,2.5
f,3
c,1.2
f,2.4
G,2.9
d,2.2
G,3.2
b,1.7
e,2.7 f,3.7
d,3
9 / 27
When following the algorithm (animation) use the paper list of frontier
and expanded
![Page 31: Problem solving by search II - cw.fel.cvut.cz€¦ · Problem solving by search II Tom a s Svoboda Vision for Robots and Autonomous Systems,Center for Machine Perception Department](https://reader033.fdocuments.in/reader033/viewer/2022060311/5f0ad59b7e708231d42d91cc/html5/thumbnails/31.jpg)
What about actual costs graph search?
a
S
b
c
d
e
f
G
1
3
1.2
1
2
1
0.5
11.2
0.5
1
1
1
1.5S,0
a,1
b,2
e,3 f,4
e,2.5
f,3
c,1.2
f,2.4
G,2.9
d,2.2
G,3.2
b,1.7
e,2.7 f,3.7
d,3
9 / 27
When following the algorithm (animation) use the paper list of frontier
and expanded
![Page 32: Problem solving by search II - cw.fel.cvut.cz€¦ · Problem solving by search II Tom a s Svoboda Vision for Robots and Autonomous Systems,Center for Machine Perception Department](https://reader033.fdocuments.in/reader033/viewer/2022060311/5f0ad59b7e708231d42d91cc/html5/thumbnails/32.jpg)
What about actual costs graph search?
a
S
b
c
d
e
f
G
1
3
1.2
1
2
1
0.5
11.2
0.5
1
1
1
1.5S,0
a,1
b,2
e,3 f,4
e,2.5
f,3
c,1.2
f,2.4
G,2.9
d,2.2
G,3.2
b,1.7
e,2.7 f,3.7
d,3
9 / 27
When following the algorithm (animation) use the paper list of frontier
and expanded
![Page 33: Problem solving by search II - cw.fel.cvut.cz€¦ · Problem solving by search II Tom a s Svoboda Vision for Robots and Autonomous Systems,Center for Machine Perception Department](https://reader033.fdocuments.in/reader033/viewer/2022060311/5f0ad59b7e708231d42d91cc/html5/thumbnails/33.jpg)
What about actual costs graph search?
a
S
b
c
d
e
f
G
1
3
1.2
1
2
1
0.5
11.2
0.5
1
1
1
1.5S,0
a,1
b,2
e,3 f,4
e,2.5
f,3
c,1.2
f,2.4
G,2.9
d,2.2
G,3.2
b,1.7
e,2.7 f,3.7
d,3
9 / 27
When following the algorithm (animation) use the paper list of frontier
and expanded
![Page 34: Problem solving by search II - cw.fel.cvut.cz€¦ · Problem solving by search II Tom a s Svoboda Vision for Robots and Autonomous Systems,Center for Machine Perception Department](https://reader033.fdocuments.in/reader033/viewer/2022060311/5f0ad59b7e708231d42d91cc/html5/thumbnails/34.jpg)
What about actual costs graph search?
a
S
b
c
d
e
f
G
1
3
1.2
1
2
1
0.5
11.2
0.5
1
1
1
1.5S,0
a,1
b,2
e,3 f,4
e,2.5
f,3
c,1.2
f,2.4
G,2.9
d,2.2
G,3.2
b,1.7
e,2.7 f,3.7
d,3
9 / 27
When following the algorithm (animation) use the paper list of frontier
and expanded
![Page 35: Problem solving by search II - cw.fel.cvut.cz€¦ · Problem solving by search II Tom a s Svoboda Vision for Robots and Autonomous Systems,Center for Machine Perception Department](https://reader033.fdocuments.in/reader033/viewer/2022060311/5f0ad59b7e708231d42d91cc/html5/thumbnails/35.jpg)
What about actual costs graph search?
a
S
b
c
d
e
f
G
1
3
1.2
1
2
1
0.5
11.2
0.5
1
1
1
1.5S,0
a,1
b,2
e,3 f,4
e,2.5
f,3
c,1.2
f,2.4
G,2.9
d,2.2
G,3.2
b,1.7
e,2.7 f,3.7
d,3
9 / 27
When following the algorithm (animation) use the paper list of frontier
and expanded
![Page 36: Problem solving by search II - cw.fel.cvut.cz€¦ · Problem solving by search II Tom a s Svoboda Vision for Robots and Autonomous Systems,Center for Machine Perception Department](https://reader033.fdocuments.in/reader033/viewer/2022060311/5f0ad59b7e708231d42d91cc/html5/thumbnails/36.jpg)
What about actual costs graph search?
a
S
b
c
d
e
f
G
1
3
1.2
1
2
1
0.5
11.2
0.5
1
1
1
1.5S,0
a,1
b,2
e,3 f,4
e,2.5
f,3
c,1.2
f,2.4
G,2.9
d,2.2
G,3.2
b,1.7
e,2.7 f,3.7
d,3
9 / 27
When following the algorithm (animation) use the paper list of frontier
and expanded
![Page 37: Problem solving by search II - cw.fel.cvut.cz€¦ · Problem solving by search II Tom a s Svoboda Vision for Robots and Autonomous Systems,Center for Machine Perception Department](https://reader033.fdocuments.in/reader033/viewer/2022060311/5f0ad59b7e708231d42d91cc/html5/thumbnails/37.jpg)
What about actual costs graph search?
a
S
b
c
d
e
f
G
1
3
1.2
1
2
1
0.5
11.2
0.5
1
1
1
1.5S,0
a,1
b,2
e,3 f,4
e,2.5
f,3
c,1.2
f,2.4
G,2.9
d,2.2
G,3.2
b,1.7
e,2.7 f,3.7
d,3
9 / 27
When following the algorithm (animation) use the paper list of frontier
and expanded
![Page 38: Problem solving by search II - cw.fel.cvut.cz€¦ · Problem solving by search II Tom a s Svoboda Vision for Robots and Autonomous Systems,Center for Machine Perception Department](https://reader033.fdocuments.in/reader033/viewer/2022060311/5f0ad59b7e708231d42d91cc/html5/thumbnails/38.jpg)
The UCS graph searchfunction UCS graph search(env) return a solution or failure
node ← env.observe()frontier ← priority queue(node) . path cost for orderingexplored ← set()while frontier not empty do
node ← frontier.pop()if node contains Goal then return node . check here!end ifexplored.add(node.state)child nodes ← env.expand(node.state)for all child nodes do
if child node.state not in explored or in frontier thenfronter.insert(child node)
else if child node.state in frontier with higher cost thenreplace that with the child node
end ifend for
end whileend function
10 / 27
Does the algorithm always find the best (cheapest) path? Are there any
requirements for the path optimality function?
![Page 39: Problem solving by search II - cw.fel.cvut.cz€¦ · Problem solving by search II Tom a s Svoboda Vision for Robots and Autonomous Systems,Center for Machine Perception Department](https://reader033.fdocuments.in/reader033/viewer/2022060311/5f0ad59b7e708231d42d91cc/html5/thumbnails/39.jpg)
The UCS graph searchfunction UCS graph search(env) return a solution or failure
node ← env.observe()frontier ← priority queue(node) . path cost for orderingexplored ← set()while frontier not empty do
node ← frontier.pop()if node contains Goal then return node . check here!end ifexplored.add(node.state)child nodes ← env.expand(node.state)for all child nodes do
if child node.state not in explored or in frontier thenfronter.insert(child node)
else if child node.state in frontier with higher cost thenreplace that with the child node
end ifend for
end whileend function
10 / 27
Does the algorithm always find the best (cheapest) path? Are there any
requirements for the path optimality function?
![Page 40: Problem solving by search II - cw.fel.cvut.cz€¦ · Problem solving by search II Tom a s Svoboda Vision for Robots and Autonomous Systems,Center for Machine Perception Department](https://reader033.fdocuments.in/reader033/viewer/2022060311/5f0ad59b7e708231d42d91cc/html5/thumbnails/40.jpg)
The UCS graph searchfunction UCS graph search(env) return a solution or failure
node ← env.observe()frontier ← priority queue(node) . path cost for orderingexplored ← set()while frontier not empty do
node ← frontier.pop()if node contains Goal then return node . check here!end ifexplored.add(node.state)child nodes ← env.expand(node.state)for all child nodes do
if child node.state not in explored or in frontier thenfronter.insert(child node)
else if child node.state in frontier with higher cost thenreplace that with the child node
end ifend for
end whileend function
10 / 27
Does the algorithm always find the best (cheapest) path? Are there any
requirements for the path optimality function?
![Page 41: Problem solving by search II - cw.fel.cvut.cz€¦ · Problem solving by search II Tom a s Svoboda Vision for Robots and Autonomous Systems,Center for Machine Perception Department](https://reader033.fdocuments.in/reader033/viewer/2022060311/5f0ad59b7e708231d42d91cc/html5/thumbnails/41.jpg)
The UCS graph searchfunction UCS graph search(env) return a solution or failure
node ← env.observe()frontier ← priority queue(node) . path cost for orderingexplored ← set()while frontier not empty do
node ← frontier.pop()if node contains Goal then return node . check here!end ifexplored.add(node.state)child nodes ← env.expand(node.state)for all child nodes do
if child node.state not in explored or in frontier thenfronter.insert(child node)
else if child node.state in frontier with higher cost thenreplace that with the child node
end ifend for
end whileend function
10 / 27
Does the algorithm always find the best (cheapest) path? Are there any
requirements for the path optimality function?
![Page 42: Problem solving by search II - cw.fel.cvut.cz€¦ · Problem solving by search II Tom a s Svoboda Vision for Robots and Autonomous Systems,Center for Machine Perception Department](https://reader033.fdocuments.in/reader033/viewer/2022060311/5f0ad59b7e708231d42d91cc/html5/thumbnails/42.jpg)
The UCS graph searchfunction UCS graph search(env) return a solution or failure
node ← env.observe()frontier ← priority queue(node) . path cost for orderingexplored ← set()while frontier not empty do
node ← frontier.pop()if node contains Goal then return node . check here!end ifexplored.add(node.state)child nodes ← env.expand(node.state)for all child nodes do
if child node.state not in explored or in frontier thenfronter.insert(child node)
else if child node.state in frontier with higher cost thenreplace that with the child node
end ifend for
end whileend function
10 / 27
Does the algorithm always find the best (cheapest) path? Are there any
requirements for the path optimality function?
![Page 43: Problem solving by search II - cw.fel.cvut.cz€¦ · Problem solving by search II Tom a s Svoboda Vision for Robots and Autonomous Systems,Center for Machine Perception Department](https://reader033.fdocuments.in/reader033/viewer/2022060311/5f0ad59b7e708231d42d91cc/html5/thumbnails/43.jpg)
The UCS graph searchfunction UCS graph search(env) return a solution or failure
node ← env.observe()frontier ← priority queue(node) . path cost for orderingexplored ← set()while frontier not empty do
node ← frontier.pop()if node contains Goal then return node . check here!end ifexplored.add(node.state)child nodes ← env.expand(node.state)for all child nodes do
if child node.state not in explored or in frontier thenfronter.insert(child node)
else if child node.state in frontier with higher cost thenreplace that with the child node
end ifend for
end whileend function
10 / 27
Does the algorithm always find the best (cheapest) path? Are there any
requirements for the path optimality function?
![Page 44: Problem solving by search II - cw.fel.cvut.cz€¦ · Problem solving by search II Tom a s Svoboda Vision for Robots and Autonomous Systems,Center for Machine Perception Department](https://reader033.fdocuments.in/reader033/viewer/2022060311/5f0ad59b7e708231d42d91cc/html5/thumbnails/44.jpg)
The UCS graph searchfunction UCS graph search(env) return a solution or failure
node ← env.observe()frontier ← priority queue(node) . path cost for orderingexplored ← set()while frontier not empty do
node ← frontier.pop()if node contains Goal then return node . check here!end ifexplored.add(node.state)child nodes ← env.expand(node.state)for all child nodes do
if child node.state not in explored or in frontier thenfronter.insert(child node)
else if child node.state in frontier with higher cost thenreplace that with the child node
end ifend for
end whileend function
10 / 27
Does the algorithm always find the best (cheapest) path? Are there any
requirements for the path optimality function?
![Page 45: Problem solving by search II - cw.fel.cvut.cz€¦ · Problem solving by search II Tom a s Svoboda Vision for Robots and Autonomous Systems,Center for Machine Perception Department](https://reader033.fdocuments.in/reader033/viewer/2022060311/5f0ad59b7e708231d42d91cc/html5/thumbnails/45.jpg)
The UCS graph searchfunction UCS graph search(env) return a solution or failure
node ← env.observe()frontier ← priority queue(node) . path cost for orderingexplored ← set()while frontier not empty do
node ← frontier.pop()if node contains Goal then return node . check here!end ifexplored.add(node.state)child nodes ← env.expand(node.state)for all child nodes do
if child node.state not in explored or in frontier thenfronter.insert(child node)
else if child node.state in frontier with higher cost thenreplace that with the child node
end ifend for
end whileend function
10 / 27
Does the algorithm always find the best (cheapest) path? Are there any
requirements for the path optimality function?
![Page 46: Problem solving by search II - cw.fel.cvut.cz€¦ · Problem solving by search II Tom a s Svoboda Vision for Robots and Autonomous Systems,Center for Machine Perception Department](https://reader033.fdocuments.in/reader033/viewer/2022060311/5f0ad59b7e708231d42d91cc/html5/thumbnails/46.jpg)
Few examples of search strategies so far0
0
1
1
2
2
3
3
4
4
5
5
6
6
7
7
8
8
9
9
10
10
0 0
1 1
2 2
3 3
4 4
5 5
6 6
7 7
8 8
9 9
10 10
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
Run the demos.11 / 27
![Page 47: Problem solving by search II - cw.fel.cvut.cz€¦ · Problem solving by search II Tom a s Svoboda Vision for Robots and Autonomous Systems,Center for Machine Perception Department](https://reader033.fdocuments.in/reader033/viewer/2022060311/5f0ad59b7e708231d42d91cc/html5/thumbnails/47.jpg)
What is wrong with UCS and other strategies?0
0
1
1
2
2
3
3
4
4
5
5
6
6
7
7
8
8
9
9
10
10
0 0
1 1
2 2
3 3
4 4
5 5
6 6
7 7
8 8
9 9
10 10
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
Run the demo.12 / 27
![Page 48: Problem solving by search II - cw.fel.cvut.cz€¦ · Problem solving by search II Tom a s Svoboda Vision for Robots and Autonomous Systems,Center for Machine Perception Department](https://reader033.fdocuments.in/reader033/viewer/2022060311/5f0ad59b7e708231d42d91cc/html5/thumbnails/48.jpg)
Node selection, take argmin f (n)
I DFS: f (n) = −n.depthI BFS: f (n) = n.depth
I UCS: f (n) = n.path cost
The good: frontier as a priority queue The bad: All the f (n) correspond tothe cost from n to the start - only backward cost.
13 / 27
![Page 49: Problem solving by search II - cw.fel.cvut.cz€¦ · Problem solving by search II Tom a s Svoboda Vision for Robots and Autonomous Systems,Center for Machine Perception Department](https://reader033.fdocuments.in/reader033/viewer/2022060311/5f0ad59b7e708231d42d91cc/html5/thumbnails/49.jpg)
Node selection, take argmin f (n)
I DFS: f (n) = −n.depthI BFS: f (n) = n.depth
I UCS: f (n) = n.path cost
The good: frontier as a priority queue The bad: All the f (n) correspond tothe cost from n to the start - only backward cost.
13 / 27
![Page 50: Problem solving by search II - cw.fel.cvut.cz€¦ · Problem solving by search II Tom a s Svoboda Vision for Robots and Autonomous Systems,Center for Machine Perception Department](https://reader033.fdocuments.in/reader033/viewer/2022060311/5f0ad59b7e708231d42d91cc/html5/thumbnails/50.jpg)
Node selection, take argmin f (n)
I DFS: f (n) = −n.depthI BFS: f (n) = n.depth
I UCS: f (n) = n.path cost
The good: frontier as a priority queue The bad: All the f (n) correspond tothe cost from n to the start - only backward cost.
13 / 27
![Page 51: Problem solving by search II - cw.fel.cvut.cz€¦ · Problem solving by search II Tom a s Svoboda Vision for Robots and Autonomous Systems,Center for Machine Perception Department](https://reader033.fdocuments.in/reader033/viewer/2022060311/5f0ad59b7e708231d42d91cc/html5/thumbnails/51.jpg)
Heuristics
I A function that estimates how close a state to the goal.
I Designed for a particular problem.
I Examples:
I We will use h(n) - heuristic value of node n
14 / 27
![Page 52: Problem solving by search II - cw.fel.cvut.cz€¦ · Problem solving by search II Tom a s Svoboda Vision for Robots and Autonomous Systems,Center for Machine Perception Department](https://reader033.fdocuments.in/reader033/viewer/2022060311/5f0ad59b7e708231d42d91cc/html5/thumbnails/52.jpg)
Example of heuristics
Giurgiu
UrziceniHirsova
Eforie
Neamt
Oradea
Zerind
Arad
Timisoara
Lugoj
Mehadia
DobretaCraiova
Sibiu Fagaras
Pitesti
Vaslui
Iasi
Rimnicu Vilcea
Bucharest
71
75
118
111
70
75
120
151
140
99
80
97
101
211
138
146 85
90
98
142
92
87
86
Urziceni
NeamtOradea
Zerind
Timisoara
Mehadia
Sibiu
PitestiRimnicu Vilcea
Vaslui
Bucharest
GiurgiuHirsova
Eforie
Arad
Lugoj
DrobetaCraiova
Fagaras
Iasi
0
160
242
161
77
151
366
244
226
176
241
253
329
80
199
380
234
374
100
193
15 / 27
![Page 53: Problem solving by search II - cw.fel.cvut.cz€¦ · Problem solving by search II Tom a s Svoboda Vision for Robots and Autonomous Systems,Center for Machine Perception Department](https://reader033.fdocuments.in/reader033/viewer/2022060311/5f0ad59b7e708231d42d91cc/html5/thumbnails/53.jpg)
Greedy, take the node argmin h(n)Greedy Strategy
11
Combining#UCS#and#Greedy#
! UniformKcost#orders#by#path#cost,#or#backward-cost--g(n)#! Greedy#orders#by#goal#proximity,#or#forward-cost--h(n)-
! A*#Search#orders#by#the#sum:#f(n)#=#g(n)#+#h(n)-
S a d
b
G h=5
h=6
h=2
1
8
1 1
2
h=6 h=0 c
h=7
3
e h=1 1
Example:#Teg#Grenager#
S
a
b
c
e d
d G
G
g = 0 h=6
g = 1 h=5
g = 2 h=6
g = 3 h=7
g = 4 h=2
g = 6 h=0
g = 9 h=1
g = 10 h=2
g = 12 h=0
1
What is wrong (and nice) with the Greedy?
1Graph example: Ted Grenager16 / 27
![Page 54: Problem solving by search II - cw.fel.cvut.cz€¦ · Problem solving by search II Tom a s Svoboda Vision for Robots and Autonomous Systems,Center for Machine Perception Department](https://reader033.fdocuments.in/reader033/viewer/2022060311/5f0ad59b7e708231d42d91cc/html5/thumbnails/54.jpg)
Greedy, take the node argmin h(n)Greedy Strategy
11
Combining#UCS#and#Greedy#
! UniformKcost#orders#by#path#cost,#or#backward-cost--g(n)#! Greedy#orders#by#goal#proximity,#or#forward-cost--h(n)-
! A*#Search#orders#by#the#sum:#f(n)#=#g(n)#+#h(n)-
S a d
b
G h=5
h=6
h=2
1
8
1 1
2
h=6 h=0 c
h=7
3
e h=1 1
Example:#Teg#Grenager#
S
a
b
c
e d
d G
G
g = 0 h=6
g = 1 h=5
g = 2 h=6
g = 3 h=7
g = 4 h=2
g = 6 h=0
g = 9 h=1
g = 10 h=2
g = 12 h=0
1
What is wrong (and nice) with the Greedy?
1Graph example: Ted Grenager16 / 27
![Page 55: Problem solving by search II - cw.fel.cvut.cz€¦ · Problem solving by search II Tom a s Svoboda Vision for Robots and Autonomous Systems,Center for Machine Perception Department](https://reader033.fdocuments.in/reader033/viewer/2022060311/5f0ad59b7e708231d42d91cc/html5/thumbnails/55.jpg)
A∗ combines UCS and GreedyGreedy Strategy
11
Combining#UCS#and#Greedy#
! UniformKcost#orders#by#path#cost,#or#backward-cost--g(n)#! Greedy#orders#by#goal#proximity,#or#forward-cost--h(n)-
! A*#Search#orders#by#the#sum:#f(n)#=#g(n)#+#h(n)-
S a d
b
G h=5
h=6
h=2
1
8
1 1
2
h=6 h=0 c
h=7
3
e h=1 1
Example:#Teg#Grenager#
S
a
b
c
e d
d G
G
g = 0 h=6
g = 1 h=5
g = 2 h=6
g = 3 h=7
g = 4 h=2
g = 6 h=0
g = 9 h=1
g = 10 h=2
g = 12 h=0
UCS orders by backward (path) cost g(n)Greedy uses heuristics (goal proximity) h(n)
A∗ orders nodes by: f (n) = g(n) + h(n)
17 / 27
![Page 56: Problem solving by search II - cw.fel.cvut.cz€¦ · Problem solving by search II Tom a s Svoboda Vision for Robots and Autonomous Systems,Center for Machine Perception Department](https://reader033.fdocuments.in/reader033/viewer/2022060311/5f0ad59b7e708231d42d91cc/html5/thumbnails/56.jpg)
A∗ combines UCS and GreedyGreedy Strategy
11
Combining#UCS#and#Greedy#
! UniformKcost#orders#by#path#cost,#or#backward-cost--g(n)#! Greedy#orders#by#goal#proximity,#or#forward-cost--h(n)-
! A*#Search#orders#by#the#sum:#f(n)#=#g(n)#+#h(n)-
S a d
b
G h=5
h=6
h=2
1
8
1 1
2
h=6 h=0 c
h=7
3
e h=1 1
Example:#Teg#Grenager#
S
a
b
c
e d
d G
G
g = 0 h=6
g = 1 h=5
g = 2 h=6
g = 3 h=7
g = 4 h=2
g = 6 h=0
g = 9 h=1
g = 10 h=2
g = 12 h=0
UCS orders by backward (path) cost g(n)Greedy uses heuristics (goal proximity) h(n)
A∗ orders nodes by: f (n) = g(n) + h(n)
17 / 27
![Page 57: Problem solving by search II - cw.fel.cvut.cz€¦ · Problem solving by search II Tom a s Svoboda Vision for Robots and Autonomous Systems,Center for Machine Perception Department](https://reader033.fdocuments.in/reader033/viewer/2022060311/5f0ad59b7e708231d42d91cc/html5/thumbnails/57.jpg)
When to stop A∗
When#should#A*#terminate?#
! Should#we#stop#when#we#enqueue#a#goal?#
! No:#only#stop#when#we#dequeue#a#goal#
S
B
A
G
2
3
2
2 h = 1
h = 2
h = 0 h = 3
2
2Graph example: Dan Klein and Pieter Abbeel18 / 27
![Page 58: Problem solving by search II - cw.fel.cvut.cz€¦ · Problem solving by search II Tom a s Svoboda Vision for Robots and Autonomous Systems,Center for Machine Perception Department](https://reader033.fdocuments.in/reader033/viewer/2022060311/5f0ad59b7e708231d42d91cc/html5/thumbnails/58.jpg)
Is A∗ optimal? Is#A*#Op)mal?#
! What#went#wrong?#! Actual#bad#goal#cost#<#es)mated#good#goal#cost#! We#need#es)mates#to#be#less#than#actual#costs!#
A
G S
1 3 h = 6
h = 0
5
h = 7
3
What is the problem?
3Graph example: Dan Klein and Pieter Abbeel19 / 27
![Page 59: Problem solving by search II - cw.fel.cvut.cz€¦ · Problem solving by search II Tom a s Svoboda Vision for Robots and Autonomous Systems,Center for Machine Perception Department](https://reader033.fdocuments.in/reader033/viewer/2022060311/5f0ad59b7e708231d42d91cc/html5/thumbnails/59.jpg)
Is A∗ optimal? Is#A*#Op)mal?#
! What#went#wrong?#! Actual#bad#goal#cost#<#es)mated#good#goal#cost#! We#need#es)mates#to#be#less#than#actual#costs!#
A
G S
1 3 h = 6
h = 0
5
h = 7
3
What is the problem?
3Graph example: Dan Klein and Pieter Abbeel19 / 27
![Page 60: Problem solving by search II - cw.fel.cvut.cz€¦ · Problem solving by search II Tom a s Svoboda Vision for Robots and Autonomous Systems,Center for Machine Perception Department](https://reader033.fdocuments.in/reader033/viewer/2022060311/5f0ad59b7e708231d42d91cc/html5/thumbnails/60.jpg)
Admissible heuristics
A heuristic function h is admissible if:
0 ≤ h(n) ≤ h∗(n)
where h∗(n) is the true cost of going from n to the nearest goal.
20 / 27
![Page 61: Problem solving by search II - cw.fel.cvut.cz€¦ · Problem solving by search II Tom a s Svoboda Vision for Robots and Autonomous Systems,Center for Machine Perception Department](https://reader033.fdocuments.in/reader033/viewer/2022060311/5f0ad59b7e708231d42d91cc/html5/thumbnails/61.jpg)
Optimality of A∗ tree search
21 / 27
![Page 62: Problem solving by search II - cw.fel.cvut.cz€¦ · Problem solving by search II Tom a s Svoboda Vision for Robots and Autonomous Systems,Center for Machine Perception Department](https://reader033.fdocuments.in/reader033/viewer/2022060311/5f0ad59b7e708231d42d91cc/html5/thumbnails/62.jpg)
Properties - does heuristic matter?0
0
1
1
2
2
3
3
4
4
5
5
6
6
7
7
8
8
9
9
10
10
11
11
12
12
13
13
14
14
15
15
16
16
17
17
18
18
19
19
20
20
21
21
22
22
23
23
24
24
25
25
26
26
27
27
28
28
29
29
30
30
31
31
32
32
33
33
34
34
35
35
36
36
37
37
38
38
39
39
40
40
41
41
42
42
43
43
44
44
45
45
46
46
47
47
48
48
49
49
50
50
51
51
52
52
53
53
54
54
55
55
56
56
57
57
58
58
59
59
60
60
61
61
62
62
63
63
64
64
65
65
66
66
67
67
68
68
69
69
70
70
71
71
72
72
73
73
74
74
75
75
76
76
77
77
78
78
79
79
80
80
81
81
82
82
83
83
84
84
85
85
86
86
87
87
88
88
89
89
90
90
91
91
92
92
93
93
94
94
95
95
96
96
97
97
98
98
99
99
100
100
0 0
1 1
2 2
3 3
4 4
5 5
6 6
7 7
8 8
9 9
10 10
11 11
12 12
13 13
14 14
15 15
16 16
17 17
18 18
19 19
20 20
21 21
22 22
23 23
24 24
25 25
26 26
27 27
28 28
29 29
30 30
31 31
32 32
33 33
34 34
35 35
36 36
37 37
38 38
39 39
40 40
41 41
42 42
43 43
44 44
45 45
46 46
47 47
48 48
49 49
50 50
51 51
52 52
53 53
54 54
55 55
56 56
57 57
58 58
59 59
60 60
61 61
62 62
63 63
64 64
65 65
66 66
67 67
68 68
69 69
70 70
71 71
72 72
73 73
74 74
75 75
76 76
77 77
78 78
79 79
80 80
81 81
82 82
83 83
84 84
85 85
86 86
87 87
88 88
89 89
90 90
91 91
92 92
93 93
94 94
95 95
96 96
97 97
98 98
99 99
100 100
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
22 / 27
![Page 63: Problem solving by search II - cw.fel.cvut.cz€¦ · Problem solving by search II Tom a s Svoboda Vision for Robots and Autonomous Systems,Center for Machine Perception Department](https://reader033.fdocuments.in/reader033/viewer/2022060311/5f0ad59b7e708231d42d91cc/html5/thumbnails/63.jpg)
A* graph search
function graph search(env)frontier.insert(startnode)explored = set()while frontier do
node = frontier.pop()if goal in node then breakend ifnodes = env.expand(node.state)explored.add(node)for all nodes do
if node not in explored thenfrontier.insert(node)
end ifend for
end whileend function
A*#Graph#Search#Gone#Wrong?#
S
A
B
C
G
1
1
1
2 3
h=2
h=1
h=4 h=1
h=0
S (0+2)
A (1+4) B (1+1)
C (2+1)
G (5+0)
C (3+1)
G (6+0)
State#space#graph# Search#tree#
Graph example: Dan Klein and Pieter Abbeel
What went wrong?
23 / 27
![Page 64: Problem solving by search II - cw.fel.cvut.cz€¦ · Problem solving by search II Tom a s Svoboda Vision for Robots and Autonomous Systems,Center for Machine Perception Department](https://reader033.fdocuments.in/reader033/viewer/2022060311/5f0ad59b7e708231d42d91cc/html5/thumbnails/64.jpg)
A* graph search
function graph search(env)frontier.insert(startnode)explored = set()while frontier do
node = frontier.pop()if goal in node then breakend ifnodes = env.expand(node.state)explored.add(node)for all nodes do
if node not in explored thenfrontier.insert(node)
end ifend for
end whileend function
A*#Graph#Search#Gone#Wrong?#
S
A
B
C
G
1
1
1
2 3
h=2
h=1
h=4 h=1
h=0
S (0+2)
A (1+4) B (1+1)
C (2+1)
G (5+0)
C (3+1)
G (6+0)
State#space#graph# Search#tree#
Graph example: Dan Klein and Pieter Abbeel
What went wrong?
23 / 27
![Page 65: Problem solving by search II - cw.fel.cvut.cz€¦ · Problem solving by search II Tom a s Svoboda Vision for Robots and Autonomous Systems,Center for Machine Perception Department](https://reader033.fdocuments.in/reader033/viewer/2022060311/5f0ad59b7e708231d42d91cc/html5/thumbnails/65.jpg)
Consistent heuristicsA*#Graph#Search#Gone#Wrong?#
S
A
B
C
G
1
1
1
2 3
h=2
h=1
h=4 h=1
h=0
S (0+2)
A (1+4) B (1+1)
C (2+1)
G (5+0)
C (3+1)
G (6+0)
State#space#graph# Search#tree#
Admissible h:h(A) ≤ true cost A→ G
Consistent h:h(A)− h(C ) ≤ true cost A→ C
f along a path never decreases!
24 / 27
![Page 66: Problem solving by search II - cw.fel.cvut.cz€¦ · Problem solving by search II Tom a s Svoboda Vision for Robots and Autonomous Systems,Center for Machine Perception Department](https://reader033.fdocuments.in/reader033/viewer/2022060311/5f0ad59b7e708231d42d91cc/html5/thumbnails/66.jpg)
Consistent heuristicsA*#Graph#Search#Gone#Wrong?#
S
A
B
C
G
1
1
1
2 3
h=2
h=1
h=4 h=1
h=0
S (0+2)
A (1+4) B (1+1)
C (2+1)
G (5+0)
C (3+1)
G (6+0)
State#space#graph# Search#tree#
Admissible h:h(A) ≤ true cost A→ G
Consistent h:h(A)− h(C ) ≤ true cost A→ C
f along a path never decreases!
24 / 27
![Page 67: Problem solving by search II - cw.fel.cvut.cz€¦ · Problem solving by search II Tom a s Svoboda Vision for Robots and Autonomous Systems,Center for Machine Perception Department](https://reader033.fdocuments.in/reader033/viewer/2022060311/5f0ad59b7e708231d42d91cc/html5/thumbnails/67.jpg)
Consistent heuristicsA*#Graph#Search#Gone#Wrong?#
S
A
B
C
G
1
1
1
2 3
h=2
h=1
h=4 h=1
h=0
S (0+2)
A (1+4) B (1+1)
C (2+1)
G (5+0)
C (3+1)
G (6+0)
State#space#graph# Search#tree#
Admissible h:h(A) ≤ true cost A→ G
Consistent h:h(A)− h(C ) ≤ true cost A→ C
f along a path never decreases!
24 / 27
![Page 68: Problem solving by search II - cw.fel.cvut.cz€¦ · Problem solving by search II Tom a s Svoboda Vision for Robots and Autonomous Systems,Center for Machine Perception Department](https://reader033.fdocuments.in/reader033/viewer/2022060311/5f0ad59b7e708231d42d91cc/html5/thumbnails/68.jpg)
Consistent heuristicsA*#Graph#Search#Gone#Wrong?#
S
A
B
C
G
1
1
1
2 3
h=2
h=1
h=4 h=1
h=0
S (0+2)
A (1+4) B (1+1)
C (2+1)
G (5+0)
C (3+1)
G (6+0)
State#space#graph# Search#tree#
Admissible h:h(A) ≤ true cost A→ G
Consistent h:h(A)− h(C ) ≤ true cost A→ C
f along a path never decreases!
24 / 27
![Page 69: Problem solving by search II - cw.fel.cvut.cz€¦ · Problem solving by search II Tom a s Svoboda Vision for Robots and Autonomous Systems,Center for Machine Perception Department](https://reader033.fdocuments.in/reader033/viewer/2022060311/5f0ad59b7e708231d42d91cc/html5/thumbnails/69.jpg)
Optimality of A∗
I admissible h for tree search
I consistent h for graph search
I What about UCS?
I Are all consistent heuristics also admissible?h(A)− h(C ) ≤ cost(A→ C )
25 / 27
![Page 70: Problem solving by search II - cw.fel.cvut.cz€¦ · Problem solving by search II Tom a s Svoboda Vision for Robots and Autonomous Systems,Center for Machine Perception Department](https://reader033.fdocuments.in/reader033/viewer/2022060311/5f0ad59b7e708231d42d91cc/html5/thumbnails/70.jpg)
Optimality of A∗
I admissible h for tree search
I consistent h for graph search
I What about UCS?
I Are all consistent heuristics also admissible?h(A)− h(C ) ≤ cost(A→ C )
25 / 27
![Page 71: Problem solving by search II - cw.fel.cvut.cz€¦ · Problem solving by search II Tom a s Svoboda Vision for Robots and Autonomous Systems,Center for Machine Perception Department](https://reader033.fdocuments.in/reader033/viewer/2022060311/5f0ad59b7e708231d42d91cc/html5/thumbnails/71.jpg)
Optimality of A∗
I admissible h for tree search
I consistent h for graph search
I What about UCS?
I Are all consistent heuristics also admissible?h(A)− h(C ) ≤ cost(A→ C )
25 / 27
![Page 72: Problem solving by search II - cw.fel.cvut.cz€¦ · Problem solving by search II Tom a s Svoboda Vision for Robots and Autonomous Systems,Center for Machine Perception Department](https://reader033.fdocuments.in/reader033/viewer/2022060311/5f0ad59b7e708231d42d91cc/html5/thumbnails/72.jpg)
Optimality of A∗
I admissible h for tree search
I consistent h for graph search
I What about UCS?
I Are all consistent heuristics also admissible?h(A)− h(C ) ≤ cost(A→ C )
25 / 27
![Page 73: Problem solving by search II - cw.fel.cvut.cz€¦ · Problem solving by search II Tom a s Svoboda Vision for Robots and Autonomous Systems,Center for Machine Perception Department](https://reader033.fdocuments.in/reader033/viewer/2022060311/5f0ad59b7e708231d42d91cc/html5/thumbnails/73.jpg)
How to find a heuristics?
Image from: https://commons.wikimedia.org/wiki/File:15-puzzle-loyd.svg 26 / 27
![Page 74: Problem solving by search II - cw.fel.cvut.cz€¦ · Problem solving by search II Tom a s Svoboda Vision for Robots and Autonomous Systems,Center for Machine Perception Department](https://reader033.fdocuments.in/reader033/viewer/2022060311/5f0ad59b7e708231d42d91cc/html5/thumbnails/74.jpg)
Which heuristics is the best?
27 / 27