{"id":21852442,"url":"https://github.com/congard/evolution-agh","last_synced_at":"2026-05-06T12:37:38.821Z","repository":{"id":99998983,"uuid":"580363682","full_name":"congard/evolution-agh","owner":"congard","description":"An evolution simulator written in Java (simulation) and Kotlin (JavaFX GUI) as a part of an Object-Oriented Programming course at the AGH University of Science and Technology.","archived":false,"fork":false,"pushed_at":"2023-01-02T22:53:19.000Z","size":678,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-26T13:24:40.887Z","etag":null,"topics":["agh","agh-university","evolution","java","javafx","kotlin","university-project"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-4-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/congard.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2022-12-20T11:30:11.000Z","updated_at":"2024-03-23T19:01:43.000Z","dependencies_parsed_at":null,"dependency_job_id":"ff55f3ff-b90f-437a-925e-0f6fe1e87d5c","html_url":"https://github.com/congard/evolution-agh","commit_stats":{"total_commits":6,"total_committers":1,"mean_commits":6.0,"dds":0.0,"last_synced_commit":"0bee49fe6505b97a16fe60ff0c7422d063e77049"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/congard%2Fevolution-agh","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/congard%2Fevolution-agh/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/congard%2Fevolution-agh/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/congard%2Fevolution-agh/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/congard","download_url":"https://codeload.github.com/congard/evolution-agh/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244847436,"owners_count":20520312,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agh","agh-university","evolution","java","javafx","kotlin","university-project"],"created_at":"2024-11-28T01:17:04.436Z","updated_at":"2026-05-06T12:37:38.781Z","avatar_url":"https://github.com/congard.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Evolution\n\nThis project is developed by [congard](https://github.com/congard) within the subject\nof Object Orientated Programming at the AGH University of Science and Technology.\n\nProject description: [apohllo/obiektowe-lab/proj1](https://github.com/apohllo/obiektowe-lab/tree/f37bdcef7cdda5b7a933cf93f87ec78e28a018e5/proj1)\n\nTechnology: Java 17 (simulation), Kotlin (JavaFX GUI)\n\nLibraries used:\n\n- [org.json](https://mvnrepository.com/artifact/org.json/json)\n- [OpenCSV](https://mvnrepository.com/artifact/com.opencsv/opencsv)\n\n## Hints\n\n- Use the mouse wheel (or touchpad) to zoom in/out the map\n- Right-click a cell to show its info (and the objects in it)\n- You can resize border panes with mouse\n- Some params can be changed during simulation\n- Pin the animal you want to observe\n- Cells pane: double-click an animal to see its info\n\n## Screenshots\n\n![StartScreen](images/StartScreen.png)\n\n![WorldWidget](images/EvolutionWindow_WorldWidget.png)\n\n![GenotypeStatsBorderPane](images/EvolutionWindow_GenotypeStatsBorderPane.png)\n\n![StatsBorderPane](images/EvolutionWindow_StatsBorderPane.png)\n\n![CellsBorderPane](images/EvolutionWindow_CellsBorderPane.png)\n\n![AnimalsBorderPane](images/EvolutionWindow_AnimalsBorderPane.png)\n\n![WorldWidget_scale](images/EvolutionWindow_WorldWidget_scale.png)\n\n## Notes\n\n- On Linux you may need to add `-Dprism.forceGPU=true` JVM option to improve GUI performance\n\n## TODO\n\n### simulation\n\n- [x] Params\n  - [x] Export to JSON\n  - [x] Import from JSON\n- [x] `Vector2d`\n- [x] `WeightedRandom`\n- [x] `Orientation`\n- [x] `Gene`\n- [x] `Genotype`\n  - [x] `static Genotype mix(Genotype left, Genotype right, float pos)`\n- [x] `WorldCell`\n- [x] `AbstractWorld`\n  - [x] Statistics to CSV\n    - [x] `OpenCSV` : https://mvnrepository.com/artifact/com.opencsv/opencsv\n  - [x] `synchronized void update()`\n    - [x] Generate new grass\n  - [x] `synchronized void forEachCell`\n  - [x] `elements: List\u003cList\u003cList\u003cWorldAbstractElement\u003e\u003e\u003e`\n  - [x] `deadAnimals: LinkedList\u003cAnimal\u003e`\n  - [x] `aliveAnimals: HashSet\u003cAnimal\u003e`\n  - [x] `synchronized void forEachAlive`\n  - [x] `synchronized void forEachDead`\n  - [x] `calcAvgLifespan()` - for dead\n  - [x] `aliveAnimalsCount`\n  - [x] `plantsCount`\n  - [x] `freeFieldsCount`\n  - [x] `avgEnergy` - for alive\n  - [x] `day` - day number\n  - [x] `long nextId()`\n  - [x] `void add(WorldAbstractElement)`\n  - [x] `void remove(WorldAbstractElement)`\n- [x] `RoundWorld`\n- [x] `PortalWorld`\n- [x] `WorldElementType`\n- [x] `WorldAbstractElement`\n  - [x] `pos: Vector2d`\n  - [x] `world: AbstractWorld`\n  - [x] `type: WorldElementType`\n  - [x] `void remove()`\n- [x] `Plant`\n  - [x] `nutritionalValue: Float`\n- [x] `Animal`\n  - [x] `eat(Plant)`\n  - [x] `isWellFed()`\n  - [x] `live()` - must be called by `SimulationEngine` every 'day'\n  - [x] `orientation: Orientation`\n  - [x] `children: LinkedList\u003cAnimal\u003e`\n  - [x] `parents: Animal[2]`\n  - [x] `health: Float`\n  - [x] `birthday: Int` - day number\n  - [x] `deathday: Int` - `-1` if alive\n  - [x] `eatenPlantsCount: Int`\n  - [x] `genotype: Genotype`\n  - [x] `id: long`\n  - [x] `boolean isAlive()`\n  - [x] `static Animal reproduce(Animal p1, Animal p2)`\n- [x] `OnTickListener` : one tick - one day\n- [x] `ErrorHandler`\n- [x] `SimulationEngine`\n  - [x] `void start()`\n  - [x] `void pause()`\n  - [x] `void stop()`\n  - [x] `AbstractWorld getWorld()`\n- [x] `Thread safety`\n  - [x] Lists read/write\n\n### gui\n\n- [x] `StartScreen`\n  - [x] use reflection for params\n  - [x] import params from `json` file\n  - [x] export params to `json` file\n  - [x] enable Scroll for fields\n- [x] `EvolutionWindow`\n  - [x] Record button - record statistics to CSV\n  - [x] `StatusBar`\n  - [x] Update gui on `onTick`\n- [x] `WorldWidget`\n- [x] borders\n  - [x] `StatsBorderPane`\n  - [x] `ParamsBorderPane`\n  - [x] `GenotypeStatsBorderPane`\n    - [x] `GenotypePane`\n  - [x] `CellsBorderPane`\n  - [x] `AnimalsBorderPane`\n- [ ] CSS styles for `Alert`\n- [x] Tests for math\n\n**Disclaimer**: I ran out of time, so you might find the code a bit undocumented\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcongard%2Fevolution-agh","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcongard%2Fevolution-agh","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcongard%2Fevolution-agh/lists"}