#ifndef GENETIC_ALGORITHM_HPP #define GENETIC_ALGORITHM_HPP #define P_c 0.7 //crossover probability (typical val.) #define P_m 0.001 //mutation probability (typical val.) #define N 8 //population size (change to something even) #define L 8 //string length (don't change) #define G 10000 //number of generations (something huge) void print_population(unsigned char population_in[]); int get_fitness(unsigned char string_in); void init_population(unsigned char* population); void do_selection(unsigned char* population, int* selected); unsigned char get_mask(int locus_in); void do_crossover(unsigned char* population, int* selected); void do_mutation(unsigned char* population); #endif // GENETIC_ALGORITHM_HPP