Expand description
§FEAGI Evolution & Genome Management
Handles all genotype operations for FEAGI:
- Genome I/O (JSON ↔ Rust structs)
- Genome validation
- Evolution operators (mutation, crossover)
- Fitness evaluation
- Population management
§Architecture
This crate manages the genetic blueprint (genotype) of FEAGI brains.
The actual instantiated brain structure (phenotype) is handled by feagi-bdu.
§Separation of Concerns
feagi-evo (Genotype) feagi-bdu (Phenotype)
───────────────────── ─────────────────────
│ Genome JSON I/O │ → │ Neuroembryogenesis │
│ Genome Validation │ │ Connectome I/O │
│ Evolution Ops │ │ Synaptogenesis │
│ Fitness Eval │ │ NPU Integration │
└────────────────────┘ └─────────────────────┘§Modules
genome- Genome I/O and validationevaluation-GenomeEvaluationrecords: fitness + genome-only lineage (ADR-016)circuit-CircuitObjectiveSpec: circuit-level objectives and boundary resolutionevolution- Evolution operators (future)fitness- Fitness evaluation (future)population- Population management (future)
Copyright 2025 Neuraville Inc. Licensed under the Apache License, Version 2.0
Re-exports§
pub use converter_flat::convert_flat_to_hierarchical;pub use converter_flat_full::convert_flat_to_hierarchical_full;pub use converter_hierarchical_to_flat::convert_hierarchical_to_flat;pub use cortical_type_parser::parse_cortical_type;pub use cortical_type_parser::validate_cortical_type;pub use evaluation::ComparabilityKey;pub use evaluation::ConfidenceInterval;pub use evaluation::EvaluationError;pub use evaluation::EvaluationId;pub use evaluation::ExperimentId;pub use evaluation::FitnessEstimate;pub use evaluation::FitnessObjective;pub use evaluation::FitnessOutcome;pub use evaluation::FitnessSpec;pub use evaluation::GenomeEvaluation;pub use evaluation::GenomeOrigin;pub use evaluation::Lineage;pub use genome::parser::string_to_cortical_id;pub use genome::apply_genome_title_to_unique_top_circuit;pub use genome::decode_genome_artifact;pub use genome::encode_genome_artifact;pub use genome::load_genome_artifact_with_report;pub use genome::load_genome_from_artifact;pub use genome::load_genome_from_file;pub use genome::load_genome_from_json;pub use genome::load_genome_value_with_report;pub use genome::load_genome_with_report;pub use genome::load_genome_with_report_from_file;pub use genome::migrate_genome;pub use genome::migrate_genome_json_to_current;pub use genome::migrate_genome_value_to_current;pub use genome::peek_quantization_precision;pub use genome::save_genome_to_file;pub use genome::save_genome_to_json;pub use genome::subset_runtime_genome_for_region_branch;pub use genome::validate_genome_artifact_file_name;pub use genome::wrap_parentless_regions_under_named_root;pub use genome::ChainResult;pub use genome::GenomeArtifactCodec;pub use genome::GenomeArtifactEncoding;pub use genome::GenomeParser;pub use genome::GenomeSaver;pub use genome::JsonGenomeArtifactCodec;pub use genome::MigrationResult;pub use genome::ParsedGenome;pub use genome::GENOME_ARTIFACT_EXTENSION;pub use genome::GENOME_ARTIFACT_MEDIA_TYPE;pub use modulators::driver_locked_properties;pub use modulators::driver_locked_property_names;pub use modulators::parse_modulator_registry;pub use modulators::ModulatorInstance;pub use modulators::ModulatorRegistry;pub use modulators::ModulatorWrite;pub use plasticity_detector::extract_memory_properties;pub use plasticity_detector::genome_has_plasticity;pub use plasticity_detector::validate_memory_mp_properties;pub use plasticity_detector::LtmEvictionMode;pub use plasticity_detector::MemoryAreaProperties;pub use plasticity_detector::MpChangeMode;pub use plasticity_detector::ReplayTrigger;pub use plasticity_detector::CAPTURE_MAX_BURSTS_KEY;pub use plasticity_detector::DEFAULT_MEMORY_FIRING_THRESHOLD;pub use plasticity_detector::LTM_EVICTION_KEY;pub use plasticity_detector::MEMORY_NEURON_CAP_KEY;pub use plasticity_detector::MP_CHANGE_MODE_KEY;pub use plasticity_detector::MP_DELTA_QUANTIZATION_KEY;pub use plasticity_detector::MP_LEARNING_ENABLED_KEY;pub use plasticity_detector::MP_RATIO_QUANTIZATION_KEY;pub use plasticity_detector::REPLAY_TRIGGER_KEY;pub use runtime::GenomeMetadata;pub use runtime::GenomeSignatures;pub use runtime::GenomeStats;pub use runtime::Morphology;pub use runtime::MorphologyParameters;pub use runtime::MorphologyRegistry;pub use runtime::MorphologyType;pub use runtime::PatternElement;pub use runtime::PhysiologyConfig;pub use runtime::RuntimeGenome;pub use storage::GenomeStorage;pub use storage::StorageError;pub use templates::add_core_morphologies;pub use templates::create_death_area;pub use templates::create_fatigue_area;pub use templates::create_fear_area;pub use templates::create_genome_with_core_areas;pub use templates::create_genome_with_core_morphologies;pub use templates::create_hope_area;pub use templates::create_minimal_genome;pub use templates::create_pain_area;pub use templates::create_pleasure_area;pub use templates::create_power_area;pub use templates::ensure_core_components;pub use templates::get_default_neural_properties;pub use templates::load_barebones_genome;pub use templates::load_essential_genome;pub use templates::load_test_genome;pub use templates::load_vision_genome;pub use templates::BAREBONES_GENOME_JSON;pub use templates::ESSENTIAL_GENOME_JSON;pub use templates::TEST_GENOME_JSON;pub use templates::VISION_GENOME_JSON;pub use types::EvoError;pub use types::EvoResult;pub use validator::validate_genome;pub use validator::ValidationResult;
Modules§
- circuit
CircuitObjectiveSpecv1 — a measurable, circuit-level objective for one brain region.- converter_
flat - Convert flat genome format (2.0) to hierarchical format.
- converter_
flat_ full - COMPLETE flat genome format (2.0) to hierarchical format converter.
- converter_
hierarchical_ to_ flat - Convert hierarchical genome format (RuntimeGenome) to flat genome format (3.0).
- cortical_
type_ parser - Cortical Type Parser - Parse CorticalAreaType from genome properties
- evaluation
GenomeEvaluationv1 — one evaluated individual: a genome, its fitness, and its lineage.- genome
- Genome I/O and manipulation for FEAGI Evolution.
- modulators
- Genome modulator instances.
- plasticity_
detector - Plasticity detection for genome analysis
- random
- Cross-platform random number generation for FEAGI evolution.
- runtime
- Runtime genome representation for FEAGI.
- storage
- Genome Storage Abstraction
- templates
- Genome templates for FEAGI.
- types
- Core types and error handling for FEAGI Evolution.
- units
- Units of stored genome values.
- validator
- Genome validation for FEAGI.
Structs§
- Adapter
Area - One new plain area of the adapter region.
- Adapter
Plan - New areas created in a new brain region, between the block and the host’s IO areas.
- Amalgamation
Modulator Plan - Modulator work for one amalgamation.
- Amalgamation
Region Plan - Region tree to build for an amalgamated guest genome.
- Amalgamation
Region Spec - One sub-region to create under the amalgamation host region.
- AreaFit
- One fitted area: the guest cortical id (base64, as in the guest genome) and its dimensions.
- FitPlan
- What the guest’s areas must look like on the host, and the wiring to add around them. Every
field but
areasis optional; an absent field changes nothing. - Host
Modulator - A modulator already in the host.
- Pattern
Bounds - A
patternsrow that falls outside the area at one of its ends. - Plan
Context - Everything outside the plan that its validation reads.
- Plan
Mapping - One mapping to create.
srcanddstare a guest area id (as published, before the import remaps it), an adapter area id, or an existing host area id.rulesare mapping rules in the shapeupdate_cortical_mappingtakes; each names amorphology_id. - Plan
Morphology - A
patternsmorphology with exact coordinates: each row is[[sx,sy,sz],[dx,dy,dz]], the same JSON as the existing patterns type minus wildcards. - Planned
Adopted Modulator - One guest modulator that adopts an existing area as its driver.
- Planned
Owned Modulator - One guest-owned modulator to create (the service allocates its driver area).
Enums§
- FitPlan
Error - Why a plan was refused. Nothing is changed when one is returned.
- Modulator
Collision Policy - What to do when a guest modulator name already exists in the host.
Constants§
- VERSION
- Crate version from Cargo.toml
Functions§
- apply_
driver_ remap - Re-key guest modulator driver areas after their instances were created in the host
(
old base64 -> new base64, including drivers of reused host modulators), and rewrite every reference to them (mapping destinations, classifier fields, region membership). - apply_
modulator_ name_ map - Rewrite every modulator name a guest area refers to: the area’s
modulatorslist and each mapping rule’smodulatorslist. Classifier reward lists are handled byplan_amalgamation_classifiers. - designated_
io_ lists_ for_ cloned_ circuit - Declared region IO on the circuit that region-export wrapped under
Root Brain Region. - fit_
areas - Return
areaswith the plan’s dimensions applied. Validates the whole plan first; on any error nothing is returned. An empty plan returns an unchanged copy. - plan_
amalgamation_ classifiers - Plan the guest classifiers: fresh
classifier_id, area fields througharea_remap, reward modulators throughname_map, andparent_region_idthroughregion_map(the host region when the guest parent was not planned). Fails when a classifier’s sample or class memory is not amongguestareas, so a half-imported assembly is never created. - plan_
amalgamation_ modulators - Plan the guest modulators. Call after the guest area ids were remapped
(
remap_guest_custom_memory_cortical_ids_for_amalgamation), so adopted drivers carry their final ids. - plan_
amalgamation_ regions - Plan the guest region tree for amalgamation. Pure: no I/O, no host state.
- plan_
host_ lookup_ ids - Ids the caller must look up on the host before validating: adapter ids (they must not exist) and mapping ends that are neither guest nor adapter areas (they must exist). Sorted, unique.
- remap_
classifier_ area_ fields - Remap every area id a classifier record holds.
- remap_
guest_ custom_ memory_ cortical_ ids_ for_ amalgamation - Remap guest Custom and Memory cortical IDs to fresh values not present in
host_reserved_base64_idsor elsewhere in this guest genome. Updates cortical area keys,cortical_mapping_dstdestination keys, brain region membership, and region IO lists. - remap_
region_ io_ lists - Rewrite the base64 area ids in a region’s
inputs,outputs,designated_inputsanddesignated_outputsproperty lists, and the keys of itsport_encodingmap. - rename_
runtime_ genome_ areas - Rename areas in a genome in place: area keys,
cortical_idfields, region membership and region IO lists, and every id-bearing property (seerewrite_area_properties), classifier fields and modulator drivers.renamesis a set of simultaneous(old, new)pairs, so a swap of two ids is allowed. Neuron data is not touched. - rewrite_
area_ properties - Rewrite every area id held inside one area’s properties (
old base64 -> new base64):cortical_mapping_dstdestination keys and the*_source_areafields of their rules, classifier assembly links, and the memory-twin properties (memory_twin_areaskeys and values,memory_twin_of,memory_twin_for). - validate_
plan - Validate the adapter, morphologies and mappings of
plan(not itsareas;fit_areasdoes those). Pure: reads onlyctx. Run it when the plan is queued and again at confirmation with freshly read host data.