An advanced evolutionary simulation based on Richard Dawkins' "The Selfish Gene," specifically modeling the "Battle of the Sexes" concept. The project simulates population dynamics between different mating strategies in a virtual environment.
- 🏙️ City-like environment with autonomous agents
- 👥 Dynamic population simulation
- 🧬 Mendelian inheritance system
- 📊 Real-time data visualization
- ⚡ High-performance processing options
The simulation models four distinct types:
- Faithful Men: Willing to court and parent
- Philanderer Men: Avoid courtship and parenting
- Coy Women: Require courtship before mating
- Fast Women: Don't require courtship
a
: Evolutionary benefit of having a babyb
: Cost of parentingc
: Cost of courtship
- Multi-threaded design for autonomous agents
- Custom time management system
- Advanced GUI with real-time updates
- Custom graphing libraries
- Mendelian inheritance system
- Thread Architecture: Manages agent interactions
- Time Management: Controls simulation flow
- GUI System: Real-time visualization
- Genetic System: Implements inheritance rules
public class Person { private boolean[] genes = new boolean[2]; public void inherit(Person parent1, Person parent2) { // Mendelian inheritance logic } }
- High courtship costs favor "fast" strategies
- High parenting costs benefit "slow" strategies
- Population equilibrium depends on parameter balance
- Higher reproduction benefits favor fast strategies
- Genetic dominance affects population stability
- Full Visualization: Complete with GUI and real-time updates
- Speed-Optimized: Stripped-down version for rapid simulations
- Maps to r-strategist vs K-strategist species behavior
- Provides insights into evolution of mating strategies
- Models population dynamics in nature
- Demonstrates game theory principles in biology
- Examples: Frogs (r-strategist) vs Dogs (K-strategist)
"After four months of regular coding, we reached almost ten thousand lines of code and hundreds of man-hours in debugging this monstrosity of a program. But we couldn't be prouder of the final result."
javac Main.java
java Main
- Dawkins, R. (1976). The Selfish Gene
- Various papers on evolutionary game theory
- Java Swing documentation
This project was developed as part of a computer science course, combining evolutionary biology concepts with advanced programming principles.