Le Monde is an evolutionary simulation game built with C++20 that explores artificial life through genetic algorithms and physics-based interactions. Watch as creatures evolve, adapt, and compete for survival in a dynamically generated world.
- Physics-Based World: Powered by Box2D for realistic creature movement and collisions
- Genetic Algorithm Evolution: Creatures evolve over generations using NEAT (NeuroEvolution of Augmenting Topologies)
- Dynamic Terrain: Procedurally generated world with different tile types (dirt, water)
- Real-time Visualization: Built with Raylib for smooth 60fps graphics
- Piki: Smaller, agile creatures with 180° vision and moderate energy consumption
- Aiko: Larger, more powerful creatures with focused 120° vision and higher energy capacity
- Energy System: Creatures must manage energy for survival and reproduction
- Vision System: Creatures can see and react to their environment within their vision range
- Plant Life: Plants grow and produce fruits that creatures can consume for energy
- Population Limits: Balanced ecosystem with limits on creatures and resources
- Modern C++20: Clean, efficient codebase using latest C++ standards
- ImGui Interface: Interactive GUI for monitoring and controlling the simulation
- Chunk-Based World: Efficient world management for large-scale simulations
- Configurable Parameters: Easy-to-modify constants for tweaking simulation behavior
- C++20 compatible compiler (GCC 10+, Clang 12+, MSVC 2019+)
- CMake 3.15 or higher
- vcpkg package manager
The project uses the following libraries (managed via vcpkg):
- Raylib (≥5.5) - Graphics and input handling
- RayGUI (≥4.0) - GUI components
- Box2D (≥3.1.0) - Physics simulation
- ImGui (≥1.91.9) - Advanced GUI interface
- fmt - String formatting
- libnoise - Procedural noise generation
- Google Test (≥1.17.0) - Unit testing
git clone https://github.com/Microsoft/vcpkg.git
cd vcpkg
./bootstrap-vcpkg.sh # Linux/macOS
# or
./bootstrap-vcpkg.bat # Windows./vcpkg install --triplet=x64-linux # Linux
# or
./vcpkg install --triplet=x64-osx # macOS
# or
./vcpkg install --triplet=x64-windows # Windows# Configure with CMake preset
cmake --preset=default
# Build the project
cmake --build build --config Release
# Run the simulation
./build/le_monde- Mouse: Pan around the world by dragging
- Scroll: Zoom in/out to observe creatures up close or get a world overview
- GUI Panel: Monitor population statistics, energy levels, and generation progress
Key parameters can be modified in src/constants.hpp:
// World configuration
WORLD_SIZE{4000.0, 4000.0} // World dimensions
TILE_SIZE{16.0, 16.0} // Terrain tile size
// Creature limits
MAX_CREATURES = 200 // Maximum creature population
MAX_FRUITS = 2000 // Maximum fruit count
// Piki creature stats
PIKI_MAX_ENERGY = 40.0 // Maximum energy capacity
PIKI_VISION_RANGE = 1000.0 // How far they can see
PIKI_VISION_ANGLE = 180.0 // Field of view in degrees- Initial Population: Creatures spawn with random neural networks
- Survival: Creatures must find food and avoid dangers to survive
- Reproduction: Successful creatures reproduce, passing on their neural networks
- Mutation: Offspring have slight variations in their neural networks
- Selection: Better-adapted creatures are more likely to survive and reproduce
- Iteration: The cycle continues, leading to increasingly sophisticated behaviors
le-monde-c/
├── src/
│ ├── main.cpp # Application entry point
│ ├── world.cpp/hpp # World management and generation
│ ├── ga_manager.cpp/hpp # Genetic algorithm coordination
│ ├── entities/ # Game entities
│ │ ├── creatures/ # Creature implementations
│ │ │ ├── piki.cpp/hpp
│ │ │ └── creature.cpp/hpp
│ │ ├── tiles/ # Terrain tile types
│ │ └── spawner.cpp/hpp # Creature spawning system
│ ├── gui/ # User interface
│ └── constants.hpp # Simulation parameters
├── libs/ # Independent libraries (MIT Licensed)
│ ├── libgame/ # Game engine utilities
│ │ ├── LICENSE # MIT License
│ │ ├── README.md # Library documentation
│ │ └── src/ # Game utilities and Raylib integration
│ └── libneatga/ # NEAT genetic algorithm implementation
│ ├── LICENSE # MIT License
│ ├── README.md # Algorithm documentation
│ └── src/ # NEAT algorithm code
├── CMakeLists.txt # Build configuration
├── vcpkg.json # Dependency specification
└── LICENSE.md # Le Monde Research License
Le Monde uses a multi-license approach to balance community contribution with project protection:
| Component | License | Use Cases |
|---|---|---|
| libgame | MIT License | ✅ Any project (including commercial) |
| libneatga | MIT License | ✅ Any project (including commercial) |
| Le Monde Application | Le Monde Research License | 🎓 Educational & Research use |
The complete Le Monde simulation is available under the Le Monde Research License v1.0:
✅ Permitted Uses:
- Educational institutions and students
- Academic research and publications
- Personal learning and experimentation
- Non-commercial research projects
❌ Restrictions:
- Commercial distribution or sale
- Use in commercial products/services
- Revenue-generating applications
The core libraries can be used freely in any project:
- libgame: Game development utilities, Raylib integration, camera systems
- libneatga: Complete NEAT genetic algorithm implementation
These libraries are designed to be valuable standalone components for the broader development community.
For commercial applications:
- Libraries: Use freely under MIT License
- Complete Application: Contact us for commercial licensing terms
See LICENSE.md for complete terms and conditions.
Contributions are welcome! Here are some areas where you can help:
- New Creature Types: Implement new species with unique behaviors
- Environmental Features: Add weather, seasons, or natural disasters
- Performance Optimization: Improve simulation speed for larger populations
- Visualization: Enhanced graphics, charts, or analysis tools
- Documentation: Improve code documentation and examples
The MIT-licensed libraries especially welcome contributions:
- libgame: Game utilities, graphics improvements, new features
- libneatga: Algorithm optimizations, new mutation operators
- Fork the repository
- Create a feature branch
- Make your changes with tests
- Submit a pull request
- Follow our coding standards and respect backward compatibility
All contributions will be licensed under the same terms as the component you're contributing to.
Le Monde can be used for:
- Evolutionary Biology Research: Study emergence of complex behaviors
- AI Development: Test neural network evolution strategies
- Game Development: Learn about ecosystem simulation techniques
- Educational Purposes: Demonstrate principles of artificial life and evolution
- Raylib - A simple and easy-to-use library to enjoy videogames programming
- Box2D - A 2D physics engine for games
- Dear ImGui - Bloat-free graphical user interface library for C++
- vcpkg - C/C++ dependency manager from Microsoft
- CMake - Cross-platform build system generator
- fmt - A modern formatting library for C++
- GoogleTest - Google's C++ testing and mocking framework
- libnoise - A portable, open-source, coherent noise-generating library for C++
- NEAT Algorithm - NeuroEvolution of Augmenting Topologies by Kenneth O. Stanley
- Genetic Algorithms - "An Introduction to Genetic Algorithms" by Melanie Mitchell
- Artificial Life - MIT Press journal on artificial life research
- Stanley, K. O., & Miikkulainen, R. (2002). Evolving neural networks through augmenting topologies. Evolutionary computation, 10(2), 99-127.
- Reynolds, C. W. (1987). Flocks, herds and schools: A distributed behavioral model ACM SIGGRAPH computer graphics, 21(4), 25-34.
- Langton, C. G. (1986). Studying artificial life with cellular automata. Physica D: Nonlinear Phenomena, 22(1-3), 120-149.
- The Bibites - Léo Caussan's artificial life simulation with evolving neural network creatures
- Tierra - Thomas S. Ray's artificial life simulator
- Avida - Digital evolution research platform
- OpenAI Gym - Toolkit for developing and comparing reinforcement learning algorithms
- NEAT-Python - Python implementation of NEAT algorithm
Happy Simulating! 🧬✨