# A Microbial Screening in Silico Method for the Fitness Step Evaluation in Evolutionary Algorithms
## 2 Materials and Methods
### Simulation Experiments  
In order to test the screening procedures, we performed simulation experiments with the two classic optimization problems mentioned above. First, we solved an instance of the 0/1 knapsack problem (Table 1). For this purpose, once a microbial screening procedure has been chosen, in the script in Gro we set the optimization problem instance and restrictions, i.e., maximum weight or maximum tolerated capacity of the knapsack. Next, the script is executed in the Gro simulator, obtaining the evaluation function \(y=f(x)\). Afterwards, the function is implemented in the step that evaluates the fitness in the genetic algorithm. From the results obtained, and for each of the screening procedures, we plotted the evolutionary surfaces. Figure 8: Flowchart of the 2-SAT (2-Satisfiability) problem implemented in Gro language. A list (_gene_) whose elements are the variables of the Boolean expression \(\phi\) is initialized as (0, 0, 0, 0, 0). At this step, \(c\) (gene in decimal notation), which is a variable used for controlling the update of gene, is set to 0 along with the time \(t\). Thereafter, the routine calls the screening method in order to calculate the fitness for the _gene_. Note that the flowchart shares the topology with the knapsack instance (Figure 7) but with \(c\) as the control variable. In the output of the routine in Gro, the _gene_ value is the number of variables that satisfy expression \(\phi\) while the total amount of GFP or _fitness_ is given by multiplying the mean GFP fluorescence by the colony size (total number of synthetic bacteria). In summary, for the general protocol, it is like the chromosomes were evaluated in a microbial screening experiment with a colony of bacteria. Therefore, the simulated procedure is equivalent to performing a laboratory experiment in which the fitness of the solution is obtained. Once the DNA segment encoding the solution is inserted in a plasmid that is introduced into a bacterium, the bacterium duplicates, growing the bacterial colony. The microbial screening protocol evaluating the bacterial (solution) fitness will be applied in this colony. Secondly, we solved an instance of the 2-SAT (2-satisfiability) problem. Similarly to the 0/1 knapsack example, we selected the microbial screening procedure, setting the optimization problem instance, etc., in the script in Gro. For instance, a logical proposition written in formal mode:  
\[\phi\ =\ (X_{1}\lor X_{3})\wedge(X_{1}\vee\
eg X_{4})\wedge(X_{2}\vee\
eg X_{4}) \wedge(X_{2}\vee\
eg X_{5}),\]  
is written in Gro language according to the syntax defined for the logical functions as:  
\[\phi\ =\ (OR(X[1])(X[3]))\ast(OR(X[1])(not(X[4])))\ast(OR(X[2])(not(X[4]))) \ast(OR(X[2])(not(X[5])))\]  
Once the evaluation table is obtained, it is included in the genetic algorithm. Since in the genetic algorithm a chromosome encodes for the values (0 or 1) of the Boolean variables, once the values are replaced in the Boolean expression, its fitness value is evaluated with the evaluation table obtained from the Gro screening routine. In order to assess the similarity of all the solutions obtained, a cluster analysis was conducted for each screening procedure, using the seaborn data representation module in Python 3.6. From simulation experiments previously conducted, we found the proper values of the parameters in SGA and SMGA. Specifically, we found that the best number of generations was 100 and the best population size, i.e., number of chromosomes, was 24, being the same values for both algorithms. Conversely, the optimal mutation rate varies depending on the chosen algorithm, being 0.03 for SGA and 0.035 for SMGA. In the case of SGA, the recombination rate was set to 0.75. In order to find the proper values of the parameters of both SGA and SMGA, we tested different ranges for mutation rate and number of generations (Figure 9). We found that the best number of generations was 100, although for the SMGA with the antibiotic-based screening method (Figure 9B), the optimal number of generations was around 25.