The goal (dependent variable) is for the population of red fish to evolve by developing traits that will help them survive for a longer period of time before being eaten by sharks.
-
The strongest 50% of each fish population mate, while the weakest are eliminated from the gene pool. The blue fish are the top 2 fish from the previous generation.
-
The variables I created includes field of vision (the arc each fish can ‘see’ a shark), size, speed, intelligence (does the fish move away from a shark as it enters the arc), and frequency of turns.
As a result, The fish last longer before being eaten as time goes on.
Start of the simulation:- The Top 50% output (to the left) was produced after the red fish were all eaten by sharks
- The red fish with the highest scores have very random traits
- Size tends to decrease
- Speed is very slow
- Radius arc slightly higher
- Intelligence slightly higher
- Size slightly increases
- Speed remains slow
- Turn frequency significantly higher
- Intelligence very high
- Size extremely small
- Speed very slow
- Big radius arc
- High intelligence
Genetic Algorithm code was from https://github.com/HanaAuana/PyWorld (initiation of DNA in objects)