that only those individuals best adapted to their
environment survive and reproduce. The procedure
starts by choosing a random number of possible
solutions in the search space to generate an initial
population. Based on a fitness function evaluated for
each possible solution, choose the best members of
the population to take part in reproduction, this
process is called selection. With the best members of
the population selected genetic operations are
carried out with the idea that new promising
individuals will be evolved from their ancestors to
produce an improved population. The genetic
operations that generally are used are crossover and
mutation, which in evolutionary strategies is the
most important operation. The crossover is the
combination of information from two or more
individuals and mutation is the alteration of the
information of a single individual (Michalewicz,
1999). There are several types of evolutionary
strategies depending on the size of the population
and how the individuals are replaced in the
population prior to generating the new population. In
our case we use an evolutionary strategy EE-(1+3),
i.e., there is an initial population of a single
individual and from this individual will generate 3
new individuals by mutation. Of these 4 individuals
the best is choosing for the next population.
Evolutionary strategies were used, at least
initially, to optimization problems of real functions,
but are possible to use it successfully in other
domains. In this paper we use evolutionary strategies
in populations where individuals are vectors.
One element of the population is represented by
a vector, where the position indicates the course and
content of each position indicates the period to
which it was assigned, as shown in figure 1.
0 1 2 3 4 5 59 60 61
1 1 3 1 2 2 9 9 0
Figure 1: Element of the Population.
In our case we used a population with a single
individual so that the only operation performed is
mutation, which consists in changing the period of a
course of the curriculum that meets the prerequisites
and restrictions of preference period.
We can consider that a balanced curriculum
should have a uniform distribution of all the credits
that make up the curriculum, so the fitness function
used is the sum of the absolute error, which is
calculated using the following formula.
Ntp
k
k
PChFitness
1
)(
(9)
Where C
k
is the academic load of the period k
calculated with the formula (4) and P is the average
number of credits per period
NtpCP
i
Ntp
i
/
1
(10)
The initial population consists of the curriculum that
we want to balance, this is a feasible solution.
Once that we have the first element of the
population three new elements are generated through
mutation. As the mutation is the random change of
the value of a single element within the vector,
randomly are chosen a course to be changed and the
period where it will change.
Given the course and the period, are validated
the restrictions prerequisites, load, course and time
preference, if they are satisfied, the change is made,
otherwise are selected randomly another course and
period and redo the validation. This continues until
to find the pair course - period that meets with the
restrictions. This will generate 3 new individuals
from the individual in the present population. The
four individuals are evaluated by the fitness function
(formula 9) and the best is selected for the next
generation.
When is detected that a local optimum has been
reached, a change in the process of mutation is
made. Now, the mutation will change two elements
of the vector, that is, now going to get the periods
with more load and less load and will try to
exchange two courses randomly between these two
periods.
Having the two courses which will be
exchanged, are evaluated the restrictions of
prerequisite , load, course and period preference, if
the exchange can be given a new individual is
generated in otherwise the mutation is not done, the
minimum period is marked as ineligible for the next
selection and is cleared until that an improvement
occurs.
4 RESULTS
The tests were carried out for the three base cases
included in CSPLib and the cases proposed by
(Aguilar-Solis, 2008) for which no solution could be
found.
4.1 Base Cases
The base cases included in CSPLib are: BACP8,
BACP10 and BACP12, whose features are shown in
FEC 2011 - Special Session on Future of Evolutionary Computation
536