# Evolutionary Algorithms in a Bacterial Consortium of Synthetic Bacteria
## 2 Materials and Methods
### BAGA Evolutionary Algorithm
An operon is defined in our simulation experiments as a functional unit of DNA containing one or more genes under the control of a promoter [23]. The algorithm calculates the Hamming distance between the gene sequence inherited by the daughter bacterium and the target sequence. Once the Hamming distance is calculated, its value is translated to a given concentration of iptg (isopropyl \(\beta\)-D-1-thiogalactopyranoside), i.e., an allolactose emulator that activates the lactose operon (operon involved in the metabolism of lactose in _E. coli_ and many other bacteria). The algorithm considers iptg molecules as an activator of a hypothetical Z operon (Figure 4), referring to this operon as the 'optimization operon'. 4. Fitness. The goodness of the'solution', i.e., the genetic sequence in the daughter bacterium, is calculated by means of the optimizing operon Z. This operon expresses a Z gene whose transcription product is a Z protein. The concentration z of product Z, i.e., the fitness value, is expressed according to the Hill function: \[z=\frac{v\cdot[iptg]^{n}}{k^{n}+[iptg]^{n}}\] (2) whose parameters \(v\), \(k\), and \(n\) are set empirically depending on the optimization problem. Thus, in our case, the optimization problem is to find the target sequence. Applying this function, we normalize the value of fitness \(z\) between 0 and 1. In the above \(z\) function (2), the concentration of iptg was calculated as the difference between \(L\), i.e., the length of the target gene sequence, and the Hamming distance \(H\) between the target and the genetic sequence in the daughter bacterium (sequence inserted in the plasmid): \[[iptg]=L-H\] (3)
5. Reporter protein. As the evolutionary algorithm governs the evolution of the synthetic bacteria, the bacteria report their fitness. That is, the fitness z of each bacterium is observed by the researcher thanks to the transcription of fluorescent proteins, e.g., gfp, yfp, rfp. The higher the fitness, the better the'solution' and consequently the more fluorescence the bacterium will emit. That is, Z plays the role of activator for a reporter operon (Figure 4) that expresses a fluorescent protein, e.g., gfp. 6. Malthusian parameter update. The Darwinian selection of the bacteria is simulated as follows. Z not only influences the fluorescence emitted by a bacterium but also affects the Malthusian parameter or bacterial growth rate (\(r\)), according to the following expression: \[r=r_{0}+\alpha\frac{z}{\beta}\] (4) where \(r_{0}\) is the growth rate of bacteria at \(t=0\), and \(\alpha\), \(\beta\) are two parameters for adjusting the \(r\) values in simulation experiments. Indeed, the higher the value of \(r\), the larger the \(e^{rt}\) term in the exponential Equation (1). As time \(t\) goes on, the number of bacteria \(y(t)\) with optimum solutions increase, which is detectable through the screening of those bacteria emitting fluorescence. For instance, in the GADY model, the optimum solution is the target sequence representing the genetic circuit of the plasmid that induces cell suicide of the pathogenic bacteria. Once the bacteria converge to the optimal solution or the target genotype is expressed, the bacterial response or output will then take place. Note that in the GADY model described in Section 2.3, the bacteria die by cell suicide upon expression of the killer gene.