101
For optimizing these solutions, the templates must be coded as chromosomes as shown
in Figure 9-4. In the initialization phase, Figure 9-4 generates many random chromosomes
(in this case CNN templates), each being a solution for driving the robot. In fact, each
chromosome is a CNN template that is reshaped in a one dimensional array. According to
Figure 9-4, each chromosome does contain a feedback template, a control template and a
bias value. Various methods exist (in genetic algorithms) for coding data as chromosomes.
This paper implements two different methods for coding and generating chromosomes.
The first method is based on the IEEE-754 scheme which is a floating point technique. In
this technique, each value must be converted to binary format according to the IEEE-754
floating point technique. The IEEE floating point format consists of three main parts: the
sign, the exponent, and the mantissa [147]. The number of bits for each field is shown in
the table below.
Table 9-1: Single Precision - IEEE Floating Point Format Structure
Sign
Exponent
Mantissa
1 bit
8 bit
23 bit
With the floating data types mentioned in Table 1, it is possible to store values between
the ranges
38
45
10
4
.
3
,
10
5
.
1
. The use of this method as
a gene coder requires the
definition of a mask for some bits. Otherwise, the random
chromosome generator will
generate values out of the range
V
V
5
,
5
. This condition
is of high importance as a
hardware implementation (using TTL devices) of this algorithm is under consideration. In
the second method impl
emented, a “real” data type value is used as a chromosome coding.
For this step, a random function generates a value in the acceptable range. The
implementation of this method is easier than of the first method. The results from the two
methods are compared and a very good similarity is obtained between them. Nevertheless,
the convergence time in binary coding was 10 percent faster.
One particular important
part of this algorithm is the design of the fitness function. This function or cost function
defines/fixes indirectly the robot behavior [148]. This function
is a particular type of
objective function that quantifies the optimality of a solution in Genetic Algorithms. The
input data for the fitness function are based
on measurements of robots’ parts orientation,
102
location and displacement. In the fitness function we don’t
define any behavioral
locomotion exactly, like a robot kinematics. On the other hand,
we define a function that
satisfies the target or destination without any details.