This shows a simple genetic algorithm and can be further improved or used as a framework