Title: Search Problems
1Search Problems
- Russell and Norvig Chapter 3, Sections 3.1
3.3
2Problem-Solving Agent
3Problem-Solving Agent
4State Space and Successor Function
- Actions
- Initial state
- Goal test
5Initial State
- Actions
- Initial state
- Goal test
6Goal Test
state space
- Actions
- Initial state
- Goal test
7Example 8-puzzle
8Example 8-puzzle
9Example 8-puzzle
Size of the state space 9!/2
181,440 15-puzzle ? .65 x 1012 24-puzzle ?
.5 x 1025
10Search Problem
- State space
- Initial state
- Successor function
- Goal test
- Path cost
11Search Problem
- State space
- each state is an abstract representation of the
environment - the state space is discrete
- Initial state
- Successor function
- Goal test
- Path cost
12Search Problem
- State space
- Initial state
- usually the current state
- sometimes one or several hypothetical states
(what if ) - Successor function
- Goal test
- Path cost
13Search Problem
- State space
- Initial state
- Successor function
- state ? subset of states
- an abstract representation of the possible
actions - Goal test
- Path cost
14Search Problem
- State space
- Initial state
- Successor function
- Goal test
- usually a condition
- sometimes the description of a state
- Path cost
15Search Problem
- State space
- Initial state
- Successor function
- Goal test
- Path cost
- path ? positive number
- usually, path cost sum of step costs
- e.g., number of moves of the empty tile
16Search of State Space
17Search of State Space
18Search State Space
19Search of State Space
20Search of State Space
21Search of State Space
? search tree
22Simple Agent Algorithm
- Problem-Solving-Agent
- initial-state ? sense/read state
- goal ? select/read goal
- successor ? select/read action models
- problem ? (initial-state, goal, successor)
- solution ? search(problem)
- perform(solution)
23Example 8-queens
Place 8 queens in a chessboard so that no two
queens are in the same row, column, or diagonal.
A solution
Not a solution
24Example 8-queens
- Formulation 1
- States any arrangement of
- 0 to 8 queens on the board
- Initial state 0 queens on the
- board
- Successor function add a
- queen in any square
- Goal test 8 queens on the
- board, none attacked
? 648 states with 8 queens
25Example 8-queens
- Formulation 2
- States any arrangement of
- k 0 to 8 queens in the k
- leftmost columns with none
- attacked
- Initial state 0 queens on the
- board
- Successor function add a
- queen to any square in the leftmost empty
column such that it is not attacked - by any other queen
- Goal test 8 queens on the
- board
? 2,067 states
26?? n-queen ??
- Neural, Genetic ?? Heuristic ???? ? ??
- ??? ???? ?? ???
- ?? n? ??? ?? ?? ???? ??? Heuristics?? ?? ?? ??
- ??? n? ?? ?? ? ???? ?? ???? ????? ??? ????? ???
?? - ??? ?? ?? ??? ?????? ????? ??? ???? ? ?? ??
- ??? ??? ??? ??? ?? ??? ??? ?? ???? ??? ??,
feasible solution? ???? ???? ??? ????? ??? ? ??
27Example Robot navigation
What is the state space?
28Example Robot navigation
29Example Robot navigation
30Example Robot navigation
31Example Robot navigation
Cost of one step ???
32Example Robot navigation
33Example Robot navigation
34Example Robot navigation
35Example Robot navigation
36Example Assembly Planning
Initial state
Goal state
37Example Assembly Planning
38Example Assembly Planning
39Assumptions in Basic Search
- The environment is static
- The environment is discretizable
- The environment is observable
- The actions are deterministic
- ? open-loop solution
40Search Problem Formulation
- Real-world environment ? Abstraction
41Search Problem Formulation
- Real-world environment ? Abstraction
- Validity
- Can the solution be executed?
42Search Problem Formulation
- Real-world environment ? Abstraction
- Validity
- Can the solution be executed?
- Does the state space contain the solution?
43(No Transcript)
44(No Transcript)
45(No Transcript)
46(No Transcript)
47Search Problem Formulation
- Real-world environment ? Abstraction
- Validity
- Can the solution be executed?
- Does the state space contain the solution?
- Usefulness
- Is the abstract problem easier than the
real-world problem?
48Search Problem Formulation
- Real-world environment ? Abstraction
- Validity
- Can the solution be executed?
- Does the state space contain the solution?
- Usefulness
- Is the abstract problem easier than the
real-world problem? - Without abstraction an agent would be swamped by
the real world
49Search Problem Variants
- One or several initial states
- One or several goal states
- The solution is the path or a goal node
- In the 8-puzzle problem, it is the path to a goal
node - In the 8-queen problem, it is a goal node
50Problem Variants
- One or several initial states
- One or several goal states
- The solution is the path or a goal node
- Any, or the best, or all solutions
51Important Parameters
- Number of states in state space
8-puzzle ? 181,44015-puzzle ? .65 x 1012
24-puzzle ? .5 x 1025
8-queens ? 2,057 100-queens ? 1052
Stating a problem as a search problem is not
always a good idea!
52Important Parameters
- Number of states in state space
- Size of memory needed to store a state
53Important Parameters
- Number of states in state space
- Size of memory needed to store a state
- Running time of the successor function
54Applications
- Route finding airline travel,
telephone/computer networks - Pipe routing, VLSI routing
- Pharmaceutical drug design
- Robot motion planning
- Video games
55Task Environment Observable Deterministic Episodic Static Discrete Agents
Crossword puzzle Fully Deterministic Sequential Static Discrete Single
Chess with a clock Fully Strategic Sequential Semi Discrete Multi
Poker Partially Strategic Sequential Static Discrete Multi
Backgammon Fully Stochastic Sequential Static Discrete Multi
Taxi driving Partially Stochastic Sequential Dynamic Continuous Multi
Medical diagnosis Partially Stochastic Sequential Dynamic Continuous Single
Image-analysis Fully Deterministic Episodic Semi Continuous Single
Part-picking robot Partially Stochastic Episodic Dynamic Continuous Single
Refinery controller Partially Stochastic Sequential Dynamic Continuous Single
Interactive English tutor Partially Stochastic Sequential Dynamic Discrete Multi
Figure 2.6 Examples of task environments and their characteristics. Figure 2.6 Examples of task environments and their characteristics. Figure 2.6 Examples of task environments and their characteristics. Figure 2.6 Examples of task environments and their characteristics. Figure 2.6 Examples of task environments and their characteristics. Figure 2.6 Examples of task environments and their characteristics. Figure 2.6 Examples of task environments and their characteristics.
56Summary
- Problem-solving agent
- State space, successor function, search
- Examples 8-puzzle, 8-queens, route finding,
robot navigation, assembly planning - Assumptions of basic search
- Important parameters
57Future Classes
- Search strategies
- Blind strategies
- Heuristic strategies
- Extensions
- Uncertainty in state sensing
- Uncertainty action model
- On-line problem solving