# VI. 遺伝的アルゴリズムのサンプル 関数の最小値

### 問題について

すでにご存知のとおり、探索空間に関する章で、問題を解くことはは関数の極値を探すことのように表現されます。 これはまさにここで紹介する問題です。

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.

いくつかの関数が与えられていて、GAはその関数の最小値を探そうとします。 別の問題点は、探索空間と適合度関数を定義する必要があることです。 その関数は私たちが与えられた関数の極値を探してたいといことを定義しています。

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 population.
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.

Here is applet, but your browser does not support Java. If you want to see applets, please check browser requirements.

(c) Marek Obitko, 1998
Japanese translation (c) Ishii Manabu, 1999