(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:
- See (perceive) its environment
- Think (reason) about what it saw
- Decide what to do
- 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:
- Perception – Collect information from sensors
- Reasoning – Process that information
- Decision-Making – Choose the best action
- 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:
| Characteristic | Meaning in Simple Words | Example |
|---|---|---|
| Autonomy | Works on its own without constant human control | Roomba cleans without you controlling every move |
| Reactivity | Notices changes and responds quickly | Car brakes when it sees a pedestrian |
| Proactiveness | Takes initiative to achieve goals | Vacuum starts cleaning when battery is full |
| Social Ability | Can communicate with other agents or humans | Chatbot talks to you |
| Rationality | Always tries to do the “best” possible action | Chooses 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):
| Type | What it considers | Intelligence Level |
|---|---|---|
| Simple Reflex | Only current percept | Lowest |
| Model-based | Current + Internal model | Medium |
| Goal-based | Future goals | High |
| Utility-based | Goals + How good the goal is | Highest |
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 Component | Description |
|---|---|
| Performance Measure | Area cleaned, dirt removed, no collisions, battery life |
| Environment | Rooms, floor, furniture, walls |
| Actuators | Wheels, vacuum motor, brushes |
| Sensors | Bumper, cliff sensors, dirt sensors, camera |
Example 2: Self-Driving Car
| PEAS Component | Description |
|---|---|
| Performance Measure | Safety, reaching destination, comfort, fuel efficiency |
| Environment | Roads, traffic, pedestrians, weather |
| Actuators | Steering, accelerator, brakes, indicators |
| Sensors | Cameras, 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
| Type | Meaning | Example |
|---|---|---|
| Fully Observable | Agent can see everything | Chess |
| Partially Observable | Agent cannot see everything | Self-driving car |
2. Deterministic vs Stochastic
| Type | Meaning | Example |
|---|---|---|
| Deterministic | Same action always gives same result | Puzzle |
| Stochastic | Outcome has randomness | Weather, traffic |
3. Static vs Dynamic
| Type | Meaning | Example |
|---|---|---|
| Static | Environment does not change while agent thinks | Crossword puzzle |
| Dynamic | Environment keeps changing | Driving a car |
4. Discrete vs Continuous
| Type | Meaning | Example |
|---|---|---|
| Discrete | Limited number of states/actions | Chess |
| Continuous | Infinite/smooth states | Temperature 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)
- Agent = Sensors + Brain + Actuators
- Four types of agents (increasing intelligence): Simple Reflex → Model-based → Goal-based → Utility-based
- PEAS = Performance, Environment, Actuators, Sensors
- Environment properties: Observable, Deterministic, Static, Discrete (and their opposites)
- Rational agent = Always tries to maximize performance measure
- Best real-life examples: Roomba, Chatbots, Recommendation systems, Self-driving cars