Professional Documents
Culture Documents
Reference book :
Artificial Intelligent a Modern
Approach
Lecture by
Zaib un nisa
Agent
Environment
?
Actions
Actuators
Various Agents
Human Agent Robotic Agent Software Agent
Intelligent or stupid?
Good Behavior: The Concept
Of Rationality
Rational Agent
That does the right thing
Every entry in the table is filled correctly
What does it mean to do right thing?
That cause the agent to be most successful
Episodic vs Sequential
Static vs Dynamic
Discrete vs Continuous
Single-agent vs Multiagent
Fully vs Partially Observable
Ifthe agent’s sensors give access to
complete state of environment at each point
on time, then we say task environment is fully
observable
Fully observable environments are
convenient because agent need not to
maintain any internal state to keep track of
world
An environment may be partially observable
because of noisy and inaccurate sensors
Deterministic (certainly)
vs
Stochastic ( determined by random
distribution of probabilities/ not certain)
Modal-Based Agents
Goal-Based Agents
Utility-Based Agents
Simple-Reflex Agents
Simplest kind of agent is the “Simple Reflex Agent”
These agents selects actions on the basis of
current percepts, ignoring rest of percept history
Vacuum agent whose agent function is tabulated is
a simple reflex agent
Because its decision is based only on the current
location and whether that contains dirt.
Tabulation of Agent function
Percept Sequence Action
{A, Clean} Right
{A, Dirty} Suck
{B, Clean} Left
{A, Dirty} Suck
{A, Clean}, {A, Clean} Right
{A, Clean}, {A, Dirty} Suck
. .
. .
{A, Clean}, {A, Clean}, {A, Clean} Right
{A, Clean}, {A, Clean}, {A, Dirty} Suck
. .
. .
Simple Reflex Agent’s
Program
function REFLEX-VACUUM-AGENT (|location,
status|) returns an action
if status = Dirty then return Suck
else if location = A then return Right
else if location = B then return Left
Simple Reflex Agent
Vacuumagent program is very small as
compared to the corresponding table
The most obvious reduction comes from ignoring
percept history, which cuts down number of
possibilities from 4T to just 4
Reflex Agent: Condition-Action
Rule
Ifcar-in-front-is-braking then initiate-braking.
Humans also have many such conditions,
some of which are learned responses (as for
driving )
Some are innate reflexes (such as blinking
when something approaches the eye)
Simple Reflex Agent
The program given in previous slides was
specific to only vacuum environment
A more general and flexible approach is to
build a general-purpose interpreter for
condition-action rules
Then to create rule sets for specific task
environments.
Schematic Diagram of Simple
Reflex Agent
Current internal state
Of the agent’s decisions process
Agent
Sensors
Environment
What the world
Is like now
Background
Information
Used
In the process
What actions
Condition Action Rules I should do now
Actuators
Simple Reflex Agent
Previousdiagram gives the structure of
general program in schematic form
Showing how condition action rules can be
applied to make connection from percept to action
Simple Reflex Agent:
Condition action rule
function SIMPLE-REFLEX-AGENT (percept) returns an action
static: rules, a set of condition-action rules
state INTERPRET-INPUT (percept)
rule RULE-MATCH (state, rules)
action RULE-ACTION [rule]
return action
INTERPRET-INPUT function generates an abstracted
description of the current state from percept
RULE-MATCH returns first rule in set of rules that match the
given state description
Description in terms of rule and match is conceptual, actual
implementation will be in from of Boolean logic gates
Simple Reflex Agent
Reflex agents are very simple, so their
intelligence capability is very limited
The are used in fully observable environment
Sensors
State
Environment
How the world evolves What the world
Is like now
What my actions do
What actions
Condition Action Rules I should do now
Agent Actuators
Modal Based Agent
Previous diagram shows how the current
percept is combined with the old internal
state to generate the update description of
the current state
Modal Based Agent’s Program
function REFLEX-AGENT-WITH-SATE (percept)
returns an action
static: sate, a description of current world state
rules, a set of condition-action rules
action, the most recent action, initially none
Sensors
State
What the world
Environment
How the world evolves Is like now
What actions
Condition Action Rules I should do now
Agent Actuators
Goal-Based Agent
Decision making of this kind is fundamentally
different from condition-action-rules
It involves consideration of future
What will happen if I do such and such?
Will that make me happy?
InReflex agents this information is not explicitly
represented
Reflex agents have built-in rules that maps directly from
percepts to actions
Goal-Based Agent
Example
Reflex agent brakes when it sees the car in front has it brake
lights on
Goal-based agent when sees the car in front has brake lights on,
it have a goal not to hit the car ---- it will achieve this goal by
slowing down the car
These are less efficient , but more flexible
Flexible coz knowledge that supports its decisions is represented
explicitly and can be modified
If it starts raining, the agent update its knowledge of applying
brakes --- it will cause all the relevant behavior to change to suit
the new conditions
For Reflex Agent we have to re-write many condition action rules
Utility-Based Agent
Goals alone not enough to generate high-quality
behavior in most of the environments
Goals provide crude (primary) binary distinction
between “happy” and “unhappy” states
Where as a more general performance measure
should allow a comparison to different world of
states
How happy they would be if they achieve the goal
For example, there are many action sequences that
will get the taxi to its destination
But some are quicker, more safe, more reliable or cheaper
than others
Utility-Based Agent
The term “happy” is not customary, so replaces by
“Utility”
If one world state is preferred to the other then it has
higher Utility for the agent
Utility function maps a state (or sequence of states)
to a real number, which describes associated
degree of happiness
Utility function allows rational decisions in two kinds
of cases where goals are inadequate (not complete, not enough)
First, when there are conflicting goals and some of them
can be achieved ( e.g speed and safety)
Second, when there are several goals that agent can aim
for, none of them can be achieved with certainty
Learning Agents
How agent’s program come into being
Turning purposes a method : i.e. to build learning
machines and then to teach them
This is a preferred method for creating “state-of-the-
art” systems
Learning allows the agent to operate in initially
unknown environments
And to become more competent than its initial knowledge
Performance Standard
Critic Sensors
Environment
Feed back
Changes
Learning Performance
Element Element
Knowledge
Learning
Goals
Problem
Generator
Actuators
Agent
Learning Agent : Conceptual
Components
Learning agent can divided into four
conceptual components
Learning Element
Performance Element
Critic
Problem Generator
Learning Element