Types of Agents - CSC 411: AI Fall 2013

Types of Agents
CSC 411: AI
Fall 2013
NC State University
Types of Agents
1 / 14
Agent functions and programs
S KELETON -AGENT(percept)
static: memory, the agent’s memory of the world
memory = U PDATE -M EMORY(memory, percept)
action = C HOOSE -B EST-ACTION(memory)
memory = U PDATE -M EMORY(memory, action)
return action
NC State University
Types of Agents
2 / 14
Agent types
Four basic types in order of increasing generality:
• Simple reflex agents
• Model-based reflex agents
• Goal-based agents
• Utility-based agents
NC State University
Types of Agents
3 / 14
Simple reflex agent
Agent
Sensors
What the world
is like now
Environment
What action I
should do now
Condition-action rules
Actuators
NC State University
Types of Agents
4 / 14
Simple reflex agent code
S IMPLE -R EFLEX -AGENT(percept)
persistent: rules, a set of condition-action rules
state = I NTERPRET-I NPUT(percept)
rule = M ATCH -RULE(state, rules)
return rule.action
NC State University
Types of Agents
5 / 14
Model-based reflex agent
Sensors
State
What my actions do
What action I
should do now
Condition-action rules
Agent
NC State University
Environment
What the world
is like now
How the world evolves
Actuators
Types of Agents
6 / 14
Model-based reflex agent code
M ODEL -BASED -R EFLEX -AGENT(percept)
persistent: state, conception of world state
persistent: model, of rule/state transitions
persistent: rules, a set of condition-action rules
persistent: action, the most recent action, initially none
state = U PDATE -S TATE(state, action, percept, model)
rule = M ATCH -RULE(state, rules)
action = rule.action
return action
NC State University
Types of Agents
7 / 14
Goal-based agent
Sensors
State
What the world
is like now
What my actions do
What it will be like
if I do action A
Goals
What action I
should do now
Agent
NC State University
Environment
How the world evolves
Actuators
Types of Agents
8 / 14
Utility-based agent
Sensors
State
What the world
is like now
What my actions do
What it will be like
if I do action A
Utility
How happy I will be
in such a state
Environment
How the world evolves
What action I
should do now
Agent
NC State University
Actuators
Types of Agents
9 / 14
On states
What’s a state?
In AI, it’s more complicated. . .
NC State University
Types of Agents
10 / 14
On states
B
C
B
(a) Atomic
C
(b) Factored
(b) Structured
In conventional finite state machines, states are atomic,
with no internal structure.
NC State University
Types of Agents
11 / 14
On states
B
C
B
(a) Atomic
C
(b) Factored
(b) Structured
States can be factored. A set of state variables of interest
are identified for problem solving; states are distinguished
by the values those variables have.
NC State University
Types of Agents
12 / 14
On states
B
C
B
(a) Atomic
C
(b) Factored
(b) Structured
States can be structured. States consist of objects (as in a
factored representation) as well as relationships between
objects.
NC State University
Types of Agents
13 / 14
States and problem solving
Different state representations have different
expressiveness; they are used by different algorithms.
Atomic
Search
Game playing
HMMs
NC State University
Factored
CSPs
Prop. logic
Planning
BN
ML
Structured
FOL
KR
NLP
Types of Agents
14 / 14