Agent Types & Architectures

GATE Relevance: High

Prerequisites

🎯 Learning Objectives

  • Describe the five main agent architectures and their key components
  • Explain why the table-driven agent is impractical
  • Compare agent types and know when to use each one
  • Identify agent types from descriptions in GATE questions
  • Understand how the learning agent generalizes all other types

1. Overview of Agent Architectures

Russell & Norvig describe five basic agent architectures, arranged from simplest to most general. Each successive type addresses limitations of the previous one. Think of them as a progression from simple reactive rules to full learning systems.

  1. Simple Reflex Agent — Condition-action rules on current percept
  2. Model-Based Reflex Agent — Maintains internal state to handle partial observability
  3. Goal-Based Agent — Uses goals to plan actions via search
  4. Utility-Based Agent — Uses a utility function for optimal decision-making
  5. Learning Agent — Improves its own performance from experience
Table-Driven Agent (Why It Fails)

Before studying practical agent types, recall the table-driven agent: it stores one action for every possible percept sequence. For a camera producing 600×480 pixels with 24-bit color at 30 fps, a single second generates a percept sequence of astronomical size. Storing such a table is impossible. The agent types below are practical alternatives that compress the agent function into manageable code.

2. Simple Reflex Agents

Simple Reflex Agent

A simple reflex agent selects actions based only on the current percept, ignoring the rest of the percept history. It uses condition-action rules (also called if-then rules, situation-action rules, or productions).

How It Works

The agent has a set of rules like:

if condition then action

For each percept, the agent checks which rule matches and executes the corresponding action.

Pseudocode

function SIMPLE-REFLEX-AGENT(percept):
    state = INTERPRET-INPUT(percept)
    rule = RULE-MATCH(state, rules)
    action = rule.ACTION
    return action

Architecture Diagram (Textual)

Simple Reflex Agent Structure

Environment → [Sensors] → What the world is like now ↓ [Condition-Action Rules] ↓ What action I should do now ↓ [Actuators] ← Action → Environment

Strengths & Weaknesses

  • ✔ Simple: Easy to implement and fast to execute.
  • ✔ Works well in fully observable environments with simple mappings.
  • ✘ No memory: Cannot handle partially observable environments (doesn’t remember what it can’t currently see).
  • ✘ No planning: Cannot look ahead or consider consequences of actions.
  • ✘ Infinite loops: May get stuck in loops if the environment is not fully observable (e.g., a vacuum cleaner oscillating forever).

Best for: Fully observable, deterministic, episodic environments. Example: thermostat, simple vacuum-cleaner world.

3. Model-Based Reflex Agents

Model-Based Reflex Agent

A model-based reflex agent maintains an internal state that tracks aspects of the world it cannot currently observe. It uses a model of the world (knowledge of how the world evolves and how its actions affect the world) to update this internal state.

Two Key Models

  • Transition model: How the world changes over time (with or without the agent’s actions). “If I turn the steering wheel left, the car turns left.”
  • Sensor model: How the state of the world is reflected in the agent’s percepts. “When it rains, the camera images become blurry.”

Pseudocode

function MODEL-BASED-REFLEX-AGENT(percept):
    state = UPDATE-STATE(state, action, percept, model)
    rule = RULE-MATCH(state, rules)
    action = rule.ACTION
    return action

Architecture Diagram (Textual)

Model-Based Reflex Agent Structure

Environment → [Sensors] → What the world is like now ↓ [State] ←—— How the world evolves | What my actions do ↓ [Condition-Action Rules] ↓ What action I should do now ↓ [Actuators] → Environment

Strengths & Weaknesses

  • ✔ Handles partial observability: Can remember what was behind it, in previously visited rooms, etc.
  • ✔ More robust than simple reflex in changing environments.
  • ✘ Still uses condition-action rules: No ability to plan ahead or reason about goals.
  • ✘ Model accuracy: If the internal model is inaccurate, the agent’s state estimate diverges from reality.

Best for: Partially observable environments where condition-action rules still suffice. Example: a robot that remembers previously visited rooms.

4. Goal-Based Agents

Goal-Based Agent

A goal-based agent has explicit goal information describing desirable states. It selects actions by considering what will happen in the future (using search and planning algorithms) and choosing actions that achieve its goals.

Key Difference from Reflex Agents

Reflex agents map percepts directly to actions. Goal-based agents ask: “Will this action bring me closer to my goal?” This requires search (exploring possible future states) and planning (constructing a sequence of actions).

Architecture Diagram (Textual)

Goal-Based Agent Structure

Environment → [Sensors] → What the world is like now ↓ [State] ←—— How the world evolves | What my actions do ↓ What it will be like if I do action A? ↓ [Goals] — What am I trying to achieve? ↓ What action I should do now ↓ [Actuators] → Environment

Strengths & Weaknesses

  • ✔ Flexible: Adapts easily to new goals without rewriting rules. Just change the goal.
  • ✔ Can plan ahead: Uses search/planning to find action sequences.
  • ✘ Binary goals: Goals are either achieved or not—no way to compare “how well” different actions perform.
  • ✘ May be slow: Search can be expensive in large state spaces.

Best for: Environments where planning is needed and goals are clearly defined. Example: GPS navigation (goal = reach destination), puzzle solving.

5. Utility-Based Agents

Utility-Based Agent

A utility-based agent has a utility function that maps each state (or sequence of states) to a real number indicating how “happy” or desirable that state is. The agent selects the action that maximizes expected utility.

Why Utility Goes Beyond Goals

Goals are binary (achieved or not). Utility allows trade-offs:

  • A taxi driver reaching the destination faster is better than slower (goal-based says both achieve the goal equally).
  • A safer route with slightly longer travel time may have higher utility than a shorter but dangerous route.
  • When conflicting goals exist (safety vs. speed), utility provides a principled way to balance them.

Architecture Diagram (Textual)

Utility-Based Agent Structure

Environment → [Sensors] → What the world is like now ↓ [State] ←—— How the world evolves | What my actions do ↓ What it will be like if I do action A? ↓ [Utility Function] — How happy will I be in that state? ↓ What action I should do now ↓ [Actuators] → Environment

Strengths & Weaknesses

  • ✔ Optimal decisions: Handles trade-offs, conflicting goals, and uncertainty.
  • ✔ Works with stochastic environments: Can compute expected utility over probabilistic outcomes.
  • ✘ Computational cost: Computing expected utility over all possible outcomes can be expensive.
  • ✘ Designing the utility function: Choosing the right utility function is challenging.

Best for: Complex environments with uncertainty and conflicting objectives. Example: self-driving car (trading off speed, safety, comfort), stock trading, medical treatment planning.

6. Learning Agents

Learning Agent

A learning agent can improve its behavior over time by learning from experience. It consists of four conceptual components.

Four Components of a Learning Agent

ComponentFunctionAnalogy
Performance Element Selects actions based on current knowledge. This is the “agent” we have discussed so far (could be simple reflex, model-based, goal-based, or utility-based). The driver
Critic Evaluates how well the agent is doing (based on a fixed performance standard). Provides feedback to the learning element. The driving instructor observing your driving
Learning Element Uses feedback from the critic to improve the performance element. Modifies rules, models, goals, or utility functions. Your ability to learn from mistakes
Problem Generator Suggests exploratory actions that may lead to new experiences. Balances exploration vs. exploitation. The instructor suggesting you try parallel parking in a busy street to challenge yourself

Architecture Diagram (Textual)

Learning Agent Structure

[Critic] ←—— Performance standard | feedback ↓ [Problem Generator] → [Learning Element] | | exploratory changes/knowledge actions ↓ | [Performance Element] ↓ | Environment ← [Actuators] ← action | [Sensors] → percept → [Performance Element]

Strengths & Weaknesses

  • ✔ Adapts: Improves performance in unknown or changing environments.
  • ✔ General: Can improve any of the other agent types.
  • ✔ Handles initial ignorance: Can start with no knowledge and learn from experience.
  • ✘ Needs training data/experience: Initial performance may be poor.
  • ✘ Complexity: Learning algorithms can be computationally expensive.

7. Comparison of All Five Agent Types

Feature Simple Reflex Model-Based Goal-Based Utility-Based Learning
Uses current percept only ✔ ✘ ✘ ✘ ✘
Has internal state ✘ ✔ ✔ ✔ ✔
Has explicit goals ✘ ✘ ✔ Implicit in utility ✔
Has utility function ✘ ✘ ✘ ✔ Possible
Can learn ✘ ✘ ✘ ✘ ✔
Handles partial observability ✘ ✔ ✔ ✔ ✔
Plans ahead ✘ ✘ ✔ ✔ ✔
Handles trade-offs ✘ ✘ ✘ ✔ ✔
Complexity Lowest Low Medium High Highest
Example Thermostat Vacuum with memory GPS navigation Self-driving car AlphaGo

8. When to Use Which Agent Type

Environment PropertiesRecommended Agent Type
Fully observable, deterministic, simpleSimple Reflex Agent
Partially observableModel-Based Reflex Agent (at minimum)
Complex, requires planningGoal-Based Agent
Stochastic, conflicting objectives, trade-offs neededUtility-Based Agent
Unknown environment, need to improve over timeLearning Agent

9. Worked Examples

Worked Example 1: Classifying a Spam Filter

Question: A spam filter that learns from user-labeled emails (spam/not spam) and improves over time. What type of agent is it?

Solution:

  1. Does it learn? Yes—it improves from user feedback. This makes it a learning agent.
  2. What is the performance element? A classifier (e.g., Naive Bayes) that maps email features to spam/not-spam. This acts as a simple reflex on each email (episodic).
  3. What is the critic? The user’s corrections (marking emails as spam or not-spam).
  4. What is the learning element? The algorithm that updates the classifier’s parameters based on corrected labels.
  5. What is the problem generator? The system might occasionally present uncertain emails to the user for labeling (active learning).

Answer: Learning agent whose performance element is a simple reflex classifier.

Worked Example 2: Identifying a Roomba Vacuum

Question: A Roomba vacuum cleaner has bump sensors, cliff sensors, and an internal map of rooms it has visited. It navigates systematically to cover all areas. Classify its agent type.

Solution:

  1. Has internal state? Yes—it maintains a map of visited areas. This rules out Simple Reflex.
  2. Has a goal? Yes—“clean the entire floor” is an explicit goal. It plans a path to systematically cover all areas.
  3. Has a utility function? Modern Roombas optimize coverage time, battery usage, and avoid re-cleaning—suggesting utility-like optimization.
  4. Can it learn? Some models learn the floor layout over multiple runs and improve their cleaning path.

Answer: At minimum a model-based, goal-based agent. Advanced models are utility-based learning agents.

Worked Example 3: AlphaGo Agent Classification

Question: DeepMind’s AlphaGo learned to play Go by training on human games and then playing against itself. Classify its agent type and identify the four learning components.

Solution:

  1. Agent type: Learning agent with a utility-based performance element.
  2. Performance element: A combination of neural networks (policy network for move selection + value network for board evaluation) and Monte Carlo Tree Search. This acts as a utility-based agent that evaluates future positions.
  3. Critic: The game outcome (win/loss) serves as the performance feedback.
  4. Learning element: Supervised learning from human games (initial training) + reinforcement learning from self-play (improvement).
  5. Problem generator: Self-play generates new game situations. Random exploration in MCTS ensures diverse experiences.

10. GATE-Style Questions

GATE Practice Question 1 (1 mark)

Question: Which agent type is most suitable for a fully observable, deterministic environment where the mapping from percepts to actions is simple?

(A) Goal-based agent    (B) Utility-based agent    (C) Simple reflex agent    (D) Learning agent

Answer: (C). A simple reflex agent works well when the environment is fully observable and deterministic and the action mapping is straightforward. More complex agent types would be overkill.

GATE Practice Question 2 (2 marks)

Question: In a learning agent, which component is responsible for suggesting exploratory actions that may yield new information about the environment?

(A) Critic    (B) Performance element    (C) Learning element    (D) Problem generator

Answer: (D). The problem generator suggests actions that lead to new, informative experiences. The critic provides feedback, the performance element selects the best known action, and the learning element modifies the performance element based on feedback.

11. Common Mistakes & Misconceptions

Mistake 1: Thinking Agent Types Are Mutually Exclusive

A learning agent contains one of the other agent types as its performance element. A utility-based agent incorporates goal information. These form a hierarchy, not mutually exclusive categories.

Mistake 2: Confusing Goal-Based and Utility-Based

Goal-based agents have binary goals (achieved or not). Utility-based agents assign a degree of happiness to each state. If a question mentions trade-offs, competing objectives, or maximizing expected value, the answer is utility-based, not goal-based.

Mistake 3: Forgetting the Four Components of Learning Agents

GATE frequently tests the four components: performance element, critic, learning element, problem generator. Don’t confuse the critic (evaluates performance) with the learning element (improves the agent).

📚 Summary

  • Five agent types form a progression: Simple Reflex → Model-Based → Goal-Based → Utility-Based → Learning.
  • Simple reflex: Condition-action rules on current percept. No memory, no planning.
  • Model-based: Maintains internal state using transition and sensor models.
  • Goal-based: Uses search/planning to achieve explicit goals.
  • Utility-based: Maximizes expected utility for optimal trade-off decisions.
  • Learning: Improves from experience using four components (performance element, critic, learning element, problem generator).
  • The table-driven agent is theoretically complete but practically impossible.
  • Agent types are hierarchical: each builds on the previous.

References

  1. Russell, S. & Norvig, P. (2020). Artificial Intelligence: A Modern Approach (4th ed.). Pearson. — Chapter 2, Sections 2.4.
  2. Wooldridge, M. (2009). An Introduction to MultiAgent Systems. Wiley. — Chapter 2.