VI. GA Example
Minimum of Function
About the Problem
As you already know from the chapter about search space, problem solving can be often expressed as looking for extreme of a function. This is exactly what the problem shown here is.
Some function is given and GA tries to find minimum of the function. For other problems we just have to define search space and the fitness function which means to define the function, which we want to find extreme for.
You can try to run genetic algorithm at the following applet by pressing button Start. Graph represents some search space and vertical lines represent solutions (points in search space). The red line is the best solution, green lines are the other ones. Above the graph are displayed old and new population. Each population consists of binary chromosomes - red and blue point means zeros and ones. On the applet you can see process of forming the new population in steps.
Button Start starts the algorithm, Step performs one step (i.e. forming
one new generation), Stop stops the algorithm and Reset resets the
We suggest you to start with pressing button Step and watching how GA works in details. The outline of GA has been introduced in one of the previous chapters. First you can see elitism and then forming new offspring by crossover and mutation until a new population is completed.