Lec04 Search Intro-1689184320071
Lec04 Search Intro-1689184320071
Lec04 Search Intro-1689184320071
Chapter 3
Search
• We will consider the problem of designing goal-
based agents in fully observable, deterministic,
discrete, known environments
• Example:
Start state
Goal state
Search
• We will consider the problem of designing goal-
based agents in fully observable, deterministic,
discrete, known environments
– The solution is a fixed sequence of actions
– Search is the process of looking for the sequence of
actions that reaches the goal
– Once the agent begins executing the search solution, it can
ignore its percepts (open-loop system)
Search problem components
• Initial state Initial
state
• Actions
• Transition model
– What is the result of
performing a given action
in a given state?
• Goal state
• Path cost
– Assume that it is a sum of Goal
nonnegative step costs state
• Initial state
– Arad
• Actions
– Go from one city to another
• Transition model
– If you go from city A to
city B, you end up in city B
• Goal state
– Bucharest
• Path cost
– Sum of edge costs
State space
• The initial state, actions, and transition model
define the state space of the problem
– The set of all states reachable from initial state by any
sequence of actions
– Can be represented as a directed graph where the
nodes are states and links between nodes are actions
• What is the state space for the Romania problem?
Example: Vacuum world
• States
– Agent location and dirt location
– How many possible states?
– What if there are n possible locations?
• Actions
– Left, right, suck
• Transition model
Vacuum world state space graph
Example: The 8-puzzle
• States
– Locations of tiles
• 8-puzzle: 181,440 states
• 15-puzzle: 1.3 trillion states
• 24-puzzle: 1025 states
• Actions
– Move blank left, right, up, down
• Path cost
– 1 per move
• States
– Real-valued coordinates of robot joint angles
• Actions
– Continuous motions of robot joints
• Goal state
– Desired final configuration (e.g., object is grasped)
• Path cost
– Time to execute, smoothness of path, etc.
Search
• Given:
– Initial state
– Actions
– Transition model
– Goal state
– Path cost
• Breadth-first search
• Uniform-cost search
• Depth-first search
• Iterative deepening search