Purpose of this Document
The Specification details the foundational architecture for creating intelligent, autonomous agents within the universe of ATET (ATET). The primary goal is to outline a system capable of simulating agents that are:
- Reactive: Able to perceive their environment and respond to changes and events in a timely and contextually appropriate manner.
- Goal-Driven: Motivated by internal needs and capable of forming and pursuing goals to satisfy those needs.
- Learning (Rudimentary): Able to form simple memories of events and their outcomes, and gradually develop beliefs that shape their future behavior and decision-making.
This draft focuses on a “vertical slice” of agent intelligence, establishing the core components, systems, and data flow for a single, relatively simple agent. This provides a robust, extensible framework upon which more complex behaviors, needs, social interactions, and the nuanced philosophical aspects of ATET’s identity dynamics can be layered in future development stages. The principles established here aim to serve as the bedrock for the rich, emergent narratives envisioned for the game.
Alignment with ECS and Scheduled/Event-Driven Architecture
The agent simulation detailed herein is designed with a strong affinity for an Entity Component System (ECS) architecture. This approach promotes:
- Data-Oriented Design: Separating agent state (data in components) from behavior (logic in systems) for clarity, performance, and modularity.
- Composability: Agents are defined by the collection of components they possess, allowing for diverse agent types and capabilities.
- Efficient Iteration: Systems operate on tightly packed arrays of relevant components.
Furthermore, this design heavily leverages a Scheduled/Event-Driven Architecture. This means:
- Efficiency at Scale: Instead of polling every agent for every possible state change every tick, agents schedule self-updates for significant future events (e.g., a need reaching a critical threshold, the planned completion of an action).
- Reactivity through Interrupts: External events or significant changes in the environment can interrupt an agent’s current plan or scheduled updates, forcing re-evaluation and adaptation.
- Decoupled Systems: Systems often communicate and trigger subsequent logic via events, rather than direct function calls, promoting modularity and cleaner dependencies.
- Support for Distributed Simulation: This model is conducive to the broader architectural goal of a large, potentially distributed simulation where different regions or “Points of Interest” (POIs) might operate with a degree of autonomy, communicating via messages (events).
The “hard tick rate” philosophy for the overall simulation ensures a consistent temporal baseline against which all scheduled events and system updates are processed.
Overview of the Agent’s Cognitive Loop
The core behavior of an agent emerges from a continuous cognitive loop, which can be broadly categorized into the following phases. These phases are not always strictly sequential for all aspects of an agent’s cognition but represent the general flow of information and decision-making:
- Sense: The agent perceives its immediate environment (e.g., entities, objects, threats, resources) and retrieves relevant information from its internal
AgentMemoryStore
andAgentBeliefStore
. This phase updates its internal representation of the current world state. - Motivate: Internal Needs (e.g., sustenance, safety) are assessed. If needs are unmet or critical thresholds are approached,
Goals
are generated or existing ones are prioritized. This phase determines what the agent wants to achieve. - Plan: For the currently selected
Goal
, the agent derives a set ofPotentialActions
that could lead to its satisfaction. This involves considering available knowledge about the environment and its own capabilities. - Appraise: Each
PotentialAction
is evaluated based on a variety of criteria, including expected benefit, associated risks, costs (time, energy), likelihood of success, and consistency with the agent’sBeliefs
and pastMemory
. This “opinion forming” step results in an appraisal score for each action. - Act: The agent selects the
PotentialAction
with the most favorable appraisal and commits to it. This involves instantiating concrete action components (e.g.,MoveToTargetAction
,PerformEatAction
) which are then processed by dedicated action execution systems over one or more ticks. - Learn: The outcome of the executed action (success, failure, unexpected consequences) is processed. This new experience is recorded in the
AgentMemoryStore
and can lead to the formation of newBeliefs
or the reinforcement/modification of existing ones in theAgentBeliefStore
. Needs are updated, and goals may be resolved or re-evaluated.
This Sense-Motivate-Plan-Appraise-Act-Learn cycle drives the agent’s moment-to-moment behavior, allowing it to adapt to changing circumstances and (over time) exhibit more nuanced and seemingly intelligent responses based on its accumulated experiences.