https://github.com/kiwijuice56/evolution-simulation
Interactive game to simulate emergence and natural selection in biological systems
https://github.com/kiwijuice56/evolution-simulation
biological-simulations biology collision-detection educational evolution evolution-simulation java natural-selection physics-2d physics-simulation simulation
Last synced: 6 months ago
JSON representation
Interactive game to simulate emergence and natural selection in biological systems
- Host: GitHub
- URL: https://github.com/kiwijuice56/evolution-simulation
- Owner: kiwijuice56
- License: mit
- Created: 2022-02-17T05:03:51.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-06-16T23:59:41.000Z (over 3 years ago)
- Last Synced: 2025-03-28T02:53:04.036Z (6 months ago)
- Topics: biological-simulations, biology, collision-detection, educational, evolution, evolution-simulation, java, natural-selection, physics-2d, physics-simulation, simulation
- Language: Java
- Homepage:
- Size: 582 KB
- Stars: 7
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
#  evolution-simulation 
This program simulates emergence and natural selection in biological systems using a few basic components.
![]()
Sample execution
## Organism Mechanics
Organisms are represented with nodes in a graph, each color representing a specific node element.
Each line represents a bidirectional connection in the graph organism.
![]()
An organism!
Each node has an energy property (represented by brightness) that must
be kept above zero to prevent the organism from starving. This can
be achieved through consuming food particles or predation. Nodes lose energy over time and viruses
can deplete energy more quickly.
![]()
Food producers and particles
![]()
Virus producers and particles
Organisms have "DNA" which is represented
through code containing lines of nodes to create and which nodes to connect to. You can create
your own organisms through the program's code editor.
As the organism gains energy, it will read through its code and add nodes with their
respective connections.
If an organism has enough energy, it can duplicate its reproductive node and code
which will then grow into fully a developed organism.### Node Table
| Tag | Col | Description |
| ----- | ----------- | -----------|
| `nod` |  | Structural, strong virus resistance
| `eat` |  | Consume food for energy, low resistance
| `run` |  | Moves away from other organisms
| `jit` |  | Jitter randomly
| `rot` | | Rotate randomly
| `fol` |  | Moves towards other organisms
| `pre` |  | Siphon energy from other organisms
| `sto` |  | Radius changes with energy, high max energy
| `gat` |  | Moves towards food circles
| `rep` |  | (cannot be coded) Organizes growing and replication### Example Code
```
eat 0
rot 0
nod 0
nod 3
nod 4
nod 5
nod 6
jit 7
```
![]()
Organism created from code example
Also, multiple node connections can be made in one line.
```
eat 0
jit 1
rot 2
rot 2
nod 3
nod 3 5
nod 3 6
nod 4
nod 4 8
nod 4 9
```
![]()
Organism created from code example
### Evolution
When an organism duplicates, its code can contain errors through
swaps, deletions, and insertions. Over time, many organism
types can be created.
![]()
Evolution
Experiment with the starting conditions to see what organisms
you can create!## Running the program
The release files were compiled using Java 17. If you encounter errors while trying to execute the jar,
ensure that Java 17 is configured in your PATH and run the program from the terminal.
![]()
Run