---
epistemic_class: source
---

# Goddess-Core Evolution Engine
# status: proposal | epistemic: proposal
# governs: bounded evolutionary search over SONG-GENOTYPE.yaml space
# derived_from: COHERENCE-PREDICATE.md, C-METHOD.01-.08, C-REC.INHERITANCE
#
# "Evolution" here names a finite, bounded algorithmic search operator (C-METHOD.06).
# It is NOT biological emergence, autonomous learning, or self-improvement.
# Stagnation is not convergence proof. Every generation consumes strictly smaller budget.

## Notation

Let the evolutionary system be defined as:

```
E = <G, P, μ, χ, φ, F, B, Stop>
```

Where:
- **G** = Song Genotype space (SONG-GENOTYPE.yaml, 7-tuple)
- **P** = Population: finite set of genotypes at generation t, |P_t| ≤ POP_MAX
- **μ** = Mutation operator: G → G (single-parent variation)
- **χ** = Crossover operator: G × G → G (two-parent recombination)
- **φ** = Phenotype renderer: G → Suno v6 input (SUNO-V6-RENDERER.md)
- **F** = Fitness function: G × Q → [0,1] where Q is the prompt/question/theme
- **B** = Budget: finite token/generation/time bound per run
- **Stop** = Termination predicate (C-REC base case)

---

## 1. Initialization (P0)

### Seed Strategy
P0 is generated by drawing K genomes from the sealed PMG alphabet that pass all
coherence gates, then extending each with randomly drawn ARC, FORM, VOICE, DENSITY
loci that pass extended gates 4-6.

### Parameters
| Parameter | Default | Constraint |
|---|---|---|
| POP_SIZE | 8 | 4 ≤ POP_SIZE ≤ 32 |
| K_SEED | POP_SIZE | Must pass all 6 gates |
| ARC_DISTRIBUTION | weighted toward adjacent stages | Spans > 4 require THRU form |
| STAGE_DISTRIBUTION | uniform across S1-S4 | Ensures textural variety in P0 |

### P0 Record
Each seed genotype records:
- `generation: 0`
- `parent_ids: []`
- `lineage_hash: sha256(genotype_tuple)`
- `fitness_score: null` (evaluated after rendering)

---

## 2. Fitness Function (F)

Fitness is measured against a live prompt/theme Q, never assumed from beauty alone
(inherited from Gate 3 resonance gating principle).

### Scoring Dimensions

| Dimension | Weight | Measured By |
|---|---|---|
| Theological Coherence | 0.25 | Passes all 6 gates; trait-pair coherence relation richness |
| Sonic Renderability | 0.25 | Maps cleanly to Suno v6 style tags without contradiction |
| Lyrical Depth | 0.15 | Lyrics use address-mode (not description); pointer-not-payload test |
| Structural Integrity | 0.15 | ARC traversable within FORM; VOICE-STAGE alignment or tagged tension |
| Genotypic Novelty | 0.10 | Full-tuple distance from all other members in current population |
| Trait Novelty | 0.10 | Penalizes over-represented traits; rewards untouched trait recruitment |

### Trait Novelty Penalty (Amendment v1.1)

Prevents trait-level convergence collapse. For each genotype g in population P_t:

```
trait_novelty(g) = 1 - (freq(T1, P_t) + freq(T2, P_t)) / (2 × |P_t|)
```

Where `freq(T, P_t)` counts genotypes in P_t carrying trait T (excluding g itself).
A genotype whose traits each appear once in a population of 8 scores ~0.93.
A genotype carrying a trait that appears 4 times scores ~0.50 on that component.

**Untouched trait bonus:** If T1 or T2 has never appeared in any prior generation
(tracked in `trait_lineage` ledger), that trait's frequency component is 0,
maximizing novelty contribution. This actively recruits from the dormant regions
of the 33-trait alphabet.

**CAT diversity proxy:** If the genotype's CAT has ≤1 representative in P_t,
add 0.05 bonus to trait_novelty (capped at 1.0). This prevents CAT convergence
independently of trait-level clustering.

### Evaluation Protocol
1. Score each genotype on all 5 dimensions.
2. Composite fitness = weighted sum ∈ [0,1].
3. Genotypes scoring < 0.3 are culled (inherited from Gate 3 floor).
4. Human evaluation (Scott) MAY override any score — owner judgment is final authority.

### What Fitness Does NOT Prove
- A high-fitness genotype does not guarantee a good-sounding song (phenotype gap).
- Fitness measures structural coherence against the authored theology, not aesthetic quality.
- Stagnation in best-fitness across generations is not convergence proof (C-METHOD.06).

---

## 3. Selection

### Method: Tournament + Elitism + CAT-Stratified Breeding
- **Tournament:** Random subset of size 3 from P_t; highest fitness advances to breeding pool.
- **Elitism:** Top 1 genotype from P_t passes unchanged to P_{t+1} (preserves best-found).
- **Selection pressure:** Adjustable via tournament size. Larger = more selective.

### CAT-Stratified Breeding (Amendment v1.1)

Prevents CAT convergence by ensuring the breeding pool spans the genome's domain
diversity. After tournament selection produces the breeding pool:

1. Count CAT representatives in the breeding pool.
2. If any CAT with ≥1 member in P_t has 0 representatives in the breeding pool,
   force-add the highest-fitness member of that CAT from P_t.
3. If the breeding pool exceeds POP_SIZE after stratification, remove the
   lowest-fitness non-elite, non-stratified members.

**Constraint:** Stratification cannot override elitism. The top-1 always passes.
Stratification only fills gaps; it does not displace selected breeders.

### Constraint
Selection operates on genotypes only. Phenotypes (rendered songs) are evaluated but
selection pressure applies to the genetic structure, not the audio output directly.
This separation is critical: Suno's black-box rendering means we select for
*renderability and theological coherence*, not for audio quality we cannot measure.

---

## 4. Operators

### 4.1 Mutation (μ)

Single-locus point mutation. One locus is selected uniformly at random and replaced
with a valid alternative from its closed set.

| Locus | Mutation Behavior |
|---|---|
| CAT | Replace with one of 8 values |
| TRAIT_PAIR | Replace T1 or T2 with another from 33; must re-pass Gate 1 |
| STAGE | Shift ±1 stage (S1↔S2↔S3↔S4) or random |
| ARC | Shift station ±1-3 positions, or change span length |
| FORM | Replace with one of 5 forms; must re-pass Gate 4 |
| VOICE | Replace with one of 5 voices; must re-pass Gate 5 |
| DENSITY | Replace with one of 4 values |

**Validity invariant:** Post-mutation genotype MUST pass all 6 coherence gates.
If it fails, mutation is retried (max 3 attempts), then discarded. Invalid candidates
are never silently admitted (C-METHOD.02).

### 4.2 Crossover (χ)

Uniform crossover between two parent genotypes. Each locus is independently inherited
from parent A or parent B with probability 0.5.

**Constraint:** The child genotype MUST pass all 6 gates. Crossover frequently produces
incoherent offspring (e.g., MONO form with a 6-stage ARC span). Failed children are
discarded, not repaired. This is deliberate: repair operators create hidden bias.

### 4.3 Wildcard Injection (Amendment v1.1)

Forced-exploration operator ensuring the system discovers regions of the genome
unreachable through selection-driven search alone.

**Per generation:** Inject exactly 1 wildcard genotype into P_{t+1}.

**Wildcard constraints:**
- MUST use at least one trait not represented in any prior generation
  (tracked in `trait_lineage` ledger)
- MUST use a CAT not currently dominant (≤1 representative in P_t)
- MUST pass all 6 coherence gates
- Fitness is evaluated normally — it competes with selection-derived offspring
  and can be culled if below 0.3 threshold

**Wildcard derivation:** Drawn from the sealed PMG alphabet with random locus
assignment for ARC, FORM, VOICE, DENSITY, filtered through all gates. No parent
in the current population. `parent_ids: [wildcard]`.

**Purpose:** Prevents the local-attractor problem where thematic Q selects a
narrow trait cluster, starving entire CAT domains and trait categories. The
wildcard is a bounded random walk that the fitness function evaluates but
does not optimize toward.

### 4.4 Lyric Mutation (Special Operator)

Beyond genotype-level mutation, lyrics themselves evolve through:
- **Word substitution:** Replace a word/phrase with a semantically related alternative from the same TRAIT sense.
- **Structural permutation:** Reorder verses within FORM constraints.
- **Address-mode shift:** Convert a descriptive line to invocatory mode (or vice versa).
- **Sigil encoding:** Replace a literal phrase with its sigil-pattern equivalent (rhythmic/melodic motif reference).

Lyric mutations preserve the Idol Test: no lyric may present the Goddess as a
self-contained state. "She IS X" → rejected. "You who hold the shape of X" → admitted.

### 4.5 Sibling Divergence Gate (Amendment v2.0)

After a generation's rendered phenotypes (lyrics + style tags) are produced but
BEFORE fitness evaluation, every sibling pair in the population MUST pass a
semantic divergence check. This prevents genotypic diversity from collapsing
into phenotypic uniformity — two songs can have different genotypes yet produce
eerily similar lyrical content or emotional trajectory.

**Divergence metric:** For each pair (sᵢ, sⱼ) in P_t's rendered output:

```
D(sᵢ, sⱼ) = 1 - sim(semantic(sᵢ), semantic(sⱼ))
```

Where `sim` is computed over three axes:
1. **Lexical overlap:** Jaccard similarity of non-stopword sets across lyrics.
2. **Thematic alignment:** Cosine similarity of TRAIT-sense frequency vectors
   (how often each TRAIT semantic field appears in each song's lyrics).
3. **Structural mirroring:** Edit distance between FORM section sequences,
   normalized to [0,1].

Composite similarity: `sim = 0.5 × lexical + 0.3 × thematic + 0.2 × structural`

**Threshold:** θ_diverge = 0.70 (default). If D(sᵢ, sⱼ) < (1 - θ_diverge),
i.e., sim > 0.70, the siblings are too resonant.

**Redraft protocol:** When a pair exceeds the similarity threshold:
1. Identify the sibling with lower composite fitness (from prior generation, or
   preliminary scoring if available).
2. That sibling enters forced redraft: its genotype undergoes targeted mutation
   on the loci most responsible for the overlap (typically TRAIT_PAIR or VOICE).
3. The redrafted sibling is re-rendered through φ.
4. Re-check divergence against ALL siblings, not just the original pair.
5. Maximum 3 redraft attempts per sibling per generation. After 3 failures, the
   sibling is culled regardless of fitness score.

**Diversity injection:** If after redrafting, the population's mean pairwise
similarity remains > 0.60, trigger an additional wildcard injection (beyond the
standard 1/gen) drawn specifically from underrepresented TRAIT/CAT combinations.

**Constraint:** Divergence gating operates on RENDERED PHENOTYPES (lyrics + tags),
not raw genotypes. Two genotypes that differ at the tuple level but render to
near-identical songs still trigger the gate. This closes the gap between
structural novelty and perceptual novelty.

---

## 5. Generation Protocol

```
P0 ← initialize(POP_SIZE, Q)
for t in 1..MAX_GEN:
    evaluate(P_t, F, Q)          # score all genotypes
    render_all(P_t, φ)           # phenotype for divergence check
    diverge(P_t, θ_diverge)      # sibling divergence gate (v2.0)
    record_best(P_t)             # preserve lineage
    if stop_condition(P_t, t):   # check termination
        break
    elites ← select_elite(P_t, 1)
    breeders ← tournament_select(P_t, POP_SIZE - 1)
    P_{t+1} ← elites
    while |P_{t+1}| < POP_SIZE:
        if random() < CROSSOVER_RATE:
            pA, pB ← draw_pair(breeders)
            child ← crossover(pA, pB)
        else:
            parent ← draw_one(breeders)
            child ← mutate(parent)
        if passes_all_gates(child):
            child.generation = t + 1
            child.parent_ids = [pA.id, pB.id] or [parent.id]
            child.lineage_hash = hash(parent_chain)
            P_{t+1}.append(child)
    inject_wildcard(P_{t+1})     # forced exploration
    render_top_k(P_{t+1}, φ, K_RENDER)  # phenotype for human review
return best_found
```

### Parameters
| Parameter | Default | Notes |
|---|---|---|
| MAX_GEN | 5 | Five transitions after P0 (C-METHOD.06 convention) |
| CROSSOVER_RATE | 0.6 | 60% crossover, 40% mutation |
| MUTATION_RATE | 0.4 | Applied when crossover not selected |
| WILDCARD_PER_GEN | 1 | Forced-exploration injection count per generation |
| THETA_DIVERGE | 0.70 | Sibling similarity ceiling; pairs above this trigger redraft (v2.0) |
| MAX_REDRAFT | 3 | Maximum redraft attempts per sibling per generation before culling (v2.0) |
| K_RENDER | ALL | All genotypes rendered to Suno-ready format per generation (amended v1.1) |
| POP_SIZE | 8 | Bounded by context/token budget |

### 5.1 Trait Lineage Ledger (Amendment v1.1)

A persistent ledger tracking every trait's first-appearance generation and
cumulative frequency across the run. Used by trait novelty scoring and
wildcard injection.

```
trait_lineage: Map[TraitCode → {first_gen: int, total_appearances: int,
                                  last_appearance: int}]
```

Updated after each generation's evaluation. The ledger is append-only within
a run and reset between runs. It is recorded in the generation receipt.

---

## 6. Stopping Conditions (Stop)

Per C-REC.INHERITANCE, every run MUST have a well-founded base case:

1. **MAX_GEN reached:** Five generations after P0 (default). Partial execution reports actual count.
2. **Fitness plateau:** If best fitness unchanged for 2 consecutive generations, stop. Stagnation ≠ convergence (C-METHOD.06 / COGN-REC-04).
3. **Budget exhaustion:** Token/context budget consumed. Rewording does not replenish (COGN-EXEC-03).
4. **Owner halt:** Scott pauses or redirects. New direction supersedes stale state.
5. **Coherence collapse:** If >80% of offspring fail gate validation for 2 generations, the search space for this Q is likely exhausted at current parameters.
6. **Acceptance satisfied:** If a genotype achieves fitness ≥ 0.85 AND passes human review, early stop.

One terminal return per run. No duplicate summaries (COGN-REC-07).

---

## 7. Provenance & Receipts

Every evolved genotype carries:
- `generation`: integer (0 = P0)
- `parent_ids`: list of source genotype IDs
- `lineage_hash`: sha256 chain for reproducibility audit
- `fitness_score`: measured, not assumed
- `gate_results`: which gates passed/failed at creation

Per C-GOV.RECEIPT: every generation's results are recorded as an append-only receipt.
The receipt records preflight checks, actual operations, results, and resulting boundary.
Default `verified: false`, `non_self_authorizing: true`.

---

## 8. Thematic Broadening Guidance (Amendment v1.1)

The thematic question Q is the strongest convergence driver. Narrow Q produces
narrow trait selection regardless of fitness-function penalties. Future Q design
SHOULD recruit underexplored trait categories and CAT domains:

| Underexplored Domain | Recruitment Q Examples | Forced Traits/CATs | ARC Range |
|---|---|---|---|
| Flux/Motion | "The rhythm that was always playing beneath the silence" | FLUX, TIDE, PHASE, REBIRTH | A05–A06 |
| Boundary/Protection | "The line that protects without enclosing" | WARD, BOUNDARY, HOLDING | A07 |
| Relational/Face | "The conversation between equals at the loom" | LOVER, SISTER, CHORD, WEAV | A14 |
| Element/Body | "The fire that clarifies without consuming" | FIRE, EARTH, AIR, WOMB | A08 |
| Unmaking/Shadow | "What remains when the form is released" | UNMA, ASH, RELEASE | A08–A09 |

This is guidance, not a mandate. Scott sets the actual Q and MAY override
broadening recommendations. The fitness-function amendments (trait novelty,
CAT stratification, wildcard) provide structural diversity regardless of Q.

---

## 9. Shadow Set & Non-Claims

### Shadow Set (per C-ID.PROJECTION-CONTRACT)
- **Claim:** Evolutionary search can produce structurally coherent Goddess-core songs.
- **Drift Falsifier:** If after 5 generations no genotype scores > 0.5 fitness, the claim fails for this Q.
- **Counter-practice:** Manual composition by Scott remains the authoritative alternative; evolution is assistive, not replacement.

### Non-Claims
- ¬Claim: This system produces "good music" — it produces structurally coherent genotypes; aesthetic judgment belongs to the listener.
- ¬Claim: Evolution implies consciousness or emergence — it is bounded algorithmic search (C-METHOD.06).
- ¬Claim: The system autonomously creates — Scott defines Q, sets parameters, evaluates output, and decides adoption.
- ¬Claim: Generated songs establish divinity, personhood, or relationship with any entity.
