An evolutionary ecosystem simulation where complex behaviors emerge from simple rules.
Preylife is a digital ecosystem that demonstrates the emergence of complex evolutionary strategies through simple probabilistic rules. Watch as creatures evolve, adapt, and develop fascinating survival strategies in real-time.
For detailed information about the simulation, check out our comprehensive guide.
- 🧬 Real-time evolution simulation
- 🔄 Complex emergent behaviors
- 🎯 Natural selection and adaptation
- 🌍 Dynamic ecosystem balance
- 📊 Population monitoring
- 🎨 Beautiful visual feedback
- ⚙️ Customizable parameters
- Clone the repository
- Install dependencies:
npm install
- Start the development server:
npm run dev
- Simulation Guide - Detailed explanation of the ecosystem
- Configuration - Customize simulation parameters
- API Documentation - Technical documentation
This project is licensed under the BSD 2-Clause License - see the LICENSE.md file for details.
If you use or modify this software, please provide appropriate credit by:
- Retaining the copyright notice in the LICENSE.md
- Including a reference to the original project (Preylife)
- Indicating if changes were made
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
[Add your demo link here]
Screenshot: Blue circles represent prey, yellow pentagons are predators, and green dots are food resources. The UI shows simulation controls, population statistics, and creature attributes.
- Creatures evolve four key attributes that determine their survival strategy:
- Strength (movement speed & combat)
- Stealth (detection & evasion)
- Learnability (adaptation speed)
- Longevity (lifespan & metabolism)
- Watch as populations naturally develop specialized traits:
- Stealthy prey that excel at predator detection
- Strong predators that dominate through raw power
- Balanced generalists that adapt to changing conditions
- Seasonal Resource Blooms: Every 90 days, massive resource clusters appear
- Adaptive Resource Generation: Environment responds to population pressures
- Geographic Specialization: Limited movement speeds create distinct regional populations
- Natural Decay: Resources and creatures age and expire naturally
- Sophisticated Hunting: Multi-stage predator-prey encounters with stealth and strength checks
- Social Learning: Creatures can learn from successful neighbors
- Anti-Clumping Behavior: Natural territorial spacing
- Energy Economics: Realistic metabolism and activity costs
- Boom-Bust Cycles: Natural population fluctuations
- Extinction Events: Populations can die out if they fail to adapt
- Recovery Mechanics: Environmental responses help prevent complete ecosystem collapse
- Species Conversion: Rare evolutionary jumps between predator and prey roles
This simulation explores several key ecological and evolutionary concepts:
- Natural selection and adaptation
- Predator-prey population dynamics
- Evolutionary arms races
- Specialized vs. generalist strategies
- Resource competition and territorial behavior
- Population bottlenecks and recovery
- Educational Value: Demonstrate fundamental principles of ecology and evolution
- Research Platform: Provide a testbed for studying emergent evolutionary behaviors
- Visual Appeal: Create an engaging visualization of complex natural processes
- Computational Efficiency: Handle hundreds of entities with sophisticated AI in real-time
- Built with TypeScript and Three.js
- Entity Component System (ECS) architecture
- Spatial partitioning for efficient collision detection
- Configurable simulation parameters
- Real-time statistics and visualization
- Development of "speed demons" vs "stealth masters"
- Formation of territorial hunting grounds
- Emergence of specialized survival strategies
- Predator-prey cycles
- Geographic specialization
- Extinction and recolonization events
- Learning cascades through populations
- Resource clustering effects
- Seasonal migration patterns
- Niche exploitation
- Territorial boundaries
Contributions are welcome! Some areas for potential enhancement:
- Additional creature attributes
- New environmental factors
- Enhanced visualization options
- Performance optimizations
- Data collection and analysis tools
This project draws inspiration from:
- Classic predator-prey models (Lotka-Volterra equations)
- Modern ecological research
- Various open-source evolution simulators
"In nature, nothing exists alone." - Rachel Carson