From 3cc01e8a6b294cfe059825fab867e64973baaaf4 Mon Sep 17 00:00:00 2001 From: Markus Klinik Date: Fri, 24 May 2019 14:23:09 +0200 Subject: [PATCH] mutation and selection --- implementation.tex | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/implementation.tex b/implementation.tex index 7777897..79d3d86 100644 --- a/implementation.tex +++ b/implementation.tex @@ -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} -- GitLab