A working model of interactive evolutionary computation applied to molecular design. A genetic algorithm searches a space of compounds assembled from chemist-chosen fragments, computational models score each compound, and the chemist steers the search by reshaping those models and rating what the algorithm proposes. The design follows the Mobius candidate design environment described by Ecemiş, Wikel, Bingham and Bonabeau (IEEE Trans. Evol. Comput., 2008).
The chromosome below is a fixed-length vector of genes. Each gene holds a fragment from a library the chemist chose, and the blueprint (a Markush structure) says where each fragment attaches. The fragments change; the branching never does, so every compound is one the chemist would recognize.
Quinolone blueprint with four variable positions.
Untick a fragment to remove it from its gene. The algorithm never builds a compound from a fragment that is not on these lists, which is what keeps its proposals plausible. The product of the list sizes is the number of compounds the search could ever reach.
Mutation picks one gene and replaces its fragment with another from the same list. A gene with more fragments is proportionally more likely to be picked, so large libraries get sampled as often as small ones. Crossover picks a random number of gene positions and swaps them between two parents to make two children.
Every model result is mapped to a value between 0 and 1 with a trapezoid: 1 inside the preferred range, 0 at or beyond the unacceptable bounds, and a straight line in between. Hard cutoffs would discard a compound that misses by a hair; the slope keeps it alive at a reduced score. The weight sets how much a model counts. Edit the four bounds or drag a weight and the whole population is rescored.
F = Σ wᵢfᵢ / (P · Σ wᵢ), where P = Π pᵢ and pᵢ is 1 + wᵢ when fᵢ = 0 and 1 otherwise.
The penalty P exists because of a tie the chemist would never accept. With six equal weights of 0.5, a compound scoring 0 on three models and 1 on the other three averages 0.5. So does a compound scoring 0.5 everywhere. The first has failed three models outright and is hard to rescue; the second is close on all six. The penalty pushes the first one down to 0.5 / 1.5³ = 0.148 while leaving the second at 0.5.
Each generation keeps the elites, then breeds the rest: parents are picked by rank (best is N times more likely than worst), crossed over with probability Pc, mutated with probability Pm, and added only if the child is new to the generation and not banned. Every compound is scored once and cached, so the number of unique compounds evaluated is the real cost of the search.
Share of compounds carrying a chlorine atom, and the mean number of heteroatoms (atoms other than carbon or hydrogen). Both move when the chemist redirects the search.
Rate a compound the way a chemist would after a feedback session. Liked compounds get re-injected into later generations with a probability that decays over time; banned compounds are kept out until the population is reset. Edit lets you change fragments by hand, see the score update, and push the result into the breeding pool.
A rating r of 1, 0.75, 0.5 or 0.25 is positive; r = −1 is negative. At every generation, a positively rated compound is injected into the population with probability P = exp(−n / (λ r)), where n is the number of generations since the rating. Negative ratings put the compound on a ban list. The user ratings do not change the fitness function; they change which chromosomes get to breed.
The paper tested feedback with one rule: at every 25th generation, review the top 12 and give 1 to compounds without chlorine and −1 to those with it. Turn the same rule on here and watch the chlorine share in the composition chart.
Computational models are never the whole story. A property calculator cannot know that a chlorine at one position tends to fail a toxicity panel, or that a particular amine is a synthetic dead end for this chemistry team. The chemist knows, but cannot write it as an equation. Rating compounds is how that knowledge gets into the search without anyone having to model it. In the paper’s experiment, the feedback made no visible difference for the first 50 generations (only 24 compounds had been rated), and then the algorithm started surfacing substantially more of the chlorine-free compounds the chemist wanted.
The edited compound replaces the lowest-scoring member of the population and breeds in the next generation.