GA Exercise (more)
If you have done the GA theory, you can now understand the code of this GA program.
Click to run World:
GA (Finnegans Wake) at
Ancient Brain.
- Clone and Edit this World.
- Turn the debug info on and off to see how it works.
Population size
- Change population size to:
What happens? What is the best value?
Mutation rate
- Change mutation rate to:
What happens? What is the best value?
- Q.
If mutation rate = 0 but you have crossover, why does it still not work?
High mutation rate
- Try a very high mutation rate, like 0.5
- This seems to work fine on short strings, but fails totally on long strings.
- Why?
I am not sure myself.
POWERBASE
- POWERBASE is explained in the code. Change POWERBASE to:
What happens? What is the best value?
Exercises
- Instead of always doing crossover, have a probability of crossover.
Make 2 children at a time.
If no crossover, we get clones of the 2 parents.
Edit the code and test it.
- Make probability of mutation start high and decline.
Same with crossover.
Does this help?