0% found this document useful (0 votes)
24 views33 pages

Topic 2 Agents

Uploaded by

Pratham Agarwal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views33 pages

Topic 2 Agents

Uploaded by

Pratham Agarwal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 33

CS 3101: Artificial

Intelligence and Soft


Computing

Lecture 3

Instructor: Dr Juhi Singh


Contents to be covered

• Agents,
• Environments
• General model
Definitions of AI if our system can be
more rational than
humans in some
cases, why not?
Systems
Cognitive Science Approach Systems
Laws of thought Approach

focus on action
avoids philosophical that think like that think
issues such as “is the humans rationally
system conscious”
etc. Systems
Turing Test Approach Systems
Rational Agent Approach

that act like that act rationally


humans
• In order to design intelligent systems, it is important to
categorize them into four categories (Luger and
Stubberfield 1993), (Russell and Norvig, 2003)
• We will follow “act rationally” approach
Agents
• An agent can be anything that perceive its environment
through sensors and act upon that environment through
actuators. An Agent runs in the cycle
of perceiving, thinking, and acting.
• An agent can be:
• Human-Agent: A human agent has eyes, ears, and other organs
which work for sensors and hand, legs, vocal tract work for
actuators.
• Robotic Agent: A robotic agent can have cameras, infrared
range finder, NLP for sensors and various motors for actuators.
• Software Agent: Software agent can have keystrokes, file
contents as sensory input and act on those inputs and display
output on the screen.
• We should first know about sensors, effectors, and
actuators.
• Sensor: Sensor is a device which detects the change in the
environment and sends the information to other electronic
devices. An agent observes its environment through sensors.
• Actuators: Actuators are the component of machines that
converts energy into motion. The actuators are only
responsible for moving and controlling a system. An actuator
can be an electric motor, gears, rails, etc.
• Effectors: Effectors are the devices which affect the
environment. Effectors can be legs, wheels, arms, fingers,
wings, fins, and display screen.
Rules for an AI agent:

• Rule 1: An AI agent must have the ability to


perceive the environment.
• Rule 2: The observation must be used to make
decisions.
• Rule 3: Decision should result in an action.
• Rule 4: The action taken by an AI agent must be a
rational
Rational Agents
• A rational agent is an agent which has clear preference, models
uncertainty, and acts in a way to maximize its performance
measure with all possible actions.
• A rational agent is said to perform the right things. AI is about
creating rational agents to use for game theory and decision
theory for various real-world scenarios.
• For an AI agent, the rational action is most important because in AI
reinforcement learning algorithm, for each best possible action,
agent gets the positive reward and for each wrong action, an
agent gets a negative reward.
• True maximization of goals requires omniscience and unlimited
computational abilities.
• Limited rationality involves maximizing goals within the
computational and other resources available.
Rational Agent at any given
time depends on
• The performance measure that defines degree of success.
• Everything that the agent has perceived so far (percept sequence).
• What the agent knows about the environment.
• The actions that the agent can perform.
Vacuum Cleaning Agent
• The vacuum cleaner agent has a location sensor and a dirt sensor
so that it knows where it is (room A or room B) and whether the
room is dirty. It can go left, go right, suck, and idle.
• A possible performance measure is to maximize the number of
clean rooms over a certain period.
• Agent function = {([A: Clean], Right), ([A: Dirty], Clean), ([B:
Clean], Left), ([B: Dirty], Clean), ([A: Clean, B: Clean], Stop), ([A:
Clean, B: Dirty], Clean), …}
• Percept sequence: [A: Clean]
• Action: Right
• Performance Measure: desirable actions performed by the agent
Performance Measure
• The amount of dirt cleaned
• The amount of time taken
• The amount of electricity consumed
• Level of noise generated
PEAS
• The PEAS System is utilized to group together agents that
share similar characteristics.
• The performance measure of the particular agent is
provided by the PEAS system, which takes into account
the surroundings, actuators, and sensors of the agent in
question.
• P: Performance measure
• E: Environment
• A: Actuators
• S: Sensors
• Here performance measure is the objective for the
success of an agent's behavior.
• PEAS stands for Performance measure, Environment,
Actuator, Sensor.
• Performance Measure: Performance measure is the unit to
define the success of an agent. Performance varies with agents
based on their different precept.
• Environment: Environment is the surrounding of an agent at
every instant. It keeps changing with time if the agent is set in
motion.
• Actuator: Actuator is a part of the agent that delivers the output
of an action to the environment.
• Sensor: Sensors are the receptive parts of an agent which takes
in the input for the agent.
Task Environment
• A task environment refers to the choices, actions and
outcomes a given user has for a given task.
• In a fully observable environment all of the environment
relevant to the action being considered is observable.
• In deterministic environments, the next state of the
environment is completely described by the current state
and the agent’s action.
• If an element of interference or uncertainty occurs then
the environment is stochastic.
Properties of Task
Environment
• 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.
• There are several types of environments:
• Fully Observable vs Partially Observable
• Deterministic vs Stochastic
• Competitive vs Collaborative
• Single-Agent vs Multi-Agent
• Static vs Dynamic
• Discrete vs Continuous
• Episodic vs Sequential
• Known vs Unknown
Fully Observable vs Partially Observable
•When an agent sensor is capable to sense or
access the complete state of an agent at each
point in time, it is said to be a fully observable
environment else it is partially observable.
•Maintaining a fully observable environment is
easy as there is no need to keep track of the
history of the surrounding.
•An environment is called unobservable when
the agent has no sensors in all environments.
•Examples:
• Chess – the board is fully observable, and so are
the opponent’s moves.
• Driving – the environment is partially observable
because what’s around the corner is not known.
Deterministic vs Stochastic
•When a uniqueness in the agent’s current state
completely determines the next state of the agent, the
environment is said to be deterministic.
•The stochastic environment is random in nature which is
not unique and cannot be completely determined by the
agent.
•Examples:
• Chess – there would be only a few possible moves for
a coin at the current state and these moves can be
determined.
• Self-Driving Cars- the actions of a self-driving car are
not unique, it varies time to time.
Episodic vs Sequential
•In an Episodic task environment, each of the agent’s
actions is divided into atomic incidents or episodes. There
is no dependency between current and previous incidents.
In each incident, an agent receives input from the
environment and then performs the corresponding action.
• Example: Consider an example of Pick and Place robot, which is
used to detect defective parts from the conveyor belts. Here,
every time robot(agent) will make the decision on the current
part i.e. there is no dependency between current and previous
decisions.
•In a Sequential environment, the previous decisions can
affect all future decisions. The next action of the agent
depends on what action he has taken previously and what
action he is supposed to take in the future.
• Example:
• Checkers- Where the previous move can affect all the
following moves.
Dynamic vs Static
•An environment that keeps constantly changing itself
when the agent is up with some action is said to be
dynamic.
•A roller coaster ride is dynamic as it is set in motion and
the environment keeps changing every instant.
•An idle environment with no change in its state is called a
static environment.
•An empty house is static as there’s no change in the
surroundings when an agent enters.
Single-agent vs Multi-agent
•An environment consisting of only one agent is said to be a
single-agent environment.
•A person left alone in a maze is an example of the single-
agent system.
•An environment involving more than one agent is a multi-
agent environment.
•The game of football is multi-agent as it involves 11
players in each team.
Discrete vs Continuous
•If an environment consists of a finite number of actions
that can be deliberated in the environment to obtain the
output, it is said to be a discrete environment.
•The game of chess is discrete as it has only a finite number
of moves. The number of moves might vary with every
game, but still, it’s finite.
•The environment in which the actions are performed
cannot be numbered i.e. is not discrete, is said to be
continuous.
•Self-driving cars are an example of continuous
environments as their actions are driving, parking, etc.
which cannot be numbered.
Examples of Task
Enviornments
Agent’s Classification
1. Simple Reflex Agents
2. Model based Reflex Agents
3. Goal based agents
4. Utility based agents
5. Learning Agent
Simple Reflex Agent

• This agent makes decisions on what actions to do not


based on previous perceptions but on the agent's present
understanding of the world.
• For instance, if a Mars lander discovered a rock in a particular
location that it needed to collect, it would pick up that rock.
However, if the agent was just a simple reflex, it would still pick up
that rock even if it found the same rock in a different location
because it does not take into account the fact that it has already
collected that rock.
• This is useful for when a quick automated response is
needed.
• Condition-Action rule
• if {set of percepts} then {set of actions}
• if it is raining then pickup umbrella
• These agents are simple to work with but have very
limited intelligence, such as picking up 2 rock samples.
• Infinite loops are often unavoidable
• If the agent can randomize its actions, it may be possible
to escape from infinite loops.
Model Based Reflex Agent

• Model-based reflex agents deal with limited accessibility


by tracking what they can see.
• It keeps an internal state that depends on what it has
seen before to store information about unseen features
of the present state.
• Handle partially observable environments.
• Example: This time out mars Lander after picking up its
first sample, it stores this in the internal state of the world
around it so when it come across the second same sample
it passes it by and saves space for other samples.
• Update this internal storage requires 2 things:
• 1. How the world naturally evolves. E.g.: If our Mars Lander
picked up the next rock, everything would continue as normal.
• 2. The agent's global impact. E.g.: Our Mars Lander may smash a
rock if it took a sample under a dangerous ledge.
• If you remove a supporting rock from a ledge, the ledge
will fall. Such facts are called models, thus the name
model-based agent.
Goal Based Agent

• These agents base decisions on their distance from their


goal (description of desirable situations).
• Every activity aims to get closer to the objective.
• This lets the agent pick from several options to
accomplish a desired state.
• A simple example would be the shopping list;
• our goal is to pick up every thing on that list.
• This makes it easier to decide if you need to choose between
milk and orange juice because you can only afford one.
• As milk is a goal on our shopping list and the orange juice is not
we chose the milk.
• These agents' explicit, modifiable knowledge makes them
more versatile.
• They need forethought and research.
• Change the goal-based agent's behavior effortlessly.
Utility Based Agent

• Utility-based agents serve as building blocks. Utility-based


agents are used to choose amongst numerous options.
• They pick activities by state preference (utility). Achieving
a goal isn't always enough.
• We may seek a faster, safer, cheaper travel. Consider
agent bliss.
• Utility indicates an agent's "happiness."
• A utility agent enhances projected utility due to global
uncertainty.
• A utility function relates a state to a happiness number.
• For example let’s show our mars Lander on the surface of
mars with an obstacle in its way.
• In a goal based agent it is uncertain which path will be taken by
the agent and some a re clearly not as efficient as others but in
a utility based agent the best path will have the best output
from the utility function and that path will be chosen.
Learning Based Agent

• AI learning agents can learn from their prior experiences.


• It acts with basic information and learns to adjust
automatically.
• A learning agent has mainly four conceptual components,
which are:
1.Learning element: It is responsible for making improvements
by learning from the environment.
2.Critic: The learning element takes feedback from critics
which describes how well the agent is doing with
respect to a fixed performance standard.
3.Performance element: It is responsible for selecting
external action.
4.Problem Generator: This component is responsible for
suggesting actions that will lead to new and informative
experiences.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy