Download pdf slides

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Canonical quantization wikipedia , lookup

Scalar field theory wikipedia , lookup

Artificial intelligence wikipedia , lookup

Multiple-criteria decision analysis wikipedia , lookup

Transcript
Artificial Intelligence
1
2
Assignment #1
Vacuum Cleaner World
Artificial Intelligence
ICS461
Fall 2010
ƒ The vacuum cleaner world and code from
Russell and Norvig (3rd edition, 2009)
• http://aima.cs.berkeley.edu/
Nancy E. Reed
[email protected]
3
4
Vacuum World Code
Assignment #1
ƒ Go to http://aima.cs.berkeley.edu
ƒ Download code.tar.gz and unzip it
ƒ Modify the file aima.lisp with the location of
ƒ http://www2.hawaii.edu/~nreed/ics461
ƒ Vacuum cleaner world – modify code
from AIMA.
ƒ Online code/comments:
http://www2.hawaii.edu/~nreed/aima/doc
1. the code directory on your machine, and
2. name of Lisp installed
ƒ
ƒ
ƒ
ƒ
Start your Lisp
(load “aima”) ; use directory if necessary
(aima-load ‘agents) ; loads agent functions
Example tests are in “test-agents.lisp” file
ƒ Part I due Friday, Midnight, Week 4
ƒ Part II (and EC) due Fri, Midnight, Week
5
A Vacuum World Example
ƒ2 cell room
ƒ8 different states
possible w/ 1
vacuum, 0-2 dirty
cells
ƒMoves possible:
• Right
• Left
• Suck
ƒStart in position #5
ƒSolution??
6
Example: Vacuum World
ƒStart in
position #5
• Solution: [Right,
Suck]
ƒIf started in
cells
{1,2,3,4,5,6,7,8
}
• E.g., right goes
to {2,4,6,8}
Artificial Intelligence
7
Vacuum World Example
8
State Space Problem Formation
ƒ Start in cell #5
ƒ A problem is defined by four items:
ƒ Initial state
• Solution [right, suck]
ƒ Start in
{1,2,3,4,5,6,7,8}
• E.g., “left square”
ƒ Successor function S(x) = set of action-state pairs
• Move to {2,4,6,8}
• E.g., S(left) = {<leftÆright>, <rightÆright>,…}
ƒ Solution [right, suck,
left, suck]
ƒ Murphy’s law – suck
will dirty a clean spot!
ƒ Solution: Add sensor
for dirt in local cell
(only).
ƒ Goal test, can be
• Explicit, e.g., “at right”
• Implicit, e.g., NoDirt(x)
ƒ Path cost (additive)
• E.g., a sum of distances, number of actions executed, etc.
• C(x,a,y) is the step cost, assumed to be non-negative
ƒ A solution is a sequence of actions leading from the
initial state to a goal state
• [right, if dirt then suck,
left, if dirt then suck]
9
10
Example: Vacuum World state space graph
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.,
“LeftÆRight” represents a complex set of possible routes,
detours, rest stops, etc.
• (Abstract) solution = set of real paths that are solutions in the
real world
ƒStates?
ƒActions?
ƒGoal test?
ƒPath cost?
ƒEach abstract action should be “easier” than the
original problem!
11
Example: Vacuum World state space graph
ƒStates
• Integers for
dirt, robot
locations
(ignore dirt
amount)
ƒActions?
•
•
•
•
Left
Right
Suck
No op
ƒGoal test?
• No dirt
ƒPath cost?
• 1 per action
12
The Super Simple Vacuum World
Artificial Intelligence
13
A 3 by 3 Cell Vacuum World
dirt
dirt
(0,2)
(1,2)
(2,2)
(0,1)
(1,1)
(2,1)
(0,0)
(1,0)
(2,0)
What is the State Space Representation
for a 3 by 3 Vacuum World?
ƒ States
ƒ Moves
ƒ ….
14