A comprehensive, interactive ecosystem simulation that models complex biological systems, species interactions, and evolutionary dynamics in real-time.
EcoForge is a browser-based ecosystem simulation that demonstrates fundamental ecological principles through an interactive visual environment. Watch as species evolve, compete for resources, form complex food webs, and adapt to changing environmental conditions.
- Three Organism Types: Producers (plants), Herbivores, and Carnivores
- Unique Traits: Size, speed, vision range, reproduction rates, and energy requirements
- Adaptive Behaviors: Foraging, predation, reproduction, and environmental response
- Lifecycle Management: Birth, growth, reproduction, and death based on energy and age
- Trophic Levels: Complete food chain from producers to top predators
- Predator-Prey Dynamics: Realistic hunting and consumption behaviors
- Energy Transfer: Efficient energy flow between trophic levels
- Competition: Intra-species and inter-species resource competition
- Real-time Monitoring: Live population counts and species diversity
- Carrying Capacity: Environmental limits on population growth
- Boom-Bust Cycles: Natural population fluctuations based on resource availability
- Extinction Events: Species disappearance and ecosystem reorganization
- Genetic Mutation: Random trait variations in offspring
- Natural Selection: Survival of the fittest through environmental pressures
- Adaptive Radiation: Species diversification to fill ecological niches
- Coevolution: Reciprocal evolutionary changes between interacting species
- Dynamic Conditions: Fluctuating temperature and resource availability
- Resource Management: Renewable and limited resource pools
- Environmental Stress: Impact of changing conditions on species survival
- Habitat Constraints: Spatial boundaries and carrying capacity
- Modern web browser with HTML5 and JavaScript support
- No additional installations required
- Download the
ecoforge.htmlfile - Open it in your preferred web browser
- The simulation will load automatically
- Click "Start Simulation" to begin
- Observe initial species interactions
- Use controls to adjust simulation parameters
- Add new species with "Add New Species" button
- Monitor statistics in real-time
- Start/Pause: Toggle simulation running state
- Reset: Restart simulation with initial conditions
- Add New Species: Introduce new herbivore or carnivore species
- Simulation Speed: Control time progression (1x to 10x)
- Mutation Rate: Adjust genetic variation probability (1% to 100%)
- Resource Abundance: Set plant growth rate (1% to 100%)
- Population Statistics: Total organisms, species count, generation number
- Active Species: Real-time species list with visual identifiers
- Environment Factors: Temperature and resource availability indicators
- Food Web Legend: Color-coded species type identification
graph TB
A[Simulation Engine] --> B[Species Management]
A --> C[Environment System]
A --> D[Rendering Engine]
B --> E[Traits & Genetics]
B --> F[Behavior System]
B --> G[Reproduction]
C --> H[Resource Management]
C --> I[Environmental Factors]
D --> J[Canvas Rendering]
D --> K[UI Updates]
class Species {
constructor(id, type, color, x, y) {
this.id = id;
this.type = type; // 'producer', 'herbivore', 'carnivore'
this.color = color; // Visual representation
this.x = x; // Position
this.y = y;
this.size = 4-6; // Physical size
this.speed = 0.5-2; // Movement capability
this.energy = 100; // Life energy
this.age = 0; // Lifespan tracking
this.vision = 0-80; // Detection range
this.reproductionRate = 0.01-0.02;
this.diet = type-based; // Feeding preferences
}
}class Plant {
constructor() {
this.x = randomPosition();
this.y = randomPosition();
this.size = 3-6;
this.color = '#4cd964';
this.energy = 50;
}
}- Environment Update: Adjust temperature and resources
- Plant Growth: Add new plants based on resource abundance
- Species Update:
- Movement and behavior
- Feeding and energy consumption
- Reproduction with mutation
- Death from old age or energy depletion
- Rendering: Draw all organisms and environment
- Statistics Update: Refresh UI with current data
- Exponential Growth: Unlimited resource scenarios
- Logistic Growth: Resource-limited population curves
- Carrying Capacity: Environmental limits on populations
- Competitive Exclusion: Species competing for identical resources
- Natural Selection: Differential survival and reproduction
- Genetic Drift: Random changes in trait frequencies
- Adaptation: Traits improving survival and reproduction
- Speciation: Emergence of new species characteristics
- Energy Flow: Unidirectional energy transfer through trophic levels
- Nutrient Cycling: Decomposition and resource renewal
- Succession: Ecological community development over time
- Stability and Resilience: Ecosystem response to disturbances
dN/dt = rN(1 - N/K)
Where:
N = Population size
r = Intrinsic growth rate
K = Carrying capacity
Prey: dx/dt = αx - βxy
Predator: dy/dt = δxy - γy
Where:
x = Prey population
y = Predator population
α, β, δ, γ = Interaction parameters
- Real-time population tracking
- Species diversity metrics
- Generation counting
- Mutation event logging
- Color-coded species identification
- Movement trails (optional)
- Population trend graphs
- Food web relationship mapping
- Biology: Evolution, ecology, and population dynamics
- Environmental Science: Ecosystem management and sustainability
- Mathematics: Modeling biological systems with equations
- Computer Science: Algorithm development and simulation design
- Understand trophic levels and energy transfer
- Observe natural selection in action
- Analyze population growth models
- Explore genetic variation and adaptation
- Study ecosystem stability and resilience
- Start with balanced herbivore and carnivore populations
- Observe cyclical population fluctuations
- Analyze impact of initial population ratios
- Rapidly decrease resource abundance
- Monitor species adaptation and extinction
- Study ecosystem recovery mechanisms
- Set high mutation rates
- Track emergence of new traits
- Analyze survival advantages of specific adaptations
- Introduce new species mid-simulation
- Observe competitive interactions
- Study ecosystem resistance to invaders
- Initial population sizes
- Trait value ranges
- Environmental fluctuation rates
- Mutation characteristics
- Resource distribution patterns
- Additional species types (omnivores, decomposers)
- Complex environmental factors (seasons, disasters)
- Spatial heterogeneity (different habitat zones)
- Cooperative behaviors (symbiosis, pack hunting)
- Efficient collision detection algorithms
- Population capping mechanisms
- Adaptive rendering based on population density
- Memory management through object pooling
- Modern JavaScript-enabled browser
- Recommended: 2GB RAM for large simulations
- Optimal performance with hardware acceleration
- 2D spatial representation
- Simplified genetic system
- Basic environmental factors
- Limited species interactions
- 3D visualization options
- Complex genetic inheritance
- Advanced environmental modeling
- Expanded behavioral repertoire
We welcome contributions from educators, students, and developers:
- Fork the repository
- Create feature branches
- Submit pull requests with clear descriptions
- Follow established code style guidelines
- Additional species behaviors
- Enhanced visualization options
- Educational lesson plans
- Performance optimizations
- Documentation improvements
- Odum, E.P. - "Fundamentals of Ecology"
- Begon, M. et al. - "Ecology: From Individuals to Ecosystems"
- Ricklefs, R.E. - "The Economy of Nature"
- Darwin, C. - "On the Origin of Species"
- Futuyma, D.J. - "Evolutionary Biology"
- Coyne, J.A. - "Why Evolution is True"
- Grimm, V. & Railsback, S.F. - "Individual-Based Modeling and Ecology"
- DeAngelis, D.L. & Gross, L.J. - "Individual-Based Models and Approaches in Ecology"
This project is licensed under the MIT License - see the LICENSE file for details.
- Inspired by classic ecosystem simulations like NetLogo and Biosphere
- Educational input from ecology and biology educators
- Testing and feedback from student users
- Open source community contributions
EcoForge - Exploring the complex beauty of ecological systems through interactive simulation
For questions, suggestions, or collaboration opportunities, please open an issue or contact the development team.