Problem solving Chapter 3, Sections 13 of; based on AIMA Slides c - - PowerPoint PPT Presentation

problem solving
SMART_READER_LITE
LIVE PREVIEW

Problem solving Chapter 3, Sections 13 of; based on AIMA Slides c - - PowerPoint PPT Presentation

Problem solving Chapter 3, Sections 13 of; based on AIMA Slides c Artificial Intelligence, spring 2013, Peter Ljungl Stuart Russel and Peter Norvig, 2004 Chapter 3, Sections 13 1 Problem types Deterministic, fully observable =


slide-1
SLIDE 1

Problem solving

Chapter 3, Sections 1–3

Artificial Intelligence, spring 2013, Peter Ljungl¨

  • f; based on AIMA Slides c

Stuart Russel and Peter Norvig, 2004 Chapter 3, Sections 1–3 1

slide-2
SLIDE 2

Problem types

Deterministic, fully observable = ⇒ single-state problem Agent knows exactly which state it will be in; solution is a sequence Non-observable = ⇒ conformant problem Agent may have no idea where it is; solution (if any) is a sequence Nondeterministic and/or partially observable = ⇒ contingency problem percepts provide new information about current state solution is a contingent plan or a policy

  • ften interleave search, execution

Unknown state space = ⇒ exploration problem (“online”)

Artificial Intelligence, spring 2013, Peter Ljungl¨

  • f; based on AIMA Slides c

Stuart Russel and Peter Norvig, 2004 Chapter 3, Sections 1–3 2

slide-3
SLIDE 3

Example: Romania

We are on holiday in Romania; currently in Arad Our flight leaves tomorrow from Bucharest Formulate goal: be in Bucharest Formulate problem: states: various cities actions: drive between cities Find solution: sequence of cities, e.g., Arad, Sibiu, Fagaras, Bucharest Problem type: deterministic, fully observable = ⇒ single-state problem

Artificial Intelligence, spring 2013, Peter Ljungl¨

  • f; based on AIMA Slides c

Stuart Russel and Peter Norvig, 2004 Chapter 3, Sections 1–3 3

slide-4
SLIDE 4

Example: Romania

Giurgiu Urziceni Hirsova Eforie Neamt Oradea Zerind Arad Timisoara Lugoj Mehadia Dobreta Craiova Sibiu Fagaras Pitesti Vaslui Iasi Rimnicu Vilcea Bucharest 71 75 118 111 70 75 120 151 140 99 80 97 101 211 138 146 85 90 98 142 92 87 86

Artificial Intelligence, spring 2013, Peter Ljungl¨

  • f; based on AIMA Slides c

Stuart Russel and Peter Norvig, 2004 Chapter 3, Sections 1–3 4

slide-5
SLIDE 5

Single-state problem formulation

A problem is defined by five components: initial state, e.g., In(Arad) actions Actions(s) = set of actions for state s e.g., Actions(In(Arad)) = {Go(Sibiu), Go(Timisoara), Go(Zerind)} transitions Result(s, a) = the successor state e.g., Result(In(Arad), Go(Zerind)) = In(Zerind) goal test, can be an explicit set of states, e.g., {In(Bucharest)}

  • r an implicit property, e.g., checkmate in chess

path cost is the sum of the step costs c(s, a, s′) e.g., sum of distances, number of actions executed, etc. in this chapter we assume c to be positive A solution is a sequence of actions leading from the initial state to a goal state

Artificial Intelligence, spring 2013, Peter Ljungl¨

  • f; based on AIMA Slides c

Stuart Russel and Peter Norvig, 2004 Chapter 3, Sections 1–3 5

slide-6
SLIDE 6

Selecting a state space

Real world is absurdly complex ⇒ state space must be abstracted for problem solving (Abstract) state = set of real states (Abstract) action = complex combination of real actions e.g., Result(In(Arad), Go(Zerind)) represents a complex set

  • f possible routes, detours, rest stops, etc.

(Abstract) solution = set of real paths that are solutions in the real world Each abstract action should be “easier” than the original problem!

Artificial Intelligence, spring 2013, Peter Ljungl¨

  • f; based on AIMA Slides c

Stuart Russel and Peter Norvig, 2004 Chapter 3, Sections 1–3 6

slide-7
SLIDE 7

Example: vacuum world state space graph

R L S S S S R L R L R L S S S S L L L L R R R R

states??: integer dirt and robot locations (ignore dirt amounts etc.) initial state??: any state actions??: Left, Right, Suck, NoOp goal test??: no dirt in any location path cost??: 1 per action (0 for NoOp)

Artificial Intelligence, spring 2013, Peter Ljungl¨

  • f; based on AIMA Slides c

Stuart Russel and Peter Norvig, 2004 Chapter 3, Sections 1–3 7

slide-8
SLIDE 8

Example: The 8-puzzle

states??: a 3 × 3 matrix of integers 0 ≤ n ≤ 8 initial state??: any state actions??: move the blank space: left, right, up, down goal test??: equal to goal state (given above) path cost??: 1 per move

Artificial Intelligence, spring 2013, Peter Ljungl¨

  • f; based on AIMA Slides c

Stuart Russel and Peter Norvig, 2004 Chapter 3, Sections 1–3 8

slide-9
SLIDE 9

Example: The 8-queens problem

states??: any arrangement of 0 to 8 queens on the board initial state??: no queens on the board actions??: add a queen to any empty square goal test??: 8 queens on the board, none attacked path cost??: 1 per move Using this formulation, there are 64 · 63 · · · · 57 ≈ 1.8 × 1014 possible sequences to explore!

Artificial Intelligence, spring 2013, Peter Ljungl¨

  • f; based on AIMA Slides c

Stuart Russel and Peter Norvig, 2004 Chapter 3, Sections 1–3 9

slide-10
SLIDE 10

Example: The 8-queens problem (alternative)

states??: one queen per column in the leftmost columns, none attacked initial state??: no queens on the board actions??: add a queen to any square in the leftmost empty column, making sure that no queen is attacked goal test??: 8 queens on the board, none attacked path cost??: 1 per move Using this formulation, we have only 2,057 sequences!

Artificial Intelligence, spring 2013, Peter Ljungl¨

  • f; based on AIMA Slides c

Stuart Russel and Peter Norvig, 2004 Chapter 3, Sections 1–3 10

slide-11
SLIDE 11

Example: robotic assembly

R R R P R R

states??: real-valued coordinates of robot joint angles parts of the object to be assembled actions??: continuous motions of robot joints goal test??: complete assembly of the object path cost??: time to execute

Artificial Intelligence, spring 2013, Peter Ljungl¨

  • f; based on AIMA Slides c

Stuart Russel and Peter Norvig, 2004 Chapter 3, Sections 1–3 11