0% found this document useful (0 votes)
47 views13 pages

Problem Solving As State Space Search

The document describes problem solving as state space search. It discusses four approaches to question answering and describes building goal-based agents by defining a start state, goal state, actions, and searching for a sequence of actions to reach the goal. It provides examples of representing the water jug problem and missionaries and cannibals problem as state space searches, defining the states, actions, and searching the state space graph to reach the goal state.

Uploaded by

Amit Seven
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
47 views13 pages

Problem Solving As State Space Search

The document describes problem solving as state space search. It discusses four approaches to question answering and describes building goal-based agents by defining a start state, goal state, actions, and searching for a sequence of actions to reach the goal. It provides examples of representing the water jug problem and missionaries and cannibals problem as state space searches, defining the states, actions, and searching the state space graph to reach the goal state.

Uploaded by

Amit Seven
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 13

Problem Solving As

State Space Search


Question 1
• In question-answering, approach 1 is based on
– Matching literal text
– Converting English text into Structured format
– Converting English text into Structured format
with World knowledge
– None of these.
Question 2
• In question-answering, approach 2 is based on
– Matching literal text
– Converting English text into Structured format
– Converting English text into Structured format
with World knowledge
– None of these.
Question 3
• In question-answering, approach 3 is based on
– Matching literal text
– Converting English text into Structured format
– Converting English text into Structured format
with World knowledge
– None of these.
Building Goal-Based Agents
• We have a goal to reach
– Driving from point A to point B
– Put 8 queens on a chess board such that no one attacks
another
– Prove that John is an ancestor of Mary
• We have information about where we are now at the beginning.
• We have a set of actions we can take to move around (change
from where we are)
• Objective: find a sequence of legal actions which will bring us
from the start point to a goal
Example: Water-Jug Problem
• There is a large bucket B full of water and Two (02) jugs, J1 of
volume 3 litre and J2 of volume 5 litre. You are allowed to fill
up any empty jug from the bucket, pour all water back to the
bucket from a jug or pour from one jug to another. The goal is
to have jug J1 with exactly one (01) litre of water.
What are the actions?
• Quantify all of the primitive actions or events that are sufficient to
describe all necessary changes in solving a task/goal.
• Example of Possible Actions for Water Jug Problem :
– Fill(X): fill jug X from bucket.
– Empty(X): Empty jug X into bucket.
– Pour(X, Y): Pour water from jug X to jug Y.

• No uncertainty associated with what an action does to the world. That


is, given an action (operator or move) and a description of the current
state of the world, the action completely specifies
– Precondition: if that action CAN be applied to the current world
(i.e., is it applicable and legal), and
– Effect: what the exact state of the world will be after the action is
performed in the current world (i.e., no need for "history"
information to be able to compute what the new world looks like).
Representing states
• At any moment, the relevant world is represented as a state
– Initial (start) state: S
– An action (or an operation) changes the current state to
another state (if it is applied): state transition
– An action can be taken (applicable) only if the its precondition
is met by the current state.
– For a given state, there might be more than one applicable
actions.
– Goal state: a state satisfies the goal description or passes the
goal test
– Dead-end state: a non-goal state to which no action is
applicable.
Problem Formulation by State Space Search
• A state space representation allows for the formal definition of
a problem which makes the movement from initial state to the
goal state quite easily. 
• A state space is a graph, (V, E) where V is a set of nodes and E is
a set of arcs, where each arc is directed from a node to another
node
• node: corresponds to a state
• arc: corresponds to an applicable action/operation.
• the source and destination nodes are called as parent
(immediate predecessor) and child (immediate successor)
nodes with respect to each other
State Space of Water Jug Problem
• Initial State: (0, 0)
• Goal State: (1, 0) 0,0
Fill (J1) Fill (J2)

5,0 0,3
Fill (J1)
Fill (J2) Pour(J2, J1)
Pour(J1, J2)
5,3 2,3 3,0 5,3
Dead End Dead End
Empty (J2) Fill (J2)

2,0 3,3
Pour(J1, J2) Pour(J2, J1)

0,2 5,1
Fill(J1) Empty (J1)

5,2 0,1
Pour(J1, J2) Pour(J2, J1)

4,3 1,0
Empty (J2) Goal

1,0 1,3 4,0


Goal Empty (J2) Pour(J1, J2)
Q4
• Which of the following must be true to carry
an action on a state?
– It must be a dead end.
– It must be a goal state.
– Current state’s pre-condition must be fulfilled.
– Goal state’s pre-condition must be fulfilled.
Exercise 1: Missionaries and Cannibals
• In this problem, three missionaries and three cannibals must
cross a river using a boat which can carry at most two people,
under the constraint that, for both banks, that the
missionaries present on the bank cannot be outnumbered by
cannibals. The boat cannot cross the river by itself with no
people on board.
• Mention the possible actions
• Draw the state space Search for M-C Problem.
Exercise 2: 8-Puzzle Problem

• Mention the possible actions


• Draw the state space Search for 8- Puzzle Problem.

You might also like