Artificial IntelligenceUnit 28 min read

Intelligent Agents: Types, Environments & Rationality

Unit 2 of Artificial Intelligence explores intelligent agents—autonomous entities that perceive and act in environments to achieve goals. This note covers agent types (reflex, model-based, goal-based, utility-based), environment characteristics (PEAS analysis), rationality, and real-world applications in apps like Path

What is an Intelligent Agent?

An intelligent agent is an autonomous entity that perceives its environment through sensors and acts upon it via actuators to achieve specific goals. It operates in a percept sequence (history of observations) and makes decisions based on its program (logic or learned behavior).

Key Components of an Agent

Percepts (e.g., traffic data, sensor inputs)State updates (e.g., new conditions, rewards)AgentEnvironment
Agent-Environment interaction loop (simplified)

Agent Function

An agent’s behavior is defined by its agent function:

  • Architecture: How the agent processes percepts (e.g., simple reflex vs. complex reasoning).
  • Program: The logic or learned model guiding decisions.

Types of Intelligent Agents

Agents are classified based on their perception, memory, and decision-making capabilities. Below is a comparison table:

Reflex0Model-Based1Goal-Based2Utility-Based3Learning4
Classification of intelligent agents by decision-making approach
Agent Type Memory Perception Decision Logic Example
Simple Reflex None Current percept Condition-action rules Traffic light controller
Model-Based Internal state Current percept Uses environment model Self-driving car (predicts obstacles)
Goal-Based Goals Current percept Plans to achieve goals Pathao’s route optimization
Utility-Based Goals + Utilities Current percept Maximizes expected utility Ncell’s network traffic prioritization
Learning Agent Performance data Current percept Improves over time (ML models) YouTube’s recommendation system

Worked Example: Pathao’s Route Optimization (Goal-Based Agent)

Scenario: A Pathao rider receives a request to pick up a passenger in Thapathali and drop them in Lakshmi Path.

  1. Percept: Current location (Thapathali), destination (Lakshmi Path), traffic data.
  2. Goal: Minimize travel time.
  3. Decision:
    • Uses a graph-based search (e.g., A* algorithm) to find the shortest path.
    • Considers real-time traffic (from NTC or Google Maps API).
  4. Action: Takes the route via Khusibhaban → Durbar Marg → Lakshmi Path.
Path 1 (selected)Path 2 (discarded)ThapathaliKhusibhabanJawalakhelDurbar MargLakshmi Path
Pathao’s optimized route (A* algorithm with real-time traffic data)

Why Pathao? Pathao uses goal-based agents to dynamically adjust routes based on live traffic (from NTC or user reports). If traffic jams at Durbar Marg, it reroutes via Jawalakhel.


Environment Characteristics (PEAS Analysis)

An agent’s performance depends on its environment. Use PEAS (Performance, Environment, Actuators, Sensors) to analyze it:

Factor Definition Example: Ncell Network Agent
Performance Success criteria Maximize data throughput, minimize call drops
Environment Type (accessible, deterministic, etc.) Dynamic (user demand fluctuates)
Actuators Actions the agent can take Adjust base station power, reroute calls
Sensors Information the agent receives Signal strength, user location (GPS), call volume

Worked Example: Ncell’s Network Traffic Agent

Scenario: During a concert in Tundikhel, Ncell’s agent detects a surge in calls.

  1. Percept: High call volume in Zone 3, weak signals in Zone 5.
  2. Action:
    • Actuator: Increase power in Zone 5 base stations.
    • Sensor: Monitor signal strength in real-time.
  3. Performance: Reduce call drops by 30%.
Data packetData packetAggregated trafficBase StationUser Device 1User Device 2Core Network
Network traffic agent managing device connections (simplified)

Rationality in Agents

An agent is rational if it acts to achieve the best outcome given its percept sequence and knowledge. Rationality depends on:

  1. Performance measure: What success looks like (e.g., minimize cost, maximize speed).
  2. Environment: Is it fully observable? Deterministic?
  3. Agent’s knowledge: Does it have perfect information?

Worked Example: Bank Loan Approval (Utility-Based Agent)

Scenario: A bank’s AI approves loans based on:

  • Percepts: Applicant’s credit score, income, loan history.
  • Utility Function: .
  • Decision: Approve if .
Applicant Credit Score Income Stability Utility Decision
Ram 0.8 0.6 Approve
Sita 0.5 0.9 Reject

Why Banks Use Utility-Based Agents? Banks like NMB or Global IME use these to balance risk (credit score) and reward (income). A higher utility means a safer loan.


In the Real World

  1. Pathao (Rider Agent)

    • Idea Used: Goal-based agent with real-time route optimization.
    • How: Uses live traffic data (from NTC or Google Maps) to adjust paths dynamically. If a rider is stuck in Kathmandu traffic, Pathao recalculates the route via less congested streets.
  2. Ncell (Network Agent)

    • Idea Used: Utility-based agent for resource allocation.
    • How: Prioritizes calls based on signal strength and user priority (e.g., emergency calls get higher utility). During peak hours, it adjusts base station power to avoid drops.
  3. eSewa (Payment Agent)

    • Idea Used: Model-based agent for fraud detection.
    • How: Monitors transaction patterns (e.g., sudden large payments) and flags anomalies using learned models. If a user’s spending spikes unexpectedly, eSewa may ask for verification.

Exam Tip

  1. PEAS Analysis: Always analyze an agent’s environment using PEAS. Examiners love this structured approach.

    • Example: For a traffic light controller, write:
      • Performance: Minimize wait time for vehicles/pedestrians.
      • Environment: Partially observable (sensors detect cars but not future traffic).
      • Actuators: Change light timings.
      • Sensors: Vehicle/pedestrian detectors.
  2. Agent Types: Memorize the table above. In exams, match real-world examples (e.g., Pathao = goal-based) to agent types.

  3. Rationality: Define rationality as "acting optimally given percepts and knowledge." Use utility functions in numerical questions.

  4. Diagrams: Draw agent-environment interactions (like the class diagram above) or PEAS tables. Visuals score extra marks!

  5. Worked Examples: Practice with small numbers (like the bank loan table). Show every step of calculations (e.g., utility functions).


Visual Summary: Agent-Environment Interaction

sequenceDiagram
    participant Agent
    participant Environment
    Agent->>Environment: Percepts (e.g., traffic data)
    Environment-->>Agent: State update (e.g., jam detected)
    Agent->>Environment: Action (e.g., reroute)
    Environment-->>Agent: New percepts
    Note over Agent: Uses program to decide next action

Based on the TU BITM syllabus for Artificial Intelligence (IT228), unit 2.

Discussion

Loading…