Cultural Searcing Algorithm
Cultural Searcing Algorithm
Cultural Algorithm
Carlos Soza a Ricardo Landa Becerra b Mara Cristina Riff a
Carlos A. Coello Coello b
a Universidad
b CINVESTAV-IPN
Abstract
This paper addresses the solution of timetabling problems using cultural algorithms.
The core idea is to extract problem domain information during the evolutionary
search, and then combine it with some previously proposed operators, in order to
improve performance. The proposed approach is validated using a benchmkar of 20
instances, and its results are compared with respect to three other approaches: two
evolutionary algorithms and simulated annealing, all of which have been previously
adopted to solve timetabling problems.
Introduction
20 September 2007
Problem Statement
The variant of the problem tackled here was proposed by Ben Paechter for the
International Timetabling Competition organized by the Metaheuristics Network [16]. It is referred to in the following as the University Course Timetabling
Problem (UCTP). Lecture must be scheduled in 45 timeslots (5 days of 9 hours
each) and a number of rooms, with varying facilities and student capacities,
so that the following hard constraints are satisfied:
H1 : lectures having students in common cannot take place at the same time;
H2 : lectures must take place in a room suitable for them in terms of facilities
and student capacity; and
H3 : no two lectures can take place at the same time in the same room.
We consider as well the following soft constraints:
S1 : students should not have to attend lectures in the last timeslot of the
day;
S2 : they should not attend more than two lectures in a row; and
S3 : they should not have only one lecture in any given day.
Note that the S1 constraints can be checked without knowledge of the rest
of the timetable; S2 constraints can be checked while building a timetable is
complete and all lectures have been assigned a timeslot. A timetable in which
all lectures have been assigned to a timeslot and a room so that no hard
constraints are violated, is said to be feasible. The aim of the problem is to
find a feasible solution with minimal soft constraint violations.
2.1 Model
2.1.1 Parameters
The parameters of the problem are the following:
3
R: Set of Rooms
E: Set of Events
F : Set of Features
S: Set of Students
T : 45 timeslots (5 days of 9 slots per day).
2.1.2 Variables
Let: a, indicate students attendance:
a(si ,ej )
g, indicate wich rooms are suitable for which events (i.e. the room provides
all the features that the event requires and has the right size) ej :
g(rl ,ej )
|E| |R|
X
X
(1)
j=0 t=0
Lectures must take place in a room suitable for them in terms of facilities
and student capacity.
H2 : eE
|T | |R|
X
X
(2)
k=0 t=0
No two lectures can take place at the same time in the same room.
H3 : tT rR
|E|
X
p(ej ,t,r) 1
(3)
j=0
S1 :
(4)
S2 :
h(),
(5)
h() =
si
P2
n=0
P|R P|E|
t=0
j=0
e.o.c.
They should not have only one lecture in any given day.
S3 :
|S|
4 X
X
q(),
(6)
d=0 i=0
q() =
si
t=0
a(si ,ej ) = 1
e.o.c.
(7)
The goal of solving the problem formulated in such a way is to minimize the
number of soft constraint violations.
Cultural Algorithms
genetic material that an offspring inherits from its parents, and (2) a macroevolutionary level, which consists of the knowledge acquired by individuals
through generations. This knowledge, once encoded and stored, is used to
guide the behavior of the individuals that belong to a certain population.
Culture can be seen as a set of ideological phenomena shared by a population
[23]. Through these phenomena, an individual can interpret its experiences
and decide its behavior. In these models, it can be clearly appreciated the
part of the system that is shared by the population: the knowledge, acquired
by members of a society, but encoded in such a way that such knowledge
can be accessed by every other member of the society. And then there is an
individual part, which consists of the interpretation of such knowledge encoded
in the form of symbols. This interpretation will produce new behaviors as
a consequence of the assimilation of the corresponding knowledge acquired,
combined with the information encoded in the ancestors genes.
Reynolds [21] attempts to capture this double inheritance phenomenon through
his proposal of cultural algorithms. The main goal of such algorithms is to increase the learning or convergence rates of an evolutionary algorithm such
that the system can respond better to a wide variety of problems [11].
Cultural algorithms operate in two spaces. First, there is the population space,
which consists of (as in all evolutionary algorithms) a set of individuals. Each
individual has a set of independent features that are used to determine its
fitness. Through time, such individuals can be replaced by some of their descendants, which are obtained through the application of a set of operators
from the population.
The second space is the belief space, which is where the knowledge, acquired by
individuals through generations, is stored. The information contained in this
space must be accessible to each individual, so that they can use it to modify
their behavior. In order to join the two spaces, it is necessary to provide a
communication link, which dictates the rules regarding the type of information
that must be exchanged between the two spaces.
Algortihm 1 shows the pseudo-code of a cultural algorithm.
Most of the steps of a cultural algorithm correspond with the steps of a traditional evolutionary algorithm. It can be clearly seen that the main difference
lies in the fact that cultural algorithms use a belief space. In the main loop of
the algorithm, the belief space must be updated. It is at this point in which
the belief space incorporates the individual experiences of a select group of
members of the population. Such a group is obtained with the function accept,
which is applied to the entire population.
On the other hand, the variation operators (such as recombination or muta6
tion) are modified by the function influence. This function applies some pressure such that the children resulting from the variation operators can exhibit
behaviors closer to the desirable ones and farther away from the undesirable
ones, according to the information stored in the belief space.
These two functions (accept and influence) constitute the communication link
between the population space and the belief space. Such interactions can be
appreciated in Figure 1 [22]. The implementation details for these functions
in the current proposal are given in the next section.
In [21], it is proposed the use of genetic algorithms [14] to model the microevolutionary process, and Version Spaces [20] to model the macro-evolutionary
process of a cultural algorithm. This sort of algorithm was called the Version
Space guided Genetic Algorithm (VSGA). The main idea behind this approach
is to preserve beliefs that are socially accepted and discard (or prune) unacceptable beliefs. Therefore, if a cultural algorithm for global optimization is
applied, the acceptable beliefs can be seen as constraints that direct the population at the micro-evolutionary level [19].
In genetic algorithms theory, there is an expression, called schema theorem
[15] that represents a bound on the speed at which the best schemata of the
population are propagated. Reynolds [21] provided a brief discussion regarding
how the belief space could affect the schema theorem. His conclusion was that,
by adding a belief space to an evolutionary algorithm, the performance of such
algorithm can be improved by increasing its convergence rate. That constitutes
the main motivation to use cultural algorithms. Despite the lack of a formal
mathematical proof of this efficiency improvement, there is empirical evidence
of such performance gains reported in the literature (see for example [4,5]).
7
Adjust
Beliefs
Acceptance
Influence
Performance
Function
Population
Selection
Variation
Proposed Approach
The approach proposed in this paper uses, in its population space, a population based on the evolutionary algorithm originally proposed in [18]. A
pseudo-code with the main steps of the proposed cultural algorithm is shown
in Algorithm 2.
In our algorithm, we have considered three types of knowledge: situational,
normative and domain knowledge. Also, we are using five variation operators:
two of them use the cultural knowledge (cultural mutation and repair) while
the other three are designed to add the exploration component of the algorithm
(interchange, sequencing and simple mutation). It is worth mentioning that
only one of the exploration operators is applied to each individual.
4.1 Representation
The operator begins selecting an event E and a position (r, t) to move it. This
is done through different types of cultural influence.
10
Comparison of Results
The Cultural Algorithm (CA) is compared with respect to 3 different approaches: a Simulated Annealing (SA) that was the winner of the competition
[17], a recent version of a Memetic Algorithm (MA) [25] and the Evolutionary
Algorithm (EA) on which this work is based [18]. These references were chosen
because they are representative of the state-of-the-art and very competitive
on the timetabling problem. The comparison with another EA shows the improvement obtained with the incorporation of culture. The SA approach is
not an EA, but it was adopted in our comparative study because it remains
as the best approach known so far for the timetabling problem.
The benchmark adopted to make the tests and comparisons are the 20 instances of UCTP from the timetabling competition [16]. Those problems are
characterized for being of varied difficulty, they consider the individual satisfaction of the students (which allows to consider them individually, not in
classes nor groups), and have at least one solution that fulfills both types of
12
550
900
Evolutionary Algorithm
Cultural Algorithm
Evolutionary Algorithm
Cultural Algorithm
500
800
450
700
400
Fitness
Fitness
600
350
300
500
400
250
300
200
200
150
100
100
0
30
60
90
120
150
180
210
240
270
300
330
360
30
60
90
120
Time
150
180
210
240
270
300
330
360
Time
restrictions.
The proposed approach was implemented in the C++ programming language
and was compiled using the GNU g++ compiler in the operating system Debian 3.1. Also, the matching algorithm found in the LEDA library [13] was
used.
The cultural algorithm spent a CPU time of 360 seconds per run, as was
required by the bechmarking rules of the timetabling competition, for our
system configuration.
The graphs of Figure 2 show the best and the worst case of improvement
of CA with respect to EA, in the 20 instances considered. The worst case
(Figure 2(a)) and the best behavior (Figure 2(b)) consider a significant improvement in the first stages which is reflected directly in the final result, in
which the cultural algorithm has better results. These graphs show that, as
expected, the incorporation of culture tends to accelerate the convergence of
the algorithm and to improve the results.
Instance
EA
CA
MA
SA
288
140
104
45
260
123
91
25
322
149
126
65
679
330
189
115
557
306
212
102
532
171
90
13
430
159
127
44
305
133
94
29
283
101
78
17
10
311
147
113
61
11
328
120
90
44
12
350
187
138
107
13
420
233
185
78
14
469
267
187
52
15
400
204
120
24
16
302
102
74
22
17
521
311
182
86
18
254
100
75
31
19
550
296
224
44
20
424
159
60
Table 1
Comparison of results
Instance
EA - CA (%)
MA - CA (%)
SA - CA (%)
51,4
-25,7
-67,9
52,7
-26
-79,7
53,7
-15,4
-56,4
51,4
-42,7
-65,2
45,1
-30,7
-66,7
67,9
-47,4
-92,4
63
-20,1
-72,3
56,4
-29,3
-78,2
64,3
-22,8
-83,2
10
52,7
-23,1
-58,5
11
63,4
-25
-63,3
12
46,6
-26,2
-42,8
13
44,5
-20,6
-66,5
14
43,1
-30
-80,5
15
49
-41,2
-88,2
16
66,2
-27,5
-78,4
17
40,3
-41,5
-72,3
18
60,6
-25
-69
19
46,2
-24,3
-85,1
20
62,5
-62,3
-95,6
Table 2
Improvement of the results of CA compared with the three other approaches
Algorithm
Average
Standard Deviation
EA
399,25
119,46
CA
186,9
76,58
MA
127,95
50,72
SA
50,55
Table 3
Summary of results for all instances
32,39
15
Simple Mutation
Sequencing
Interchange
Fitness
0.95
0.9
0.85
0.9
0.85
0.8
0.75
0.8
0.75
0.7
Operators rate
Operators rate
Simple Mutation
Sequencing
Interchange
Fitness
0.95
0.65
0.6
0.55
0.5
0.45
0.4
0.35
0.3
0.25
0.7
0.65
0.6
0.55
0.5
0.45
0.4
0.35
0.3
0.25
0.2
0.2
0.15
0.1
0.15
0.1
0.05
0
0.05
0
0
500
1000
1500
2000
2500
3000
3500
Generations
500
1000
1500
2000
2500
3000
3500
Generations
(a) Instance 20, with more places than (b) Instance 09, with the same number
events
of places and events
Fig. 3. Operators rate of application
In this paper, we propose the use of domain knowledge, both a priori and
extracted during the search, to improve the performance of an evolutionary
algorithm when solving timetabling problems. The executed experiments provided very encouraging results.
As a future work it would be very interesting to analyze the mechanisms of the
simulated annealing method, in order to incorporate them in an evolutionary
algorithm or a cultural algorithm. Also, the development of a classification
of instances, is a very interesting topic for future research, mainly to better
understand the performance of different algorithms on different instances.
Acknowledgments
References
[1] J. Arabas, Z. Michalewicz, and J. Mulawka. GAVaPS-A Genetic Algorithm with
Varying Population Size. In Proceedings of the 1st IEEE Conf. on Evolutionary
Computation, 1994.
16
[2] Halvard Arntzen and Arne Lkketangen. A local search heuristic for a university
timetabling problem. International Timetabling Competition, 2003.
[3] M. Chiarandini, K. Socha, M. Birattari, and O. Rossi-Doria. International
timetabling competition. A hybrid approach. Technical Report AIDA-03-04,
Intellectics Group, Computer Science Department, Darmstadt University of
Technology, Darmstadt, Germany, March 2003.
[4] Chan-Jin Chung and Robert G. Reynolds. CAEP: An Evolution-based Tool
for Real-Valued Function Optimization using Cultural Algorithms. Journal on
Artificial Intelligence Tools, 7(3):239292, 1998.
[5] Carlos A. Coello Coello and Ricardo Landa Becerra. Adding Knowledge and
Efficient Data Structures to Evolutionary Programming: A Cultural Algorithm
for Constrained Optimization. In W.B. Langdon et al., editors, Proceedings of
the Genetic and Evolutionary Computation Conference (GECCO2002), pages
201209, San Francisco, California, July 2002. Morgan Kaufmann Publishers.
[6] Jean Franois Cordeau, Brigitte Jaumard, and Rodrigo Morales. Efficient
timetabling solution with tabu search. International Timetabling Competition,
2003.
[7] W. H. Durham. Co-evolution: Genes, Culture, and Human Diversity. Stanford
University Press, Stanford, California, 1994.
[8] A. E. Eiben, R. Hinterding, and Z. Michalewicz. Parameter Control in
Evolutionary Algorithms. IEEE Transactions on Evolutionary Computation,
3(2):124141, July 2000.
[9] A.E. Eiben, E. Marchiori, and V.A. Valko. Evolutionary Algorithms with onthe-fly Population Size Adjustment. In Parallel Problem Solving from Nature,
PPSN VIII, volume 3242, pages 4150, 2004.
[10] David B. Fogel. Evolutionary Computation. Toward a New Philosophy of
Machine Intelligence. The Institute of Electrical and Electronic Engineers, New
York, 1995.
[11] Benjamin Franklin and Marcel Bergerman. Cultural algorithms: Concepts
and experiments. In Proceedings of the 2000 Congress on Evolutionary
Computation, pages 12451251, Piscataway, New Jersey, 2000. IEEE Service
Center.
[12] Luca Di Gaspero and Andrea Schaerf. Timetabling competition ttcomp 2002:
Solver description. International Timetabling Competition, 2003.
[13] Algorithmic Solutions Software GmbH.
Leda 5.1.
algorithmic-solutions.com/index.htm, 2006.
http://www.
17
18