Chapter 2
Chapter 2
Chapter-2
Outline
• Agents and environments
• Rationality
• 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.
• An environment in artificial intelligence is the surrounding of the
agent. The agent takes input from the environment through
sensors and delivers the output to the 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
• Software agent ( SoftBot : software robot ) :-
receives keystrokes, file contents, network packets etc as
sensory input.
A Network Packet is the fundamental unit of information
transmitted over a network or over a digital communication link
acts on the environment by displaying on the screen, writing
files, sending message packets.
Agent perception and action
• Percept :- refers to an agents perceptual input at any given instant.
• Example of perceptual input:-information, objects, events, people
• Percept sequence :- refers to the complete history of what an agent has
perceived so far.
• Action:- an agent’s choice of action at any given instant can depend on the
entire percept sequence observed till that time.
• Agent function:- an agent’s behavior is described by the agent function that
maps any percept sequence to an action.
Agent
For example, to evaluate a taxi driver in simulated traffic, we would want to run
many simulations with different traffic, lighting, and weather conditions. If we
designed the agent for a single scenario, we might be able to take advantage of
specific properties of the particular case but might not identify a good design for
driving in general.
ENVIRONMENT GENERATOR
An environment generator for each environment class that selects particular
environments (with certain likelihoods) in which to run the agent.
For example, the vacuum environment generator initializes the dirt pattern and
agent location randomly. We are then interested in the agent’s average
performance over the environment class. A rational agent for a given environment
class maximizes this average performance.
Agent functions and programs
RULES:
(1) If small moving object,
then activate SNAP
(2) If large moving object,
then activate AVOID and inhibit SNAP
ELSE (not moving) then NOOP
needed for
completeness Action: SNAP or AVOID or
NOOP
Model-based reflex agents
• Model based agents can handle partially observable
environments.
• Its current state is stored inside the agent maintaining
some kind of structure which describes the part of
the world which can’t be seen. This behavior requires
information on how the world behaves and works.
This additional information completes the “world
view” model.
Model-based reflex agents
• A model – based reflex agent keeps track of the
current state of the world using an internal model. It
then chooses an action in the same way as the reflex
agent.
• The state changes whenever an action is performed
or something is perceived in the environment.
• For example,
The self-steering mobile vision, where it's necessary to
check the percept history to fully understand how the
world is evolving.
Model-based reflex agents
• For the world that is partially observable
● the agent has to keep track of an internal state
● That depends on the percept history
● Reflecting some of the unobserved aspects
● E.g., driving a car and changing lane
• Requiring two types of knowledge
● How the world evolves independently of the agent
● How the agent’s actions affect the world
• For example, that an overtaking car generally will be closer behind
than it was a moment ago.
• Second, we need some information about how the agent’s own
actions affect the world- for example, that when the agents turn the
steering wheel clockwise, then it turns to right.
• This knowlege about “how the world works”- whether implemented
in simple boolean circuits or in complete scientific theories- called
model of the world.
• An agent that uses such as model is called a model-based agent.
Example Table Agent
With Internal State
IF THEN
start