Lecture3 - Problem Solving by Search
Lecture3 - Problem Solving by Search
Solving by Search
LECTURE 3
Outline
2
problems.
⚫ Example problems.
uncertainty.
Fully Observable
⚫ Static Environment
yes
Deterministic
yes
Sequential
yes no
Discrete no
yes Discrete
no
yes
Planning, Control, Vector Search: Continuous Function
heuristic cybernetics Constraint Optimization
search Satisfaction
Choice in a Deterministic Known Environment
4
⚫ Single-state:
Start in #5. Solution??
[Right, Suck]
Example: Romania
8
⚫ Formulate goal:
be in Bucharest
⚫ Formulate problem:
states: various cities
actions: drive between cities
⚫ Find solution:
sequence of cities, e.g., Arad, Sibiu, Fagaras, Bucharest
Example: Romania
9
Abstraction: The process of removing details from a representation Is the map a good representation of the
problem? What is a good replacement?
Single-state problem formulation
10
⚫ Vacuum-cleaner world: (A, dirty, clean) → (’Left’, (A, dirty, clean)),(’Right’, (B, dirty, clean)),
(’Suck’, (A, clean, dirty)), (’NoOp, (A, dirty, clean))
⚫ states?
⚫ actions?
⚫ goal test?
⚫ path cost?
Vacuum world state space graph
15
⚫ states?
⚫ actions?
⚫ goal test?
⚫ path cost?
Example: The 8-puzzle
17
⚫ Basic idea:
offline, simulated exploration of state space by generating
successors of already-explored states (a.k.a.~expanding
states)
Tree search example
21
Tree search example
22
Tree search example
23
Search Graph vs. State Graph
24
⚫ Be careful to distinguish
Search tree: nodes are sequences of actions.
State Graph: Nodes are states of the environment.
We will also consider soon search graphs.
Search strategies
25
⚫ Implementation:
is a FIFO queue, i.e., new successors go at end
Breadth-first search
29
⚫ Implementation:
is a FIFO queue, i.e., new successors go at end
Breadth-first search
30
⚫ Implementation:
is a FIFO queue, i.e., new successors go at end
Breadth-first search
31