A sophisticated simulation tool that models societal health and stability through the lens of class dynamics, economic factors, and social conditions. This project provides an interactive way to explore how various factors influence a society's overall success and stability.
- Overview
 - Features
 - Getting Started
 - Technical Details
 - Applications & Use Cases
 - Project Status
 - Contributing
 - The Author
 
The simulator calculates a society's success rate based on the complex interplay between three main classes (lower, middle, and upper) and numerous societal factors. It employs a nuanced algorithm that considers:
- Class prosperity and distribution
 - Economic indicators
 - Social cohesion
 - Government effectiveness
 - Environmental factors
 - Infrastructure quality
 - And more...
 
- Lower Class Prosperity (45% weight) - Represents basic needs and survival
 - Middle Class Stability (40% weight) - Represents economic engine
 - Upper Class Wealth (15% weight) - Represents investment capacity
 
The simulation uses a sophisticated algorithm that considers:
- 
Base Success: Weighted combination of class prosperities
 - 
Penalty Factors:
- Extreme inequality penalties
 - Failed state conditions
 - Low class penalties
 - Factor-specific penalties (corruption, unemployment, etc.)
 - Economic inequality impact
 
 - 
Bonus Factors:
- Social cohesion
 - Class balance
 - Positive synergies between factors
 
 
The simulator determines various societal states including:
- Moderately Stable Society
 - Lower Class Poverty Crisis
 - Middle Class Economic Instability
 - Upper Class Wealth Decline
 - Widespread Government Corruption
 - Severe Social Fragmentation
 - Extreme Economic Inequality
 
For added entertainment value, the simulator includes optional fantasy scenarios:
- Mana Storms
 - Thanos Snap Events
 - Godzilla Rampages
 - Joker Chaos
 - Graphene Technology Revolution
 
- Node.js 18.x or higher
 - npm or yarn package manager
 
- Clone the repository:
 
git clone https://github.com/yourusername/civilization-simulator.git
cd civilization-simulator- Install dependencies:
 
npm install
# or
yarn install- Start the development server:
 
npm run dev
# or
yarn dev- Open http://localhost:3000 in your browser to see the application.
 
npm run dev- Start development servernpm run build- Build production versionnpm run start- Start production servernpm run lint- Run lintingnpm run test- Run tests (when implemented)
The simulation processes various input factors through multiple stages:
- 
Base Calculations:
- Computes prosperity for each class
 - Applies factor effects and synergies
 - Calculates penalties and bonuses
 
 - 
Adjustments:
- Applies scaling factors
 - Implements minimum thresholds
 - Caps maximum penalties
 
 - 
Final Output:
- Success rate (0-100%)
 - Class prosperity levels
 - Current state assessment
 - Notable events
 
 
The simulation uses:
- TypeScript for type safety
 - Modern JavaScript features
 - Complex mathematical models
 - Event generation system
 - State determination logic
 
The simulator can model various real-world scenarios:
- Economic inequality impacts
 - Failed state conditions
 - Social mobility effects
 - Policy change outcomes
 - Crisis response effectiveness
 
The simulator acknowledges certain limitations:
- Simplified model of complex real-world dynamics
 - Focus on specific aspects of society
 - Abstraction of many detailed factors
 - Idealized interactions between factors
 
Planned improvements include:
- More sophisticated economic models
 - Additional societal factors
 - Enhanced historical scenarios
 - Improved visualization tools
 - Time-based progression
 
Contributions are welcome! Please feel free to submit pull requests or open issues for:
- Bug fixes
 - New features
 - Documentation improvements
 - Additional scenarios
 - Algorithm refinements
 
- Find me at PeterMSouzaJr.com