This PR introduces comprehensive reward tracking for agents and significantly enhances the simulation database schema to support better analysis and evolutionary tracking.
Key Changes
Agent Reward Tracking
Added total_reward accumulation in all action types:
Attack actions
Gather actions
Move actions
Share actions
Enhanced Database Schema
Added new fields to Agents table:
max_health
starvation_threshold
genome_id
parent_id (for tracking lineage)
generation
Added new fields to AgentStates table:
current_health
max_health
starvation_threshold
is_defending
total_reward
age
Added new metrics to SimulationSteps table:
Population dynamics (births, deaths, generations)
Resource metrics (efficiency, distribution)
Performance metrics (health, age, rewards)
Combat metrics (encounters, successful attacks)
Evolutionary metrics (genetic diversity)
Agent Creation Improvements
Added support for tracking parent-child relationships
Added generation tracking for evolutionary analysis
Improved agent initialization with optional logging control
Enhanced genome handling and mutation capabilities
Documentation
Added comprehensive database schema documentation
Added detailed field descriptions and usage examples
Added performance considerations and error handling guidelines
Configuration Updates
Updated default configuration to adjust initial agent populations
This PR introduces comprehensive reward tracking for agents and significantly enhances the simulation database schema to support better analysis and evolutionary tracking.
Key Changes
Agent Reward Tracking
total_reward
accumulation in all action types:Enhanced Database Schema
Added new fields to Agents table:
max_health
starvation_threshold
genome_id
parent_id
(for tracking lineage)generation
Added new fields to AgentStates table:
current_health
max_health
starvation_threshold
is_defending
total_reward
age
Added new metrics to SimulationSteps table:
Agent Creation Improvements
Documentation
Configuration Updates