Generation storage and fitness algorythm