We can't find the internet
Attempting to reconnect
Something went wrong!
Attempting to reconnect
Genetic Algorithms in Production: The MENDEL System
Darwinian selection applied to code evolution at scale
Prismatic Engineering
Prismatic Platform
Evolution as Engineering
Gregor Mendel's experiments with pea plants in the 1860s revealed that inheritance follows discrete, predictable rules. The MENDEL system applies those same principles to software: traits are encoded, fitness is measured, and the fittest survive to breed the next generation.
Unlike traditional software development where humans decide what to build next, MENDEL lets the platform explore the solution space through controlled evolution. The system does not replace human judgment -- it augments it by exploring combinations that humans would never think to try.
Trait Encoding
Every evolutionary unit in the platform is encoded as a trait -- a discrete, measurable characteristic that can be inherited, mutated, or combined.
%Trait{
id: "trait_query_batching",
domain: :performance,
alleles: %{
batch_size: 50,
timeout_ms: 5000,
retry_strategy: :exponential_backoff
},
fitness: 0.91,
generation: 18,
lineage: ["trait_query_basic", "trait_query_pooled"]
}
Traits carry their lineage -- the chain of ancestor traits that led to their current form. This allows the system to trace why a particular solution works and to identify evolutionary dead-ends.
Trait Categories
|----------|----------|---------------|
Enforcement traits have the lowest mutation rate by design. The ARCHER SUPREME anti-shortcut policy, for example, has a 0.01 mutation rate and dominant inheritance -- it is extremely unlikely to degrade across generations.
Fitness Functions
Fitness is not a single number. The MENDEL system uses a composite fitness function that combines multiple objectives:
F(trait) = w1 correctness + w2 performance + w3 maintainability + w4 compliance
Where:
Weights are configurable per domain. Security-critical domains may increase the compliance weight to 0.40, while data processing domains may prioritize performance.
Crossover Operators
When two high-fitness traits breed, the system combines their alleles using one of three crossover strategies:
Single-Point Crossover
A random split point divides the allele set. Parent A contributes alleles before the split, Parent B contributes alleles after. This is the default strategy and works well for traits with independent alleles.
Uniform Crossover
Each allele is independently selected from either parent with equal probability. This produces more genetic diversity but can disrupt co-adapted allele groups.
Domain-Aware Crossover
Alleles are grouped by functional domain, and entire groups are inherited together. This preserves co-adapted allele clusters -- for example, keeping batch_size and timeout_ms together because they were tuned as a pair.
Mutation Strategies
Mutations introduce novelty. The system uses four mutation types:
2. Strategy Mutation: An enum allele switches to a different variant. Retry strategy might change from exponential backoff to linear.
3. Structural Mutation: A new allele is added or an existing one is removed. This is the rarest and most impactful mutation type.
4. Null Mutation: No change occurs. This provides a control group for measuring whether mutations are actually improving fitness.
Population Management
The MENDEL system maintains a population of 75 trait variants per evolutionary niche. Each generation:
2. Select: Top 20% (15 variants) are selected as parents
3. Breed: Parents produce offspring through crossover until population is restored to 75
4. Mutate: Apply mutations according to category-specific rates
5. Cull: Remove any variants with fitness below the breeding threshold (0.92)
Stall Detection
If the best fitness in a population has not improved for 30 generations, the system triggers a diversity injection -- 20% of the population is replaced with randomly generated variants. This prevents the population from converging on a local optimum.
The Darwinian Selection Process
Selection pressure determines how strongly the system favors high-fitness variants. With the current L2-optimized selection pressure of 5, the probability of a variant being selected as a parent is proportional to the 5th power of its fitness rank.
This creates strong pressure toward the best solutions while still allowing mid-tier variants an occasional chance to breed -- important because a mid-tier variant might carry a recessive allele that becomes dominant in a future context.
Production Safeguards
Running genetic algorithms in production requires safety rails:
Results in Practice
Over 19 generations, MENDEL has autonomously discovered:
The system does not replace human engineers. It explores the combinatorial space faster than any human team could, surfacing promising configurations that engineers then review, validate, and deploy.
Mendel proved that evolution follows rules. We encoded those rules in Elixir.