/neuroevolve

Evolution COSMIC Experimental low usage

/neuroevolve

Overview

/neuroevolve is an experimental command in the Evolution category of the Prismatic Platform. It implements neuroevolution combining neural network architecture with evolutionary optimization, enabling the platform to autonomously discover, refine, and deploy novel computational structures through biologically-inspired search algorithms.

Neuroevolution represents the convergence of two powerful optimization paradigms: neural network learning and evolutionary computation. The /neuroevolve command operationalizes this convergence within the Prismatic ecosystem, applying topology-evolving algorithms inspired by NEAT (NeuroEvolution of Augmenting Topologies) and HyperNEAT to platform components including agent behavior networks, quality prediction models, and pattern recognition architectures.

The command operates at the highest authority tier -- COSMIC -- reflecting its ability to modify fundamental platform behaviors through evolved network topologies. Each neuroevolution run produces a population of candidate solutions that compete, mutate, and recombine across generations. The fittest individuals are evaluated against the platform's quality gates and, upon passing the Trinity Gate verification, are eligible for deployment into production systems.

This command is executed by the evolution-orchestrator agent and is part of the platform's 216-command slash command registry, built on the AIAD (Autonomous Intelligence Agent Design) standard. Its experimental status indicates active research-grade development with stable core functionality and evolving edge capabilities.

Architecture

The /neuroevolve command is built on a distributed evolutionary computation framework that leverages Elixir's OTP concurrency model for population-level parallelism.

System Architecture

User Command --> Evolution Orchestrator
                        |
                  Population Manager
                   /    |    \
            Island 1  Island 2  Island N    (Island Model)
              |         |         |
          [Genomes]  [Genomes]  [Genomes]   (Neural Topologies)
              |         |         |
          Evaluator  Evaluator  Evaluator   (Fitness Assessment)
              |         |         |
          Selection  Selection  Selection   (Tournament/Elite)
              \        |        /
               Migration Manager            (Inter-Island Transfer)
                        |
                  Best Genome Extractor
                        |
                  Trinity Gate Validation
                        |
                  Deployment Decision

Core Components

ComponentModuleResponsibility
Population ManagerPrismaticEvolution.Neuro.PopulationManagerManages genome populations across islands
Genome EncoderPrismaticEvolution.Neuro.GenomeEncoderNEAT-style genome representation
Topology MutatorPrismaticEvolution.Neuro.TopologyMutatorAdd/remove nodes and connections
Crossover EnginePrismaticEvolution.Neuro.CrossoverMulti-point crossover with innovation tracking
Fitness EvaluatorPrismaticEvolution.Neuro.FitnessEvaluatorMulti-objective fitness assessment
Speciation ManagerPrismaticEvolution.Neuro.SpeciationCompatibility-based species management
Migration ControllerPrismaticEvolution.Neuro.MigrationInter-island genome transfer

The island model distributes the population across independent GenServer processes, each evolving semi-independently. Periodic migration events transfer high-fitness genomes between islands, combining the exploration benefits of independent populations with the exploitation advantages of sharing successful topologies.

Usage

Basic Neuroevolution

# Evolve a pattern recognition network
/neuroevolve --task pattern-recognition --generations 100

# Evolve agent behavior network with custom fitness
/neuroevolve --task agent-behavior --fitness-fn quality_score --generations 500

# Quick experimental run with small population
/neuroevolve --task optimization --population 50 --generations 20 --mode quick

Advanced Configuration

# Multi-island evolution with migration
/neuroevolve --task quality-prediction --islands 4 --migration-rate 0.05 --generations 1000

# NEAT-style topology evolution with speciation
/neuroevolve --task topology-search --algorithm neat --species-threshold 3.0

# HyperNEAT with compositional pattern producing networks
/neuroevolve --task spatial-patterns --algorithm hyperneat --substrate-dims 8x8

# Resume interrupted evolution from checkpoint
/neuroevolve --resume checkpoint-2026-02-15-gen-450 --generations +200

Monitoring and Analysis

# View current evolution status
/neuroevolve --status

# Export best genome for analysis
/neuroevolve --export-best --format dot --file best-topology.dot

# Visualize fitness landscape
/neuroevolve --analyze fitness-landscape --run-id latest

# Compare runs
/neuroevolve --compare run-001 run-002 --metric fitness,complexity

Options & Parameters

ParameterTypeDefaultDescription
--taskStringRequiredEvolution target task identifier
--algorithmEnumneatAlgorithm: neat, hyperneat, cppn, es-hyperneat
--generationsInteger100Maximum number of generations
--populationInteger150Population size per island
--islandsInteger1Number of parallel island populations
--migration-rateFloat0.03Fraction of genomes migrating per generation
--mutation-rateFloat0.8Probability of mutation per genome
--crossover-rateFloat0.75Probability of crossover per mating
--species-thresholdFloat3.0Compatibility threshold for speciation
--elitismInteger2Number of elite genomes preserved per species
--fitness-fnStringdefaultCustom fitness function identifier
--modeEnumstandardExecution mode: quick, standard, thorough, exhaustive
--resumeString-Resume from checkpoint identifier
--export-bestBooleanfalseExport best genome after completion
--formatEnumjsonExport format: json, dot, onnx
--convergence-thresholdFloat0.001Early stopping when fitness improvement falls below threshold

Execution Flow

The neuroevolution process follows a generational loop with well-defined stages at each iteration.

Phase 1 -- Initialization (0-10s): The Population Manager creates the initial population of minimal-topology genomes. Each genome starts with input nodes connected directly to output nodes with random weights. Innovation numbers are assigned to each connection gene for tracking historical origin during crossover.

Phase 2 -- Evaluation (per generation, variable): Every genome in the population is evaluated against the fitness function. For platform optimization tasks, this involves instantiating the encoded neural network, running it against a test suite, and measuring performance metrics. Evaluation is parallelized across available CPU cores using Task.async_stream/3.

Phase 3 -- Speciation (per generation, <1s): Genomes are grouped into species based on topological and weight similarity. The compatibility distance function considers excess genes, disjoint genes, and average weight differences. This protects topological innovation by allowing novel structures time to optimize their weights before competing against established topologies.

Phase 4 -- Selection and Reproduction (per generation, <1s): Within each species, genomes are selected for reproduction using tournament selection. Elite genomes are preserved unchanged. Selected parents produce offspring through crossover (aligning genes by innovation number) and mutation (weight perturbation, add node, add connection, disable connection).

Phase 5 -- Migration (periodic): At configurable intervals, top-performing genomes migrate between islands. The migration topology can be ring, fully-connected, or custom, controlling the rate of genetic mixing between subpopulations.

Phase 6 -- Convergence Check and Finalization: Evolution terminates when the generation limit is reached, the convergence threshold is met, or a genome achieves the target fitness. The best genome undergoes Trinity Gate validation before being marked as deployment-eligible.

Integration Points

ComponentIntegration TypeDescription
Prismatic AgentsExecutionManaged by evolution-orchestrator agent
Quality GatesValidationEvolved solutions must pass all quality gates
Trinity GateVerificationFormal verification of evolved topologies
TelemetryObservabilityGeneration metrics, fitness trajectories, species counts
SEADFFrameworkIntegrates with Self-Evolving Autonomous Development Framework
Mycelial NetworkPattern propagationSuccessful topologies propagated via mycelial channels
NABLAEpistemic validationConfidence scoring on evolved solutions

Best Practices

Population Sizing: Use a minimum of 150 genomes per island for standard tasks. Smaller populations risk premature convergence. For complex topology searches, increase to 300-500 genomes with multiple islands.

Speciation Tuning: The species compatibility threshold controls diversity. Too low (< 1.0) creates excessive species with tiny populations that cannot evolve effectively. Too high (> 6.0) collapses all genomes into one species, eliminating topological protection. Start at 3.0 and adjust based on species count -- aim for 5-15 active species.

Fitness Function Design: Multi-objective fitness functions should balance performance against complexity. Penalize overly complex topologies to prevent bloat. The platform provides built-in complexity penalties via the --complexity-penalty parameter.

Checkpointing: Always enable checkpointing for long evolution runs (>100 generations). The --checkpoint-interval parameter defaults to every 10 generations but should be reduced for expensive fitness evaluations.

Resource Management: Each island runs as an independent GenServer process. Monitor memory usage for large populations with complex topologies. The platform's circuit breaker will terminate runaway evaluations that exceed memory bounds.

Error Handling

Error ConditionHandling StrategyUser Impact
Fitness evaluation timeoutGenome assigned minimum fitness, evolution continuesSlow genomes naturally deselected
Island process crashSupervisor restarts island from last checkpointBrief pause, minimal data loss
Memory exhaustionPopulation pruned, complexity limits enforcedReduced population, warning issued
Convergence stallAutomatic mutation rate increase triggeredExtended run time, diversity injection
Invalid genome topologyGenome repaired or replaced with random individualTransparent recovery
Checkpoint corruptionFallback to previous valid checkpointPotential generation loss, warning

Advanced Usage

Custom Fitness Functions

Define domain-specific fitness evaluation through the platform's fitness function registry:

# Register a custom fitness function
PrismaticEvolution.FitnessRegistry.register(:my_fitness, fn genome ->
  network = PrismaticEvolution.Neuro.Phenotype.build(genome)
  accuracy = evaluate_accuracy(network, test_data)
  complexity = genome.connection_count / max_connections
  accuracy * 0.8 + (1.0 - complexity) * 0.2
end)
# Use the custom fitness function
/neuroevolve --task custom --fitness-fn my_fitness --generations 200

Coevolution

Run multiple populations that evolve against each other:

# Coevolve attack and defense networks
/neuroevolve --task coevolution --populations "attacker,defender" --coevolution-mode competitive

Doctrine Compliance

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

  • NO MERCY: Zero tolerance for incomplete execution or quality violations. Evolved solutions that fail quality gates are rejected regardless of fitness score. No partial deployments. No unvalidated topologies in production.
  • NO DOUBTS: Full investigation before action, evidence-based results. Every evolved genome carries full lineage tracing back to its initial random topology. Fitness improvements are statistically validated across multiple evaluations to prevent overfitting.

The COSMIC authority level ensures that neuroevolved changes undergo the most rigorous review process, including Trinity Gate formal verification, before any deployment consideration.


Connect & Contribute

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