Introduction
Most non-player characters (NPCs) and AI agents in video games rely on rigid, pre-scripted behaviors. While robust, these systems lack the flexibility to adapt, learn, or cooperate in a believable, self-motivated way. This research introduces an implementation of the SEMLINCS cognitive architecture that enables AI agents to play Super Mario cooperatively. By drawing inspiration from human cognitive science—specifically embodied cognition, predictive coding, and event segmentation—the authors move beyond hardcoded scripts toward an architecture where agents autonomously learn environment dynamics, recognize other agents as distinct actors, and coordinate joint actions to achieve shared goals.
The SEMLINCS Architecture
The authors apply SEMLINCS (SEMantic, SEnsory-Motor, SElf-Motivated, Learning, INtelligent Cognitive System), a predictive control architecture designed for autonomous learning and planning.
As shown in the diagram, the system consists of five interacting modules:
- Motivational System: Governs intrinsic drives like collecting coins or maintaining health.
- Schematic Knowledge: Learns "event-schematic" rules by predicting sensory outcomes. When a prediction fails (a "surprise"), the agent registers an event boundary and forms a new probabilistic rule (e.g., "jumping into a block from below destroys it").
- Schematic Planning: Uses recursive search based on sensorimotor forward simulations to determine the scope of action and plan high-level events.
- Sensorimotor Planning: Employs a stochastic, effect-probability-based Dijkstra search (A*) to execute physical movements.
- Speech System: Facilitates negotiation via natural language to establish common ground for joint plans.
Key Insights
The research highlights three core concepts that enable emergent cooperation:
- Grounded Event Codes: Cooperative behavior is not explicitly hardcoded; it emerges organically from basic sensorimotor experiences and predictive learning.
- Dynamic Scope of Action: By treating other agents as actors, an AI can expand its own reachable space. For example, Mario realizes his physical reach increases if he factors in climbing onto Toad's back.
- Abstract Communication: Agents do not share raw motor commands. Instead, they communicate abstract, schematic plans. This forces the receiving agent to perform "contextual replanning," mentally reenacting the proposed plan to validate it against its own knowledge.
Experimental Results
The architecture was evaluated through qualitative demonstrations in a custom multi-agent Super Mario simulation. The agents successfully learned each other's unique abilities—such as Toad's higher jump and Mario's ability to break blocks—and integrated them into their planning space.
Two primary scenarios were demonstrated:
- Toad Transports Mario: Mario, unable to reach a high block, formulates a plan to mount Toad, have Toad jump to a ledge, and then dismount to break the block. The agents negotiate and execute this sequence successfully.
- Mario Clears a Path: Toad wants a coin blocked by a brick he cannot break. Toad anticipates Mario's ability, proposes a plan for Mario to clear the path, and collects the coin once the obstacle is removed.
Future Directions
While successful, the current implementation has limitations. Agents currently operate under "unconditional cooperation," always agreeing to valid plans. Future work will explore game-theoretic models for conditional cooperation based on fairness and shared rewards. Additionally, the architecture currently supports only sequential actions; moving toward parallel, concurrent coordination (e.g., lifting an object together) remains a significant challenge. Finally, the authors aim to implement a more advanced "Theory of Mind" to reduce the need for explicit verbalization of every plan step.
Summary updated