Skip to content

About

Evolution simulation — Java, JavaFX, genetics & ecosystem

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

29 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

DarwinWorld 🌍

An evolution simulator built with Java and JavaFX. Organisms with individual genomes roam a toroidal map, forage for plants, reproduce, pass on (and mutate) their genes, and eventually die — letting you observe natural selection in real time.

Course project for Object-Oriented Programming at AGH University of Science and Technology (2025).
Variant 3 / C · Authors: Kamil Baran, Katarzyna Kucharzyk


Features

Area Details
Genetics Genome crossover, random mutation, configurable genome length
Ecosystem Plant growth, energy management, reproduction thresholds
Maps Base (standard) and Cultivated map variants with soil-state mechanics
Simulation Configurable via JSON presets — population, energy, map size, mutation rates
Visualisation Live JavaFX GUI with real-time map rendering
Statistics CSV logger tracks population, avg. energy, dominant genotype and more
Testing JUnit 5 tests for core model, genetics, and utilities

Architecture

agh.darwinworld
├── Main.java / SimulationEngine.java        # Entry point & simulation loop
├── app/
│   ├── MainApp.java                         # JavaFX application
│   └── SimulationPresenter.java             # FXML controller
├── model/
│   ├── Animal, Vector2d, MapDirection, ...   # Core domain
│   ├── genetics/                            # Genotype, crossover, mutation
│   └── map/                                 # WorldMap, BaseMap, CultivatedMap, Plant
├── stats/
│   └── CsvLogger.java                       # Simulation statistics export
└── utils/
    └── ConfigManager.java                   # JSON configuration loader

Requirements

  • Java 25+
  • Gradle (wrapper included)

Getting Started

# Clone
git clone https://github.com/kamilbarann/DarwinWorld.git
cd DarwinWorld

# Run
./gradlew run

Configuration

Edit or create JSON presets in the presets/ directory to customise simulation parameters such as map dimensions, initial population, energy values, and mutation rates. The configuration is loaded automatically via ConfigManager.

Running Tests

./gradlew test

License

MIT

About

Evolution simulation — Java, JavaFX, genetics & ecosystem

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages