Commit 3cc01e8a authored by Markus Klinik's avatar Markus Klinik

mutation and selection

parent 5b344d1b
......@@ -56,6 +56,7 @@ The resource requirement of the frame applies to all tasks inside the frame.}
\subsection{Genetic Algorithm}
Our genetic algorithm is based on the implementation by \citet{Alexeev2014SimpleGeneticAlgorithm}.
We ported his code from Haskell to Clean and extended it in a number of ways to make it fit our needs.
The algorithm has four input parameters: the problem instance, the population size, the mutation probability, and the number of generations.
\paragraph{Encoding}
Our chromosome encoding scheme is based on the one by \citet{MyszkowskiLNS2018}, extended with support for tasks with multiple skill requirements.
......@@ -77,13 +78,21 @@ Single-point crossover takes two chromosomes, randomly determines a cut-off poin
The following table illustrates this scheme with two parents A and B.
\begin{IEEEeqnarray*}{l"l}
\textrm{Parents} & \textrm{Children}
\\ \relax [A,A,A,A,A,A] & [A, A, B, B, B, B]
\\ \relax [B,B,B,B,B,B] & [B, B, A, A, A, A]
\\ \relax [A,A,A,A,A,A] & [A,A,B,B,B,B]
\\ \relax [B,B,B,B,B,B] & [B,B,A,A,A,A]
\end{IEEEeqnarray*}
\paragraph{Mutation}
Our mutation operation randomly determines a location in a given chromosome and changes it to a randomly selected entry in the corresponding domain.
\paragraph{Selection}
We use the selection method of \citet{Alexeev2014SimpleGeneticAlgorithm}, where all chromosomes in a population are paired with each other.
This makes the algorithm run with quadratic complexity in the population size, so it is advised to use reasonably small populations.
The children of crossover are subjected to mutation with the given mutation probability.
Alexeev discards the old population and continues with the new one.
We changed this so that the old and new populations are combined, sorted according to the fitness function, and then the best chromosomes are taken to be the new generation.
This way the algorithm preserves the best individuals found so far.
\paragraph{Constraints and invalid assignments}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment