|What you have tried is actually *NOT* a genetic algorithm (GA).
Any genetic algorithm has the following formulation:
0. Generate random values (chromosomes) population;
1. Select a random pair of chromosomes;
2. Recombine chromosomes using cross-over genetic operator;
3. Check if the new child chromosomes are the fittest ones by using objective fitness function;
4. If at least one chromosome in a pair is the fittest, appended it to the array of valid solutions;
4. Mutate those new child chromosomes;
5. Go to step 1 until you've selected N / 2 - chromosomes, where N - the size of population;
6. Proceed with steps 1-5 until you've produced the desired number of fittest solutions;
This is the easies variant of the a classical genetic algorithm.
If you want implement a genetic algorithm, please rework it the way as just I have explained.
And if you've got any questions about how to rework it, just write me in the reply to my post.