Professional Documents
Culture Documents
Intelligent Agents
Intelligent Agents
Intelligent Agents
Outline
• Introduction to Agents and Environments
• Acting of Intelligent Agents (Rationality)
• (Task Environment) PEAS
• Structure of Intelligent Agents
• Environment types
• Agent Types:
– Simple reflex agent
– Model-based reflex agent
– Goal-based agent
– Utility-based agent
– Learning agent
Introduction: Agents
• An Agent is anything that can be viewed as
perceiving its environment through sensors
and acting upon that environment through
actuators.
– Human agent:
• eyes, ears, and other organs for sensors;
• hands, legs, mouth, and other body parts for actuators.
– Robotic agent:
• cameras and infrared range finders for sensors;
• various motors for actuators.
Agents and environments
• Percepts: location
and contents, e.g.,
[A,Dirty]
• Actions: Left, Right,
Suck, NoOp
Rational agents
• An agent should strive to "do the right thing",
based on what it can perceive and the actions it
can perform.
• The right action is the one that will cause the
agent to be most successful.
Rational agents….. (cont’d)
• Rational Agent: For each possible percept
sequence, a rational agent should select an
action that is expected to maximize its
performance measure,
• Performance measure: An objective criterion
for success of an agent's behavior
• E.g., performance measure of a vacuum-
cleaner agent could be amount of dirt cleaned
up, amount of time taken, amount of electricity
consumed, amount of noise generated, etc.
Rational agents ….. (cont’d)
• Rationality is distinct from omniscience (all-
knowing with infinite knowledge)
• Agents can perform actions in order to modify
future percepts so as to obtain useful
information (information gathering, exploration)
• An agent is autonomous if its behavior is
determined by its own Percepts and
experience (with ability to learn and adapt),
without depending solely on build-in
knowledge.
Task Environment
• Before we design an intelligent agent, we
must specify its “task environment”:
• PEAS is an acronym that summarises
the 4 components of any environment
that it is necessary to define:
– Performance measure,
– Environment,
– Actuators,
– Sensors
PEAS …. (cont’d)
• Performance measure: A measure of how good
the behaviour of agents operating in the
environment is.
• Environment: What things are considered to be a
part of the environment and what things are
excluded?
• Actuators: How can an agent perform actions in
the environment?
• Sensors: How can the agent perceive the
environment?
Goals
• An intelligent agent will generally exist for a reason
– to perform some task
• This is generally known as the goal
• Needn’t be a single action or outcome,
– Often used to measure how well the agent is performing
• Sometimes the goal is at the end of a long series of
actions, sometimes each action has a goal of its
own
• Goals can be outcomes to achieve or to avoid
(drive fast, don’t crash)
Performance Measure
• The agent needs to know if it has reached
the goal or not
• An agent needs to know how to work
towards a goal, but also to be told how
well it is doing
• The performance measure can either be
determined from the sensors, or given as
an external input
Environment
• An agent interacts with its environment
– It is situated in an environment.
• It collects data from the environment via
sensors
• It acts in/on its environment via actuators (the
output of something: movement, data, power,
etc.) towards some goal
• It might change its environment as it acts
• It might learn from its environment too
Sensors
• Typical sensors include
– Camera, light detector, IR sensor, etc. for light
– Microphone for sound
– Keyboard / mouse / buttons for typed input
– Touch sensors for impact
– Heat sensor / stress gauge / pressure
sensor / accelerometer for physical
measurements
– Many other sensors are possible.
Actuators
• Actions are controlled by actuators
• An actuator can be anything that causes
any kind of output
– Varying electrical current
– Pumping hydraulic fluid, moving gears
– Transmitting data, showing images / text
– Changing a temperature / flow rate / pressure
– Moving something!
PEAS …. (cont’d)
• Agent: taxi driver:
– Performance measure: Safe, fast, legal,
comfortable trip, maximize profits
– Environment: Roads, other traffic,
pedestrians, customers
– Actuators: Steering wheel, accelerator,
brake, signal indicator, horn
– Sensors: Cameras, sonar, speedometer,
GPS, odometer, engine sensors,
keyboard
PEAS …. (cont’d)
• Agent: Medical diagnosis system
• Performance measure: Healthy patient,
minimize costs, lawsuits
• Environment: Patient, hospital, staff
• Actuators: Screen display (questions,
tests, diagnoses, treatments, referrals)
• Sensors: Keyboard (entry of symptoms,
findings, patient's answers)
PEAS …. (cont’d)
• Agent: Part-picking robot
• Performance measure: Percentage of
parts in correct bins
• Environment: Conveyor belt with parts,
bins
• Actuators: Jointed arm and hand
• Sensors: Camera, joint angle sensors
Home Work
• Agent : Table Tennis player
Structure of Intelligent Agents
• Any agent consists of two parts: the agent
architecture and the agent program.
• The architecture is the hardware and the
program is the software.
• agent = architecture + program
• how can we best implement the agent program
on the available architecture?
– use a lookup-table. A lookup-table is simply a table
which contains every possible percept history as
inputs, and best actions as outputs.
Environment types
Fully observable, partially observable, unobservable
• Fully observable: An agent's sensors give it access to the
complete state of the environment at each point in time. A
task environment is effectively fully observable if the sensors
detect all aspects that are relevant to the choice of action
• E.g Chess – the board is fully observable, as are opponent’s
moves. Driving – what is around the next bend is not
observable (yet).
• An environment might be partially observable because of
noisy and inaccurate sensors or because parts of the state
are simply missing from the sensor data
• If the agent has no sensors at all then the environment is
unobservable.
Environment types ….. (cont’d)
• Deterministic, stochastic, Strategic
• Deterministic : The next state of the environment is
completely determined by the current state and the
action executed by the agent. Ex Crossword puzzle
• If there are apparently “random” events that can
make the next state unpredictable, lack of a good
environment model, or lack of complete sensor
coverage, the environment is stochastic.
• If the environment is deterministic except for the
actions of other agents, then the environment is
Strategic
Environment types ….. (cont’d)
• Episodic, sequential
• Episodic: The agent's experience is divided into
atomic "episodes" (each episode consists of the
agent perceiving and then performing a single
action), and the choice of action in each episode
depends only on the episode itself.
• the next episode does not depend on the actions
taken in previous episodes. Ex part picking robot
• Otherwise it is sequential.
Environment types ….. (cont’d)
•
Utility-based agents
• Goals alone are not really enough to generate
high-quality behavior.
• For example, there are many action sequences
that will get the taxi to its destination, thereby
achieving the goal, but some are quicker, safer,
more reliable, or cheaper than others.
• Utility based agents deal with this by assigning
utility to each state of the world. This utility
defines how “happy” the agent will be in such a
state.
Cot..
• These agents are similar to the goal-based agent but
provide an extra component of utility measurement
which makes them different by providing a measure of
success at a given state.
• Utility-based agent act based not only goals but also
the best way to achieve the goal.
• The Utility-based agent is useful when there are
multiple possible alternatives, and an agent has to
choose in order to perform the best action.
• The utility function maps each state to a real number to
check how efficiently each action achieves the goals.
Utility-based agents
Learning agents
• A learning agent in AI is the type of agent which can learn from
its past experiences, or it has learning capabilities.
• It starts to act with basic knowledge and then able to act and
adapt automatically through learning.
• A learning agent has mainly four conceptual components, which
are:
– Learning element: It is responsible for making improvements by learning
from environment
– Critic: Learning element takes feedback from critic which describes that
how well the agent is doing with respect to a fixed performance standard.
– Performance element: It is responsible for selecting external action
– Problem generator: This component is responsible for suggesting
actions that will lead to new and informative experiences.
• Hence, learning agents are able to learn, analyze performance,
and look for new ways to improve the performance.
Cot….