"Genetic Algorithms" have become commonplace in
industrial, commercial, and robotic design processes. They
have even been used to program robot brains. Now there is
an alternative — a new kid on the block called Self Similar
Optimization. With just a few lines of computer code it
allows you to sometimes equal or surpass what has been
done with genetic algorithms.

A Self Similar Curve

The self similar curve used in the calculations is one of
the simplest available. It is just the exponential function
found in most computer languages. The input to the
exponential function is going to be a number ranging from
zero to some negative value known as the precision; for
example, from 0 to - 4. This curve is shown in Figure 1.

It is not altogether clear that the curve is self similar,
however, looking at Figure 2 you can see that the curve is
made up of smaller and smaller copies of itself.

Self similarity implies a kind of fairness when searching
for an optimal design or result from an engineering
equation. It means the same strategy is used whether you
are looking at a design very similar to the current best one
or very different to the current best one. Both strategies are
merely scaled copies of each other.

52 SERVO 01.2010

How to Compute

You start out the design process with a randomly
chosen 'parent' design. Then, using the self similar function
you create a mutated 'child' design based on the parent. If
the child turns out to be a better design than its parent
then it simply replaces its parent, as the generator of new
children. Over time and sometimes quite quickly, you can
get very good designs.

An important difference with genetic algorithms is the
type of mutation involved. Rather than being the small local
mutations of genetic algorithms, the mutations can displace
a particular design parameter from one extreme value to
another with moderately high probability in one pass. On
the other hand, it will often only make microscopic changes
to other design parameters. This turns out to be a good
search strategy, similar to the building blocks scheme used
in sophisticated genetic algorithms.

Mutation Express

The easiest way to proceed is to standardize all the
design parameters into the range from zero to one. For
example, zero could mean 0 rpm for a motor and one
could mean 100 rpm. Or, zero could mean a lever 1'' long
and one could mean a lever 5'' long. To get a suitable
mutation for each design parameter, you first pick a
random number between zero and the precision number.
You then calculate the exponential function of that random
number. The exponential function produces a number
somewhere between one and nearly zero. You then
randomly decide whether to add or subtract this number to
the design parameter to get the mutated version. If you