-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
We need to implement the agent state storage system based on the proposed schema and behavior described in agent_state_storage.md. This feature will enable detailed logging of agent states during simulation steps for later analysis, replay, and debugging.
Goals:
- Store agent states (position, health, resources, etc.) at every simulation step.
- Maintain historical records in a queryable format.
- Support exporting and importing state snapshots.
Tasks:
-
Define Schema
- Create
AgentStatestable with fields:id: primary keyagent_id: foreign key reference toAgentssimulation_step_id: foreign key reference toSimulationStepsposition_x,position_y: numeric (or vector)health,resources: numericother_states: JSON field for extensibility
- Create
-
Modify Simulation Engine
- Log agent states after each step
- Ensure consistent mapping with
SimulationSteps
-
Support Queries
- Ability to retrieve state history for a given agent
- Ability to reconstruct entire grid/world at a given step
-
Testing
- Unit tests for schema interactions
- End-to-end test that validates state tracking over a short simulation
-
(Optional) Performance Optimization
- Explore bulk inserts or batching techniques if simulations are large-scale
Acceptance Criteria:
- The database schema matches the specification
- Agent states are stored accurately after every simulation step
- Queries for historical states work as intended
- Documentation added for schema and logging logic
Reference: See attached agent_state_storage.md for full specification and rationale.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels