# Drug Making Using Genetic Algorithms

I want to create a drug using N different chemicals for fighting a bacterial infection those N chemicals are contained inside the drug in different quantities my work environment is a simulated one and I want to create the drug using genetic algorithms.

How can I use genetic algorithm for this problem. What's representation for chromosomes can I use and what kind evaluation function should I use?

What could go wrong using genetic algorithms for these kinds of problems?

• Welcome to DataScienceSE. Do you have a way to simulate the evaluation of a particular combination of chemicals? The results of a genetic algorithm depend a lot on the objective function. Commented Mar 27, 2021 at 16:21
• Yes, i thought about a simple one. Like bacteria population / bactreria survived. Commented Mar 27, 2021 at 17:07
• Are you sure this value can be calculated, i.e. do you have a formula/function which returns the proportion of bacteria which survived given an input vector representing a combination of chemicals as input? Commented Mar 27, 2021 at 18:28
• What i am asking is if i can represent such a problem using genetic algorithms and if so how i represent the different substances and the evalution function of that. Commented Mar 27, 2021 at 19:50

A simple representation of the problem in terms of a genetic algorithm could be something like this:

• A gene represents a chemical and the values it takes represent the proportion of the chemical in the drug
• An individual is a combination of N genes/chemicals, each with their particular proportion
• A cross-over is the combination of the genes of two individuals A and B, either by picking randomly the value of either A or B for each gene or by some other kind of aggregation. A mutation is the random modification of a gene to a different proportion.

The standard genetic algorithm works like this:

1. Randomly pick a set of say 100 individuals (first generation)
2. Calculate the "performance" of every individual, i.e. evaluate how good this particular combination of chemicals proportions is.
3. Select say the top 10 individuals according to their performance, then produce the next generation of 100 individuals by cross-over among these top 10. Optionally add some random mutations to the new individuals' genes.
4. Iterate again from step 2. Keep iterating unless some stop condition is satisfied, for example the average performance over the last 5 generations doesn't increase anymore.

As far as I understand the task, the main problem is the evaluation in step 2: if there is no automatic way to evaluate the performance of a combination of chemicals, it's impossible to use the genetic algorithm. In theory the evaluation doesn't need to be automatic, one could imagine doing a manual experiment for every individual, but that means performing thousands of experiments, a lot of them probably useless.

• Thanks, your answer is well put. I came to the same conclusions the past 10 hours. So i was thinking what can could wrong using this representation for the chromosomes, the evaluation function and the genetic operators. So far i haven't found anything wrong. Commented Mar 28, 2021 at 10:37
• @Demokles I think that you're under-estimating the problem of the evaluation step: can you know the result, like the proportion of bacteria which survived, without doing a manual experiment? For example imagine you're told 12% chemical A, 65% chemical B and 23% chemical C: can you calculate the proportion of bacteria which survived using only this information? Commented Mar 28, 2021 at 14:50