Unity Basic Genetic Algorithm

preview_player
Показать описание
Small project I made to see how easy it would be to implement a genetic algorithm in Unity.

The program basically starts off with a random population of 15 different balls, each one has different properties (genome) such as spawn point, friction, mass, bounciness... The objective is to get the most optimum ball. The most optimum ball will be the one that achieves the best score. Each ball gets one point by touching a star and receives more points at the end depending on the box they end up on.

In this particular execution of the program we see how in within 50 generations we end up finding a ball that scores double the points that the best one we found in the initial random population. This is achieved by evolving the initial population with a very simple genetic algorithm.

Needless to say this is not the most optimum solution possible, is just the best solution we got in 50 generations in this particular execution. The point of this video is just to show that everything works, not to find the best solution.

As previously said this was just a test and I'll try implementing more interesting experiments in the future.
Рекомендации по теме
join shbcf.ru