ResilienceSim is a Python-based civil protection infrastructure simulator for two fictional countries under cascading crises. It models disruption, recovery, resource allocation, consequence propagation, optional humanitarian narration, and an optional vision adapter for scenario annotation.
- Dependency-driven infrastructure simulation
- Multi-agent recovery logic with resource constraints
- Streamlit dashboard for scenario playback and KPI monitoring
- Optional AI narration for humanitarian turn summaries
- Optional YOLOv8 adapter for civilian infrastructure annotation
- Phase 1: Core engine complete
- Phase 2: Scenario builder complete
- Phase 3: Dashboard code complete
- Phase 4: Vision adapter complete as an optional module
- Phase 5: Narrator complete as an optional module
- Phase 6: RL environment and wrapper scaffolded
engine/: world loading, turn engine, consequences, scenario builderagents/: rule agent, PettingZoo environment, RL wrapperui/: dashboard panels and controlsvision/: optional YOLOv8 detectorai_narrator/: optional Claude narratordata/scenarios/: hand-authored and generated scenariostests/: phase-based test suites
pip install -r requirements.txt
streamlit run app.pyBackend:
python -m uvicorn backend.main:app --reload --port 8000Frontend:
cd frontend
npm install
npm run devOpen:
http://localhost:3000
http://localhost:8000/api/health
python -m pytest -q tests/test_phase1.py tests/test_phase2.py tests/test_phase3.py tests/test_phase4.py tests/test_phase5.py tests/test_phase6.pyDependencies include advisories in Next.js internals that require a major version upgrade to resolve. Not exploitable in this deployment context.
This project is a fictional civil-protection and resilience simulator. It does not model weapons, targeting, strike planning, or real-world military operations.