HOW TO ESCAPE TRAPS USING
CLONAL SELECTION ALGORITHMS
V. Cutello, G. Narzisi, G. Nicosia, M. Pavone, G. Sorace
Department of Mathematics and Computer Science - University of Catania
V. le A. Doria 6, 95125 Catania Italy
Keywords:
Evolutionary Algorithms, Immune Algorithms, Clonal Selection Algorithms, Trap Functions.
Abstract:
This paper presents an experimental study on clonal selection algorithms (CSAs) to optimize simple and
complex trap functions. Several settings of the proposed immune algorithms were tested in order to effectively
face such a hard computational problem. The key feature to solve the trap functions, hence escape traps,
is the usage of the hypermacromutation operator couple with a traditional perturbation immune operator.
The experimental results show that the CSAs we designed are very competitive with the best algorithms in
literature.
1 CLONAL SELECTION THEORY
Artificial Immune Systems (AIS) are computational
models, inspired by biological immune systems in
a broader sense, that have often been shown to
be effective for difficult combinatorial optimization
(Cutello V., 2002), learning and solving problems
(Timmis J., 2001) and many other areas appearing
in various industrial, economical and academic do-
mains (de Castro L. N., 2002b). In this paper, we
use Clonal Selection Algorithms (CSAs) to solve two
trap functions, i.e. for extracting the characteris-
tic behavior when facing these computational prob-
lems. The trap functions are complex toy problem,
that can help in understanding the efficiency of al-
gorithms’ search ability. Toy problems (e.g., ones-
counting, Basin-with-a-barrier, Hurdle-problem) play
a central role in understanding the dynamics of algo-
rithms (Prugel-Bennett A., 2001). They allow algo-
rithm designers to devise new tools for mathemati-
cal analysis and modelling. One can tackle toy prob-
lems to build-up a fruitful intuition about the algo-
rithm workings. Moreover, toy problems can be used
to show the main differences between different algo-
rithms. In the present experimental research work, we
will consider the main differences between clonal se-
lection algorithms, and we will show which particular
algorithms and implementation to use to solve effec-
tively the trap functions, a paradigmatic example of
toy problem.
Clonal selection algorithms are special kind of Im-
mune Algorithms (de Castro L. N., 2002b; Cutello V.,
2004) which use the clonal expansion and the affinity
maturation as the main forces of the evolutionary pro-
cess. The theory of clonal selection (Burnet, 1959),
suggests that among all possible cells with different
receptors circulating in the host organism, only those
who are actually able to recognize the antigen will
start to proliferate by duplication (cloning). Hence,
when a B cell is activated by binding an antigen,
it produces many clones, in a process called clonal
expansion. The resulting cells can undergo somatic
hypermutation, creating offspring B cells with mu-
tated receptors. Antigens compete for recognition
with these new B cells, their parents and with other
clones. The higher the affinity of a B cell to avail-
able antigens, the more likely it will clone. This re-
sults in a Darwinian process of variation and selec-
tion, called affinity maturation. Two key features of
the clonal selection theory need to be taken into ac-
count: the hypermutation mechanism and the clonal
expansion. Hypermutation can be seen as a local
search procedure that leads to a fast ”maturation” dur-
ing the learning phase. The clonal expansion phase
triggers the growth of a new population of high-value
B cells centered on a higher affinity value. We will
describe, in what follows, the class of immune algo-
rithms (IA) based on the theory of clonal selection.
To this end, we will abstract a simplified model of
the IS. We will consider only two entities: antigens
322
Cutello V., Narzisi G., Nicosia G., Pavone M. and Sorace G. (2004).
HOW TO ESCAPE TRAPS USING CLONAL SELECTION ALGORITHMS.
In Proceedings of the First International Conference on Informatics in Control, Automation and Robotics, pages 322-326
DOI: 10.5220/0001142503220326
Copyright
c
SciTePress
(Ag’s) and B cells. The input is the Ag (i.e.,the prob-
lem to tackle, the function to optimize); the output
is basically the candidate solutions, the B cells, that
have solved/recognized the Ag. All IAs based on the
clonal selection theory are population based. Each
individual of the population is a candidate solution
belonging to the combinatorial fitness landscape of
a given computational problem. Using the cloning
operator, an immune algorithm produces individuals
with higher affinities (higher fitness function values),
introducing blind perturbation (by means of a hyper-
mutation operator) and selecting their improved ma-
ture progenies. We will describe two different exam-
ples of Clonal Selection Algorithms. We start with
the algorithm CLONALG (de Castro L. N., 2002a),
which uses fitness values for proportional cloning, in-
versely proportional hypermutation and a birth oper-
ator to introduce diversity in the current population
along with a mutation rate to flip a bit of a B cell mem-
ory. Extended algorithms use also threshold values to
clone the best cells in the present population. We will,
then, describe an immune algorithm that uses a static
cloning operator, hypermutation and hypermacromu-
tation operators, without memory cells and an aging
phase, a deterministic elimination process; we will re-
fer to the algorithm using the acronym opt-IA.
CLONALG. CLONALG (de Castro L. N., 2002a)
is characterized by two populations: a population
of antigens Ag and a population of antibodies
Ab (denoted with P
(t)
). The individual anti-
body, Ab, and antigen, Ag, are represented by
string attributes m = m
L
,...,m
1
, that is, a point
in an Ldimensional real-valued shape space
S, m S
L
⊆
L
. The Ab population is the set of
current candidate solutions, and the Ag is the environ-
ment to be recognized. After a random initialization
of the first population P
(0)
, the algorithm loops for a
predefined maximum number of generations (N
gen
). In the first step, it determines the fitness function
values of all Abs in relation to the Ag. Next, it
selects n Abs that will be cloned independently and
proportionally to their antigenic affinities, generating
the clone population P
clo
. Hence, the higher the
affinity-fitness, the higher the number of clones
generated for each of the n Abs with respect to
the following function: N
c
=
i=1...n
(β n)/i
where β is a multiplying factor to be experimentally
determined. Each term of the sum corresponds to the
clone size of each Ab. The hypermutation operator
performs an affinity maturation process inversely
proportional to the fitness values generating the
matured clone population P
hyp
. After computing
the antigenic affinity (i.e., the fitness function) of
the population P
hyp
, CLONALG creates randomly
d new antibodies that will replace the d lowest fit
Abs in the current population (for the pseudo-code of
CLONALG see (de Castro L. N., 2002a)).
opt-IA. The opt-IA algorithm uses only two en-
tities: antigens (Ag) and B cells like CLONALG.
At each time step t, we have a population P
(t)
of
size d. The initial population of candidate solutions,
time t =0, is generated randomly. The function
Evaluate(P) computes the affinity (fitness) function
value of each B cell x P. The designed IA , like
all immune algorithms based on the clonal selection
principle, is characterized by clonal expansion, the
cloning of B cells with higher antigenic affinity.
The implemented IA uses three immune operators,
cloning, hypermutation and aging. The cloning oper-
ator, simply, clones each B cell dup times producing
an intermediate population P
clo
of size d × dup. The
hypermutation operator acts on the the B cell receptor
of P
clo
. The number of mutations M is determined
by a mutation potential. It is possible define various
mutation potential. We tested our IA using static,
and inversely proportional hypermutation operators,
hypermacromutation operator, and combination of
hypermutation operators and hypermacromutation.
The two hypermutation operators and the Hyperma-
cromutation perturbs the receptors using different
mutation potentials, depending upon a parameter c
In particular, it is worthwhile to note here, that all
the implemented operators try to mutate each B cell
receptor M times without using probability mutation.
The mutation potentials used in this research work
are the following: Static Hypermutation (H1): the
number of mutations is independent from the fitness
function f, so each B cell receptor at each time
step will undergo at most M
s
(x)=c mutations.
Inversely Proportional Hypermutation (H2): the
number of mutations is inversely proportional to
the fitness value, that is it decrease as the affinity
function of the current B cell increases. So at
each time step t, the operator will perform at most
M
i
(f(x)) = ((1
E
f(x)
) × (c × )) + (c × ))
mutations. In this case, M
i
(f(x)) has the shape
of an hyperbola branch. Hypermacromutation (M):
the number of mutations is independent from the
fitness function f and the parameter c. In this case,
we choose at random two integers, i and j such
that (i +1) j the operator mutates at most
M
m
(x)=j i +1directions, in the range [i, j].
The aging operator eliminates old B cells, in the
populations P
(t)
, P
(hyp)
and/or P
(macro)
, to avoid
premature convergence. To increase the population
diversity, new B cells are added by the Elitist
Merge
function. The parameter τ
B
sets the maximum num-
ber of generations allowed to B cells to remain in the
population. When a B cell is τ
B
+1old it is erased
HOW TO ESCAPE TRAPS USING CLONAL SELECTION ALGORITHMS
323
by the current population, no matter what its fitness
value is. We call this strategy, static pure aging.
During the cloning expansion, a cloned B cell takes
the age of its parent. After the hypermutation phase,
a cloned B cell which successfully mutates, that is
the new receptor will have a better fitness value, will
be considered to have age equal to 0. Such a scheme
intends to give an equal opportunity to each “new
receptor” to effectively explore the landscape. We
note that for τ
B
greater than the maximum number of
allowed generations, the IA works essentially without
aging operator. In such a limit case the algorithm
uses a strong elitist selection strategy. The best B
cells which“survived” the aging operator, are selected
from the populations P
(t)
, P
(hyp)
and/or P
(macro)
,
in such a way each B cell receptor is unique, i.e. each
B cell receptor is different from all other receptors.
In this way, we obtain the new population P
(t+1)
,
of d B cells, for the next generation t +1. If only
d
<dB cells survived , the Elitist Merge function
creates d d
new B cells (Birth phase). The boolean
function Termination
Condition() returns true if a
solution is found, or a maximum number of fitness
function evaluations (T
max
) is reached. Next we
show the pseudo-code of the proposed Immune
Algorithm.
opt-IA(, d, dup, τ
B
,c,h,hm)
1. t := 0
2. P
(t)
:= Initial Pop()
3. Evaluate(P
(0)
)
4. while (¬ Termination
Condition())do
5. P
(clo)
:= Cloning (P
(t)
,dup)
6. if (h is TRUE) then
7. P
(hyp)
:= Hypermutation(P
(clo)
,c,)
8. Evaluate(P
(hyp)
)
9. if (hm is TRUE) then
10. P
(macro)
:= Hypermacro(P
clo
)
11. Evaluate (P
(macro)
)
12. Pure
Aging(P
(t)
,P
(hyp)
,P
(macro)
B
)
13. P
(t+1)
:=Merge (P
(t)
,P
(hyp)
,P
(macro)
)
14. t := t +1
15.end
while
The boolean variables h, hm control, respectively, the
hypermutation and the hypermacromutation operator.
2 ESCAPING TRAPS
In this section, we will describe the behavior and
performances of the Clonal selection algorithms pre-
sented in previous section. First, we briefly illustrate
the two trap functions, simple and complex trap func-
tions, faced by CLONALG and opt-IA, and then we
report the experimental results obtained with different
0
10
20
30
40
50
60
70
80
90
100
0
20 40 60 80 100
Simple trap function
0
20
40
60
80
100
0 20 40 60 80 100
Complex trap function
Figure 1: Simple and Complex trap functions.
algorithmic settings. The trap functions (Nijssen S.,
2003), simply, take as input the number of 1’s of bit
strings of length :
f(x)=
f(u(x)) =
f
k=1
x
k
(1)
For our experiments we will use two trap functions: a
simple trap function and a complex trap function.In
the following we give the definition of the simple trap
function:
f(u)=
a
z
(zu),
if uz
b
z
(uz),
otherwise.
(2)
There are many choice for parameters a, b and z, we
will use the parameter values used in (Nijssen S.,
2003): z (1/4); b = z 1; 1.5b a 2b; a
a multiple of z.
The simple trap function is characterize by a global
optimum (for a bit string of all 0’s) and a local opti-
mum (for a bit string of all 1’s) that are the comple-
ment bit-wise of each other. The complex trap func-
tion, how we will see, is more difficult to investigate,
in fact there are two directions to get trapped :
f(u)=
a
z
1
(z
1
u), if uz
1
b
z
1
(uz
1
), if z
1
<uz
2
b(z
2
z
1
)
z
1
1
1
z
2
(uz
2
)
otherwise.
(3)
We note that for z
2
= the complex trap function
becomes the simple trap function. In this case the val-
ues of parameter z
2
are determines by the following
equation z
2
= z
1
, with this trick an ad hoc oper-
ator that mutates all the bit of string does not obtain
the global maximum of the complex trap function (see
figure 1). The tables of the next section reporting the
experimental results will label the trap function with
the following syntax: S(type) and C(type); where S
and C mean respectively Simple and Complex trap
function, while type varying with respect the param-
eter values used by simple and complex trap func-
tions: type I ( =10,z =3,a =12,b =6),
type II ( =20,z =5,a =20,b =14), type
III ( =50,z =10,a =80,b =39), type IV
( =75,z =20,a =80,b =54), type V ( =
100,z =25,a = 100,b =74). For the complex trap
function z
1
= z and z
2
= z
1
.
ICINCO 2004 - INTELLIGENT CONTROL SYSTEMS AND OPTIMIZATION
324
Table 1: The best results obtained by CLONALG
1
with population size N =10, varying d
{1, 2, 3, 4, 5}.
Trap
1
ρ
e
(f )
e
(ρf )
SR AES (β, ρ) SR AES (β, ρ)
S(I) 100 1100.4 (.5,3) 100 479.7 (.8,2)
S(II)
100 27939.2 (.8,8) 24 174563.4 (.1,4)
S(III)
0- -0- -
S(IV)
0- -0- -
S(V)
0- -0- -
C(I) 100 272.0 (.7,3) 100 251.0 (.9,4)
C(II)
100 17526.3 (1,8) 10 191852.7 (.2,1)
C(III)
0- -0- -
C(IV)
0- -0- -
C(V)
0- -0- -
CLONALG VS TRAPS. In this paper we use
the CLONALG version for multimodal optimization
(de Castro L. N., 2002a), varying the same parameters
(N,n,β,d,ρ) where ρ controls the shape of the muta-
tion rate with respect to the following two equations:
α = e
(ρf)
(4)
α =
1
ρ
e
(f)
(5)
where α represents the mutation rate , and f is the
fitness function value normalized in [0.1] (i.e. anti-
genic affinity). The number of mutations of the clone
with fitness function value f is equal to L α where
L is the length of the clone receptor. The potential
mutation 4 has been proposed in (de Castro L. N.,
2002a), the original mutation law used by CLONALG
algorithm; while the potential mutation 5 has been in-
troduced in (de Castro L. N., 2002b), a hybrid arti-
ficial immune system that combines clonal selection
principle and immune network, the opt-aiNET algo-
rithm. Moreover, using the CLONALG version for
optimization tasks, the affinity proportionate cloning
is not useful, we use the same law defined in (de Cas-
tro L. N., 2002a):
N
c
=
n
i=1
round (β N) (6)
in 6 N
c
represents the total number of clones cre-
ated at each generation where each antibody (or B
cell) produces the same number of clones. We vary
β in the range {0.1, 0.2, ..., 1.0}in the range
{1.0, 2.0, ..., 10.0}, and the population size N in the
set {10, 100}, assigning n = N, that is all Ab’s will
be selected for cloning.
We conducted our experimental study with two ver-
sions of CLONALG, CLONALG
1
and CLONALG
2
,
and using the two potential mutations above defined
(equations 4 and 5).
Table 2: The best results obtained by CLONALG
2
with population size N =10, varying d
{1, 2, 3, 4, 5}.
Trap
1
ρ
e
(f )
e
(ρf )
SR AES (β, ρ) SR AES (β, ρ)
S(I) 100 725.0 (.9,4) 100 539.2 (.7,2)
S(II)
30 173679.8 (.1,6) 31 172191.2 (.1,4)
S(III)
0- -0- -
S(IV)
0- -0- -
S(V)
0- -0- -
C(I) 100 254.0 (.3,3) 100 218.4 (.5,4)
C(II)
29 173992.6 (.1,6) 24 172434.2 (.1,4)
C(III)
0- -0- -
C(IV)
0- -0- -
C(V)
0- -0- -
Table 3: opt IA with HyperMacromutation Opera-
tor with population size d =10.
Trap T
max
SR AES (dup, τ
B
)
S(I) 10
5
100 1495.9(1, 1)
S(II)
2 × 10
5
28 64760.25 (1, 1)
S(III)
3 × 10
5
23 19346.09 (4, 13)
S(IV)
4 × 10
5
28 69987 (10, 12)
S(V)
5 × 10
5
27 139824.41 (7, 1)
C(I) 10
5
100 737.78 (5, 3)
C(II)
2 × 10
5
100 27392.18 (5, 3)
C(III)
3 × 10
5
54 115908.61 (4, 7)
C(IV)
4 × 10
5
7 179593.29 (2, 9)
C(V)
5 × 10
5
2 353579 (1, 15)
CLONALG
1
: each Ab at generation t will be sub-
stituted at the next generation (t +1) by the best
individual of its set of β N mutated clones.
CLONALG
2
: the population at the next generation
(t +1) will be formed by the n best Ab’s of the
mutated clones at time step t.
All the experimental results reported in this and the
next sections have been averaged over 100 indepen-
dent runs, varying all the parameter values (β
{0.1, 0.2, ..., 1.0}∈{1.0, 2.0, ..., 10.0}.
Tables 1 and 2 show the best results obtained re-
spectively by CLONALG
1
and CLONALG
2
in terms
of Success Rate (SR) and Average number of Eval-
uations to Solutions (AES), varying the rate of new-
comers d ∈{1, 2, 3, 4, 5} while the population size
has been set to the minimal value N =10. The third
column of the tables reports the best parameter values
that allowed the hypermutation operators to reach the
best results. In terms of problem solving ability, the
results show clearly that facing toy problems is not an
easy game.
HOW TO ESCAPE TRAPS USING CLONAL SELECTION ALGORITHMS
325
Table 4: opt IA with Inversely Proportional Hyper-
mutation Operator with population size d =10and
dup =1.
Trap T
max
SR AES (τ
B
,c)
S(I) 10
5
100 504.76 (5, 0.3)
S(II)
2 × 10
5
97 58092.7(20, 0.2)
S(III)
3 × 10
5
0 --
S(IV)
4 × 10
5
0 --
S(V)
5 × 10
5
0 --
C(I) 10
5
100 371.15 (10, 0.2)
C(II)
2 × 10
5
100 44079.57 (10, 0.2)
C(III)
3 × 10
5
0 --
C(IV)
4 × 10
5
0 --
C(V)
5 × 10
5
0 --
OPT-IA VS TRAP FUNCTIONS. In this sec-
tion we report the experimental results obtained by
opt IA when using a population size d =10,
a duplication parameter dup =1, and varying the
parameter of maximum number of generations al-
lowed to B cells to remain in the population τ
B
{1,...,15, 20, 25, 50, 50, 100, 200, ∞} and parame-
ter c ∈{0.1,...,1.0}. All results have been averaged
on 100 independent runs. Table 3 reports the results
of opt-IA when using only the hypermacromutation
operator. It is the first time that all cases of the sim-
ple and complex trap function have SR > 0. Instead
table 4 reports the results of opt-IA when using only
the inversely proportional hypermutation operator. If
we compare these results with the results obtained by
CLONALG for population size of 10 Ab’s we note
how opt-IA outperforms CLONALG. Finally, table 5
shows the results obtained by opt-IA using both per-
turbation operators. The usage of coupled operators is
the key feature to effectively face the trap functions.
The same experiments were performed using static
hypermutation alone and static hypermutation with
hypermacromutation, and the final result is equiva-
lent to that reported in table 5. The results obtained
with this setting are comparable with the results in
(Nijssen S., 2003), where the authors, in their theoret-
ical and experimental research work, use only cases
C(I), C(II) and C(III) for the complex trap function.
3 CONCLUSION
This paper presented an experimental study of clonal
selection algorithms to face trap functions. Differ-
ent settings of the proposed IAs were analyzed in or-
der to detect the key features to properly tackle the
given computational problem. The results obtained
by CSAa show clearly that facing toy problems is not
an easy game. The key feature is the hypermacromu-
Table 5: opt IA with Inversely Proportional Hyper-
mutation and HyperMacromutation Operators with
population size d =10, and dup =1.
Trap T
max
SR AES (τ
B
,c)
S(I) 10
5
100 477.04 (15, 0.2)
S(II)
2 × 10
5
100 35312.29 (100, 0.2)
S(III)
3 × 10
5
100 20045.81 (2 × 10
5
, 0.1)
S(IV)
4 × 10
5
100 42089 (25, 0.2)
S(V)
5 × 10
5
100 80789.94 (50, 0.2)
C(I) 10
5
100 388.42 (10, 0.2)
C(II)
2 × 10
5
100 29271.68 (5, 0.2)
C(III)
3 × 10
5
24 149006.5(20, 0.1)
C(IV)
4 × 10
5
2 154925 (15, 0.4)
C(V)
5 × 10
5
0 --
tation operator coupled with a traditional perturbation
immune operator (for example, static hypermutation
or inversely hypermutation) to optimize both simple
and trap functions.
REFERENCES
Burnet, F. M. (1959). The Clonal Selection theory of ac-
quired immunity. Cambridge University Press, Cam-
bridge.
Cutello V., Nicosia, G. (2002). An immunological ap-
proach to combinatorial optimization problems. In
IBERAMIA’02, Proceedigns of the 8th Conference
Iberoamericana of Artificial Intelligence. Springer.
Cutello V., N. G. (2004). The clonal selection principle for
in silico and in vitro computing. In de Castro, L. N.
and von Zuben, F. J., editors, Recent Developments in
Biologically Inspired Computing. Idea Group Publish-
ing, Hershey, PA.
de Castro L. N., Von Zuben, F. J. (2002a). Learning and
optimization using the clonal selection principle. In
IEEE Trans. on Evolutionary Computation, vol. 6, no.
3, pp. 239-251. IEEE.
de Castro L. N., Timmis, J. (2002b). Artificial Immune Sys-
tems: A New Computational Intelligence Approach.
Springer, London.
Nijssen S., Back, T. (2003). An analysis of the behavior of
semplified evolutionary algorithms on trap functions.
In IEEE Trans. on Evolutionary Computation, vol 7,
no 1, pp. 11-22. IEEE.
Prugel-Bennett A., Rogers, A. (2001). Modelling ga dy-
namics. In Proceedings Theoretical Aspects of Evolu-
tionary Computing. Springer.
Timmis J., Neal, M. (2001). A resource limited artificial im-
mune system for data analysis. In Knowledge Based
Systems, vol 14, pp. 121-130.
ICINCO 2004 - INTELLIGENT CONTROL SYSTEMS AND OPTIMIZATION
326