Artificial Intelligence Lecture No. 6
Artificial Intelligence Lecture No. 6
Lecture No. 6
Summary of Previous Lecture
• Different types of Environments
• IA examples based on Environment
• Agent types
– Simple reflex agents
– Reflex agents with state/model
– Goal-based agents
– Utility-based agents
Today’s Lecture
• Problem solving by searching
• What is Search?
• Problem formulation
• Search Space Definitions
• Goal-formulation
• Searching for Solutions Visualize Search Space
as a Graphs
Problem-Solving Agent
• In which we look at how an agent can decide
what to do by systematically considering the
outcomes of various sequences of actions that
it might take.
- Stuart Russell & Peter Norvig
Problem solving agent
• A kind of Goal-based agent.
• Decide what to do by searching sequences of
actions that lead to desirable states.
5
Problem Definition
• Initial state : starting point
• Operator: description of an action
• State space: all states reachable from the initial state
by any sequence action
• Path: sequence of actions leading from one state to
another
• Goal test: which the agent can apply to a single state
description to determine if it is a goal state
• Path cost function: assign a cost to a path which the
sum of the costs of the individual actions along the
path.
What is Search?
• Search is the systematic examination of states to find
path from the start/root state to the goal state.
• The set of possible states, together
with operators defining their connectivity the search
space.
• The output of a search algorithm is a solution, that is, a
path from the initial state to a state that satisfies the goal
test.
• In real life search usually results from a lack of
knowledge. In AI too search is merely a offensive
instrument with which to attack problems that we can't
seem to solve any better way.
Search groups
Search techniques fall into three groups:
Start Street
Street with
Parking
Search Example
Formulate goal: Be in
Bucharest.
S3 S6 S5 S4
S7 S8
•States: S1 , S2 , S3 , S4 , S5 , S6 , S7 , S8
• Operators: Go Left , Go Right , Suck
• Goal test: no dirt left in both squares
• Path Cost: each action costs 1.
Example Problems – Eight Puzzle
States: tile locations
Eight Puzzle
http://mypuzzle.org/sliding
Single-State problem and
Multiple-States problem