Extending a Genetic Algorithm into a search problem

Photo by Steve Bruce on Unsplash
Hill climbing algorithm using the genetic functions Mutate and Fitness.
HILL-CLIMBING(seed: initial random selection, 
n: number of descendants per iteration):
do:
new_population = []
for i=1 to n:
child = Mutate(seed)
new_population.add(child)
seed = max(Fitness(new_population))
while (Fitness is not enough) or (fixed point reached)
Fitness value for 10 different selections over 10 iterations.
SIMULATED-ANNEALING(seed: initial random selection, 
n: number of descendants per iteration):
do:
new_population = []
for i=1 to n:
child = Mutate(seed)
new_population.add(child)
new_seed = random_select(new_population)
if Fitness(new_seed) > Fitness(seed):
seed = new_seed
else:
seed = new_seed only with probability p
while (Fitness is not enough) or (fixed point reached)
Fitness for 10 iterations of the Hill Climbing Algorithm
Fitness for 10 iterations of the Hill Climbing and Simulated Annealing Algorithm

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store