CSE 630: Artificial Intelligence I Chapter 2: Agents: Jeremy Morris Spring 2012
CSE 630: Artificial Intelligence I Chapter 2: Agents: Jeremy Morris Spring 2012
Chapter 2: Agents
Jeremy Morris
Spring 2012
1
Overview
2
Reminder: Agents
3
Agent-based design
4
Perception-Action Cycle
5
6
Human Activity Detection (Prof. Davis)
reasoning
7
Vacuum World
8
Vacuum World
9
Vacuum World
10
Autonomy
11
Basic Vacuum Agent Design
while (!done) {
p = getPercept();
a = chooseAction(p);
doAction(a);
done = checkIfDone();
}
12
Designing “chooseAction”
[A,clean] MoveRight
[A,dirty] Suck
[B,clean] MoveLeft
[B,dirty] Suck
13
Evaluating the basic agent
14
Evaluating the basic agent
15
Evaluating the basic agent
16
Rationality vs. Omniscience
17
Environments
18
PEAS for Vacuum Agent
Performance Measure
Maximize ratio of dirt to energy/time usage
Environment
Two squares, A&B, with/without dirt
Actuators (effectors)
Wheels, Vacuum
Sensors
Location, Dirt Sensor
19
PEAS for Poker Agent
Performance Measure
Environment
Actuators
Sensors
20
PEAS for Survivor Agent
Performance Measure
Environment
Actuators
Sensors
21
Properties of task environments
Observability
Can the agent get all information from the environment
Partially observable
Poker: Only the cards in your hand
Survivor: Votes cast at tribal council
Fully observable
Chess: Positions of all the playing pieces
Survivor: Who won the immunity challenge
22
Properties of task environments
Determinism
Is the state of the world at time t determined
completely by the state of the world at time (t-1) and
the actions of the agent?
Deterministic?
Yes
Stochastic?
No, not completely predictable
Strategic?
Yes – except for the actions of other agents
Tic-tac-toe, Chess
23
Properties of task environments
Episodic vs. Sequential
Episodic: only current percepts needed to decide
Sequential: need history and current percepts
Static vs. Dynamic
Static: time halts while agent makes a decision
“Turn-based” games
Dynamic: world moves on while agent decides
“Real-time” applications/games
Semi-dynamic: world stands still, but decision time has
an effect on performance score
Tournament-level Chess
24
Properties of task environments
25
Sample Environments
26
Agent Architecture
27
Reflex Agent
Condition-action rules:
if (status==dirty):
return suck
if (location==A):
return moveRight
if (location==B):
return moveLeft
28
Reflex Agent with state
Memory
Model
29
Reflex Agent with state
30
Goal-based Agent
“Look-ahead”
31
Utility-based Agent
32
Utility-based Agent
33
Learning-based Agent
Provides
Feedback
“Agent”
Makes
Improvements
Suggests
Exploratory
Actions
34