search’ - northeastern university · 2 search as problem solving ! need to search a space of...
TRANSCRIPT
![Page 1: Search’ - Northeastern University · 2 Search as Problem Solving ! Need to search a space of possible solutions ! There are many sequences of actions, each with their own utility](https://reader036.vdocuments.mx/reader036/viewer/2022090606/605c2e5c04c077356a706495/html5/thumbnails/1.jpg)
ì Search Chapter 3 (acknowledgement goes to Gillian Smith(NEU) and Hwee Tou Ng’s for slides used in this lecture)
![Page 2: Search’ - Northeastern University · 2 Search as Problem Solving ! Need to search a space of possible solutions ! There are many sequences of actions, each with their own utility](https://reader036.vdocuments.mx/reader036/viewer/2022090606/605c2e5c04c077356a706495/html5/thumbnails/2.jpg)
2
Search as Problem Solving
ì Need to search a space of possible solutions
ì There are many sequences of actions, each with their own utility.
ì We want to find, or search for, the best one.
![Page 3: Search’ - Northeastern University · 2 Search as Problem Solving ! Need to search a space of possible solutions ! There are many sequences of actions, each with their own utility](https://reader036.vdocuments.mx/reader036/viewer/2022090606/605c2e5c04c077356a706495/html5/thumbnails/3.jpg)
Framework for Search Problems
ì Problem formula1on ì A set of discrete states (usually finite, usually huge) ì Start state ì Subset of states designated as goals (usually) ì A set of ac1ons the agent can perform
ì Objec1ve ì Find a sequence of operators that lead to the goal
state
![Page 4: Search’ - Northeastern University · 2 Search as Problem Solving ! Need to search a space of possible solutions ! There are many sequences of actions, each with their own utility](https://reader036.vdocuments.mx/reader036/viewer/2022090606/605c2e5c04c077356a706495/html5/thumbnails/4.jpg)
4
Example: Romania
ì On holiday in Romania; currently in Arad.
ì Flight leaves tomorrow from Bucharest
ì Formulate problem: ì Goal: at a city; e.g., at Bucharest ì states: at various cities ì actions: choose next city
![Page 5: Search’ - Northeastern University · 2 Search as Problem Solving ! Need to search a space of possible solutions ! There are many sequences of actions, each with their own utility](https://reader036.vdocuments.mx/reader036/viewer/2022090606/605c2e5c04c077356a706495/html5/thumbnails/5.jpg)
5
Example: Romania
![Page 6: Search’ - Northeastern University · 2 Search as Problem Solving ! Need to search a space of possible solutions ! There are many sequences of actions, each with their own utility](https://reader036.vdocuments.mx/reader036/viewer/2022090606/605c2e5c04c077356a706495/html5/thumbnails/6.jpg)
6
Problem Formulation
A problem is defined as follows:
initial state e.g., “at Arad”
actions set of possible actions in current state x.
transition model Result(x,a) = state that follows from applying action
a in state x. e.g., Result(X2 (Arad), A4 (Arad Zerind)) = X3 (Zerind)
goal test, e.g., x = “at Bucharest”
path cost (additive) ì e.g., sum of distances, number of actions executed, etc. ì c(x,a,y) is the step cost, assumed to be ≥ 0
A solution is a sequence of actions leading from the initial state to a goal state
![Page 7: Search’ - Northeastern University · 2 Search as Problem Solving ! Need to search a space of possible solutions ! There are many sequences of actions, each with their own utility](https://reader036.vdocuments.mx/reader036/viewer/2022090606/605c2e5c04c077356a706495/html5/thumbnails/7.jpg)
Search Algorithm
ì Start with a specific state
ì State space forms a tree structure ì Root = start state ì Each node represents a state ì Ac1ons are branches, children are all possible
next-‐states
ì Search involves expanding a fron%er of poten1al next states
![Page 8: Search’ - Northeastern University · 2 Search as Problem Solving ! Need to search a space of possible solutions ! There are many sequences of actions, each with their own utility](https://reader036.vdocuments.mx/reader036/viewer/2022090606/605c2e5c04c077356a706495/html5/thumbnails/8.jpg)
8
Tree search example
![Page 9: Search’ - Northeastern University · 2 Search as Problem Solving ! Need to search a space of possible solutions ! There are many sequences of actions, each with their own utility](https://reader036.vdocuments.mx/reader036/viewer/2022090606/605c2e5c04c077356a706495/html5/thumbnails/9.jpg)
9
Implementation: general tree search
fron%er
Fron%er)
(fron%er)
fron%er
Fron%er)
![Page 10: Search’ - Northeastern University · 2 Search as Problem Solving ! Need to search a space of possible solutions ! There are many sequences of actions, each with their own utility](https://reader036.vdocuments.mx/reader036/viewer/2022090606/605c2e5c04c077356a706495/html5/thumbnails/10.jpg)
Kinds of Search
ì Uninformed
ì Informed
ì Op1miza1on
ì Adversarial
![Page 11: Search’ - Northeastern University · 2 Search as Problem Solving ! Need to search a space of possible solutions ! There are many sequences of actions, each with their own utility](https://reader036.vdocuments.mx/reader036/viewer/2022090606/605c2e5c04c077356a706495/html5/thumbnails/11.jpg)
Uninformed Search Strategies
ì Breadth-‐First Search
ì Depth-‐First Search
ì Limited Depth Search
ì Itera1ve Deepening
![Page 12: Search’ - Northeastern University · 2 Search as Problem Solving ! Need to search a space of possible solutions ! There are many sequences of actions, each with their own utility](https://reader036.vdocuments.mx/reader036/viewer/2022090606/605c2e5c04c077356a706495/html5/thumbnails/12.jpg)
Breadth-‐First Search
ì Order of node expansion? ì Shallowest unexpanded node
A
B
D E
C
F G
Fron%er (FIFO Queue)
A
![Page 13: Search’ - Northeastern University · 2 Search as Problem Solving ! Need to search a space of possible solutions ! There are many sequences of actions, each with their own utility](https://reader036.vdocuments.mx/reader036/viewer/2022090606/605c2e5c04c077356a706495/html5/thumbnails/13.jpg)
Breadth-‐First Search
ì Order of node expansion? ì Shallowest unexpanded node
Fron%er (FIFO Queue)
B C
A
B
D E
C
F G
![Page 14: Search’ - Northeastern University · 2 Search as Problem Solving ! Need to search a space of possible solutions ! There are many sequences of actions, each with their own utility](https://reader036.vdocuments.mx/reader036/viewer/2022090606/605c2e5c04c077356a706495/html5/thumbnails/14.jpg)
Breadth-‐First Search ì Order of node expansion?
ì Shallowest unexpanded node Fron%er (FIFO Queue)
C D E
A
B
D E
C
F G
![Page 15: Search’ - Northeastern University · 2 Search as Problem Solving ! Need to search a space of possible solutions ! There are many sequences of actions, each with their own utility](https://reader036.vdocuments.mx/reader036/viewer/2022090606/605c2e5c04c077356a706495/html5/thumbnails/15.jpg)
Breadth-‐First Search ì Order of node expansion?
ì Shallowest unexpanded node Fron%er (FIFO Queue)
D E F G
A
B
D E
C
F G
![Page 16: Search’ - Northeastern University · 2 Search as Problem Solving ! Need to search a space of possible solutions ! There are many sequences of actions, each with their own utility](https://reader036.vdocuments.mx/reader036/viewer/2022090606/605c2e5c04c077356a706495/html5/thumbnails/16.jpg)
16
Example BFS
![Page 17: Search’ - Northeastern University · 2 Search as Problem Solving ! Need to search a space of possible solutions ! There are many sequences of actions, each with their own utility](https://reader036.vdocuments.mx/reader036/viewer/2022090606/605c2e5c04c077356a706495/html5/thumbnails/17.jpg)
Evaluating a Search Strategy ì Search strategy is defined by picking the order of node
expansion
ì Evalua1on criteria ì Completeness ì Time complexity ì Space Complexity ì Op1mality
ì Time and space complexity measured in ì b – maximum branching factor for the search tree ì d – depth of least-‐cost solu1on ì m – maximum depth of the state space
![Page 18: Search’ - Northeastern University · 2 Search as Problem Solving ! Need to search a space of possible solutions ! There are many sequences of actions, each with their own utility](https://reader036.vdocuments.mx/reader036/viewer/2022090606/605c2e5c04c077356a706495/html5/thumbnails/18.jpg)
Breadth-‐First Search
ì Complete? ì Yes! As long as b is finite
ì Op1mal? ì Yes
ì Time cost? ì O(bd)
ì Space cost? ì O(bd)
![Page 19: Search’ - Northeastern University · 2 Search as Problem Solving ! Need to search a space of possible solutions ! There are many sequences of actions, each with their own utility](https://reader036.vdocuments.mx/reader036/viewer/2022090606/605c2e5c04c077356a706495/html5/thumbnails/19.jpg)
Breadth-‐First Search
ì Complete? ì Yes! As long as b is finite
ì Op1mal? ì Yes! Assuming?
ì Time cost? ì O(bd)
ì Space cost? ì O(bd)
Suppose b=10, a node uses 1000 bytes, 1m nodes/sec can be generated Depth 10: ~3 hours, ~10 terabytes Depth 12: ~13 days, ~1 petabyte Depth 14: ~3.5 years, ~99 petabytes
![Page 20: Search’ - Northeastern University · 2 Search as Problem Solving ! Need to search a space of possible solutions ! There are many sequences of actions, each with their own utility](https://reader036.vdocuments.mx/reader036/viewer/2022090606/605c2e5c04c077356a706495/html5/thumbnails/20.jpg)
Depth-‐First Search
ì Order of node expansion? ì Deepest unexpanded node
A
B
D E
C
F G
Fron%er (LIFO Queue)
A
![Page 21: Search’ - Northeastern University · 2 Search as Problem Solving ! Need to search a space of possible solutions ! There are many sequences of actions, each with their own utility](https://reader036.vdocuments.mx/reader036/viewer/2022090606/605c2e5c04c077356a706495/html5/thumbnails/21.jpg)
Depth-‐First Search
A
B
D E
C
F G
Fron%er (LIFO Queue)
C B
![Page 22: Search’ - Northeastern University · 2 Search as Problem Solving ! Need to search a space of possible solutions ! There are many sequences of actions, each with their own utility](https://reader036.vdocuments.mx/reader036/viewer/2022090606/605c2e5c04c077356a706495/html5/thumbnails/22.jpg)
Depth-‐First Search
A
B
D E
C
F G
Fron%er (LIFO Queue)
C E D
![Page 23: Search’ - Northeastern University · 2 Search as Problem Solving ! Need to search a space of possible solutions ! There are many sequences of actions, each with their own utility](https://reader036.vdocuments.mx/reader036/viewer/2022090606/605c2e5c04c077356a706495/html5/thumbnails/23.jpg)
Depth-‐First Search
A
B
D E
C
F G
Fron%er (LIFO Queue)
C E
![Page 24: Search’ - Northeastern University · 2 Search as Problem Solving ! Need to search a space of possible solutions ! There are many sequences of actions, each with their own utility](https://reader036.vdocuments.mx/reader036/viewer/2022090606/605c2e5c04c077356a706495/html5/thumbnails/24.jpg)
Depth-‐First Search
A
B
E
C
F G
Fron%er (LIFO Queue)
C
![Page 25: Search’ - Northeastern University · 2 Search as Problem Solving ! Need to search a space of possible solutions ! There are many sequences of actions, each with their own utility](https://reader036.vdocuments.mx/reader036/viewer/2022090606/605c2e5c04c077356a706495/html5/thumbnails/25.jpg)
Depth-‐First Search
A
C
F G
Fron%er (LIFO Queue)
G F
![Page 26: Search’ - Northeastern University · 2 Search as Problem Solving ! Need to search a space of possible solutions ! There are many sequences of actions, each with their own utility](https://reader036.vdocuments.mx/reader036/viewer/2022090606/605c2e5c04c077356a706495/html5/thumbnails/26.jpg)
Depth-‐First Search
A
C
F G
Fron%er (LIFO Queue)
G
![Page 27: Search’ - Northeastern University · 2 Search as Problem Solving ! Need to search a space of possible solutions ! There are many sequences of actions, each with their own utility](https://reader036.vdocuments.mx/reader036/viewer/2022090606/605c2e5c04c077356a706495/html5/thumbnails/27.jpg)
Properties of depth-first search
ì Complete? No: fails in infinite-depth spaces
Can modify to avoid repeated states along path
ì Time? O(bm) with m=maximum depth
ì terrible if m is much larger than d ì but if solutions are dense, may be much faster than breadth-first
ì Space? O(bm), i.e., linear space! (we only need to
remember a single path + expanded unexplored nodes)
ì Optimal? No (It may find a non-optimal goal first)
![Page 28: Search’ - Northeastern University · 2 Search as Problem Solving ! Need to search a space of possible solutions ! There are many sequences of actions, each with their own utility](https://reader036.vdocuments.mx/reader036/viewer/2022090606/605c2e5c04c077356a706495/html5/thumbnails/28.jpg)
Depth-‐Limited Search
ì Depth first search, but don’t go past a pre-‐set limit (L) while searching
A
B
D E
C
F G
H I J K L M N O
L
![Page 29: Search’ - Northeastern University · 2 Search as Problem Solving ! Need to search a space of possible solutions ! There are many sequences of actions, each with their own utility](https://reader036.vdocuments.mx/reader036/viewer/2022090606/605c2e5c04c077356a706495/html5/thumbnails/29.jpg)
Limited Depth Search
ì Combines benefits of depth-‐ and breadth-‐first
ì Number of nodes generated: ì (d+1)b0 + (d)b1 + (d-‐1)b2 + … + (2)bd-‐1 + (1)bd = O(bd)
![Page 30: Search’ - Northeastern University · 2 Search as Problem Solving ! Need to search a space of possible solutions ! There are many sequences of actions, each with their own utility](https://reader036.vdocuments.mx/reader036/viewer/2022090606/605c2e5c04c077356a706495/html5/thumbnails/30.jpg)
30
Iterative deepening search L=0
![Page 31: Search’ - Northeastern University · 2 Search as Problem Solving ! Need to search a space of possible solutions ! There are many sequences of actions, each with their own utility](https://reader036.vdocuments.mx/reader036/viewer/2022090606/605c2e5c04c077356a706495/html5/thumbnails/31.jpg)
31
Iterative deepening search L=1
![Page 32: Search’ - Northeastern University · 2 Search as Problem Solving ! Need to search a space of possible solutions ! There are many sequences of actions, each with their own utility](https://reader036.vdocuments.mx/reader036/viewer/2022090606/605c2e5c04c077356a706495/html5/thumbnails/32.jpg)
32
Iterative deepening search L=2
![Page 33: Search’ - Northeastern University · 2 Search as Problem Solving ! Need to search a space of possible solutions ! There are many sequences of actions, each with their own utility](https://reader036.vdocuments.mx/reader036/viewer/2022090606/605c2e5c04c077356a706495/html5/thumbnails/33.jpg)
33
Iterative Deepening Search L=3
![Page 34: Search’ - Northeastern University · 2 Search as Problem Solving ! Need to search a space of possible solutions ! There are many sequences of actions, each with their own utility](https://reader036.vdocuments.mx/reader036/viewer/2022090606/605c2e5c04c077356a706495/html5/thumbnails/34.jpg)
34
Iterative deepening search
ì Complete? Yes
ì Time? O(bd)
ì Space? O(bd)
ì Optimal? Yes, if step cost = 1 or increasing function of depth.
![Page 35: Search’ - Northeastern University · 2 Search as Problem Solving ! Need to search a space of possible solutions ! There are many sequences of actions, each with their own utility](https://reader036.vdocuments.mx/reader036/viewer/2022090606/605c2e5c04c077356a706495/html5/thumbnails/35.jpg)
Iterative Deepening Search
ì Combines benefits of depth-‐ and breadth-‐first
ì Number of nodes generated: ì (d+1)b0 + (d)b1 + (d-‐1)b2 + … + (2)bd-‐1 + (1)bd = O(bd)
ì Spa1al complexity: O(bd)
![Page 36: Search’ - Northeastern University · 2 Search as Problem Solving ! Need to search a space of possible solutions ! There are many sequences of actions, each with their own utility](https://reader036.vdocuments.mx/reader036/viewer/2022090606/605c2e5c04c077356a706495/html5/thumbnails/36.jpg)
36
Summary of algorithms
preferred uninformed search strategy
Third edition has O(bd)
![Page 37: Search’ - Northeastern University · 2 Search as Problem Solving ! Need to search a space of possible solutions ! There are many sequences of actions, each with their own utility](https://reader036.vdocuments.mx/reader036/viewer/2022090606/605c2e5c04c077356a706495/html5/thumbnails/37.jpg)
ì Classwork
![Page 38: Search’ - Northeastern University · 2 Search as Problem Solving ! Need to search a space of possible solutions ! There are many sequences of actions, each with their own utility](https://reader036.vdocuments.mx/reader036/viewer/2022090606/605c2e5c04c077356a706495/html5/thumbnails/38.jpg)
38
Example: 8-Queens
ì states? -any arrangement of n<=8 queens -or arrangements of n<=8 queens in leftmost n columns, 1 per column, such that no queen attacks any other. ì initial state? no queens on the board ì actions? -add queen to any empty square -or add queen to leftmost empty square such
that it is not attacked by other queens. ì goal test? 8 queens on the board, none attacked. ì path cost? 1 per move
![Page 39: Search’ - Northeastern University · 2 Search as Problem Solving ! Need to search a space of possible solutions ! There are many sequences of actions, each with their own utility](https://reader036.vdocuments.mx/reader036/viewer/2022090606/605c2e5c04c077356a706495/html5/thumbnails/39.jpg)
Environment types ì Fully observable (vs. partially observable): An agent's
sensors give it access to the complete state of the environment at each point in time.
ì Deterministic (vs. stochastic): The next state of the environment is completely determined by the current state and the action executed by the agent. (If the environment is deterministic except for the actions of other agents, then the environment is strategic)
ì Episodic (vs. sequential): An agent’s action is divided into atomic episodes. Decisions do not depend on previous decisions/actions.
![Page 40: Search’ - Northeastern University · 2 Search as Problem Solving ! Need to search a space of possible solutions ! There are many sequences of actions, each with their own utility](https://reader036.vdocuments.mx/reader036/viewer/2022090606/605c2e5c04c077356a706495/html5/thumbnails/40.jpg)
Environment types
ì Static (vs. dynamic): The environment is unchanged while an agent is deliberating. (The environment is semidynamic if the environment itself does not change with the passage of time but the agent's performance score does)
ì Discrete (vs. continuous): A limited number of distinct, clearly defined percepts and actions.
ì Single agent (vs. multi-agent): An agent operating by itself in an environment. Does the other agent interfere with my performance measure?
![Page 41: Search’ - Northeastern University · 2 Search as Problem Solving ! Need to search a space of possible solutions ! There are many sequences of actions, each with their own utility](https://reader036.vdocuments.mx/reader036/viewer/2022090606/605c2e5c04c077356a706495/html5/thumbnails/41.jpg)
BFS, DFS, IDFS, LDFS
ì What type of environment/problem space would these algorithms be op1mal for?
![Page 42: Search’ - Northeastern University · 2 Search as Problem Solving ! Need to search a space of possible solutions ! There are many sequences of actions, each with their own utility](https://reader036.vdocuments.mx/reader036/viewer/2022090606/605c2e5c04c077356a706495/html5/thumbnails/42.jpg)
Quizzes and Classwork
ì “What type of agent?” ì An intelligent agent
ì “Can you formulate a poker agent in terms of a search problem?” ì Sorry I cannot
ì Show the state space ì O(bd)
![Page 43: Search’ - Northeastern University · 2 Search as Problem Solving ! Need to search a space of possible solutions ! There are many sequences of actions, each with their own utility](https://reader036.vdocuments.mx/reader036/viewer/2022090606/605c2e5c04c077356a706495/html5/thumbnails/43.jpg)
ì informed Search
![Page 44: Search’ - Northeastern University · 2 Search as Problem Solving ! Need to search a space of possible solutions ! There are many sequences of actions, each with their own utility](https://reader036.vdocuments.mx/reader036/viewer/2022090606/605c2e5c04c077356a706495/html5/thumbnails/44.jpg)
Informed Search
ì Use problem-‐specific knowledge beyond the problem defini1on to find solu1ons more efficiently
ì Heuris%c: which node should be expanded next?
![Page 45: Search’ - Northeastern University · 2 Search as Problem Solving ! Need to search a space of possible solutions ! There are many sequences of actions, each with their own utility](https://reader036.vdocuments.mx/reader036/viewer/2022090606/605c2e5c04c077356a706495/html5/thumbnails/45.jpg)
Heuristic Search
ì Use an evalua1on func1on f(n) for each node ì Es1mate of “desirability” ì Includes a heuris1c func1on, h(n)
ì Expand the most desirable unexpanded node
![Page 46: Search’ - Northeastern University · 2 Search as Problem Solving ! Need to search a space of possible solutions ! There are many sequences of actions, each with their own utility](https://reader036.vdocuments.mx/reader036/viewer/2022090606/605c2e5c04c077356a706495/html5/thumbnails/46.jpg)
Greedy best-‐first search
ì Evalua1on func1on f(n) = h(n) (heuris1c) = es1mate of cost from n to goal
ì e.g., hSLD(n) = straight-‐line distance from n to Bucharest
ì Greedy best-‐first search expands the node that appears to be closest to goal
![Page 47: Search’ - Northeastern University · 2 Search as Problem Solving ! Need to search a space of possible solutions ! There are many sequences of actions, each with their own utility](https://reader036.vdocuments.mx/reader036/viewer/2022090606/605c2e5c04c077356a706495/html5/thumbnails/47.jpg)
Example: Heuristic for Path-‐Finding
![Page 48: Search’ - Northeastern University · 2 Search as Problem Solving ! Need to search a space of possible solutions ! There are many sequences of actions, each with their own utility](https://reader036.vdocuments.mx/reader036/viewer/2022090606/605c2e5c04c077356a706495/html5/thumbnails/48.jpg)
Greedy best-‐first search example
![Page 49: Search’ - Northeastern University · 2 Search as Problem Solving ! Need to search a space of possible solutions ! There are many sequences of actions, each with their own utility](https://reader036.vdocuments.mx/reader036/viewer/2022090606/605c2e5c04c077356a706495/html5/thumbnails/49.jpg)
Greedy best-‐first search example
![Page 50: Search’ - Northeastern University · 2 Search as Problem Solving ! Need to search a space of possible solutions ! There are many sequences of actions, each with their own utility](https://reader036.vdocuments.mx/reader036/viewer/2022090606/605c2e5c04c077356a706495/html5/thumbnails/50.jpg)
Greedy best-‐first search example
![Page 51: Search’ - Northeastern University · 2 Search as Problem Solving ! Need to search a space of possible solutions ! There are many sequences of actions, each with their own utility](https://reader036.vdocuments.mx/reader036/viewer/2022090606/605c2e5c04c077356a706495/html5/thumbnails/51.jpg)
Greedy best-‐first search example
![Page 52: Search’ - Northeastern University · 2 Search as Problem Solving ! Need to search a space of possible solutions ! There are many sequences of actions, each with their own utility](https://reader036.vdocuments.mx/reader036/viewer/2022090606/605c2e5c04c077356a706495/html5/thumbnails/52.jpg)
Properties of greedy best-‐first search
ì Complete? No – can get stuck in loops, e.g., Iasi à Neamt à Iasi à Neamt à
ì Time? O(bm), but a good heuris1c can give drama1c improvement
ì Space? O(bm) -‐-‐ keeps all nodes in memory
ì Op1mal? No
![Page 53: Search’ - Northeastern University · 2 Search as Problem Solving ! Need to search a space of possible solutions ! There are many sequences of actions, each with their own utility](https://reader036.vdocuments.mx/reader036/viewer/2022090606/605c2e5c04c077356a706495/html5/thumbnails/53.jpg)
A* Search
ì Avoid expanding paths that are already expensive
ì Evalua1on func1on: f(n) = g(n) + h(n) ì g(n) = cost of path so far ì h(n) = es1mated cost from n to goal ì f(n) = es1mated total cost of path through n to goal
![Page 54: Search’ - Northeastern University · 2 Search as Problem Solving ! Need to search a space of possible solutions ! There are many sequences of actions, each with their own utility](https://reader036.vdocuments.mx/reader036/viewer/2022090606/605c2e5c04c077356a706495/html5/thumbnails/54.jpg)
A* Search Example: Arad to Bucharest
![Page 55: Search’ - Northeastern University · 2 Search as Problem Solving ! Need to search a space of possible solutions ! There are many sequences of actions, each with their own utility](https://reader036.vdocuments.mx/reader036/viewer/2022090606/605c2e5c04c077356a706495/html5/thumbnails/55.jpg)
A* Search Example: Arad to Bucharest
![Page 56: Search’ - Northeastern University · 2 Search as Problem Solving ! Need to search a space of possible solutions ! There are many sequences of actions, each with their own utility](https://reader036.vdocuments.mx/reader036/viewer/2022090606/605c2e5c04c077356a706495/html5/thumbnails/56.jpg)
A* Search Example: Arad to Bucharest
![Page 57: Search’ - Northeastern University · 2 Search as Problem Solving ! Need to search a space of possible solutions ! There are many sequences of actions, each with their own utility](https://reader036.vdocuments.mx/reader036/viewer/2022090606/605c2e5c04c077356a706495/html5/thumbnails/57.jpg)
A* Search Example: Arad to Bucharest
![Page 58: Search’ - Northeastern University · 2 Search as Problem Solving ! Need to search a space of possible solutions ! There are many sequences of actions, each with their own utility](https://reader036.vdocuments.mx/reader036/viewer/2022090606/605c2e5c04c077356a706495/html5/thumbnails/58.jpg)
A* Search Example: Arad to Bucharest
![Page 59: Search’ - Northeastern University · 2 Search as Problem Solving ! Need to search a space of possible solutions ! There are many sequences of actions, each with their own utility](https://reader036.vdocuments.mx/reader036/viewer/2022090606/605c2e5c04c077356a706495/html5/thumbnails/59.jpg)
A* Search Example: Arad to Bucharest
![Page 60: Search’ - Northeastern University · 2 Search as Problem Solving ! Need to search a space of possible solutions ! There are many sequences of actions, each with their own utility](https://reader036.vdocuments.mx/reader036/viewer/2022090606/605c2e5c04c077356a706495/html5/thumbnails/60.jpg)
A* Search
ì Complete? ì Yes
ì Op1mal? ì Yes!
ì Time? ì Exponen1al
ì Space? ì Keeps all nodes in memory
![Page 61: Search’ - Northeastern University · 2 Search as Problem Solving ! Need to search a space of possible solutions ! There are many sequences of actions, each with their own utility](https://reader036.vdocuments.mx/reader036/viewer/2022090606/605c2e5c04c077356a706495/html5/thumbnails/61.jpg)
Admissible Heuristics
ì A heuris1c is admissible if, for every node n, h(n) ≤ h*(n) ì h*(n): true cost to reach the goal from state n
ì Example: path-‐finding heuris1c never overes1mates actual road distance
ì Generate from a relaxed problem ì Fewer restric1ons than original problem
![Page 62: Search’ - Northeastern University · 2 Search as Problem Solving ! Need to search a space of possible solutions ! There are many sequences of actions, each with their own utility](https://reader036.vdocuments.mx/reader036/viewer/2022090606/605c2e5c04c077356a706495/html5/thumbnails/62.jpg)
ì Classwork
![Page 63: Search’ - Northeastern University · 2 Search as Problem Solving ! Need to search a space of possible solutions ! There are many sequences of actions, each with their own utility](https://reader036.vdocuments.mx/reader036/viewer/2022090606/605c2e5c04c077356a706495/html5/thumbnails/63.jpg)
A* and Games Given A* algorithm, define h(n) and f(n), environment, trace the algorithm
Resource: hop://unitygems.com/astar-‐1-‐journeys-‐start-‐single-‐step/, hop://en.wikipedia.org/wiki/A*_search_algorithm
![Page 64: Search’ - Northeastern University · 2 Search as Problem Solving ! Need to search a space of possible solutions ! There are many sequences of actions, each with their own utility](https://reader036.vdocuments.mx/reader036/viewer/2022090606/605c2e5c04c077356a706495/html5/thumbnails/64.jpg)
Video – Summary and outlook
ì hop://videolectures.net/aaai2010_thayer_bis/