Genetic Algorithm Simulation
A downloadable Simulation
Using genetic algorithms to create a population of bots that evolve over time! ๐คโจ
It's just a simple (ugly) simulation project to show how the algorithm works, so don't expect an artistic piece.
๐ช๐ต๐ฎ๐ ๐ถ๐ ๐ฎ ๐๐ฒ๐ป๐ฒ๐๐ถ๐ฐ ๐๐น๐ด๐ผ๐ฟ๐ถ๐๐ต๐บ?
A genetic algorithm mimics the process of natural selection. It starts with an initial population of random solutions and evolves them through generations by selecting, breeding, and mutating the best-performing individuals. They are often employed to develop effective solutions for complex optimization and search-related challenges.
So I made this project (not a game, but you can interact with it) where you can see that in action and better understand it.
๐๐ผ๐ ๐๐ผ๐ฒ๐ ๐ถ๐ ๐ช๐ผ๐ฟ๐ธ?
โข ๐๐น๐ผ๐ผ๐ฟ ๐ถ๐ ๐น๐ฎ๐๐ฎ: If a bot touches the red ground they die and won't pass their genes.
โข ๐ฆ๐ผ๐น๐ผ ๐๐ฟ๐ถ๐ฎ๐น๐: They donโt see or touch each other, only the ground.
โข ๐๐ป๐ถ๐๐ถ๐ฎ๐น๐ถ๐๐ฎ๐๐ถ๐ผ๐ป: Each bot is equipped with a unique DNA that defines its traits (e.g., speed, color).
โข ๐๐๐ฎ๐น๐๐ฎ๐๐ถ๐ผ๐ป: Bots are evaluated based on how long they survive and how far they travel.
โข ๐ฆ๐ฒ๐น๐ฒ๐ฐ๐๐ถ๐ผ๐ป & ๐๐ฟ๐ฒ๐ฒ๐ฑ๐ถ๐ป๐ด: Top-performing bots breed to create the next generation, passing on their favorable traits.
โข ๐ ๐๐๐ฎ๐๐ถ๐ผ๐ป: Occasionally, random mutations occur to introduce new variations.
โข ๐๐๐ผ๐น๐๐๐ถ๐ผ๐ป: See at what generation your bots will all have acquired the necessary skills to survive.
๐ง๐ต๐ฒ ๐๐ผ๐ฑ๐ฒ ๐๐ฒ๐ต๐ถ๐ป๐ฑ ๐๐:
โข ๐๐ฟ๐ฎ๐ถ๐ป: Manages bot behavior based on its DNA.
โข ๐๐ก๐: Handles genetic operations like initialization, crossover, and mutation.
โข ๐ฃ๐ผ๐ฝ๐๐น๐ฎ๐๐ถ๐ผ๐ป ๐ ๐ฎ๐ป๐ฎ๐ด๐ฒ๐ฟ: Oversees the entire population lifecycle, from creation to evolution.
๐๐ฒ๐ป๐ฒ๐:
- ๐ฆ๐ฝ๐ฒ๐ฒ๐ฑ: bots that are too slow or doesn't move are punished. They can be too fast as well (there's physics involved).
- ๐๐ผ๐น๐ผ๐ฟ: itโs their camouflage, if they die they wonโt pass their color genes.
- ๐ฆ๐๐ฟ๐๐ถ๐๐ฎ๐น ๐๐ผ๐น๐๐๐ถ๐ผ๐ป: They see if the ground in front of them is lava, they can either run, turn left or right.
๐๐ป๐๐ฒ๐ฟ๐ฎ๐ฐ๐ ๐๐ถ๐๐ต ๐๐ต๐ฒ๐บ! (๐ฎ๐ป๐ฑ ๐๐ฒ๐ฒ ๐ต๐ผ๐ ๐๐ต๐ฎ๐ ๐ฎ๐ณ๐ณ๐ฒ๐ฐ๐ ๐๐ต๐ฒ ๐๐ถ๐บ๐๐น๐ฎ๐๐ถ๐ผ๐ป)
- Click on them to โkillโ.
- Press the pause button and modify the mutation rate value.
#MachineLearning #Unity #Simulation #GeneticAlgorithm
Published | 14 days ago |
Status | Released |
Author | Guilmeer |
Genre | Educational, Simulation |
Tags | 3D, genetic, machine-learning, Unity |
Download
Click download now to get access to the following files:
Leave a comment
Log in with itch.io to leave a comment.