Abstract
This paper introduces an autonomous generalization mechanism for Projective Simulation (PS), a physically-motivated framework for reinforcement learning. By dynamically creating "wildcard clips" that represent abstract features, the agent can learn to navigate environments where it encounters unique stimuli at every single time step—a scenario where traditional tabular learning fails completely. We demonstrate that treating generalization as a structural evolution of memory provides a transparent and flexible alternative to traditional function approximation.
Introduction
In reinforcement learning (RL), an agent typically learns by associating specific states (percepts) with rewarding actions. However, real-world environments rarely present the exact same stimulus twice. If an agent treats every minor variation as a distinct state, it falls victim to the "curse of dimensionality," leading to a failure to learn or generalize.
While standard solutions often involve coupling RL algorithms with "black-box" function approximators like deep neural networks, we argue for a "homogeneous" approach. In this model, generalization capability is built directly into the agent’s internal memory structure. This maintains transparency and provides a clear path toward physical and quantum implementations of autonomous agents.
Methods: The Wildcard Mechanism
The core of our approach builds upon the Projective Simulation (PS) model, where an agent's memory is represented as a directed graph of "clips" (percepts and actions). Decision-making is modeled as a random walk through this network, starting from a triggered percept clip and ending at an action clip.
To enable generalization, we introduce the Wildcard Mechanism, which allows the network to evolve structurally:
- Dynamic Clip Creation: Upon encountering a new stimulus, the agent generates a new percept clip and compares its features to existing memory.
- Abstraction via Wildcards: If multiple percepts share a common feature (e.g., color or shape), the agent creates a "wildcard clip" (denoted by
#) representing that abstract category. For instance, if the agent sees different green shapes, it may create a(#, green)clip. - Layered Hierarchy: These wildcard clips form intermediate layers between raw percepts and actions. The random walk can then transition from a specific percept to an abstract category, and finally to an action.
- Flexible Learning: Using standard PS reward rules, the agent updates the transition weights ($h$-values) of the edges. If a specific abstraction (like "redness") consistently leads to rewards, the edges connected to that wildcard clip are strengthened.
Benchmarking Environments
We evaluated the generalization-capable PS agent in two primary synthetic scenarios:
- The Driver Scenario: A multi-phase task requiring the agent to adapt to changing rules. For example, the agent might initially need to stop for red lights, but later must ignore color and follow arrow directions instead.
- The Neverending-Color Scenario: A challenging task where the agent is presented with a unique background color at every time step. To succeed, the agent must learn to ignore the infinite variety of colors and focus on the relevant feature, such as an arrow's direction.
Key Results
In the "Neverending-Color" task, traditional tabular RL agents are limited to random guessing ($1/n$ success rate) because they never encounter the same state twice. In contrast, the PS agent with generalization achieves significantly higher success by converging on the relevant abstract features.
Our results in the multi-phase Driver Scenario demonstrate the agent's flexibility. As shown in the performance curves, the agent can "unlearn" outdated generalizations and adapt its internal structure to new environmental rules. When a rule change occurs (indicated by the sharp drops in reward), the agent's memory network reconfigures, allowing it to regain high performance through new abstractions.
Discussion and Future Work
This structural approach to generalization offers several unique insights. First, we observe a "More is Better" paradox: having a larger set of potential (even irrelevant) categories can improve asymptotic performance by providing a richer pool of candidate abstractions. Second, because PS is based on stochastic random walks, it is naturally suited for quantization using quantum walks, potentially offering a quadratic speedup in deliberation time.
Future work will address the computational challenge of combinatorial explosion in wildcard clips. We are currently developing "clip-deletion" mechanisms to prune rarely used abstractions, ensuring the memory structure remains efficient. Additionally, we aim to extend this model to unstructured data, such as raw pixels, which may require a preprocessing step to factor percepts into discrete categories.
Summary updated