Learn about intelligent agents, rational agents, PEAS description, knowledge-based systems, and the ELIZA case study in this detailed AI Lecture 2 guide.
Artificial Intelligence is built around the idea of creating systems that can behave intelligently in dynamic environments. At the heart of this idea lies the concept of intelligent agents. Understanding intelligent agents, rational behavior, PEAS descriptions, and knowledge-based systems provides the theoretical foundation upon which most AI systems are designed. This lecture explores these concepts in depth and concludes with a classical case study: ELIZA, one of the earliest AI programs.
Intelligent Agents
An intelligent agent is an autonomous system that perceives its environment through sensors, processes the information it receives, and takes actions through actuators in order to achieve specific goals.
In simple terms:
An intelligent agent senses the environment, makes decisions, and acts to achieve objectives.
The interaction between the agent and its environment follows a continuous cycle:
Environment → Sensors → Agent (Decision-making) → Actuators → Environment
This loop allows the agent to constantly adapt its behavior based on new information.
Components of an Intelligent Agent
- Environment
The environment is everything external to the agent that it interacts with. This may include physical surroundings (roads, buildings, weather) or digital spaces (internet, databases, networks). - Sensors (Input)
Sensors collect data from the environment.
Examples:- Cameras
- Microphones
- GPS devices
- Temperature sensors
- Agent Program (Decision System)
This is the “brain” of the system. It processes input data and determines what action to take. The agent program may use rules, logic, search algorithms, or machine learning models. - Actuators (Output)
Actuators carry out actions in the environment.
Examples:- Steering wheels in self-driving cars
- Robotic arms
- Display screens
- Speakers
Example: Self-Driving Car
- Environment: Road, traffic, pedestrians
- Sensors: Cameras, radar, LiDAR
- Decision System: AI model analyzing traffic and road conditions
- Actuators: Steering, braking, acceleration
The car continuously senses its surroundings, processes information, and acts accordingly.
Types of Intelligent Agents
AI researchers classify agents into different types based on their capabilities and decision-making complexity.
1. Simple Reflex Agents
Simple reflex agents act only on the current percept (current input) using condition-action rules.
Structure:
IF condition → THEN action
Example:
A thermostat:
- If temperature < 20°C → turn heater ON
- If temperature ≥ 20°C → turn heater OFF
These agents do not remember past states. They are suitable only for simple, fully observable environments.
2. Model-Based Agents
Model-based agents maintain an internal model of the world. They consider both current percepts and past information.
Example:
A robot vacuum that remembers which areas have already been cleaned.
These agents are useful in partially observable environments.
3. Goal-Based Agents
Goal-based agents take actions that help achieve a specific goal. They use planning and search techniques to determine sequences of actions.
Example:
Google Maps selecting the best route to reach a destination.
Such agents consider future consequences before acting.
4. Utility-Based Agents
Utility-based agents aim to maximize a utility function. A utility function assigns a numerical value representing how desirable a state is.
Example:
A self-driving car balancing:
- Safety
- Speed
- Comfort
- Fuel efficiency
Instead of merely achieving a goal, these agents choose the action that produces the highest overall benefit.
5. Learning Agents
Learning agents improve their performance over time by learning from experience.
They usually consist of:
- Performance element (makes decisions)
- Learning element (improves the system)
- Critic (evaluates performance)
- Problem generator (explores new actions)
Example:
Recommendation systems like Netflix that adapt to user preferences.
Rational Agents
A rational agent is one that selects actions expected to maximize its performance measure, given the percept sequence and knowledge of the environment.
Important clarification:
Rational does not mean perfect.
Rational means making the best possible decision based on available information.
Four key factors determine rationality:
- Performance measure (how success is evaluated)
- Percept sequence (history of observations)
- Prior knowledge of environment
- Available actions
For example, a delivery drone chooses the safest and fastest route based on weather, battery level, and traffic conditions.
PEAS Description
To design intelligent agents effectively, AI engineers use a structured method called PEAS, which stands for:
- P – Performance measure
- E – Environment
- A – Actuators
- S – Sensors
This framework helps define the task environment of an agent.
Example 1: Self-Driving Car
Performance: Safety, speed, comfort, legal compliance
Environment: Roads, traffic, weather, pedestrians
Actuators: Steering, brakes, accelerator
Sensors: Cameras, radar, GPS
Example 2: Spam Filter
Performance: High detection accuracy, low false positives
Environment: Incoming emails
Actuators: Mark spam or allow email
Sensors: Email content, metadata
Example 3: Medical Diagnosis System
Performance: Accurate diagnosis
Environment: Patient symptoms and medical data
Actuators: Diagnostic suggestions
Sensors: Medical reports, lab results
PEAS is frequently tested in examinations because it demonstrates understanding of agent design.
Knowledge-Based Systems
A Knowledge-Based System (KBS) is an AI system that uses stored knowledge and logical reasoning to solve problems.
These systems attempt to replicate the expertise of human specialists.
Main Components of a Knowledge-Based System
- Knowledge Base
Stores facts and rules.
Example rule:
IF fever AND cough → possible flu - Inference Engine
Applies logical reasoning to derive new conclusions from known facts. - Working Memory
Stores current input data for processing. - Explanation System
Explains why a certain conclusion was reached.
Inference Methods
Forward Chaining:
- Start from known facts
- Apply rules
- Reach conclusion
Backward Chaining:
- Start from a goal
- Work backward to verify required facts
Knowledge-based systems were especially popular during the 1970s and 1980s in expert systems such as medical diagnosis tools.
Case Study: ELIZA
ELIZA, developed in the 1960s by Joseph Weizenbaum, was one of the earliest AI programs designed to simulate human conversation.
It mimicked a psychotherapist and responded to user input using pattern matching and scripted rules.
Example interaction:
User: I feel sad.
ELIZA: Why do you feel sad?
ELIZA did not truly understand language. Instead, it:
- Detected keywords
- Rephrased user input
- Used predefined templates
Despite its simplicity, ELIZA created the illusion of intelligence.
Importance of ELIZA
- Demonstrated that conversation can be simulated with rules
- Showed how humans can attribute intelligence to machines
- Highlighted the limitations of rule-based language processing
ELIZA marked an important milestone in the history of conversational AI.
Conclusion
Intelligent agents form the backbone of Artificial Intelligence systems. They perceive environments, make decisions, and act to achieve goals. Different types of agents from simple reflex agents to learning agents reflect increasing levels of complexity and autonomy.
Rationality ensures that agents aim to maximize performance under given conditions. The PEAS framework provides a structured way to define agent tasks. Knowledge-based systems extend intelligence through structured knowledge and logical reasoning.
The case study of ELIZA illustrates both the power and limitations of early AI systems, laying the groundwork for modern conversational agents.
Together, these concepts establish the theoretical structure upon which more advanced AI topics such as search algorithms, machine learning, and natural language processing are built.
Multiple Choice Questions (MCQs) – Intelligent Agents & Knowledge-Based Systems
1. An intelligent agent is a system that:
A) Only stores data
B) Perceives and acts to achieve goals
C) Executes fixed instructions
D) Compiles programs
Answer: B
2. The basic structure of an intelligent agent includes:
A) CPU and RAM
B) Sensors and Actuators
C) Compiler and Interpreter
D) Network and Server
Answer: B
3. Sensors in an intelligent agent are responsible for:
A) Making decisions
B) Storing memory
C) Collecting input from environment
D) Producing output
Answer: C
4. Actuators in an intelligent agent are responsible for:
A) Collecting data
B) Executing actions
C) Processing algorithms
D) Training models
Answer: B
5. Which of the following is NOT a type of intelligent agent?
A) Simple reflex agent
B) Goal-based agent
C) Utility-based agent
D) Compiler-based agent
Answer: D
6. A simple reflex agent:
A) Uses past memory
B) Uses current percept only
C) Learns from experience
D) Maximizes utility
Answer: B
7. Model-based agents differ from simple reflex agents because they:
A) Ignore environment
B) Maintain internal state
C) Do not use sensors
D) Avoid decision-making
Answer: B
8. Goal-based agents:
A) Use condition-action rules only
B) Ignore future consequences
C) Choose actions to achieve goals
D) Do not require planning
Answer: C
9. Utility-based agents:
A) Choose actions randomly
B) Maximize performance measure
C) Minimize input
D) Ignore trade-offs
Answer: B
10. A learning agent improves performance by:
A) Removing rules
B) Increasing hardware
C) Learning from experience
D) Ignoring feedback
Answer: C
11. A rational agent selects actions that:
A) Always succeed
B) Maximize expected performance
C) Are fastest
D) Are cheapest
Answer: B
12. Rationality depends on:
A) Luck
B) Perfect knowledge
C) Performance measure
D) Random choice
Answer: C
13. PEAS stands for:
A) Process, Execute, Act, System
B) Performance, Environment, Actuators, Sensors
C) Program, Engine, Agent, Storage
D) Performance, Engine, Algorithm, Sensors
Answer: B
14. In PEAS, “P” represents:
A) Program
B) Performance measure
C) Perception
D) Processing
Answer: B
15. In PEAS, “E” represents:
A) Execution
B) Evaluation
C) Environment
D) Engine
Answer: C
16. In PEAS, “A” represents:
A) Agent
B) Algorithm
C) Actuators
D) Analysis
Answer: C
17. In PEAS, “S” represents:
A) Storage
B) Sensors
C) System
D) Search
Answer: B
18. Which of the following is a correct PEAS component for a self-driving car?
A) Printer
B) Steering
C) Compiler
D) Antivirus
Answer: B
19. A knowledge-based system mainly consists of:
A) Database only
B) Knowledge base and inference engine
C) CPU and memory
D) Compiler and linker
Answer: B
20. The knowledge base stores:
A) Programs
B) Facts and rules
C) Hardware data
D) Images only
Answer: B
21. The inference engine is responsible for:
A) Collecting input
B) Executing logic to derive conclusions
C) Printing results
D) Compiling code
Answer: B
22. Forward chaining starts reasoning from:
A) Goal
B) Conclusion
C) Facts
D) Output
Answer: C
23. Backward chaining starts reasoning from:
A) Known facts
B) Random rules
C) Goal
D) Sensors
Answer: C
24. ELIZA was developed in:
A) 1950
B) 1960s
C) 1980s
D) 2000s
Answer: B
25. ELIZA primarily used:
A) Deep learning
B) Neural networks
C) Pattern matching
D) Reinforcement learning
Answer: C
26. ELIZA simulated:
A) A teacher
B) A programmer
C) A psychotherapist
D) A lawyer
Answer: C
27. ELIZA demonstrated that:
A) Machines understand language fully
B) AI can simulate conversation
C) Deep learning existed
D) AI solves all problems
Answer: B
28. A rational agent must:
A) Be perfect
B) Always succeed
C) Make best possible decision based on information
D) Avoid uncertainty
Answer: C
29. Which agent type is best for uncertain environments with trade-offs?
A) Simple reflex agent
B) Utility-based agent
C) Static agent
D) Compiler agent
Answer: B
30. Which of the following is an example of a knowledge-based system?
A) Calculator
B) Expert medical diagnosis system
C) Keyboard driver
D) Text editor
Answer: B
SHORT QUESTIONS ANSWERS
1. Define Intelligent Agent. Explain with example.
An Intelligent Agent is an autonomous system that perceives its environment through sensors and takes actions through actuators in order to achieve specific goals.
An intelligent agent follows the cycle:
Perception → Decision → Action.
It continuously observes the environment, processes information using its internal logic or learning mechanism, and performs actions to maximize performance.
Example:
A self-driving car:
- Sensors: Cameras and radar
- Agent program: Processes road and traffic data
- Actuators: Steering, braking, acceleration
Thus, an intelligent agent behaves intelligently by sensing, thinking, and acting.
2. Explain types of Intelligent Agents.
Intelligent agents are classified into five main types:
- Simple Reflex Agent
Acts only on current percept using condition-action rules. - Model-Based Agent
Maintains internal state to handle partially observable environments. - Goal-Based Agent
Takes actions to achieve specific goals using planning. - Utility-Based Agent
Selects actions that maximize a utility function. - Learning Agent
Improves performance through experience and feedback.
Each type increases in complexity and intelligence level.
3. Define Rational Agent.
A Rational Agent is an agent that selects actions expected to maximize its performance measure based on its percept sequence and knowledge of the environment.
Rationality depends on:
- Performance measure
- Percept history
- Knowledge of environment
- Available actions
A rational agent does not always guarantee success but makes the best possible decision based on available information.
4. Explain PEAS description with example.
PEAS is a framework used to describe the task environment of an intelligent agent.
PEAS stands for:
- P – Performance Measure
- E – Environment
- A – Actuators
- S – Sensors
Example: Self-Driving Car
Performance: Safety, speed, comfort
Environment: Roads, traffic, weather
Actuators: Steering, brakes
Sensors: Cameras, radar, GPS
PEAS helps clearly define how an agent interacts with its environment.
5. What is a Knowledge-Based System?
A Knowledge-Based System (KBS) is an AI system that uses stored knowledge and logical reasoning to solve problems.
It consists of:
- Knowledge Base – Stores facts and rules
- Inference Engine – Applies logic to derive conclusions
These systems are commonly used in expert systems such as medical diagnosis tools.
Example:
IF fever AND cough → possible flu
Knowledge-based systems simulate expert-level decision-making.
LONG QUESTIONS ANSWERS
1. Explain Types of Intelligent Agents in Detail.
Introduction
Intelligent agents are autonomous systems that perceive their environment and take actions to achieve goals. They are classified into different types based on their decision-making mechanisms.
1. Simple Reflex Agents
These agents act only on the current percept using condition-action rules.
Structure:
IF condition → THEN action
They are suitable for simple, fully observable environments.
2. Model-Based Agents
These agents maintain an internal model of the world. They consider both current percepts and past states.
Useful in partially observable environments.
3. Goal-Based Agents
Goal-based agents take actions to achieve specific goals. They use planning and search techniques.
Example: Route planning systems.
4. Utility-Based Agents
These agents maximize a utility function that measures desirability.
They handle trade-offs between different factors such as safety and speed.
5. Learning Agents
Learning agents improve their performance over time using feedback and experience.
They include:
- Performance element
- Learning element
- Critic
- Problem generator
Conclusion
Each type of intelligent agent represents increasing complexity and capability. From simple reflex agents to learning agents, these architectures form the foundation of AI systems.
2. Explain Rational Agent and PEAS Description.
Introduction
Rationality is a central concept in Artificial Intelligence. A rational agent selects actions that maximize its performance measure based on available information.
Rational Agent
A rational agent makes decisions based on:
- Performance measure
- Percept sequence
- Knowledge of environment
- Available actions
Rational does not mean perfect; it means making the best possible decision under given circumstances.
PEAS Description
PEAS is used to define the task environment of an agent.
P – Performance measure
E – Environment
A – Actuators
S – Sensors
Example: Self-Driving Car
Performance: Safety, comfort
Environment: Roads, traffic
Actuators: Steering, braking
Sensors: Cameras, radar
Conclusion
Rationality ensures optimal decision-making, while PEAS provides a structured method to design intelligent agents.
3. Explain Knowledge-Based Systems with ELIZA Case Study.
Introduction
Knowledge-Based Systems are AI systems that use stored knowledge and reasoning mechanisms to solve problems.
Components of Knowledge-Based Systems
- Knowledge Base
Stores facts and rules - Inference Engine
Applies logical reasoning - Working Memory
Stores current inputs - Explanation System
Explains conclusions
ELIZA Case Study
ELIZA was developed in the 1960s and simulated a psychotherapist.
It used:
- Pattern matching
- Keyword detection
- Scripted responses
Example:
User: I feel sad
ELIZA: Why do you feel sad?
ELIZA created an illusion of understanding but did not truly comprehend language.
Conclusion
Knowledge-Based Systems use structured knowledge and reasoning to simulate expertise. ELIZA demonstrated early conversational AI and highlighted both the potential and limitations of rule-based AI systems.



