Agents: Definition and Formal Architectures: Lecturer: S Luz Luzs@cs - Tcd.ie September 23, 2014
Agents: Definition and Formal Architectures: Lecturer: S Luz Luzs@cs - Tcd.ie September 23, 2014
Lecturer: S Luz
[email protected]
September 23, 2014
Outline
What is an agent?
1
What is an agent?
Not all UI designers like the idea, though (Shneiderman and Maes, 1997)
Natural Sciences
Conformance to natural laws
An air of necessity about them
Sciences of the artificial (Simon, 1981):
Prescription vs. description
A science of the contingent
A science of design
2
From a prescriptive (design) perspective...
Agent properties:
Autonomy: acting independently (of user/human intervention)
Situatedness: sensing and modifying the environment
Flexibility:
re-activity to changes
pro-activity in bringing about environmental conditions under
which the agents goals can be achieved, and
sociability: communicating with other agents, collaborating, and
sometimes competing
PAGE Descriptions
P.A.G.E.: Percepts, Actions, Goals and Environment
Symptoms, find-
Medical diagnosis Questions, tests, Healthy patient,
ings, patients Patient, hospital
system treatments minimize costs
answers
Satellite image Pixels of varying Print a categoriza- Correct categoriza- Images from orbit-
analysis system intensity, color tion of scene tion ing satellite
Pixels of varying Pick up parts and Place parts in cor- Conveyor belt with
Part-picking robot
intensity sort into bins rect bins parts
Print exercises,
Interactive English Maximize students
Typed words suggestions, cor- Set of students
tutor score on test
rections
3
Performance mea-
Agent Type Environment Actuators Sensors
sure
Symptoms, find-
Medical diagno- Healthy patient, Questions, tests,
Patient, hospital ings, patients
sis system minimize costs treatments
answers
Pick up parts
Part-picking % parts in cor- Conveyor belt Pixels of varying
and sort into
robot rect bins with parts intensity
bins
Print exercises,
Interactive Students score Set of students;
suggestions, cor- Keyboard input
English tutor on test testing agency
rections
Environment properties
Fully vs. partially observable: whether agents can obtain complete and accurate in-
formation about the environment
deterministic vs. stochastic: whether the next state of the environment is fully deter-
mined by the current state and action performed by the agent
episodic vs. sequential: whether agents next action depends only on the current state
of the environment (episodic), or on assessment of past environment states (sequential)
static vs. dynamic: whether the environment changes independently of the agents
actions
discrete vs. continuous: whether the possible actions and percepts on an environment
are finite (discrete environment) or not (continuous environment)
single vs. multiple agents
Types of environments
Environment Observable Deterministic Episodic Static Discrete Agents
Crossword puzzle fully yes sequential static yes single
Chess w/ clock fully strategic sequential semi yes multi
Poker partially strategic sequential static discrete multi
Backgammon fully stochastic sequential static discrete multi
Car driving partially stochastic sequential dynamic continuous multi From (Russell and
Medical diagnosis partially stochastic sequential dynamic continuous single
Image analysis fully deterministic episodic semi continuous single
Robot arm partially stochastic episodic dynamic continuous single
English tutor partially stochastic sequential dynamic discrete multi
Plant controller partially stochastic sequential dynamic continuous single
Norvig, 2003)
Why?
What we would like to describe:
4
agent
environment
Agent
Perception Action
Environment
their interactions
Notation
Defining an architecture
A standard architecture is a 4-tuple: Archs =< S, A, action, env >
where
S = {s1 , s2 , ..., sn } is a finite set describing all (possible) environment
states, and
A = {a1 , a2 , ..., an } is the set of all actions an agent is capable of
performing
action is a function describing the agents behaviour, and
env is a function describing the behaviour of the environment
5
c
a b
000000000000000000000000000000000000
111111111111111111111111111111111111
000000000000000000000000000000000000
111111111111111111111111111111111111
Assume the robotic arm is capable of performing a set of actions A = {move(a, b), move(c, f loor), . . . }.
Environment states could be represented by an S = {s1 , s2 , ..., sn }, where we
could have
s1 = {lef t(a, b), on(f loor, a), on(a, c), . . . } (1)
and (after a move(c, f loor)):
s2 = {lef t(a, b), on(f loor, a), on(f loor, c), . . . } (2)
One could also, for instance, encode general properties such as
x, y, z.lef t(x, y) lef t(y, z) lef t(x, z) (3)
etc, to remain constant in all environment states.
Agenthood
An agents behaviour will be characterised by the following function:
action : S A
Does having S as the domain of action make the function most naturally
suited to modelling episodic or sequential environments? Why?
Requirement captured: the current action may depend on the interaction
history (i.e. the sequence of environment states)
Actions consider an essentially sequential environment, since their arguments
are sequences. In our blocks world example, one could have action(hs1 , s2 i) =
move(a, b), assuming that the purpose of moving block c off block a was to be
able to place a on b. Note, however, that the formalism does not explicitly
represent purpose, planning, or any such notion.
Environment dynamics
Changes in the environments will be characterised by the following function:
env : S A (S)
6
Interaction history
The agent-environment interaction will be characterized as follows:
a a au1 a
u
h : s0 0 s1 1 ... su ...
Characteristic behaviour
Characteristic behaviour is defined as a set of interaction histories
where
each hi is a possible history for the agent in the environment
Invariant properties
We say that is an invariant property of an agent architecture iff
Behavioural equivalence
Equivalence of behaviours is defined as follows (in an abstract architecture)
When the condition above holds for all environments envi , then we simply
say that ag1 and ag2 have equivalent behaviour
7
Modelling reactive agents
Reactive architectures
production rules
a scheme for defining priorities in the application of rules (e.g. sub-
sumption (Brooks, 1986))
P ...
e A
r c
Wander
c
e t
p Explore i
t o
i Move forward
n
o
n Avoid Obstacles
action : S A
Example: a thermostat.
temperature(cold) do(heater(on))
temperature(cold) do(heater(of f ))
S = {{temperature(cold)}, {temperature(cold)}}
A = {heater(on), heater(of f )}
Proposition 1 (exercise):
8
Modelling Perception
Refining the agents decision function
see action
Agent
Perception Action
Environment
P = {p0 , p1 , ..., pn }
action : P A
see : S P
Properties of perception
If see(si ) = see(sj ), we say that si and sj are indistinguishable, even if
si 6= sj .
Define , an equivalence relation over S by saying s s0 iff see(s) =
see(s0 )
If | | = |S|, then we say that the agent is perceptually ominiscient
On the other hand, if | | = 1, then the agents perceptual ability is nil
In the following example, four environment states are (rightfully, assuming
that a butterfly doesnt cause changes in the weather) as two:
x = weather(cold)
y = moving wings(butterf ly)
S = {{x, y}, {x, y}, {x, y}, {x, y}}
see({x, y}) = see({x, y})
see({x, y}) = see({x, y})
The equivalence relation is then {{{x, y}, {x, y}, }{{x, y}, {x, y}}}
For perceptually omniscient agents, see(si ) = si , for all si S. In an agent
with no perceptual abaility, see(si ) = see(sj ) for all si , sj S.
9
Refining the interaction history
see Agent
action
next state
Perception Action
Environment
The next step: represent history (in the agent architecture) as environment
changes as perceived by the agent
where
I is the set of all internal states of an agent,
see : S P ,
action : I A, and
next : I P I
Proposition 2:
Exercise
Prove Proposition 2.
Further information
10
References
Brooks, R. A. (1986). A robust layered control system for a mobile robot. IEEE
Journal of Robotics and Automation, RA-2(1):1423.
11