Sie sind auf Seite 1von 20

CSIS0270/COMP3270

2. Intelligent Agents

CSIS0270/COMP3270 2. Intelligent Agents 1


Outline

Agents and Environments


Rationality
PEAS (Performance measure, Environment, Actuators,
Sensors)
Environment Types
Agent Types

CSIS0270/COMP3270 2. Intelligent Agents 2


Agents and Environment

Agent – Anything that can be viewed as perceiving its


environment through sensors and acting upon that
environment through actuators.
Agent Sensors
Percepts

Environment
?

Actions
Actuators

Percept – Agent’s perceptual inputs at any given instant.


Percept Sequence – complete history of everything the
agent has ever perceived.
Agent function – maps any given percept sequence to
action, description of agent’s behaviour.
Agent program – implementation of agent’s function.
CSIS0270/COMP3270 2. Intelligent Agents 3
Simple Agent – An Example

Vacuum cleaner world – with only two location A and B.


perceive which square it is in, and whether it is dirty or not.

Percept : Location and Content, e.g. [A, Clean]


Actions: Left, Right, Suck, NoOp.

CSIS0270/COMP3270 2. Intelligent Agents 4


A vacuum-cleaner agent

Agent function:

CSIS0270/COMP3270 2. Intelligent Agents 5


Rationality
Rational Agent: one that does the right thing.
Rational Agent: For each possible percept sequence, a
rational agent should select an action that is expected to
maximize its performance measure, given the evidence
provided by the percept sequence and whatever built-in
knowledge the agent has.
Performance measure: criterion for success of an agent’s
behaviour, e.g. Vacuum cleaner example – the amount of
dirt cleaned up.
A rational agent should do:
Exploration – information gathering in a unknown
environment.
Learning – when agent gains experience, should be able to
modify its action accordingly.
Autonomy – agent not only relies on prior knowledge, but
also its own percept.
CSIS0270/COMP3270 2. Intelligent Agents 6
Task Environment – PEAS

To design a rational agent, we must specify the task


environment.
Task environment described by PEAS
Performance Measure
Environment
Actuators
Sensors
Example: Automated Taxi

CSIS0270/COMP3270 2. Intelligent Agents 7


PEAS description for other agents

CSIS0270/COMP3270 2. Intelligent Agents 8


Properties of Task Environment I

Observable – when sensors give it access to the complete


state of the environment at each point in time.
Not fully observable – e.g. poker game (you cannot see
the cards of your opponents).
Single vs MultiAgents – Is Taxi an agent? Competitive
multiagent (chess) vs Cooperative multiagent (taxi).
Deterministic vs Stochastic – deterministic: the next state
is fully determined by the current state and the agent’s
action. Uncertain: if environment not fully observable or
deterministic. Stochastic: Random. If the environment is
deterministic except for the action of other agents,
environment is strategic

CSIS0270/COMP3270 2. Intelligent Agents 9


Properties of Task Environment II

Episodic vs Sequential – Episodic: the agent’s experience


is divided into atomic episodes, each consists of agent
perceiving and then performing an action. Classification is
a episodic, depending on the current observation only.
Sequential: current decision could affect all future
decisions, e.g. chess.
Static vs Dynamic – Dynamic: Environment changes while
an agent is deliberating. Agent need not keep looking at
the world for static environment, e.g. crossword puzzle.
Taxi driving is dynamic. If environment does not change
with time, but agent’s performance score does,
semidynamic, e.g. chess playing with a clock.
Discrete vs Continuous – e.g. Chess has a discrete set of
percepts and actions. Taxi driving is continuous.

CSIS0270/COMP3270 2. Intelligent Agents 10


Properties of Task Environment III

Known vs Unknown – agent’s state of knowledge about the


“laws of physics” of the environment. Known environment:
outcomes (or outcome probabilities) of all actions are
given. Unknown environment: have to learn how the
environment reacts.

CSIS0270/COMP3270 2. Intelligent Agents 11


Example of Task Environment

The hardest case: partially observable, stochastic, sequential,


dynamic, continuous and multiagent.

CSIS0270/COMP3270 2. Intelligent Agents 12


Structure of Agents

There are 4 basic kinds of agents (of increasing generality):


Simple Reflex Agents
Model-based Reflex Agents
Goal-based Agents
Utility-based Agents
These agents can be converted into Learning Agents.

CSIS0270/COMP3270 2. Intelligent Agents 13


Simple Reflex Agent

Agent Sensors

What the world


is like now

Environment
Condition-action rules What action I
should do now

Actuators

CSIS0270/COMP3270 2. Intelligent Agents 14


Model-based Reflex Agent
handle partial observability – keep track of the part of the
world it can’t see now.
maintain some sort of internal state that depends on the
percept history.
Model of the world – e.g. predict position of other cars
when changing lane.

Sensors
State
How the world evolves What the world
is like now

Environment
What my actions do

Condition-action rules What action I


should do now

Agent Actuators

CSIS0270/COMP3270 2. Intelligent Agents 15


Goal-based Agent
action depends on final goal, e.g. destination of the taxi
may need complex search and planning to achieve the goal
goal-based agent is less efficient but more flexible, as
knowledge that support the decision is represented
explicitly and can be modified.
e.g. can update the effectiveness of brake if it starts to rain.

Sensors

State
What the world
How the world evolves is like now

Environment
What it will be like
What my actions do if I do action A

What action I
Goals should do now

Agent Actuators

CSIS0270/COMP3270 2. Intelligent Agents 16


Utility-based Agent

Goal may not be enough, some kind of utility may be


needed.
For example, the cost to the destination, rather than just
arriving.
A utility function maps a state (or a sequence of states) to
a numerical value.
Useful when:
Conflicting goals – e.g. speed vs safety, use some kind of
utility function for trade off.
May have multiple goals but with uncertainty. Utility provide
a likelihood of success.
Rational Agent – possess an explicit utility function so that
it can make rational decision, an agent that has highest
performance in terms of the utility function.

CSIS0270/COMP3270 2. Intelligent Agents 17


Utility-based Agent

Sensors
State
What the world
How the world evolves is like now

Environment
What it will be like
What my actions do if I do action A

Utility How happy I will be


in such a state

What action I
should do now

Agent Actuators

CSIS0270/COMP3270 2. Intelligent Agents 18


Learning Agent

Learning element – responsible for making improvement


Performance element – selecting external actions.
Previously this is the entire agent (without learning), taking
percepts and decide on actions.
Critics – feedback on how the agent is doing, and
determines how the performance element should be
modified to do better in the future.
The percept provide no indication on the success of the
agent.
Problem Generator – suggesting actions that will lead to
new and informative experiences, e.g. introducing new
ways (which may be sup-optimal in the short run, but may
produce good result eventually) e.g. Mutation in Evolution.

CSIS0270/COMP3270 2. Intelligent Agents 19


Learning Agent

Performance standard

Critic Sensors

feedback

Environment
changes
Learning Performance
element element
knowledge
learning
goals

Problem
generator

Actuators
Agent

CSIS0270/COMP3270 2. Intelligent Agents 20