# Adaptive Gene Level Mutation
## 3 Locus Adaptive Genetic Algorithm  
All possible solutions in the initial population (\(Pop\)) are sampled randomly from the search space. The algorithm is iterated \(IterNum\) times where at each step, the population is continuously changing and better samples are selected and recombined; this helps increasing the average fitness value of the population over time. Thus, the time dependency of the population can be noted by \(Pop_{t}\) which denotes the population at iteration \(t\). At each iteration within the population, each sample is usually referenced to as a chromosome. A chromosome is one possible solution; a solution candidate; and this can be referenced to as \(Pop_{tk}\) where \(k=1\ldots N\) chromosomes. A chromosome is a vector representing a solution, which can be further divided into individual elements (Like a position of a single queen on a chessboard) this is noted by a third index \(Pop_{tkl}\) where \(l=1\ldots M\) genes. In the traditional approach, selection of a position for mutation is a random process and its major goal is the exploration of the high-dimensional search space without taking the current state of the chromosome into account. Optimal selection of the gene which will be modified requires a comprehensive knowledge of three different variables; the statistics of the inter and intra populations, the chromosomes as a function of time and the statistic of the genes' competences. Scrutinizing the relation between this three variables and the fitness function will lead us to the optimal modification of every gene. Although seemingly the optimal solution can be attained from Equation (1), it is not practical and both memory and time consuming because you need to keep track of all generations, chromosomes and genes throughout the algorithm. \[PM(Pop_{tij})=F(Pop_{tkl}^{l=1\ldots M,k=1\ldots N,q=1\ldots t},i,j) \tag{1}\]_PM_ calculates the probability of mutation for a given gene \(j\) and \(F\) is a function calculating the mutation rate of gene \(j\) taking into account all previous generations (\(q\)), chromosomes (\(k\)) and genes (\(l\)). A lot of attempts have been made to calculate an adaptive mutation operator using one of the aforementioned variables, but the authors are not aware of any method that has used the genes statistic to form a gene level mutation. Any mutation method can be rewritten as in Equation (1) using constant parameters as we will see in the following paragraphs. Traditional Genetic algorithm uses static operators as defined in Equation (2) which means that all chromosomes and genes throughout all generations would have the same mutation probability although some candidate solutions are closer to the optimal solution than others. \[PM(Pop_{tij})=C \tag{2}\]  
\(C\) is a constant value for every iteration, chromosome and gene. Static mutation is good until it gets stuck in a local minimum. After we reach a local minimum, we can walk back down the hill and try another angle craving for the optimal solution or try to jump from the local minima by increasing/decreasing the mutation rate or applying crossover. Parameter tuning is a manual, time consuming and unpleasant road which can be superseded with parameter control [13]. Parameter control means to start from an initial value then tune it adaptively during execution as in the following approaches. With the presupposition of converging to the optimal solution over time, an adaptive mutation subjected to time as in Equation (3) has been proposed. \[PM(Pop_{tij})=F(t) \tag{3}\]  
\(F\) is a function of time which depends on \(t\) but does not depend on the chromosome \(i\) or the gene \(j\). Once the population is determined the probability of mutation is the same for every chromosome and gene \((PM(Pop_{tij})=PM(Pop_{tik})\forall i,j,k,l)\) in that iteration. Dynamic mutation takes the number of the current iteration as an input and gives us the mutation rate as an output.