Evolutionary Algorithm
start
initialization
1
termination
done
critera met?
select next
generation
mutation
evaluate fitness
initialization
instantiate array of Gait - members of the population, suggested name: Robots
o load Robots with initial pose for all steps
o store Robots in file (we'll talk about this later)
generation counter = 0
fitnesses to 0
evaluate fitness
send poses to real robot for fixed time period
note distance from starting point and provide to program
repeat for all Robots
compute average fitness
store Robots in file
select next generation
select Robot with best fitness (elitism)
choose several—about 30% of the total—Robots at random and compete, i.e., compare
fitnesses (tournament selection)
select Robot with best fitness in the tournament
repeat the tournaments until all members of the next generation are filled
bump generation counter
mutate
for each Robot in the new generation, for each pose, for each leg
draw two random numbers from range 0 to 1
add the two numbers and subtract 1
multiply by the current maximum mutation angle
add to the azimuths with limits to the max/min angles
repeat starting at drawing two random numbers for the elevations
termination criteria
maximum number of generations, OR
some predefined level of fitness