Implemented a simple genetic algorithm and explored its performance in evolving solution to one numerical problem, investigating the effect that various parameters have on its performance.
A simple genetic algorithm, that works on binary strings, and shows its performance on the Max-1s problem where the aim is to get a chromosome of all 1s. Used an 8-bit chromosome and, when calculating the fitness, mapped the binary number to an integer first; so the maximum fitness for an 8-bit chromosome is 255 which is the ideal case to reach.
Files atatched are:
- Code (Genetic Algorithm.ipynb)
- Report (Shows how performance has varied with respect to population size, number of generations and chromosome length separately)