Unit 3: Intelligent Agents

CSE276 — Artificial Intelligence Foundations 10 min read

I. Foundations of Intelligent Agency

Intelligent-agent theory studies systems that perceive their surroundings and act upon them to achieve objectives. An agent receives percepts through sensors and affects an environment through actuators; an agent architecture is the physical or software platform on which its decision-making program operates.

A. Introduction to intelligent agents and agent architecture

An intelligent agent continually converts perceptual information into actions appropriate to its objectives.

  • Agent function: Formally maps a complete percept history to an action:
TEXT
f: P* -> A
  • f = agent function.
  • P* = set of all possible percept sequences.
  • A = set of actions available to the agent.
  • Agent program: Implements the agent function on a particular architecture; for example, a robot-control program runs on processors connected to cameras, motors, and range sensors.
  • Agent architecture: Supplies the computational and physical resources needed by the program, summarized as:
TEXT
Agent = Architecture + Agent Program
  • Percept and percept sequence: A percept is one sensor input at a particular time, while a percept sequence is the complete history available to the agent. A vacuum agent might perceive [Room A, Dirty] followed by [Room A, Clean].
  • Agent cycle: The recurring sequence is sense → interpret → decide → act. More advanced agents also learn from the consequences of actions.
  • Defining characteristics:
    • Situatedness: The agent operates within an environment rather than in isolation.
    • Reactivity: It responds to environmental changes.
    • Proactiveness: It takes initiative to achieve future outcomes.
    • Persistence: It continues operating over time.
    • Social ability: It may communicate with humans or other agents.

II. PEAS Framework

PEAS provides a systematic method for specifying an intelligent agent’s task before selecting algorithms or designing its internal architecture.

A. PEAS Framework: Performance Measure, Environment, Actuators and Sensors

The PEAS description defines what counts as success, where the agent operates, how it acts, and what it can perceive.

  • Performance Measure: Specifies the criteria used to evaluate behavior. For an autonomous taxi, measures may include safety, legality, travel time, passenger comfort, fuel consumption, and profit.
  • Environment: Contains everything relevant outside the agent. The taxi’s environment includes roads, traffic lights, pedestrians, passengers, weather, maps, and other vehicles.
  • Actuators: Enable the agent to affect its environment. Taxi actuators include steering, accelerator, brakes, gear controls, horn, indicators, and display systems.
  • Sensors: Collect information from the environment. Taxi sensors may include cameras, radar, lidar, GPS, microphones, speedometers, and engine monitors.
  • Design significance: PEAS prevents a designer from defining intelligence only in terms of an algorithm. A powerful planner is ineffective if its sensors cannot detect hazards or its actuators cannot execute required actions.
  • Task alignment: Each component must support the others; for example, collision avoidance cannot be a performance criterion unless sensors detect obstacles and brakes can respond adequately.

III. Rationality and Environments

Rational-agent design links action selection to expected performance while accounting for the information and computational resources available.

A. Rational agents and agent environments

A rational agent selects the action expected to maximize its performance measure given its percept history and prior knowledge.

  • Rational action: For percept sequence p, a rational agent selects:
TEXT
a* = argmax E[U | a, p, K]
  • a* = selected action.
  • a = a possible action.
  • E = expected value under uncertainty.
  • U = performance or utility obtained.
  • p = percept sequence.
  • K = prior knowledge.
  • Rationality versus omniscience: A rational agent chooses well using available evidence; it need not know the actual future. Braking for an apparently blocked road can be rational even if the object later proves harmless.
  • Task-environment properties:
    • Fully or partially observable: Chess exposes the complete board, whereas driving hides intentions and distant hazards.
    • Deterministic or stochastic: A calculator is largely deterministic; medical treatment has uncertain outcomes.
    • Episodic or sequential: Image classification decisions are often independent, while chess moves affect all later positions.
    • Static or dynamic: A crossword remains unchanged during deliberation; road traffic continues moving.
    • Discrete or continuous: Chess uses discrete states and actions; robotic motion uses continuous time, position, and velocity.
    • Single-agent or multi-agent: Route planning may involve one decision-maker, whereas chess includes an opponent.
    • Known or unknown: In a known environment, transition rules are available; in an unknown one, the agent must learn them.

IV. Reactive and State-Based Agents

Reactive architectures select actions from current conditions, while state-based architectures retain information needed when observations are incomplete.

A. Simple reflex agents and model-based agents

Simple reflex agents use immediate condition-action rules, whereas model-based agents maintain an internal representation of the world.

  1. Simple reflex agents:

    • Rule structure: A condition-action rule has the form IF condition THEN action; for example, IF dirt detected THEN suck.
    • Strength: Decisions are fast because the agent performs no explicit planning or historical reasoning.
    • Limitation: The current percept may not reveal the complete state. A cleaning agent cannot know another room is dirty if it neither observes nor remembers it.
  2. Model-based agents:

    • Internal state: Stores aspects of the world not present in the current percept, such as the last known condition of another room.
    • Transition model: Represents how the world changes after actions or independent events.
    • Sensor model: Relates hidden world states to expected observations.
    • Contrast: A simple reflex agent reacts to “what is perceived now”; a model-based agent estimates “what the world is probably like now.”
TEXT
state(t) = UPDATE(state(t-1), action(t-1), percept(t))

Here, state(t) is the current internal state, action(t-1) is the previous action, and percept(t) is the latest observation.

V. Goal-Directed Agents

Goal-directed behavior evaluates actions according to whether they lead toward explicitly represented desired states.

A. Goal-based agents

A goal-based agent uses future consequences, rather than only current conditions, to select actions.

  • Goal representation: A goal defines an acceptable state, such as destination reached or checkmate achieved.
  • Search and planning: The agent considers sequences of actions and uses a transition model to predict resulting states. Route planning compares alternative road sequences before movement begins.
  • Goal test: A Boolean test identifies whether a state satisfies the objective:
TEXT
GOAL-TEST(state) -> true or false
  • Flexibility: Changing the goal can change behavior without rewriting every condition-action rule; a navigation agent can plan toward a new destination using the same map model.
  • Limitation: A binary goal distinguishes success from failure but may not rank several successful outcomes. Two routes may both reach the destination even though one is safer and faster.

VI. Preference and Adaptation

Utility introduces graded preferences among outcomes, while learning allows behavior to improve through data and experience.

A. Utility-based agents and learning agents

Utility-based agents compare the desirability of outcomes, whereas learning agents improve the knowledge or policy used to choose them.

  1. Utility-based agents:
    • Utility function: Assigns a numerical value U(s) to state s; a higher value represents a more preferred outcome.
    • Expected utility: Under uncertainty, actions are evaluated by:
TEXT
EU(a) = sum P(s' | s, a) U(s')
 - EU(a) = expected utility of action a.
 - P(s' | s, a) = probability of next state s'.
 - U(s') = utility of that state.
  • Trade-offs: An autonomous vehicle may balance speed, safety, comfort, and energy use rather than treating arrival as the only criterion.
  1. Learning agents:
    • Performance element: Selects external actions.
    • Learning element: Modifies the performance element using experience.
    • Critic: Evaluates results against a performance standard.
    • Problem generator: Suggests exploratory actions that may produce informative experience.
    • Contrast: Utility explains what outcomes are preferred; learning improves how accurately or efficiently those outcomes are reached.

VII. Autonomy and Multi-Agent Operation

Autonomous systems operate with limited direct control, while multi-agent systems distribute perception, decisions, or tasks among interacting agents.

A. Autonomous intelligent systems and multi-agent systems

Autonomy concerns independent operation, whereas multi-agent intelligence emerges from interaction among separate decision-making entities.

  • Autonomous operation: An autonomous agent relies substantially on its own percepts and learned experience instead of constant human instructions.
  • Degrees of autonomy: Systems range from decision support, where humans approve actions, to high autonomy, where the system plans and acts independently within defined limits.
  • Multi-agent system: Contains multiple agents with individual observations, actions, knowledge, or objectives; examples include robot teams, traffic-control agents, and automated trading systems.
  • Interaction structure: Agents may be cooperative, competitive, or mixed. Chess agents compete, while warehouse robots usually cooperate but still compete for space or charging access.
  • Benefits: Distribution provides parallelism, specialization, scalability, and resilience when one agent fails.
  • Risks: Local decisions may produce congestion, conflict, duplicated work, unstable feedback, or unexpected system-wide behavior.

VIII. Collective Action

Effective multi-agent behavior requires mechanisms that align decisions and manage dependencies between agents.

A. Cooperation and coordination

Cooperation concerns shared objectives, while coordination organizes interdependent actions so that agents do not obstruct one another.

  1. Cooperation:

    • Shared purpose: Agents contribute to a common performance measure, such as minimizing total warehouse order-completion time.
    • Task allocation: Jobs may be assigned through centralized scheduling, auctions, bidding, or contract-net protocols.
    • Information sharing: Agents exchange observations, intentions, or partial plans to improve collective decisions.
  2. Coordination:

    • Conflict avoidance: Scheduling and reservation mechanisms prevent two robots from occupying the same aisle segment simultaneously.
    • Synchronization: Agents order dependent activities; a delivery robot waits until a loading robot completes packaging.
    • Communication trade-off: More communication can improve consistency but consumes bandwidth and may delay action.
    • Emergent behavior: Simple local rules can produce organized global results, but designers must verify that these results satisfy system-level goals.

IX. Human-Centred Agency

Human-centred intelligent systems combine machine computation with human judgment, responsibility, and contextual understanding.

A. Human-AI collaboration

Human-AI collaboration assigns tasks so that human and machine capabilities complement one another.

  • Complementary strengths: AI handles rapid computation, pattern detection, and large datasets; humans contribute contextual reasoning, values, empathy, and responsibility.
  • Interaction models:
    • Human in the loop: A person approves or corrects decisions before execution, as in review of a flagged medical image.
    • Human on the loop: The system acts while a person monitors and can intervene.
    • Human out of the loop: The agent acts independently within established constraints.
  • Explainability: The agent should present relevant reasons, confidence, and evidence so users can calibrate trust rather than accept outputs automatically.
  • Control and accountability: Interfaces need override mechanisms, audit logs, and clear responsibility for consequential decisions.
  • Automation bias: Users may over-trust machine recommendations; poorly calibrated alerts can also cause distrust or alert fatigue.
  • Effective design: Responsibility should be allocated according to risk, reversibility, time pressure, and the reliability of both human and AI judgments.

X. Practical Deployment

Intelligent agents are applied wherever sensing, decision-making, and action must be performed repeatedly in changing environments.

A. Applications of intelligent agents

Applications differ in embodiment and autonomy but share the perception–decision–action structure.

  • Robotics: Industrial arms, warehouse robots, drones, and planetary rovers perceive physical conditions and control movement.
  • Transportation: Driver-assistance and autonomous-driving agents detect lanes, predict traffic behavior, plan routes, and control vehicles.
  • Healthcare: Agents support diagnosis, patient monitoring, treatment scheduling, and robotic surgery, generally under clinical oversight.
  • Finance: Trading, fraud-detection, and credit-monitoring agents analyze transactions and respond to changing market or risk signals.
  • Digital assistants: Conversational agents interpret requests, retrieve information, schedule events, and invoke software tools.
  • Cybersecurity: Monitoring agents identify anomalous traffic, prioritize threats, isolate compromised devices, or recommend responses.
  • Games and simulation: Agents control opponents, teammates, or simulated populations using search, planning, reinforcement learning, and coordination.
  • Smart infrastructure: Traffic signals, electrical grids, and building-management agents adjust resource allocation from sensor data.
  • Deployment requirements: Practical agents need reliability, security, privacy protection, bias evaluation, human oversight, and fallback behavior when sensors, models, or communications fail.