BTCE | 5th Sem
AiML SubjectUnit 2

(2nd Sem) AIML Unit 2: Complete Concepts Guide

Unit – II: Intelligent Agents -> Generated and Prepared By Thiruselvan (ThiruXD)

Level 1: Absolute Basics – What is an Intelligent Agent?

Simple definition:

An Intelligent Agent is anything that can:

  1. See (perceive) its environment
  2. Think (reason) about what it saw
  3. Decide what to do
  4. Act to achieve some goal

Everyday examples:

  • A Roomba vacuum cleaner
  • Siri or Google Assistant
  • A self-driving car
  • Netflix recommending movies
  • A chatbot on a website

Key idea:

An agent is not just a normal computer program. It continuously senses the world and acts to achieve goals.


Level 2: Structure of an Intelligent Agent

Every intelligent agent has this basic structure:

Environment  →  Sensors  →  Agent (Brain)  →  Actuators  →  Environment
  • Sensors: Eyes, cameras, microphones, temperature sensors, etc. (how the agent sees the world)
  • Agent (Brain): The decision-making part
  • Actuators: Motors, wheels, speakers, screens, robotic arms (how the agent changes the world)

Four important steps inside the agent:

  1. Perception – Collect information from sensors
  2. Reasoning – Process that information
  3. Decision-Making – Choose the best action
  4. Action – Execute the action using actuators

Level 3: Definition & Agent Function

Formal Definition:

An agent is a system that maps percept sequences (everything it has seen so far) to actions.

Mathematically written as:

f : P\ → A*

  • P* = sequence of all percepts (history of what it has seen)
  • A = the action it will take

This means:

“Based on everything I have seen till now, what should I do next?”


Level 4: Characteristics of Intelligent Agents

To be called an intelligent agent (not ordinary software), it must have these qualities:

CharacteristicMeaning in Simple WordsExample
AutonomyWorks on its own without constant human controlRoomba cleans without you controlling every move
ReactivityNotices changes and responds quicklyCar brakes when it sees a pedestrian
ProactivenessTakes initiative to achieve goalsVacuum starts cleaning when battery is full
Social AbilityCan communicate with other agents or humansChatbot talks to you
RationalityAlways tries to do the “best” possible actionChooses the action that gives highest success

Level 5: Types of Agents (Most Important Topic)

Agents become more intelligent as we go from Type 1 to Type 4.

1. Simple Reflex Agents (Most Basic)

  • Looks only at the current situation
  • Uses fixed rules: “If this happens → Do that”
  • No memory of the past
  • Very fast but limited

Example: Traffic light that changes every 60 seconds (fixed timing)

Limitation: Fails if the environment is complex or partially hidden.

2. Model-Based Agents (Better)

  • Maintains an internal model (memory) of the world
  • Remembers what it has seen before
  • Can handle partially observable environments

Example: Roomba

  • It remembers which areas it has already cleaned
  • It builds a map of the room

Advantage: Can work even when it cannot see everything at once.

3. Goal-Based Agents (Smarter)

  • Has clear goals
  • Thinks about the future
  • Plans a sequence of actions to reach the goal

Example: Delivery robot that finds the shortest path to deliver a package.

Advantage: Can re-plan if something changes.

4. Utility-Based Agents (Most Advanced)

  • Not only reaches the goal, but chooses the best quality goal
  • Uses a utility function (a score of how good a situation is)
  • Can make trade-offs (speed vs safety, cost vs quality, etc.)

Example:

  • Self-driving car choosing between fastest route and safest route
  • Financial AI deciding which investment gives best risk-return balance

Summary of Types (Memory Trick):

TypeWhat it considersIntelligence Level
Simple ReflexOnly current perceptLowest
Model-basedCurrent + Internal modelMedium
Goal-basedFuture goalsHigh
Utility-basedGoals + How good the goal isHighest

Level 6: PEAS Framework (Very Important for Exams)

PEAS is the standard way to describe any agent completely.

P – Performance Measure (How do we measure success?)

E – Environment (Where does the agent work?)

A – Actuators (What can it do?)

S – Sensors (What can it sense?)

Example 1: Roomba

PEAS ComponentDescription
Performance MeasureArea cleaned, dirt removed, no collisions, battery life
EnvironmentRooms, floor, furniture, walls
ActuatorsWheels, vacuum motor, brushes
SensorsBumper, cliff sensors, dirt sensors, camera

Example 2: Self-Driving Car

PEAS ComponentDescription
Performance MeasureSafety, reaching destination, comfort, fuel efficiency
EnvironmentRoads, traffic, pedestrians, weather
ActuatorsSteering, accelerator, brakes, indicators
SensorsCameras, LiDAR, Radar, GPS, ultrasonic sensors

Level 7: Agent Environments (Properties)

The environment decides how difficult the agent’s job is.

1. Fully Observable vs Partially Observable

TypeMeaningExample
Fully ObservableAgent can see everythingChess
Partially ObservableAgent cannot see everythingSelf-driving car

2. Deterministic vs Stochastic

TypeMeaningExample
DeterministicSame action always gives same resultPuzzle
StochasticOutcome has randomnessWeather, traffic

3. Static vs Dynamic

TypeMeaningExample
StaticEnvironment does not change while agent thinksCrossword puzzle
DynamicEnvironment keeps changingDriving a car

4. Discrete vs Continuous

TypeMeaningExample
DiscreteLimited number of states/actionsChess
ContinuousInfinite/smooth statesTemperature control, car speed

Most difficult environment for an agent:

Partially Observable + Stochastic + Dynamic + Continuous

(Example: Self-driving car)


Level 8: Rationality and Performance Measure

What is a Rational Agent?

A rational agent always chooses the action that is expected to give the best possible result according to the performance measure.

Performance Measure = The scorecard created by the designer.

It tells what “success” means.

Important points:

  • Performance measure is external (set by designer, not by the agent)
  • Rationality depends on:
    • What the agent has perceived so far
    • What knowledge it has
    • What actions are available

Evaluation of Agents can be done by:

  • Accuracy
  • Speed / Efficiency
  • Robustness (handling unexpected situations)
  • Scalability

Level 9: Real-World Examples (Must Remember)

1. Autonomous Robots – Roomba

  • Type: Model-based
  • Perceives dirt and obstacles → Decides → Cleans and moves

2. Software Agents

  • Chatbots (ChatGPT, Google Assistant) → Understand questions and reply
  • Recommendation Systems (Netflix, Amazon) → Suggest content based on behaviour

3. Self-Driving Cars (Tesla etc.)

  • Type: Highly advanced (Goal + Utility based)
  • Uses many sensors → Makes real-time decisions → Controls steering, speed, brakes

Final Quick Summary (Last-Minute Revision)

  1. Agent = Sensors + Brain + Actuators
  2. Four types of agents (increasing intelligence): Simple Reflex → Model-based → Goal-based → Utility-based
  3. PEAS = Performance, Environment, Actuators, Sensors
  4. Environment properties: Observable, Deterministic, Static, Discrete (and their opposites)
  5. Rational agent = Always tries to maximize performance measure
  6. Best real-life examples: Roomba, Chatbots, Recommendation systems, Self-driving cars

On this page