Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Organism model

Castellan treats the harness as a living organism: genomes express coordination parameters, circulation vitals track field health, and an immune gate rejects harmful topology mutations.

Status: Phases 1–4 complete (circulation, DNA lineage, immune gate, per-zone expression).

Architecture

castellan-core/organism.rs     DNA types + circulation vitals + zone expression
castellan-substrate/pheromone  per-zone decay (fallback to global lambda)
castellan-runtime/circulation  vitals + immune_fever tracking
castellan-runtime/engine.rs    vitals + genome_id + fever + decay wire-through
castellan-evolve/genome.rs     lineage + crossover + archive reconstruction
castellan-evolve/immune.rs     corpus threat detection + auto_reject
castellan-evolve/mutator.rs    crossover + cold-zone decay adjustment
castellan-cli/organism_cmd.rs  castellan vitals | castellan genome list|lineage

Organism loop

flowchart LR
    RUN[castellan run] --> VITALS[circulation vitals]
    VITALS --> EP[episode JSON]
    EP --> EV[castellan evolve]
    EV --> IMM[immune_report]
    IMM -->|accept| ARCH[genome archive]
    IMM -->|reject| QUAR[quarantine]

    classDef runtime stroke:#0969da,stroke-width:2px
    classDef evolve stroke:#d97706,stroke-width:2px
    classDef gate stroke:#1a7f37,stroke-width:2px

    class RUN,VITALS,EP runtime
    class EV,ARCH evolve
    class IMM,QUAR gate
  1. CastellanGenome expresses coordination + decay params at episode end
  2. PheromoneField circulation → CirculationVitals in episode
  3. castellan evolve mutates or crossover (Pareto ≥ 2) → immune_report() gates accept
  4. Quarantined genomes excluded from archive.nearest() seed
  5. Per-zone decay tuned from proposer cold-zone heatmap

CLI

castellan run --goal "reach target" --plugin gridworld
castellan vitals
castellan evolve --episodes 10
castellan genome list
castellan genome lineage <genome_id>

Phase completion

PhaseDeliverableStatus
1 Circulationcirculation_vitals, castellan vitals, fitness dimension
2 DNAgenome_id lineage, archive seed reconstruction, castellan genome
3 Immunedrift + fitness + immune gate, quarantine, fever deposit
4 Expressionper-zone decay, crossover, flux-grid test, fever unit test

flux-grid (optional)

  • Feature: castellan-substrate/flux-grid (vendored 64×64 Stigmergy grid)
  • Not enabled in default builds — zone-keyed PheromoneField remains default substrate
  • Enable for experiments: cargo build -p castellan-substrate --features flux-grid

Known deferred

  • flux-grid in swarm-demo default path
  • Full parent_ids lineage CLI (crossover sets parent_ids; CLI shows primary parent_genome_id only)
  • RAH_MAX_DEPTH in castellan-core (cycle avoidance with castellan-evolvecastellan-rah)

See also