/darwinize

Evolution L3 Production medium usage

/darwinize

Overview

/darwinize is a production command in the Evolution category of the Prismatic Platform that implements Darwinian natural selection operations for evolutionary fitness optimization across the platform ecosystem. The command applies environmental pressure to populations of solutions, selects the fittest individuals, enables adaptive radiation into new ecological niches, and tracks speciation and extinction events -- all modeled on biological evolutionary principles.

The Darwinian evolution mechanism is one of three complementary evolution strategies in the Prismatic Evolution Framework, alongside Mendelian (genetic crossover and mutation) and Mycelial (network-based pattern propagation). While Mendelian evolution operates on genetic recombination and Mycelial evolution spreads successful patterns through network connections, Darwinian evolution focuses on environmental fitness selection -- the survival and reproduction of individuals best adapted to their environmental context.

This command operates under the L3 authority level and is executed by the darwinian-evolution-coordinator agent. It is part of the platform's 216-command slash command registry, built on the AIAD (Autonomous Intelligence Agent Design) standard. The command supports six operations (adapt, compete, speciate, radiate, analyze, status) across four environmental contexts (production, development, testing, research), each applying distinct selection pressures optimized for that environment's priorities.

The evolution system maintains population viability through mandatory quality gates that prevent genetic bottlenecks, enforce diversity preservation, and ensure that at least two active ecological niches are maintained at all times. Extinction events are documented and analyzed to prevent loss of valuable genetic diversity.

Architecture

The Darwinian evolution system is built on an environment-population-niche architecture that models biological natural selection.

Environment Configuration (production/development/testing/research)
    |
    v
Population Manager
    |-- Individual trait vectors
    |-- Fitness evaluation
    |-- Generation tracking
    |
    +-- Natural Selection Engine
    |       |-- Fitness-proportional selection
    |       |-- Tournament selection
    |       |-- Environmental pressure application
    |
    +-- Niche Manager
    |       |-- Niche partition
    |       |-- Adaptive radiation
    |       |-- Speciation detection
    |       |-- Extinction monitoring
    |
    +-- Evolution Reporter
            |-- Generation metrics
            |-- Speciation events
            |-- Extinction records
            |-- Telemetry emission

Core Principles

PrincipleImplementation
VariationIndividuals vary in trait vectors (performance, reliability, efficiency, innovation)
SelectionEnvironment selects fitter individuals through pressure-proportional survival
InheritanceSuccessful traits pass to offspring in subsequent generations
TimeEvolution occurs over configurable number of generations

Usage

Adaptation Operations

# Adapt population to production environment
/darwinize adapt production --selection-pressure 0.7

# Low-pressure development adaptation
/darwinize adapt development --adaptation-rate 0.2

# Research environment with high innovation weight
/darwinize adapt research --selection-pressure 0.3 --radiation

# Multi-generation production optimization
/darwinize adapt production --selection-pressure 0.7 --generations 15 --detailed

Competition Operations

# Intense competition with 30% survival
/darwinize compete production --survival-rate 0.3

# Moderate competition with detailed output
/darwinize compete testing --detailed

# Competition with custom population size
/darwinize compete development --population-size 100 --survival-rate 0.5

Speciation and Radiation

# Trigger speciation with 5 niches
/darwinize speciate --niche-count 5 --radiation

# Research speciation analysis
/darwinize speciate research --detailed

# Adaptive radiation into new niches
/darwinize radiate development --niche-count 4
/darwinize radiate production --adaptation-rate 0.15

Analysis and Status

# Analyze population dynamics
/darwinize analyze --detailed

# Environment-specific analysis
/darwinize analyze production

# Current population status
/darwinize status
/darwinize status --detailed

# Dry run (preview without executing)
/darwinize adapt production --dry-run

Options & Parameters

ParameterTypeDefaultRangeDescription
actionenumadaptadapt, compete, speciate, radiate, analyze, statusOperation to perform
environmentenumproductionproduction, development, testing, researchEnvironmental context
--selection-pressurefloat0.50.0-1.0Intensity of natural selection
--survival-ratefloat0.50.1-0.9Proportion surviving each generation
--niche-countinteger31-5Number of ecological niches
--adaptation-ratefloat0.10.0-0.5Rate of adaptive changes
--population-sizeinteger5010-500Population size
--generationsinteger101-100Number of generations
--radiationbooleantrue-Enable adaptive radiation
--detailedbooleanfalse-Show detailed metrics
--dry-runbooleanfalse-Preview without executing

Environmental Contexts

Each environment applies different selection pressures that favor different trait combinations:

EnvironmentPerformanceReliabilityEfficiencyInnovationThreshold
Production40%30%20%10%60%
Development20%20%20%40%40%
Testing30%40%20%10%50%
Research10%10%20%60%30%

Ecological Niches

NicheFocusSuccess Criteria
PerformanceSpeed and efficiencyLow latency, high throughput
ReliabilityStability and correctnessLow error rate, consistency
EfficiencyResource optimizationLow memory, CPU efficiency
InnovationNovel approachesCreative solutions, uniqueness
HybridBalanced approachMulti-dimensional fitness

Execution Flow

PHASE 1: ENVIRONMENT INITIALIZATION
    |-- Configure environmental factors
    |-- Set selection pressure
    |-- Define ecological niches
    |-- Initialize population
    |
PHASE 2: ENVIRONMENTAL PRESSURE
    |-- Apply environmental stress
    |-- Evaluate fitness in context
    |-- Identify struggling individuals
    |-- Apply survival challenges
    |
PHASE 3: NATURAL SELECTION
    |-- Fitness-proportional selection
    |-- Competition for resources
    |-- Survival of the fittest
    |-- Removal of unfit individuals
    |
PHASE 4: NICHE DYNAMICS
    |-- Partition into niches
    |-- Reproduce within niches
    |-- Enable adaptive radiation
    |-- Track niche populations
    |
PHASE 5: POPULATION DYNAMICS
    |-- Detect speciation events
    |-- Record extinctions
    |-- Update population structure
    |-- Calculate diversity metrics
    |
PHASE 6: REPORTING
    |-- Generate evolution report
    |-- Emit telemetry events
    |-- Update niche maps
    |-- Save to .claude/reports/darwinize/

Integration Points

ComponentRelationshipDetails
Prismatic AgentsExecuted by darwinian-evolution-coordinatorMulti-agent evolution
AIAD RegistryCommand specification and discoveryStandard AIAD interface
Quality GatesPopulation viability enforcementDiversity and niche gates
TelemetryEvolution event tracking[:prismatic, :evolution, :darwinian, *]
Evolution FrameworkUnified evolution enginePrismatic.Evolution.Engine
Mendelian MechanismGenetic crossover complementPrismatic.Evolution.Mechanisms.Mendelian
Mycelial MechanismPattern propagation complementPrismatic.Evolution.Mechanisms.Mycelial

Elixir API

alias Prismatic.Evolution.{Engine, Mechanisms.Darwinian}

# Single evolution cycle
{:ok, result} = Engine.run_cycle(Darwinian, population)

# Multiple generations
{:ok, result} = Engine.run_generations(Darwinian, population, generations: 20)

# Custom configuration
{:ok, state} = Darwinian.init(
  environment: :production,
  selection_pressure: 0.7,
  survival_rate: 0.4,
  niche_count: 4
)

# Run until convergence
{:ok, result} = Engine.run_until_convergence(Darwinian, population)

# Chain with other mechanisms
{:ok, darwinian_result} = Engine.run_cycle(Darwinian, population)
{:ok, mycelial_result} = Engine.run_cycle(Mycelial, darwinian_result.population)

Quality Gates

Mandatory Population Gates

GateCriteriaEnforcement
Population ViabilityMinimum population size maintainedBlocking
Diversity PreservationDiversity index above 0.5Blocking
Niche BalanceAt least 2 active nichesBlocking
Fitness ProgressPositive selection effectWarning

Best Practices

  1. Match Environment to Goal: Use production environment for stability optimization, research for innovation exploration. Mismatched environments produce suboptimal selection.

  2. Start with Moderate Pressure: Begin with --selection-pressure 0.5 and adjust based on results. High pressure (0.8+) can cause premature convergence and loss of diversity.

  3. Monitor Diversity: Track the diversity index across generations. If diversity drops below 0.5, reduce selection pressure or increase niche count to prevent genetic bottleneck.

  4. Use Dry Run for Configuration Tuning: Run /darwinize adapt --dry-run with different parameter combinations to preview expected outcomes before committing.

  5. Chain with Other Mechanisms: Combine Darwinian selection with Mendelian crossover and Mycelial propagation for comprehensive evolution. Each mechanism addresses different aspects of optimization.

  6. Document Speciation Events: Speciation events represent significant evolutionary milestones. Review and document the conditions that triggered speciation for future reference.

Error Handling

ErrorCauseResolution
POPULATION_EXTINCTSelection pressure too highReduce pressure or survival rate
DIVERSITY_BOTTLENECKPopulation converged too quicklyIncrease niche count or reduce pressure
NICHE_COLLAPSEAll individuals in single nicheEnable radiation, increase niche count
GENERATION_TIMEOUTGeneration processing exceeded limitReduce population size or simplify fitness function
INVALID_ENVIRONMENTUnknown environment specifiedUse: production, development, testing, research

Performance

MetricValueNotes
Per Generation1-5 secondsDepends on population size
10 Generations10-50 secondsStandard configuration
100 Generations2-10 minutesExtended evolution
Population 500~5 seconds/generationMaximum population
Telemetry Overhead< 50msPer event emission

Doctrine Compliance

All commands operate under the NO MERCY, NO DOUBTS doctrine:

  • NO MERCY: Quality gates are non-negotiable. Populations that violate viability or diversity thresholds trigger automatic intervention. No evolution cycle completes without gate validation.
  • NO DOUBTS: Full investigation through multi-generation analysis before conclusions. Evolution results are evidence-based through fitness tracking, diversity metrics, and speciation event documentation.

Connect & Contribute

Created by Tomáš Korcak (korczis) | Open Source under GHL