A dynamic agent-based simulation modeling economic interactions between autonomous agents and limited resources. The system explores resource allocation strategies, price dynamics, and wealth distribution under various economic parameters.
Autonomous Agents:
50 agents with evolving resource needs, income/expense dynamics, and bankruptcy rules
Resource Ecosystem:
3 resources with price elasticity, regeneration patterns, and capacity adaptation
Economic Mechanics:
Resource capacity adaptation to economic output
Analysis Tools:
Run full experimentation suite:
python main.py
| File | Purpose |
|---|---|
constants.py |
Central configuration of simulation parameters |
models.py |
Agent/Resource class definitions with core behaviors |
simulation.py |
Main simulation loop and step-by-step execution logic |
helpers.py |
Economic calculations and system operations |
experimentation.py |
Parameter space exploration and result analysis |
main.py |
Entry point for running experiments and viewing results |
| Parameter | Description | Default |
|---|---|---|
NUM_AGENTS |
Initial population size | 50 |
SIMULATION_STEPS |
Duration of each simulation run | 100 |
TAX_RATE |
Wealth redistribution percentage | 2% |
PRICE_ELASTICITY |
Demand sensitivity to price changes | 0.05 |
RESOURCE_REGEN_RATE |
Base resource regeneration rate | 1% |
BANKRUPTCY_THRESHOLD |
Balance level for agent removal | -50 |
AGENT_INCOME_CEILING |
Maximum possible agent income | 1.0 |
The system tests four key parameters across ranges:
Sample findings:
Tax rate that minimizes bankruptcies: 0.0278
Regen rate that maximizes average final balance: 0.0189
Browse the source repository