0% found this document useful (0 votes)
15 views

Lecture 2

Yes No No No
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views

Lecture 2

Yes No No No
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 48

Intelligent Agents

Outline
 Knowledge
 Agents and environments
 Rationality
 PEAS (Performance measure, Environment,
Actuators, Sensors)
 Environment types
 Agent types
Knowledge
• Can be defined as the body of facts & principles
accumulated by humankind or the act, fact, or
state of knowing.
• True, but incomplete, much more than this
• It is having a familiarity with language,
concepts, procedures, rules, ideas, abstractions,
places, customs, facts, & associations, coupled
with an ability to use these notions effectively
in modeling different aspects of the world.
Knowledge
• The meaning of knowledge is closely related to
the meaning of intelligence.
• Intelligence requires the possession of an access
to knowledge
• And a characteristic of intelligent people is that
they posses much knowledge
• Knowledge is likely stored as complex structures
of interconnected neurons.
Knowledge

• Human brain
• Computer
• 3.3 lbs
• 100 gms
• 1012 neurons • magnetic spots & voltage states
• 1014 bits storage • 1012 bits doubling
•The gap between human & computer storage
capacities is narrowing rapidly
•Still wide gape between representation schemes &
efficiencies
Knowledge
• Declarative vs. procedural
• Procedural: compiled knowledge related to the
performance of some tasks
• The steps used to solve an algebraic equation
• Declarative: passive knowledge expressed as
statements of facts about the world.
• Personal data is a database
Heuristic Knowledge
• special type of knowledge used by humans to solve complex
problems.
• The knowledge used to make good judgments, or strategies, tricks, or
‘rules of thumb’ used to simply the solution of problems.
• Heuristic s are usually acquired with much experience
 Fault in a TV set
 an experienced technician will not start by making numerous voltage
checks when it is clear that the sound is present but the picture is not
 The high voltage flyback transformer or related component is the
culprit
• May not always be correct
• But frequently/quickly can find a solution
Knowledge and Data
• Knowledge should not confused with data
• Physician treating a patient use both Knowledge & Data
• Data: record: history, measurement of vital sign, drugs
given, response to drugs,……
• Knowledge: what Physician learned from medical school,
internship, residency, specialization, practice.
• Knowledge includes & requires the use of data &
information
• It combines relationship, correlations, dependencies, &
notion of gestalt with data & information
Belief, Hypothesis, & Knowledge
Belief: define as essentially any meaningful &
coherent expression that can be represented
• It may be true or false
Hypothesis: define as a justified belief that is
not known to be true
• Thus a hypothesis is a belief which is backed up
with some supporting evidence, but it may still
be false
Knowledge: define as true justified belief
Intelligent Agent?
• Rational agent
• Examine: agents, environments & coupling
between them
• How well an agent can behave depends on the
nature of environment; some environments are
more difficult than others.
• Need categorization of environments & show
how properties of an environment influence the
design of suitable agents for that environment.
Agents and Environments
• An agent is anything that can be viewed as perceiving its
environment through sensors & acting upon that environment
through actuators

• Human agent: eyes, ears, & other organs for sensors;


• hands, legs, mouth, & other body parts for actuators

• Robotic agent: cameras & infrared range finders for sensors;


• various motors for actuators
• Software agent: keystrokes, file contents & network packets
• Acts on the environment by displaying on the screen, writing
files, & sending network packet
Percept/Percept Sequence
• Percept: agent’s perceptual inputs at any
given instant.
• Percept sequence: complete history of
everything the agent has ever perceived.
• An agent’s choice of action at any given
instant can depend on the entire percept
sequence observed to date
Agent Function
• Agent’s behavior is described by the agent
function that maps any given percept
sequence to an action
• Tabulating agent function—very large: infinite
[abstract: external properties]
• The agent function for an artificial agent will
be implemented by an agent program
(concrete)
Agents and environments

• The agent function maps from percept histories to


• f: P*  A
• The agent program runs on the physical
architecture to produce f
• agent = architecture + program
Vacuum-cleaner world

• Percepts: location &


contents, e.g., [A;Dirty]
• Actions: Left, Right, Suck,
NoOp

Agent function: if the current square is


dirty, then suck, otherwise move to
the other square
A vacuum-cleaner agent

 What is the right function?


 Can it be implemented in a small agent program?
Rationality
• An agent should strive to "do the right thing",
based on what it can perceive & the actions it can
perform.
• The right action is the one that will cause the agent
to be most successful
• 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 & whatever built-in knowledge
the agent has.
Rationality
• Fixed performance measure evaluates the environment sequence
- one point per square cleaned up in time T?
- one point per clean square per time step, minus one per move?
- penalize for > k dirty squares?

• A rational agent chooses whichever action maximizes the expected


value of the performance measure given the percept sequence to
date
Rational  omniscient
- percepts may not supply all relevant information
Rational  clairvoyant
- action outcomes may not be as expected
• Hence, rational  successful
• Rational  exploration, learning, autonomy
PEAS
• PEAS: Performance measure, Environment, Actuators, Sensors
• To design a rational agent, we must specify the task
environment
• Consider, e.g., the task of designing an automated taxi:
• Performance measure?? safety, destination, profits, legality,
comfort, …….
• Environment?? US streets/freeways, traffic, pedestrians,
weather, …….
• Actuators?? steering, accelerator, brake, horn, speaker/display,
….
• Sensors?? video, accelerometers, gauges, engine sensors,
keyboard, GPS, ……
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
Internet shopping agent
• Performance measure?? price, quality,
appropriateness, efficiency
• Environment?? current and future WWW sites,
vendors, shippers
• Actuators?? display to user, follow URL, fill in
form
• Sensors?? HTML pages (text, graphics, scripts)
Environment types
• Fully observable (vs. partially observable):
An agent's sensors give it access to the
complete state of the environment at each
point in time.
• An environment might be partially
observable because f noisy & inaccurate
sensors or because parts of the state are
simply missing from the sensor data.
• Deterministic (vs. stochastic): The next
state of the environment is completely
determined by the current state and the
action executed by the agent.
• (If the environment is deterministic except
for the actions of other agents, then the
environment is strategic)
• Episodic (vs. sequential): 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.
• In sequential, the current decision could
affect all future decisions.
Environment types
• Static (vs. dynamic): The environment is
unchanged while an agent is deliberating. (The
environment is semi-dynamic if the environment
itself does not change with the passage of time
but the agent's performance score does)

• Discrete (vs. continuous): A limited number of


distinct, clearly defined percepts and actions.

• Single agent (vs. multiagent): An agent operating


by itself in an environment.
Environment types
Solitaire Backgammon Internet Taxi
shopping

Observable?? Yes Yes No No


Deterministic?? Yes No Partly No
Episodic?? No No No No
Static?? Yes Semi Semi No
Discrete?? Yes Yes Yes No
Single-agent?? Yes No Yes(except No
auctions)

The environment type largely determines the agent design

The real world is (of course) partially observable, stochastic,


sequential, dynamic, continuous, multi-agent
Agent types
• Four basic types in order of increasing
generality:
simple reflex agents
Model-based reflex agents
goal-based agents
 utility-based agents
All these can be turned into learning agents
Simple reflex agents
• These agents select actions on the basis of the
current percept, ignoring the rest of the
percept history.
• vacuum agent: simple reflex agent, because
its decision is based only on the current
location & on whether that location contains
dirt.
• condition–action rule
Simple reflex agents
Simple reflex agents
• Simple, but they turn out to be of limited
intelligence.
• The agent will work only if the correct decision
can be made on the basis of only the current
percept—that is, only if the environment is
fully observable.
Example
Model-based reflex agents
• The most effective way to handle partial
observability is for the agent to keep track of
the part of the world it can’t see now.
• That is, the agent should maintain some sort
of internal state that depends on the percept
history & thereby reflects at least some of the
unobserved aspects of the current state.
Model-based reflex agents
• Updating this internal state information as time goes by
requires two kinds of knowledge to be encoded in the
agent program.
• First, need some information about how the world
evolves independently of the
• Second, need some information about how the agent’s
own actions affect the
• This knowledge about “how the world works”—is called a
model of the world.
• An agent that uses such a model is called a model-based
agent.
Model-based reflex agents
Model-based reflex agents
Fig. gives the structure of the model-based reflex agent with
internal state, showing how the current percept is combined
with the old internal state to generate the updated description
of the current state, based on the agent’s model of how the
world works.
Model-based reflex agents
• The function Update-state is responsible for
creating the new internal state description.
• As well as interpreting the new percept in the
light of existing knowledge about the state, it
uses information about
-how the world evolves to keep track of the
unseen parts of the world,
-also must know about the agent’s actions do to
the sate of the world.
Goal-based agents
• Knowing something about the current state of
the environment is not always enough to
decide what to do.
• For example, at a road junction, the taxi can
turn left, turn right, or go straight on.
• The correct decision depends on where the
taxi is trying to get to.
Goal-based agents
• In other words, as well as a current state
description, the agent needs some sort of goal
information that describes situations that are
desirable—for example, being at the
passenger’s destination.
• The agent program can combine this with the
model (the same information as was used in
the model based reflex agent) to choose
actions that achieve the goal.
Goal-based agents
Goal-based agents
• Sometimes goal-based action selection is
straight forward, when goal satisfaction results
immediately from a single action.
• Sometimes it will be more tricky, when the
agent has to consider long sequences of twists &
turns in order to find a way to achieve the goal.
• Search & planning are the subfields of AI
devoted to finding action sequences that
achieve the agent’s goals.
Goal-based agents
• Although the goal-based agent appears less efficient, it is more flexible
because the knowledge that supports its decisions is represented
explicitly and can be modified.
• If it starts to rain, the agent can update its knowledge of how
effectively its brakes will operate; this will automatically cause all of
the relevant behaviors to be altered to suit the new conditions.
• For the reflex agent, on the other hand, we would have to rewrite
many condition–action rules.
• The goal-based agent’s behavior can easily be changed to go to a
different destination, simply by specifying that destination as the goal.
• The reflex agent’s rules for when to turn & when to go straight will
work only for a single destination; they must all be replaced to go
somewhere new.
Utility-based agents
• Goals alone are not enough to generate high-quality behavior
in most environments.
• For example, many action sequences will get the taxi to its
destination (thereby achieving the goal) but some are quicker,
safer, more reliable, or cheaper than others.
• Goals just provide a crude binary distinction between “happy”
and “unhappy” states.
• A more general performance measure should allow a
comparison of different world states according to exactly how
happy they would make the agent.
• Because “happy” does not sound very scientific, economists
and computer scientists use the term utility instead.
Utility-based agents
• A utility function maps a state onto a real number,
which describes the associated degree of
happiness.
• An agent’s utility function is essentially an
internalization of the performance measure.
• If the internal utility function and the external
performance measure are in agreement, then an
agent that chooses actions to maximize its utility
will be rational according to the external
performance measure.
Utility-based agents
Learning agents
Summary
• Agents interact with environments through actuators and sensors
• The agent function describes what the agent does in all
circumstances
• The performance measure evaluates the environment sequence
• A perfectly rational agent maximizes expected performance
• Agent programs implement (some) agent functions
• PEAS descriptions define task environments

• Environments are categorized along several dimensions:


observable? deterministic? episodic? static? discrete?
single-agent?

• Several basic agent architectures exist:


reflex, reflex with state, goal-based, utility-based

You might also like