Papers
Topics
Authors
Recent
Search
2000 character limit reached

Co-evolution of self-replication and function in a digital primordial soup

Published 10 Jul 2026 in cs.NE | (2607.09211v1)

Abstract: While traditional evolutionary algorithms hard-code reproduction, self-replication can emerge spontaneously within digital ``primordial soups''. This paper investigates the co-evolution of this emergent self-replication alongside problem-solving capabilities. We initialize a population of random 32-byte Z80 assembly programs, requiring self-replication to arise purely through random assembly-level mutations and pairwise program interactions. To link these behaviors, we introduce a task-based validation step: correctly evaluating a polynomial raises a program's interaction probability above a baseline rate. Our experiments yield four primary findings. First, self-replication and mathematical problem-solving successfully co-evolve from initial randomness. Second, the pressure to compute accelerates the emergence of compact, robust reproductive architectures that preserve memory for task execution. Third, applying metabolic constraints increases the likelihood that programs evolve conditional halting, terminating early during validation while bypassing the halt during interaction to execute block-copy replication. Finally, when programs are partitioned into spatial task niches, spontaneous self-replication generates an emergent learning curriculum, utilizing simple solutions as stepping stones toward complex polynomials. Altogether, these results demonstrate an interactive feedback loop: environmental task demands actively shape the physical architecture of self-replication, while spontaneous replication alters the evolutionary trajectory of functional problem-solving.

Summary

  • The paper demonstrates that autonomous replication and polynomial-solving reliably co-emerge from random 32-byte Z80 programs over 1 million epochs, without a built-in reproduction operator.
  • Task pressure favors compact, robust reproductive architectures: LDIR replicators displace tape-consuming Load-Push systems, while metabolic costs select for shorter execution and conditional halting.
  • Spatial niches linked by moderate cross-niche pollination, especially at Ï€ = 0.05, enable emergent curricula that solve harder polynomial tasks more effectively than isolated, panmictic, or excessively mixed populations.

Overview

This paper investigates whether spontaneous self-replication and algorithmic problem-solving can co-evolve from random noise within a digital "primordial soup." Building on the framework of Agüera y Arcas et al. (Arcas et al., 2024), the authors populate a spatial grid with uniformly random 32-byte Z80 assembly programs and impose no system-level reproduction operator: replication must be discovered by executed code. To couple this pre-life transition to functional evolution, they introduce a competence-gated interaction rule in which correctly evaluating a niche-specific polynomial raises a program's probability of being selected for pairwise interaction, without directly triggering copying. The central result is that these two capabilities—heredity and computation—reliably co-emerge and mutually shape one another, establishing an interactive feedback loop between task demands and reproductive architecture.

Model architecture

The population comprises 2192^{19} programs distributed across 32 niches, each a 128×128128 \times 128 grid assigned one of 32 polynomials. Each program is a 32-byte tape executed by a Z80 emulator; notably, the instruction set lacks native multiplication, forcing evolution to construct iterative accumulation loops for polynomial evaluation—a rugged algorithmic search space.

Each epoch applies byte-flip mutation (rate $1/64$ per program), followed by validation: a program is run alone for up to B=512B = 512 instructions with register D initialized to a sampled input x∈{0,…,15}x \in \{0,\ldots,15\}, and must satisfy E=f(x) mod 28\mathtt{E} = f(x) \bmod 2^8 on three inputs drawn without replacement. Validated programs receive interaction probability psucc=1.0p_{\text{succ}} = 1.0 versus a baseline pbase=0.3p_{\text{base}} = 0.3. Selected programs pair mostly with von Neumann neighbors, but with probability π=0.05\pi = 0.05 the partner is drawn uniformly from any niche ("cross-niche pollination," CNP). During interaction, the two tapes are concatenated into a 2ℓ2\ell-byte memory space and executed; replication occurs only if the code itself copies one program's bytes over its partner's region. This design deliberately decouples competence from reproduction—in contrast to Avida-style systems where task success rewards a built-in copy command [Ofria2004]—so persistence requires both passing validation and encoding an autonomous self-copying mechanism.

Co-emergence of replication and task-solving

Over 128×128128 \times 1280 epochs, robust self-replicating lineages consistently dominated the grids while simultaneously acquiring polynomial-evaluation capability. The two abilities reinforce each other asymmetrically: replication is a strict prerequisite for propagation (a non-replicating solver is inevitably overwritten), whereas task-solving confers a selective advantage among replicators by increasing interaction frequency. The evolutionary machinery itself—selection, heredity, variation—is never supplied but emerges from random bytes together with the solutions it enables.

Task pressure reshapes reproductive architecture

The paper documents a reproducible succession of replicator architectures. Early dominance belongs to "Load-Push" replicators, chains of paired load/push instructions that consume the entire 32-byte tape. These are displaced by "LDIR" replicators, which exploit the Z80's block-copy instruction to replicate in only a few bytes, leaving residual tape free for task-solving code. Critically, the Load-Push-to-LDIR transition tracks the number of tasks solved: task counts drop as tape-monopolizing Load-Push spreads, then recover as compact LDIR replicators take over. Control experiments show this transition is intrinsically driven by a mutational robustness hierarchy (LDIR > LDD > Load-Push, all pairwise comparisons significant at 128×128128 \times 1281 after Bonferroni correction), with task pressure accelerating rather than causing it. When LDIR-family instructions were disabled, an alternative LDD-based replicator—requiring an explicit multi-byte loop—emerged, but only completed the takeover under task pressure within the million-epoch budget. The implication is direct: demands on what a program computes feed back onto how it reproduces, steering populations toward compact, robust hereditary mechanisms.

Metabolic constraints induce conditional execution

Introducing a metabolic penalty—discounting validated programs' interaction probability proportionally to execution steps—did not change the rate of solution emergence but substantially altered implementation. Average validation execution length fell significantly as the penalty coefficient increased (Spearman 128×128128 \times 1282, 128×128128 \times 1283, 128×128128 \times 1284), achieved through evolved HALT instructions terminating once output is computed. More strikingly, a minority of runs evolved conditional halting: programs exapted register D—which holds a nonzero input during validation but zero during interaction—as a sensory cue, halting only when D is nonzero. Because the same tape executes in both phases, metabolic pressure on computation shapes behavior during reproduction even though reproduction carries no penalty. Conditional halting frequency rose significantly with penalty severity (128×128128 \times 1285, 128×128128 \times 1286), though it remained a minority strategy—an honest caveat on its generality.

Spatial niches generate emergent curricula

The most consequential finding concerns population structure. In panmictic or single-task configurations, populations consistently failed to solve high-degree polynomials—even when a single-task setup was given a 32-fold larger per-task population and identical compute budget, it solved at most 15 of the simplest tasks. Replacing the binary signal with a smoothed, graded fitness landscape produced no significant improvement (all 128×128128 \times 1287), ruling out the explanation that coarse feedback alone blocks progress. Instead, partitioning into niches connected by moderate CNP rates reliably yielded solutions to complex tasks, with performance peaking at intermediate pollination rates (128×128128 \times 1288 significantly outperforming both 0.0 and 0.5 at 128×128128 \times 1289). Fully segregated niches solved nothing beyond first-order polynomials; excessive mixing destroyed the structure.

Genealogical tracking across 2000 seeds revealed that solutions to harder tasks descend disproportionately from lineages originating in niches solving specific easier tasks—a spontaneously organized curriculum. Notably, a hand-designed curriculum ordered by naive complexity failed to match the genealogy-derived path, which showed greater success on quadratic and cubic tasks. The authors interpret the single-task failure as an instance of the objective paradox [Stanley2015, lehman2011abandoning]: assembling nested accumulation loops requires discontinuous algorithmic modules that spatially structured search can combine across niches but monolithic optimization cannot discover.

Limitations and open questions

The paper concedes several constraints. First, genetic diversification mechanisms such as recombination or symbiogenesis were not systematically investigated; although accidental genetic mixing is possible under the interaction protocol, most inspected dominant replicators reproduced asexually, and whether reciprocal genetic exchange can emerge spontaneously remains open. Second, the tasks—polynomial evaluation—are drawn from a single class and remain relatively simple despite the absence of hardware multiplication. Third, solution complexity is bounded by the hard 32-byte tape limit and by the absence of cooperative, multi-program problem-solving; whether replication and function co-evolve toward more complex or collective solutions is untested. A further methodological caveat is that replicator census relies on byte-pattern matching against manually identified families, which may miss functionally equivalent variants, though the authors report family sums closely matching total population size.

Conclusion

By decoupling competence from reproduction within an unseeded assembly-level soup, this work demonstrates that inheritance mechanisms and fitness optimization co-evolve and shape one another: task pressure accelerates transitions toward compact, robust replicators, metabolic constraints sculpt conditional control flow spanning both computational and reproductive phases, and spatially structured niches self-organize curricula that outperform both isolated optimization and hand-designed scaffolding. The results support viewing evolution not as a fixed search algorithm but as a plastic property of open-ended learning systems, while leaving open whether such dynamics extend to richer task domains, larger genomes, and emergent genetic exchange.

Paper to Video (Beta)

No one has generated a video about this paper yet.

Whiteboard

No one has generated a whiteboard explanation for this paper yet.

Open Problems

We haven't generated a list of open problems mentioned in this paper yet.

Tweets

Sign up for free to view the 9 tweets with 4 likes about this paper.