Autonomous Agents, World Models, and Knowledge-Based Representation Systems

Administrative Guidelines and Exam Scope

  • Curriculum Structural Adjustments:

    • In 20252025, the course slides on adversarial search were officially divided into two distinct slide decks spanning lectures 1515, 1616, and 1717. In previous course offerings, adversarial search was presented as a single deck of approximately 6060 pages encompassing all game algorithms, which presented comprehension difficulties for students.

    • The material covered across lectures 1515 through 1717 directly matches the adversarial search content from previous course iterations, with minor structural reorganizations regarding agents and world models.

  • Midterm Examination Parameters and Scope:

    • No mock test will be provided for the midterm exam.

    • A comprehensive review session analyzing past exam questions from 20232023 and 20242024 is scheduled to be delivered by Anna.

    • The scope for the midterm examination is restricted strictly to two specific topics:

      1. Representation Encoding

      2. Minimax Trees

    • Excluded Topics for Midterm Test: Game theory extensions, stochastic games, autonomous agents, and world models are explicitly excluded from the midterm examination, despite their inclusion in Week 66 lecture decks.

    • Test Structure: The midterm exam comprises exactly 22 primary questions, each containing multiple sub-questions.

Agent Architectures and Cognitive Loops

  • Definitional Clarification of Autonomous Agents:

    • In contemporary computer science, the term "agent" is frequently applied to Search Problem Solvers, Large Language Models (LLMs), Multimodal LLMs, or Evolving Agents. However, its foundational definition originates in classical Reinforcement Learning (RL).

    • An Agent is defined as an autonomous entity possessing three fundamental operational capabilities:

      • Perception: The capacity to observe and receive sensory inputs or percepts from its environment.

      • Deliberation (Planning/Reasoning): The internal process executed between receiving a sensory percept and selecting an action. Historically termed "deliberating," this phase corresponds to modern concepts of planning and reasoning.

      • Action: The capacity to execute motor commands or operations that alter, modify, or interact with the surrounding environment.

  • The Agent-Environment Interaction Loop:

    • The environment presents a sensory observation or percept to the agent.

    • The agent processes the observation through its internal state machine or knowledge base.

    • The agent selects and executes an action based on its current observation and internal state.

    • The executed action impacts the environment, updating its state and generating a new percept to repeat the cycle.

  • Failures and Limitations of Purely Reactive Agents:

    • Classical search algorithms assume a global view, wherein the agent possesses complete, uninhibited visibility over the entire state space, board configuration, and environmental rules.

    • A purely reactive agent maps sensory percepts directly to actions (Percept→Action\text{Percept} \rightarrow \text{Action}). This reactive mechanism fails under three real-world constraints:

      1. Partial Observability (Partial Sensors): Physical sensors rarely provide complete environmental visibility. Objects can be occluded (e.g., a table positioned behind another table, or a person hidden behind an obstacle), denying the agent a global view.

      2. Indirect Sensory Clues: Sensations often provide indirect signals rather than explicit state updates (e.g., detecting an odor or a draft without seeing the source object directly).

      3. Insufficiency of Instantaneous Percepts: Optimal decision-making frequently requires synthesizing sensory data collected across multiple spatial locations and temporal steps (e.g., combining observations from two distinct rooms) rather than reacting solely to the current percept.

World Models and Internal Representation

  • Conceptual Definition of World Models:

    • A World Model is an internal cognitive representation or "imagination" constructed by an agent to emulate physical reality, model environmental transition dynamics, and predict outcomes without executing real-world actions.

    • Formally, the agent maintains an internal state representing its belief about unobservable aspects of the world. This belief state is updated via a State Transition Function (Model\text{Model}):         Internal Statet+1=f(Internal Statet,Actiont,Perceptt+1)\text{Internal State}_{t+1} = f(\text{Internal State}_t, \text{Action}_t, \text{Percept}_{t+1})

  • Practical Motivation and Industry Applications:

    • Real-World Safety and Cost Constraints: Training autonomous agents (such as self-driving vehicles) directly in physical environments is prohibited by high financial costs and the risk of catastrophic destruction during failure states. World models allow agents to train inside internal simulated environments ("dreams").

    • Physical Emulation Example: A human holding an object (e.g., a water bottle) predicts that opening their hand will cause the bottle to drop to the floor. The human does not need to drop the object to verify the physical outcome, as an internal world model encodes physical gravitational laws.

    • OpenAI SORA: Video generation architectures like SORA are categorized as world models because they simulate physical interactions and object dynamics at the pixel level, developing an implicit understanding of physical geometry and motion.

    • Four Typologies: Scientific literature categorizes world models across four distinct definitions: video generation models, latent-space transition models, classical RL environment simulators, and symbolic belief transition networks.

Methodologies for State Representation

  • Overview:

    • To represent environmental states within an agent prior to deep neural network approximations, four classical representation frameworks are utilized.

  • The Vacuum World Benchmark Environment:

    • Environment setup: 22 distinct rooms (Left\text{Left} room LL and Right\text{Right} room RR).

    • Room conditions: Each room is independently either Clean\text{Clean} or Dirty\text{Dirty}.

    • Available Agent actions: Move Left\text{Move Left}, Move Right\text{Move Right}, Suck\text{Suck}.

    • Total distinct system states:         Total States=2 (Status of L)×2 (Status of R)×2 (Agent Position)=8 distinct states\text{Total States} = 2\,(\text{Status of } L) \times 2\,(\text{Status of } R) \times 2\,(\text{Agent Position}) = 8 \text{ distinct states}

  • 1. Atomic Representation:

    • Encodes every environmental configuration as an indivisible scalar identifier or discrete state index (e.g., State 11, State 22, \dots, State 88).

    • Example: State 11 represents Left Dirty\text{Left Dirty}, Right Clean\text{Right Clean}, Agent at Left\text{Agent at Left}. Executing Move Right\text{Move Right} transitions to State 22; executing Suck\text{Suck} transitions to State 33.

    • Limitations:

      • Opaque semantics: Scalar state indices (e.g., State 55) convey no intrinsic information regarding agent location or cleanliness without consulting an external lookup table.

      • Graph complexity: State-transition graphs become highly congested with directed transition arcs.

      • Exponential expansion: Adding rooms causes an exponential explosion in state indices and directed transition arcs.

    • Application: Standard search algorithms (BFS, A*, Minimax) use atomic representations because search mechanics depend solely on state adjacency relationships rather than internal state semantics.

  • 2. Factored Representation:

    • Decomposes each state into a structured vector of explicit, fixed attribute variables.

    • Variables for the Vacuum World (33 variables):

      1. DirtyL∈{0,1}\text{Dirty}_L \in \{0, 1\} (11 if Left room is dirty, 00 if clean).

      2. DirtyR∈{0,1}\text{Dirty}_R \in \{0, 1\} (11 if Right room is dirty, 00 if clean).

      3. Location∈{L,R}\text{Location} \in \{L, R\} (Current room location of the agent).

    • Example State 55 Encoding: DirtyL=1\text{Dirty}_L = 1, DirtyR=0\text{Dirty}_R = 0, Location=L\text{Location} = L.

    • Advantages:

      • High interpretability: Direct inspection of feature vectors reveals exact world attributes without auxiliary mapping tables.

      • Compact transition definitions: Action effects are defined as variable updates rather than explicitly drawing full transition edges across graph nodes.

    • Limitations:

      • Lacks relational constraints: Feature vectors store raw variable values but fail to encode underlying causal dependencies or physical laws across variables.

      • Inability to represent unobserved variables: If an agent cannot observe an unvisited room, feature assignment fails without probabilistic or logical inference mechanisms.

  • 3. Rule-Based / Constraint-Based Representation:

    • Augments variable representations with symbolic propositional logic, common-sense knowledge, and domain constraints to infer unobserved facts.

    • Inference Mechanism:

      • Observation: Agent identifies an object as a Fish\text{Fish}.

      • Domain Constraint / Rule: Fish  ⟹  Lives Underwater\text{Fish} \implies \text{Lives Underwater}.

      • Derived Knowledge: The observed entity lives underwater.

  • 4. Structured Representation:

    • Captures high-level relational schemas and object-oriented structural dynamics across multi-agent or multi-location environments.

    • Efficiency Gain: Instead of defining 2020 distinct operational rules for a 2020-room vacuum environment, a structured representation defines a single generalized action rule:         ∀r∈Rooms,(Location=r∧Action=Suck)  ⟹  Clean(r)\forall r \in \text{Rooms}, \quad (\text{Location} = r \land \text{Action} = \text{Suck}) \implies \text{Clean}(r)

Case Study: The Wumpus World

  • Environment Parameters and Rules:

    • Environment Type: Static grid world (non-adversarial, zero movement from external entities).

    • Hazards and Objectives:

      • Wumpus: Static monster that kills the agent upon co-occupying its cell.

      • Pit: Stationary trap that kills the agent upon entry.

      • Gold: Objective item to be located and retrieved.

    • Sensory Indicators (Perceived in orthogonally adjacent cells):

      • Stench: Generated in cells directly adjacent (North,South,East,West\text{North}, \text{South}, \text{East}, \text{West}) to the Wumpus.

      • Breeze: Generated in cells directly adjacent (North,South,East,West\text{North}, \text{South}, \text{East}, \text{West}) to a Pit.

      • Glitter: Generated strictly within the exact cell containing the Gold.

  • Formal Logical Foundations (Biconditional Logic):

    • Sensory indicators operate under biconditional equivalence (  ⟺  \iff):         Stench(x,y)  ⟺  ∃ (i,j)∈Adjacent(x,y) such that Wumpus(i,j)\text{Stench}(x, y) \iff \exists\,(i, j) \in \text{Adjacent}(x, y) \text{ such that } \text{Wumpus}(i, j)         Breeze(x,y)  ⟺  ∃ (i,j)∈Adjacent(x,y) such that Pit(i,j)\text{Breeze}(x, y) \iff \exists\,(i, j) \in \text{Adjacent}(x, y) \text{ such that } \text{Pit}(i, j)

    • Significance of Biconditionality:

      • A single-way implication (  ⟹  \implies) states that an adjacent Wumpus causes a Stench, but it does not allow the agent to deduce that the absence of a Stench guarantees the absence of a Wumpus in adjacent cells.

      • The biconditional (  ⟺  \iff) enables bidirectional deduction: if a cell lacks a Stench, the agent logically guarantees that no adjacent cell contains the Wumpus.

  • Step-by-Step Execution and Deduction Walkthrough:

    • Grid Coordinates are expressed as (c,r)(c, r) where cc represents the column and rr represents the row.

    • Step 1: Initial State at Cell (1,1)(1,1)

      • Percept at (1,1)(1,1): Stench=False\text{Stench} = \text{False}, Breeze=False\text{Breeze} = \text{False}.

      • Deduction: By biconditional rule, no adjacent cells contain hazards.

      • Marked Safe: Cells (1,2)(1,2) and (2,1)(2,1) are definitively safe.

    • Step 2: Exploration to Cell (2,1)(2,1)

      • Agent moves to (2,1)(2,1).

      • Percept at (2,1)(2,1): Breeze=True\text{Breeze} = \text{True}, Stench=False\text{Stench} = \text{False}.

      • Deduction: At least one adjacent cell—(1,1)(1,1), (2,2)(2,2), or (3,1)(3,1)—contains a Pit.

      • Since (1,1)(1,1) is confirmed safe, a Pit must reside in (2,2)(2,2) or (3,1)(3,1).

      • Action Choice: Entering (2,2)(2,2) or (3,1)(3,1) carries a mortality risk. The agent backtracks to safe cell (1,2)(1,2).

    • Step 3: Exploration to Cell (1,2)(1,2) and Multi-Cell Inference

      • Agent moves to (1,2)(1,2).

      • Percept at (1,2)(1,2): Stench=True\text{Stench} = \text{True}, Breeze=False\text{Breeze} = \text{False}.

      • Wumpus Location Derivation:

        • Stench\text{Stench} at (1,2)(1,2) indicates the Wumpus is at (1,3)(1,3) or (2,2)(2,2).

        • If the Wumpus were at (2,2)(2,2), cell (2,1)(2,1) would have registered a Stench during Step 2.

        • Because percept at (2,1)(2,1) had Stench=False\text{Stench} = \text{False}, cell (2,2)(2,2) cannot contain the Wumpus.

        • Conclusion: The Wumpus is definitively located at cell (1,3)(1,3), deduced safely without entering (1,3)(1,3).

      • Pit Location Derivation:

        • Breeze=False\text{Breeze} = \text{False} at (1,2)(1,2) guarantees no Pit resides in adjacent cell (2,2)(2,2).

        • From Step 2, a Pit exists in either (2,2)(2,2) or (3,1)(3,1). Since (2,2)(2,2) is cleared, the Pit is definitively located at cell (3,1)(3,1).

      • Safety Determination: Cell (2,2)(2,2) has neither Wumpus nor Pit. Cell (2,2)(2,2) is marked safe (OK\text{OK}).

    • Step 4: Exploration to Cell (2,2)(2,2)

      • Agent moves to cell (2,2)(2,2).

      • Percept at (2,2)(2,2): Stench=False\text{Stench} = \text{False}, Breeze=False\text{Breeze} = \text{False}.

      • Deduction: Unvisited adjacent cells (2,3)(2,3) and (3,2)(3,2) are marked safe.

    • Step 5: Exploration to Cell (2,3)(2,3) and Goal Acquisition

      • Agent moves to cell (2,3)(2,3).

      • Percept at (2,3)(2,3): Glitter=True\text{Glitter} = \text{True}.

      • Outcome: Agent locates and retrieves the Gold, successfully finishing the task without triggering hazards.

Knowledge-Based Architecture and Belief Reduction

  • Belief State Elimination Dynamics:

    • Decision-making in unobserved environments acts as a process of continuous possibility elimination.

    • Prior to initial observation in a 4×44 \times 4 grid (1616 total cells), the potential configuration space of hazard placements is massive.

    • At each step, sensory inputs eliminate invalid physical configurations from the agent's internal belief state.

    • The agent does not require complete world observation; it merely needs to eliminate hazard configurations along a path to the goal state.

  • Dual Components of the Knowledge Base (KB):

    • An agent's World Model / Knowledge Base combines two distinct knowledge sources:

      1. Offline / General Rules (Predefined Laws): Static environment rules programmatically defined prior to execution (e.g., physical laws, grid connectivity, biconditional sensory axioms).

      2. Online / Experience Rules (Dynamic Observations): Sequential percepts gathered during physical interaction and navigation.

  • Operational Loop of a Knowledge-Based Agent:

    1. Perceive: Ingest sensor data from current state.

    2. Tell: Append sensory observations to the Knowledge Base.

    3. Ask: Query the Knowledge Base using logical inference engines to derive unobserved cell safety and select optimal actions.

    4. Act: Perform the selected action, alter the state, and iterate.