On Meme Self-Adaptation in Spatially-Structured Multimemetic Algorithms
1. NMA 2014 8th Int. Conf. on Numerical Methods and Applications
On Meme Self-Adaptation in Spatially-Structured
Multimemetic Algorithms
Rafael Nogueras Carlos Cotta
Departamento de Lenguajes y Ciencias de la Computación
Universidad de Málaga, Spain
NMA 2014, Borovets, 20-24 August 2014
R. Nogueras, C. Cotta Meme Self-Adaptation in Spatially-Structured MMAs
2. Introduction
Model Description
Experimental Analysis
Conclusions
What are Memes?
Memes are information pieces that constitute units of imitation.
“Examples of memes are tunes, ideas,
catch-phrases, clothes fashions, ways of
making pots or of building arches. Just as
genes propagate themselves in the gene pool
by leaping from body to body via sperms or
eggs, so memes propagate themselves in the
meme pool by leaping from brain to brain via a
process which, in the broad sense, can be
called imitation.”
The Selfish Gene, Richard Dawkins, 1976
R. Nogueras, C. Cotta Meme Self-Adaptation in Spatially-Structured MMAs
3. Introduction
Model Description
Experimental Analysis
Conclusions
What is a Memetic Algorithm?
Memetic Algorithms
A Memetic Algorithm is a population of agents
that alternate periods of self-improvement
with periods of cooperation, and competition.
Pablo Moscato, 1989
Memes can be implicitly defined be the choice of local-search (i.e.,
self-improvement) method, or can be explicitly described in the
agent.
R. Nogueras, C. Cotta Meme Self-Adaptation in Spatially-Structured MMAs
4. Introduction
Model Description
Experimental Analysis
Conclusions
Multimemetic Algoritms (and Memetic Computing)
The term “multimemetic” was coined by N. Krasnogor and J.
Smith (2001). In an MMA, each agent carries a solution and the
meme(s) to improve it.
Evolution works at these two levels, cf. Moscato (1999).
Memetic Computing
A paradigm that uses the notion of meme(s) as units of
information encoded in computational representations for the
purpose of problem solving.
Ong, Lim, Chen, 2010
R. Nogueras, C. Cotta Meme Self-Adaptation in Spatially-Structured MMAs
5. Introduction
Model Description
Experimental Analysis
Conclusions
Background and Scope
Some interesting issues in MMAs:
Memes evolve in MMAs alongside with the solutions they
attach to. It is up to the algorithm to (self-adaptively)
discover good fits between genotypes and memes.
Memes can (self-)adapt their complexity during the run.
R. Nogueras, C. Cotta Meme Self-Adaptation in Spatially-Structured MMAs
6. Introduction
Model Description
Experimental Analysis
Conclusions
Background and Scope
Dynamics of meme propagation is more complex than genetic
counterparts.
Genes represent solutions objectively measurable via the
fitness function.
Memes are indirectly evaluated by their effect on solutions.
Previous research by Nogueras and Cotta (2013) indicates that
population structure is very important to determine the behavior of
the algorithm.
R. Nogueras, C. Cotta Meme Self-Adaptation in Spatially-Structured MMAs
7. Introduction
Model Description
Experimental Analysis
Conclusions
Background and Scope
Selection intensity plays a very important role in allowing
high-potential memes to proliferate.
When meme improvement margins are small, average memes can
hitchhike their way to the final stages of the evolution.
Spatial structure induces longer takeover times, mitigating the
hitchhiking effect.
We consider a spatially-structured MMA whose memes are
rewriting rules of fixed/self-adapted length.
R. Nogueras, C. Cotta Meme Self-Adaptation in Spatially-Structured MMAs
8. Introduction
Model Description
Experimental Analysis
Conclusions
Meme Adaptation
Spatial Structure
Meme Representation
Memes are pattern-based rewriting rules [C → A], where:
C, A ∈ Σr with Σ = {0, 1, #} and r ∈ N.
‘#’ represents a wildcard symbol.
A meme [C → A] can be applied on a genotypic string
G = g1 · · · gn, iff
∃i : gi · · · gi+r−1 ' c1 · · · cr
where C = c1 · · · cr . Its action is to implant A in G, i.e.
gi · · · gi+r−1 ← a1 · · · ar
where A = a1 · · · ar .
R. Nogueras, C. Cotta Meme Self-Adaptation in Spatially-Structured MMAs
9. Introduction
Model Description
Experimental Analysis
Conclusions
Meme Adaptation
Spatial Structure
Meme Application
Example
Let G = 00010011, and let a meme be 01# → 1#0. A possible
application of the meme could be the following:
00
C
z}|{
010 011
meme
−
−
−
−
−
−
−
→ 00 110
|{z}
A
011
Another potential application site would be i = 6, resulting in
00010
C
z}|{
011
meme
−
−
−
−
−
−
−
→ 00010 110
|{z}
A
Genotype scanning is randomized, and at most w sites are used,
keeping the best result.
R. Nogueras, C. Cotta Meme Self-Adaptation in Spatially-Structured MMAs
10. Introduction
Model Description
Experimental Analysis
Conclusions
Meme Adaptation
Spatial Structure
Meme Application
Pseudocode
Algorithm 1: Meme Application
for i ∈ [1 · · · w] do
// w = maximal number of meme applications
repeat
p ← SelectPos(`) // Pick different position
until Gp···p+|C| ' C;
G0
p···p+|A| ← A // Application of meme on genotype
Ni ← G0 // Neighboring genotype is updated
end
if max(f (Ni )) > f (G) then
G ← arg max(f (Ni )) // Individual is updated
end
R. Nogueras, C. Cotta Meme Self-Adaptation in Spatially-Structured MMAs
11. Introduction
Model Description
Experimental Analysis
Conclusions
Meme Adaptation
Spatial Structure
Spatial Structure
Definition
The spatial structure is characterized using a Boolean µ × µ matrix
S, Sij = true iff the individual at the i-th site can interact with the
individual at the j-th site.
We consider interaction matrices induced by a particular spatial
arrangement of individual sites in a toroidal grid: let µ = a × b,
where:
each site i can then be represented by a pair of coordinates
(ix , iy ) ∈ {1, · · · , a} × {1, · · · , b}.
let d : ({1, · · · , a} × {1, · · · , b})2
→ N be a distance measure
between sites.
Given a certain neighborhood radius ρ, Sij ⇔ (d(i, j) 6 ρ).
R. Nogueras, C. Cotta Meme Self-Adaptation in Spatially-Structured MMAs
12. Introduction
Model Description
Experimental Analysis
Conclusions
Meme Adaptation
Spatial Structure
Spatial Structure
Neighborhoods
Two sites can interact if they are within a certain distance
threshold.
Different spatial structures depend upon distance measures:
Panmixia: d(·, ·) = 0.
Moore neighborhood:
d((ix , iy ), (jx , jy )) = max(|ix − jx |, |iy − jy |).
von Neumann neighborhood:
d((ix , iy ), (jx , jy )) = |ix − jx | + |iy − jy |.
R. Nogueras, C. Cotta Meme Self-Adaptation in Spatially-Structured MMAs
13. Introduction
Model Description
Experimental Analysis
Conclusions
Meme Adaptation
Spatial Structure
Spatial Structure
Example
Illustration of the different neighborhoods considered.
0 1 2 3 4 5 6 7 8
0
1
2
3
4
5
6
7
8
0 1 2 3 4 5 6 7 8
0
1
2
3
4
5
6
7
8
0 1 2 3 4 5 6 7 8
0
1
2
3
4
5
6
7
8
The black cell indicates an arbitrary individual and the grey cells
denote its neighbors (ρ = 1).
R. Nogueras, C. Cotta Meme Self-Adaptation in Spatially-Structured MMAs
14. Introduction
Model Description
Experimental Analysis
Conclusions
Benchmark and Settings
Results
Problems Considered
TRAP
A basic 4-bit trap is defined as
ftrap(b1 · · · b4) =
(
0.6 − 0.2 · u(b1 · · · b4) if u(b1 · · · b4) < 4
1 if u(b1 · · · b4) = 4
where u(s1 · · · si ) =
P
j sj is the unitation.
A higher-order problem can be built by concatenating k such traps,
and defining the fitness of a 4k-bit string as the sum of the fitness
contribution of each block.
R. Nogueras, C. Cotta Meme Self-Adaptation in Spatially-Structured MMAs
15. Introduction
Model Description
Experimental Analysis
Conclusions
Benchmark and Settings
Results
Problems Considered
HIFF
HIFF is defined for binary strings of 2k bits by using two functions :
f : {0, 1, •} → {0, 1} t : {0, 1, •} → {0, 1, •}
where ‘•’ denotes a null value. These are defined as:
f (a, b) =
(
1 a = b 6= •
0 otherwise
t(a, b) =
(
a a = b
• otherwise
These two functions are combined as follows:
HIFFk(b1 · · · bn) =
n/2
X
i=1
f (b2i−1, b2i ) + 2 · HIFFk−1(b0
1, · · · , b0
n/2)
where b0
i = t(b2i−1, b2i ) and HIFF0(·) = 1.
R. Nogueras, C. Cotta Meme Self-Adaptation in Spatially-Structured MMAs
16. Introduction
Model Description
Experimental Analysis
Conclusions
Benchmark and Settings
Results
Configuration
General
These are the global parameters for MMAs:
µ = 100 individuals.
Generational with binary tournament for parent selection.
One-point crossover (pX = 1.0).
Bit-flip mutation (pM = 1/`).
Local-search and replacement of the worst parent.
Spatially structured MMAs consider a 10 × 10 grid and a
neighborhood radius ρ = 1.
25,000 evaluations per execution.
20 runs are performed for each problem and algorithm.
R. Nogueras, C. Cotta Meme Self-Adaptation in Spatially-Structured MMAs
17. Introduction
Model Description
Experimental Analysis
Conclusions
Benchmark and Settings
Results
Configuration
Specific
And these are the specific parameters for meme configuration:
Offspring inherit the meme of the best parent.
Meme lengths bounded by lmin = 3 and lmax = 9.
pr = 1/lmax for length self-adaptation.
R. Nogueras, C. Cotta Meme Self-Adaptation in Spatially-Structured MMAs
18. Introduction
Model Description
Experimental Analysis
Conclusions
Benchmark and Settings
Results
Numerical Results
Approximation to the Optimum
0.6
0.7
0.8
0.9
1
TRAP HIFF
approximation
to
optimum
panmictic
Moore
von Neumann
Quade test p-value = 1.97 · 10−3.
R. Nogueras, C. Cotta Meme Self-Adaptation in Spatially-Structured MMAs
19. Introduction
Model Description
Experimental Analysis
Conclusions
Benchmark and Settings
Results
Numerical Results
Number of Times the Optimum is Found
2 4 6 8
TRAP
HIFF
times optimum found
(a) Panmictic
5 6 7 8 9 10 11
TRAP
HIFF
times optimum found
(b) Moore
6 8 10 12 14
TRAP
HIFF
times optimum found
(c) von Neumann
Quade test p-value = 6.40 · 10−4.
R. Nogueras, C. Cotta Meme Self-Adaptation in Spatially-Structured MMAs
20. Introduction
Model Description
Experimental Analysis
Conclusions
Benchmark and Settings
Results
Diversity
Evolution of diversity with von Neumann topology on the TRAP
function.
0.5 1 1.5 2 2.5
x 10
4
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
evaluations
entropy
r3
r6
r9
r39
(a) Genetic diversity
0.5 1 1.5 2 2.5
x 10
4
0
0.5
1
1.5
2
2.5
3
3.5
4
evaluations
entropy
r3
r6
r9
r39
(b) Memetic diversity
R. Nogueras, C. Cotta Meme Self-Adaptation in Spatially-Structured MMAs
21. Introduction
Model Description
Experimental Analysis
Conclusions
Benchmark and Settings
Results
Self-Adaptation
Meme Length
Evolution of meme lengths for different topologies and the two
problems considered:
0.5 1 1.5 2 2.5
x 10
4
5
5.2
5.4
5.6
5.8
6
6.2
6.4
6.6
6.8
evaluations
meme
lengths
PANM
Moore
von Neumann
(a) TRAP
0.5 1 1.5 2 2.5
x 10
4
4.8
5
5.2
5.4
5.6
5.8
6
6.2
evaluations
meme
lengths
PANM
Moore
von Neumann
(b) HIFF
R. Nogueras, C. Cotta Meme Self-Adaptation in Spatially-Structured MMAs
22. Introduction
Model Description
Experimental Analysis
Conclusions
Benchmark and Settings
Results
Self-Adaptation
Meme Success Ratio
Percentage of meme applications resulting in an improvement of
the different MMAs on TRAP function:
0.5 1 1.5 2 2.5
x 10
4
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
evaluations
improvement
rate
r3
r6
r9
r39
(a) Panmictic
0.5 1 1.5 2 2.5
x 10
4
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
evaluations
improvement
rate
r3
r6
r9
r39
(b) Moore
0.5 1 1.5 2 2.5
x 10
4
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
evaluations
improvement
rate
r3
r6
r9
r39
(c) von Neumann
R. Nogueras, C. Cotta Meme Self-Adaptation in Spatially-Structured MMAs
23. Introduction
Model Description
Experimental Analysis
Conclusions
Benchmark and Settings
Results
Self-Adaptation Impact
For fixed-length memes the intermediate value r = 6 offers the
best tradeoff.
For self-adaptive meme length:
Average meme lengths oscillate around values close to 6.
Fully self-adaptive MMA discover this area of memetic
interest.
The role of memes is self-adaptive too, it turns from
exploratory to exploitative.
Success rates follow an upwards trend and the values for
MMA3−9 are normally superior to the remaining MMAs.
R. Nogueras, C. Cotta Meme Self-Adaptation in Spatially-Structured MMAs
24. Introduction
Model Description
Experimental Analysis
Conclusions
Conclusions
Self-adaptation mechanisms alleviating one of the major issues in
memetic algorithms → Parameterization.
Experimental results indicate that self-adaptation of meme lengths
can be beneficial, mainly in panmictic populations, where
suboptimal parameterization is less robust.
Self-Adaptation of meme lengths seems an adequate strategy, since
it does not penalize performance and saves configuration time.
Future work:
further experimentation on other problems,
use of other population structures,
analyze the scalability of the approach.
R. Nogueras, C. Cotta Meme Self-Adaptation in Spatially-Structured MMAs