Artificial Intelligence
Mr. MMM. Mufassirin
Dept. of Mathematical Sciences
South Eastern University of Sri Lanka
Lecture - 02
Intelligent Agents
Intelligent Agents
Outline
• Agents and environments
• Rationality
• Intelligence Agent
• PEAS (Performance measure, Environment,
Actuators, Sensors)
• Environment types
• Agent types
Agents
• An agent is anything that can be viewed as perceiving
its environment through sensors and acting upon
that environment through actuators
– Operates in an environment
– Perceive its environment through sensors
– Acts upon its environment through actuators/ effectors
– Has Goals
Agents and environments
• The agent function maps from percept histories to
actions:
[f: P*  A]
• The agent program runs on the physical architecture
to produce f
• agent = architecture + program
Sensor and Effectors
• An agent perceives its environment through sensors
The complete set of inputs at a given time is called a
percept
The current percept or Sequence of percepts can influence
the action of an agent
• It can change the environment through actuators/
effectors
 An operation involving an actuator is called an action
 Action can be grouped into action sequences
Examples of Agents
Humans Programs Robots___
senses keyboard, mouse, dataset cameras, pads
body parts monitor, speakers, files motors, limbs
Ex:
 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, wheels, and speakers for actuators
 A software agent: function (Input) as sensors
— function as actuators (output-Screening)
Examples of Agents (cont..)
Vacuum-Cleaner World
• Percepts: location and contents, e.g., [A,Dirty]
• Actions: Left, Right, Suck, NoOp
A vacuum-cleaner agent
• input{tables/vacuum-agent-function-table}
Rationality
What is rational at any given time depends on
four things:
– The performance measure that defines the
criterion of success.
– The agent's prior knowledge of the environment.
– The actions that the agent can perform.
– The agent's percept sequence to date.
Rational agents
• A rational agent is one that does the right thing.
• 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.
• An agent's percept sequence is the complete history of
everything the agent has ever perceived
Rational agents (cont..)
• 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)
Autonomy in Agents
The autonomy of an agent is the extent to which
its behaviour is determined by its own experience
(with ability to learn and adapt)
• Extremes
– No autonomy – ignores environment/data
– Complete autonomy – must act randomly/no program
• Example: baby learning to crawl
• Ideal: design agents to have some autonomy
– Possibly good to become more autonomous in time
Intelligence Agent
• Must sense
• Must act
• Must autonomous (to some extend)
• Must rational
PEAS
• PEAS: Performance measure, Environment,
Actuators, Sensors
• Must first specify the setting for intelligent agent
design
• Consider, e.g., the task of designing an automated
taxi driver:
– Performance measure
– Environment
– Actuators
– Sensors
PEAS
• The task of designing an automated taxi driver:
– Performance measure: Safe, fast, legal, comfortable
trip, maximize profits
– Environment: Roads, other traffic, pedestrians,
customers
– Actuators: Steering wheel, accelerator, brake,
signal, horn
– Sensors: Cameras, sonar, speedometer, GPS,
odometer, engine sensors, keyboard
PEAS
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
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
PEAS
Agent: Interactive English tutor
• Performance measure: Maximize student's
score on test
• Environment: Set of students
• Actuators: Screen display (exercises,
suggestions, corrections)
• Sensors: Keyboard
Types of the Environment
23
Environments –
Accessible vs. inaccessible
• An accessible environment is one in which the agent can
obtain complete, accurate, up-to-date information about
the environment’s state
• Most moderately complex environments (for example,
the everyday physical world and the Internet) are
inaccessible
• The more accessible an environment is, the simpler it is
to build agents to operate in it
24
Environments –
Deterministic vs. non-deterministic
• A deterministic environment is one in which the next
state of the environment is completely determined by
the current state and the action executed by the agent.
• The physical world can to all intents and purposes be
regarded as non-deterministic
• Non-deterministic environments present greater
problems for the agent designer
25
Environments –
Episodic vs. non-episodic
• In an episodic environment, the performance of an
agent is dependent on a number of discrete episodes,
with no link between the performance of an agent in
different scenarios
• Episodic environments are simpler from the agent
developer’s perspective because the agent can decide
what action to perform based only on the current
episode — it need not reason about the interactions
between this and future episodes
26
Environments –
Static vs. dynamic
• A static environment is unchanged while an agent is
reflecting.
• A dynamic environment is one that has other
processes operating on it, and which hence changes in
ways beyond the agent’s control
• Other processes can interfere with the agent’s actions
(as in concurrent systems theory)
• The physical world is a highly dynamic environment
27
Environments –
Discrete vs. continuous
• An environment is discrete if there are a fixed, finite
number of actions and percepts in it
– Ex: chess game
• Continuous environments have a certain level of
mismatch with computer systems
– Ex: taxi driving
• Discrete environments could in principle be handled
by a kind of “lookup table”
Discussion
?
Review Question
• Define in your own words the following terms:
– agent, agent function, agent program, rationality, autonomy,
• For each of the following agents, develop a PEAS
description of the task environment
– Part-picking robot, Taxi Driver
• Describe the following types of the environment
– Static vs. Dynamic
– Deterministic vs. non-deterministic
• List 4 most complex environments in which constructing
agent is very difficult.
• What is Omniscience?

Intelligence Agent - Artificial Intelligent (AI)

  • 1.
    Artificial Intelligence Mr. MMM.Mufassirin Dept. of Mathematical Sciences South Eastern University of Sri Lanka Lecture - 02 Intelligent Agents
  • 2.
  • 3.
    Outline • Agents andenvironments • Rationality • Intelligence Agent • PEAS (Performance measure, Environment, Actuators, Sensors) • Environment types • Agent types
  • 4.
    Agents • An agentis anything that can be viewed as perceiving its environment through sensors and acting upon that environment through actuators – Operates in an environment – Perceive its environment through sensors – Acts upon its environment through actuators/ effectors – Has Goals
  • 5.
    Agents and environments •The agent function maps from percept histories to actions: [f: P*  A] • The agent program runs on the physical architecture to produce f • agent = architecture + program
  • 6.
    Sensor and Effectors •An agent perceives its environment through sensors The complete set of inputs at a given time is called a percept The current percept or Sequence of percepts can influence the action of an agent • It can change the environment through actuators/ effectors  An operation involving an actuator is called an action  Action can be grouped into action sequences
  • 7.
    Examples of Agents HumansPrograms Robots___ senses keyboard, mouse, dataset cameras, pads body parts monitor, speakers, files motors, limbs
  • 8.
    Ex:  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, wheels, and speakers for actuators  A software agent: function (Input) as sensors — function as actuators (output-Screening) Examples of Agents (cont..)
  • 9.
    Vacuum-Cleaner World • Percepts:location and contents, e.g., [A,Dirty] • Actions: Left, Right, Suck, NoOp
  • 10.
    A vacuum-cleaner agent •input{tables/vacuum-agent-function-table}
  • 12.
    Rationality What is rationalat any given time depends on four things: – The performance measure that defines the criterion of success. – The agent's prior knowledge of the environment. – The actions that the agent can perform. – The agent's percept sequence to date.
  • 13.
    Rational agents • Arational agent is one that does the right thing. • 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. • An agent's percept sequence is the complete history of everything the agent has ever perceived
  • 14.
    Rational agents (cont..) •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)
  • 15.
    Autonomy in Agents Theautonomy of an agent is the extent to which its behaviour is determined by its own experience (with ability to learn and adapt) • Extremes – No autonomy – ignores environment/data – Complete autonomy – must act randomly/no program • Example: baby learning to crawl • Ideal: design agents to have some autonomy – Possibly good to become more autonomous in time
  • 16.
    Intelligence Agent • Mustsense • Must act • Must autonomous (to some extend) • Must rational
  • 17.
    PEAS • PEAS: Performancemeasure, Environment, Actuators, Sensors • Must first specify the setting for intelligent agent design • Consider, e.g., the task of designing an automated taxi driver: – Performance measure – Environment – Actuators – Sensors
  • 18.
    PEAS • The taskof designing an automated taxi driver: – Performance measure: Safe, fast, legal, comfortable trip, maximize profits – Environment: Roads, other traffic, pedestrians, customers – Actuators: Steering wheel, accelerator, brake, signal, horn – Sensors: Cameras, sonar, speedometer, GPS, odometer, engine sensors, keyboard
  • 19.
    PEAS Agent: Medical diagnosissystem • 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)
  • 20.
    PEAS 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
  • 21.
    PEAS Agent: Interactive Englishtutor • Performance measure: Maximize student's score on test • Environment: Set of students • Actuators: Screen display (exercises, suggestions, corrections) • Sensors: Keyboard
  • 22.
    Types of theEnvironment
  • 23.
    23 Environments – Accessible vs.inaccessible • An accessible environment is one in which the agent can obtain complete, accurate, up-to-date information about the environment’s state • Most moderately complex environments (for example, the everyday physical world and the Internet) are inaccessible • The more accessible an environment is, the simpler it is to build agents to operate in it
  • 24.
    24 Environments – Deterministic vs.non-deterministic • A deterministic environment is one in which the next state of the environment is completely determined by the current state and the action executed by the agent. • The physical world can to all intents and purposes be regarded as non-deterministic • Non-deterministic environments present greater problems for the agent designer
  • 25.
    25 Environments – Episodic vs.non-episodic • In an episodic environment, the performance of an agent is dependent on a number of discrete episodes, with no link between the performance of an agent in different scenarios • Episodic environments are simpler from the agent developer’s perspective because the agent can decide what action to perform based only on the current episode — it need not reason about the interactions between this and future episodes
  • 26.
    26 Environments – Static vs.dynamic • A static environment is unchanged while an agent is reflecting. • A dynamic environment is one that has other processes operating on it, and which hence changes in ways beyond the agent’s control • Other processes can interfere with the agent’s actions (as in concurrent systems theory) • The physical world is a highly dynamic environment
  • 27.
    27 Environments – Discrete vs.continuous • An environment is discrete if there are a fixed, finite number of actions and percepts in it – Ex: chess game • Continuous environments have a certain level of mismatch with computer systems – Ex: taxi driving • Discrete environments could in principle be handled by a kind of “lookup table”
  • 28.
  • 29.
    Review Question • Definein your own words the following terms: – agent, agent function, agent program, rationality, autonomy, • For each of the following agents, develop a PEAS description of the task environment – Part-picking robot, Taxi Driver • Describe the following types of the environment – Static vs. Dynamic – Deterministic vs. non-deterministic • List 4 most complex environments in which constructing agent is very difficult. • What is Omniscience?