// geneticAlgorithm1c.c - John LeFlohic #include #include #define ORGS 100 #define GENES 20 #define ALLELES 4 #define MUT 1000 char **curG, **nextG, *mod; int *f, totF, Eval(), Sel(), Run(); void Mem(), Init(), Gen(); int main(){ Mem(); printf("The final generation was: %d\n", Run());} void Mem(){ int o; curG=(char**)malloc(sizeof(char*)*ORGS); nextG=(char**)malloc(sizeof(char*)*ORGS); mod=(char*)malloc(sizeof(char)*GENES); f=(int*)malloc(sizeof(int)*ORGS); for(o=0; o=pt) return o;}