Problem solving in state spaces - PowerPoint PPT Presentation

1 / 19
About This Presentation
Title:

Problem solving in state spaces

Description:

Internal model. State of environment data structure. Perceptions and ... Ff. Fd. Fg. F. Fd. D Goforth - COSC 4117, fall 2006. 19. General search algorithms ... – PowerPoint PPT presentation

Number of Views:42
Avg rating:3.0/5.0
Slides: 20
Provided by: laurentian3
Category:
Tags: ff | models | problem | solving | spaces | state

less

Transcript and Presenter's Notes

Title: Problem solving in state spaces


1
Problem solvinginstate spaces
  • State representation
  • and
  • the problem solving agent algorithm

2
Problem-solving agent
  • environment described as state space
  • agent actions can change one state to some others
  • current situation is one state in space
  • goal situation is another state
  • problem solving agent finds sequence of actions
    to move from current to goal state

3
Problem-solving agent - example
  • A farmer agent traveling with a bag of grain, a
    fox and a duck comes to a river he must cross on
    the way to market. There is on the shore a boat
    so small that he can only take one of his market
    products across at a time. He cannot leave the
    fox alone with the duck, nor the duck with the
    grain. How does he get his produce safely across
    the river?

4
What kind of problem?
  • fully / partly observable
  • deterministic / stochastic
  • sequential / episodic
  • static / dynamic
  • discrete / continuous
  • single- / multi-agent

5
What kind of problem?
  • fully / partly observable
  • deterministic / stochastic
  • sequential / episodic
  • static / dynamic
  • discrete / continuous
  • single- / multi-agent

6
Utility-based agent
  • internal state representing environment
  • goals expressed in terms of environment and/or
    agent states
  • performance measure rationality
  • NOT REFLEX tries actions internally and tests
    results against goals AND performance measure
  • Algorithm
  • Perceive state
  • If no plan exists, develop a plan
  • Act according to plan

7
Utility-based agents view
  • Crossing river problem state space which bank
    are farmer and produce on?
  • Possible actions cross river alone or with one
    item
  • Current state all on left bank
  • Goal state all on right bank
  • Problem plan a sequence of crossings to get from
    start (left bank) to goal (right) while avoiding
    other terminal states.

8
Internal model
  • State of environment data structure
  • Perceptions and actions
  • Current state
  • Goal state
  • Intelligence to develop a plan
  • Possible form of plan
  • Look-up table or rules or list of actions
  • (perception -gt action)

9
The simple problem solver
  • Restricted form of general agent Figure 3.1,
    p.61
  • function Simple-Problem-Solving-Agent( percept)
    returns action
  • seq an action sequence, initially empty
  • state some description of the current world state
  • goal a goal, initially null
  • problem a problem formulation
  • state Update-State(state, percept)
  • if seq is empty (ie do plan (search) first
    time only)
  • goal Formulate-Goal(state)
  • if (stategoal) return nil
  • problem Formulate-Problem(state, goal)
    performance
  • seq Search(problem)
  • action First(seq) (no replanning)
  • seq Rest(seq)
  • return action

10
Problem-solving agent
  • State space possible locations of four objects
    Agent, fox, duck, grain on left or right bank
  • e.g.
  • Agent left
  • fox left
  • duck left
  • grain right
  • State space has 24 16 states

A f d g
L
L
L
R
11
Problem-solving agent
  • Possible actions Agent can cross river, taking
    any object on same side with it.

R
R
L
R
Af
A f d g
Ad
R
L
R
R
L
L
L
R
A
R
L
L
R
12
Problem-solving agent
  • Start state
  • Goal state

F f d g
L
L
L
L
F f d g
R
R
R
R
13
Problem-solving agent
  • Performance measure
  • get to goal state
  • minimize number of trips
  • avoid losing produce
  • Constraints
  • possible actions
  • boat size
  • dangerous combinations of position

14
Problem-solving agentstate-space and actions
L
L
L
L
R
L
L
L
F
Fg
Fd
Ff
R
R
L
L
R
L
L
R
R
L
R
L
F
F
F
L
R
L
L
L
L
L
R
L
L
R
L
Fg
Ff
Fd
Fd
Fg
Ff
R
R
R
L
R
L
R
R
R
R
L
R
F
F
F
L
R
R
L
L
L
R
R
L
R
L
R
Ff
Fd
Fg
R
R
R
R
L
R
R
R
F
15
Problem-solving agent (formulate problem)STATES
TO AVOID
L
L
L
L
R
L
L
L
R
R
L
L
R
L
L
R
R
L
R
L
L
R
L
L
L
L
L
R
L
L
R
L
R
R
R
L
R
L
R
R
R
R
L
R
L
R
R
L
L
L
R
R
L
R
L
R
R
R
R
R
L
R
R
R
16
Problem-solving agent example
Node in search space
L
L
R
L
F
2
17
Problem-solving agent example
A solution sequence
Fd F Ff Fd Fg F Fd
18
The simple problem solver
  • Restricted form of general agent Figure 3.1,
    p.61
  • function Simple-Problem-Solving-Agent( percept)
    returns action
  • seq an action sequence, initially empty
  • state some description of the current world state
  • goal a goal, initially null
  • problem a problem formulation
  • state Update-State(state, percept)
  • if seq is empty (ie do plan (search) first
    time only)
  • goal Formulate-Goal(state)
  • if (stategoal) return nil
  • problem Formulate-Problem(state, goal)
    performance
  • seq Search(problem)
  • action First(seq)
  • seq Rest(seq)
  • return action

Fd F Ff Fd Fg F Fd
19
General search algorithms
  • Review breadth-first
  • and depth-first
  • traversals
  • in graphs
Write a Comment
User Comments (0)
About PowerShow.com