You are on page 1of 33

Agents – Structures - Types

Agents & environments


An agent is anything that can be viewed as perceiving its environment through sensors and acting upon
that environment through actuators.

AGENT FUNCTION implemented as


AGENT PROGRAM
Intelligent Agent Specifications
• An intelligent agent is:
• A (usually) autonomous entity which…
• Observes an environment (the world)
• Acts on its environment in order to achieve goals
• An intelligent agent may learn
• Not always
• A simple “reflex agent” still counts as an agent
• Behaves in a rational manner
• Not “optimal”
Designing an Intelligent Agent

An intelligent agent:
• Perceives its environment via sensors
• Acts upon that environment with its actuators (or effectors)
• Properties:
• Autonomous
• Reactive to the environment
• Pro-active (goal-directed)
• Interacts with other agents via the environment
Agent related terms
Percept sequence: A complete history of everything the
agent has ever perceived. Think of this as the state of the
world from the agent’s perspective.
Agent function: Maps percept sequence to action
(determines agent behavior)
Agent Program: Implements the agent function
Structure of intelligent agents

The job of AI is to design an agent program that implements the agent


function— the mapping from percepts to actions.
We assume this program will run on some sort of computing device with
physical sensors and actuators—we call this the architecture

AGENT = PROGRAM + ARCHITECTURE


Agent Program
Takes just the current percept as input because
nothing more is available from the environment; if the
agent’s actions need to depend on the entire percept
sequence, the agent will have to remember the
percepts.
Intelligent Agents
FOUR TYPES OF AGENTS: REFLEX AGENTS (E.G TABLE DRIVEN AGENT),
MODEL-BASED AGENTS, GOAL-BASED AGENTS, AND UTILITY-BASED
AGENTS.
AGENTS CAN IMPROVE THEIR PERFORMANCE THROUGH LEARNING.
STATES REPRESENTATIONS: ATOMIC, FACTORED, STRUCTURED.
INCREASING EXPRESSIVENESS POWER

Ref:https://courses.edx.org/asset-
v1:ColumbiaX+CSMM.101x+1T2017+type@asset+block@AI_edx_intelligent_agents_new__1_.pdf
Table Driven Agent
Example – Table Driven Agent Program
Simple reflex agent AGENT FUNCTION

SCHEMATIC DIAGRAM
Example – Simple Reflex Agent
Simple Reflex Agent
• Advantages:
• Easy to implement
• Uses much less memory than the table-
driven agent
• Disadvantages:
• Will only work correctly if the environment
is fully observable
• Infinite loops
https://classes.engr.oregonstate.edu/eecs/spring2019/cs331/slides/Agents.2pp.pdf
Model Based Agent
• Maintain some internal state that keeps track of
the part of the world it can’t see now (partially
observable environment)
• Needs model (encodes knowledge about how the
world works)
SCHEMATIC DIAGRAM

MODEL BASED AGENT

AGENT FUNCTION
Simple Vs Model based

Simple reflex

Model based
Goal Based Agents (Model based goal
based agents)
• Goal information guides agent’s actions (looks to the
future)
• Sometimes achieving goal is simple e.g. from a single
action
• Other times, goal requires reasoning about long
sequences of actions
• Flexible: simply reprogram the agent by changing goals
Goal Based Agent
Choose actions that achieve a goal
• Which may be given, or computed by the agent
• A goal is a description of a desirable state
• Need goals to decide what situations are “good”
• Keeping track of the current state is often not enough
• Deliberative instead of reactive
• Must consider sequences of actions to get to goal
• Involves thinking about the future
• “What will happen if I do...?”
MODEL BASED GOAL BASED AGENT
SCHEMATIC DIAGRAM
Simple Vs Model based

Simple reflex

Model based
Simple Reflex

Goal Based

Model based
Example
Searching problems (searching for a state that would
satisfy the defined conditions for a goal)
Searching robot that has an initial location and wants
to reach a destination
Utility Based Agents (Model Based Utility Based Agents)
How to choose from multiple alternatives?
• What action is best?
• What state is best?
• Goals à crude distinction between “happy” / “unhappy” states
• Often need a more general performance measure (how “happy”?)
• Utility function gives success or happiness at a given state
• Can compare choice between:
• Conflicting goals
• Likelihood of success
• Importance of goal (if achievement is uncertain)
MODEL BASED UTILITY BASED AGENT
SCHEMATIC DIAGRAM
Simple Reflex

Goal Based

Model based
Utility based agent - Example

An utility-based reflex agent is like the goal-based agent but with a


measure of "how much happy" an action would make it rather than
the goal-based binary feedback ['happy', 'unhappy']. This kind of
agents provide the best solution.
An example is the route recommendation system which solves the
'best' route to reach a destination.

https://ai.stackexchange.com/questions/3243/what-are-some-examples-of-intelligent-agents-for-each-intelligent-agent-class
Learning Agent
A learning agent is an agent capable of learning
from experience.
It has the capability of automatic information
acquisition and integration into the system.
Any agent designed and expected to be successful in
an uncertain environment is considered to be learning
agent.
A GENERAL LEARNING AGENT
Example
A spam filter that learns from user feedback. It gains basic
knowledge from past and uses that learning to act and adapt
automatically
COMPONENTS OF AGENT PROGRAMS
AI algorithms: first
E.g., GPS location, amount order logic,
E.G., Finding a
of gas in the tank. AI knowledge-based
driving route,
algorithms: constraint learning, natural
each state is a
satisfaction, and Bayesian language
city. AI
networks. understanding.
algorithms:
search, games,
markov decision
processes, hidden
markov models,
etc.
Module 1 summary
AI – definitions
State of the art
Types of AI
Environment – Characteristics, Properties
Agent – types
Representation of states in an agent
Digital Assignment – 10 marks weightage
Activity Max Marks
Choosing an agent for a given Application 1
(State of the AI tools or under research) –
Problem definition
PEAS Description of the environment 2
Characterise the environment
Agent program design (document submission) 3
(Applying techniques, algorithms from further
modules)
Presentation video 2
Demonstrate implementation (code 2
documented and demo in the presentation
video)
Team size: 1 - 3
Responsive and adaptive gaming identification of celestial objects, exoplanets,
Applications Examples and facilitating the study of transient cosmic
application processes for credit cards and loans, events., noise removal from data
including acceptance and rejection, providing near-
instant responses AI virtual nurse assistants –
detect patterns and anomalies chatbots
that may indicate a security Accident monitoring
breach, even in the absence of Logistics
a known threat signature

content creation, ideation, identify the best-


sentiment analysis, and performing plant
forecasting varieties

minimize traffic assisting with translations


congestion and optimize and language learning to
fuel efficiency outsourcing homework and
grading assignments

ML to train robots personalized product recommendations,


chatbots, virtual shopping assistants,
AI driven animation and dynamic pricing, fraud detection, and
character modelling logistics optimization

You might also like