Lab 5: GA to maximize digit gene.
- Make a population of genes of length 20 digits.
- Make a cross over function to create new genes.
- Make the simple evaluation function that returns the sum of the
digits.
- Using cross-over and a population of 20 genes per generation,
make a system that returns the best gene.
- Add mutation.
- Make an evaluation function that minimizes.
- Make a more interesting evaluation function. For instance,
let the user type in a 20 digit number. Now make the
evaluation function the digit by digit difference between
the gene and user's number. Can you improve this function?
- Explore parameters of population size and mutation rate.