MutateEvolve - akilmarshall/procedural-image-generation Wiki
MutateEvolve is a naive genetic algorithm that attempts to optimize a population through a culling and mutation step.
- Initialize the population randomly
- for t time steps
- order the population by fitness
- cull the bottom half
- copy the fit half, mutating each at a random position
- goto 3.
This algorithm experimentally fails to improve a population, for example a population of 500 5x5 images had their average fitness plotted over 3 consecutive episodes of 100 steps each.
Obviously the algorithm does not work, average fitness falls to
$\approx0$ rapidly and then stays there forever.
Primarily I believe this is due to the algorithm having little stability with respect to the individuals that are culled and with the new individuals that are accepted into the population.
How can MutateEvolve be tweaked or modified in order improve its performance (either increase fitness scores, or decrease time required to maximize fitness).
Modify the mutation step:
- select a random location
- neighboring tiles are forced to conform to the neighbor function
Fitness decays notably slower than the unmodified algorithm, however still tends to 0 over time.