Simple hypergraph rewrite rules can generate complex regular and multiway behavior, yet their global dynamics are difficult to predict or direct. This project develops a structure-adaptive evolutionary framework for searching rule-space for large, nontrivial multiway systems that halt. Candidate rules are modified by targeted mutation strategies and evaluated with fitness metrics describing state-space growth, branching, termination, state size, density, and runtime, while multi-objective (Pareto) selection preserves trade-offs instead of collapsing them into a single score. The resulting Wolfram Language paclet treats rule-space as an evolving computational landscape and provides a foundation for reproducible searches for distinct classes of finite “universes.”

Introduction

Preamble

Previous investigations looking at adaptive evolution over hypergraph rewrite rules mostly focused on simple, signature-preserving mutations and highly general fitness functions (e.g. vertex count, lifetime). The results showed that adaptive evolution can find interesting rules which may optimize certain properties, but the link between mutation and structural behavior which it was meant to influence was indirect and randomized.
In the structure-adaptive approach outlined in this essay, we plan to directly explore this link between mutations and fitness functions and thus make the exploration of rule-space in the standard Wolfram model more navigable.
Mutation strategies (occasionally referred to as “objectives”) are multi-function structures which contain operators that are designed around intended structural effects of the hypergraph rewriting systems along with the corresponding metrics to measure them. Fitness functions are an aggregate of the various metrics which measured different aspects of the multiway or regular hypergraph systems.
Combinations of mutation strategies may accentuate or conflict with each other are retained through Pareto selection rather than disregarded prematurely or prioritized trivially. This allows us to keep the actual rewrite rule mutations, hypergraph evolutions, scoring, selections, and interpretation of results separate.
​
But this different approach requires a broader toolset which can search for our desired structure. Namely, it has to find and differentiate between multiway systems which: immediately halt (which are trivial), have finite states that cyclically rewrite themselves forever, and never halt; growing unbounded forever.

Previous Research

In the many substrates which can be used to represent patterns in nature, there has been a long-lived interest in how they adapt through evolutionary means. Notably:
◼
  • Stephen Wolfram used adaptive evolution in formal systems such as cellular automata, Turing machines, and networks in this pursuit.
  • ◼
  • Willem Nielsen applied a similar approach to Stephen Wolfram’s work to hypergraph rewriting systems, specifically in a biological context.
  • ◼
  • Anneline Daggelinckx (WSS25) generalized Willem’s work towards optimizing fitness functions for regular hypergraphs and extending it to multiway systems. This project uses her research as its foundations, building on her approach to mutating rewrite rules for hypergraph systems.
  • Scope of Project

    Our primary goal for this project is to create a paclet to efficiently find rewrite-rule and initial state combinations which produce large (many distinct canonical states and/or transitions; preferring those with rich terminal hypergraph states), finite, and globally halting multiway systems under certain state-equivalence and rewrite semantics.
    ​
    Some of our secondary goals are related to further development on the paclet which includes comparing targeted mutation strategies systematically, preserving graph structure trade-offs with Pareto selection, adaptive weighting for using mutation strategies based on their success, logging identity (which rule-space is this?) / ancestry (where did this result come from?) / provenance (what edit was made at which time?), supporting custom fitness metrics, separate and support ordered and unordered rule-space searches; enable later causal/branchial/evolutionary/geometric analysis and eventually benchmark against random and small exhaustive baselines.

    Functionality and Paclet

    Notable Universes Rules + Initial States
    

    Helper Functions
    

    Paclet Information
    

    Adaptive Evolution of Hypergraph Rewriting Systems

    In adaptive evolution, we iteratively mutate rules at random in order to improve upon a singular fitness function. Here, we will go over how this approach has been applied to hypergraph rewriting systems in past research. Furthermore, we will analyze how different types of metrics such as vertex or edge count affect the development and final state of a hypergraph.

    Fitness Functions and Mutations
    

    Affect of Mutations Based on Singular Fitness Metrics

    Below are multiple examples of how important metrics such as density can inform about the final state of a hypergraph (no values are normalized here).
    V
    represents vertex count,
    E
    represents edge count, and
    ρ
    stands for hypergraph density whereas
    ρG
    is the density of a hypergraph-to-graph conversion.
    

    VertexCount

    Following Willem’s [1] and Anneline’s [2] original idea we can find the rule that maximizes vertex count, with a mutation that does not change its signature:
    In[]:=
    fitnessHyperGraphVertexCountA[rule_, init_, maxVertices_:2000, maxEdges_:2000, maxEvents_:2000] :=
    Module[
    ]
    res=
    Table[
    ]
    ;
    Results
    We can see that the fitness gradually increases over multiple iterations.
    Out[]=
    With the corresponding final hypergraph states being:
    Out[]=
    Because we are not putting on more than one constraint for the given fitness function, such as one for the connected components, our rewrite rule ends up maximizing the creation of disconnected components.

    EdgeCount
    

    EdgeToVertexRatio
    

    HypergraphDensity
    

    MaxDegree
    

    LargeConnectedComponents
    

    Lifetime

    One can also use the multiway system as a measure for the fitness. The simplest option is the lifetime, which we define as the number of states the system reaches before hitting a fixed point:
    In[]:=
    fitnessMultiwayA[rule_, init_, depth_:2, maxTime_:60, maxVertices_:2000, maxEdges_:2000, maxEvents_:2000] :=
    Module[
    ]
    res=
    Table[
    ]
    ;
    Like before, we plot the relation between the used fitness function and iterations:
    Out[]=
    The best rules we found in each run are outlined below
    
    Out[]=
    Mutating for more iterations, another run of the process gives:
    Out[]=
    Out[]=
    Again, running this on the using compute services gets us:
    res=
    For a separate set of rules, we can find some other interesting results:
    With the corresponding final hypergraph states being:

    Structure-Adaptive Evolutionary Approach

    The previous analysis into how changing a fitness function in a variety ways can significantly alter the resulting structure produced from adaptive evolutionary methods. However, even then generic mutations only have a somewhat indirect relationship to whichever behavior is being optimized. Now, we take a look at how a structure-adaptive approach addresses the radical changes in structure seen these issues with targeted mutations and fitness metrics designed to measure their intended effects.

    Mutation Strategies and Fitness Objectives

    In this project we explore the below implemented mutation strategies along with their corresponding fitness objectives.
    We have already explored what happens when one plays with a mutation that doesn’t change the signature, but just as one can play with the fitness function, one can also play with the mutation function.

    General Structure of Implemented Mutation Strategies

    Growth-budget Mutation (add edges to LHS)

    The growth-budget mutation will growth the right-hand side of a rule while leaving the left-hand side alone, which allows it to find incredibly large and complex structures.
    We can then obtain a larger mutation of that:
    And the graphs would then look like:
    Degree
    If one uses this mutation with the fitness function that tries to maximize the max degree, one gets:
    We can see that the fitness gradually increases over multiple iterations:
    With the corresponding final hypergraph states being:
    Connected Components
    We can try to maximize a different fitness function to analyze the differences with our mutation strategy:
    One ends with the fitness increasing like:
    With the corresponding final hypergraph states being:

    Growth-budget Mutation (only changing signature)

    We can also explore other mutation functions – for example, a version of the growth mutation where only the signature may change:
    Taking a look at the mutation itself, we can see that it often changes the position of vertices:
    Vertex Count
    If one explores the vertex count as fitness metric with this mutation function one can get:
    We see the same trend for many of the other mutations:
    And get some interesting structures from the evolution:

    Dual Pareto Fronts: Search Front vs. Verified Solutions

    Visualizations of different Pareto selection approach

    Here we can see which candidates were solutions or considered on the search front, versus those that they dominated (evaluated to be worse on certain metrics).
    Each vertex correspond to a rule associated with a multiway system, edges are the mutations which are applied to a given rule.
    These are the actual multiway systems associated with a candidate rule, they are quite simple since this search was done in an unordered space. Which means canonicalization for rules occurred by deleting duplicate edges and not considering relations between vertices. The second one corresponds to a larger initial state.

    Exploring Unordered Rule-space

    Even when not navigating the ordered rule-space, we still found some interesting multiway results:
    Some richer results from the search front:

    Explorations in Ordered Rule-Space

    Hypergraph Geometries from Singular Mutation Strategies

    Using just the growth-budget mutation strategy, we were able to generate multiple different striking geometries of regular hypergraphs:

    ​

    Finding Large Multiway Systems which Halt

    Promoting MultiwayLifetime

    Long mutation lifetime but fairly small initial state

    Initial State:
    Different multiway system evolutions that end in terminal states:
    Some interesting candidates from a Pareto search front:

    Creates a more wheel-like structure with symmetric orientation.

    More of an interesting initial state than previous example:
    First multiway system that halted plus its final states:
    All hypergraph states in the above multiway
    Second multiway system that halted plus its final states (richer terminal structures):
    Final states of the above multiway:

    Promoting MultiwayLifetime + TerminalEdgeMass

    By promoting the optimization of hyperedge count in terminal states, we can create more diverse hypergraph structures.

    Ternary Fusions Initial State

    This new rule combines two hyperedges into a reversed ternary structure such that the binary LHS cannot consume them - all vertices remain.
    Corresponding multiway systems which halt:
    Hypergraph states for one of the densest candidates (3c749df8):

    Double Hub Initial State

    We continue to complexify our initial state once again. There are two hubs here - one that “feeds” the rimmed hyperedges and one which “drains” it.
    HIghly interesting multiway graphs which halted from its Pareto solution front:
    Many other interesting multiway graphs from the search front (did not halt due to finite constraints):

    Concluding Remarks

    In this project we developed a framework for treating the rule-space of hypergraph rewriting systems as something that can be searched rather than merely enumerated. Through multiple different methods such as Pareto selection and structured mutation strategies, we were able to reliably findrewrite rules whose multiway systems grow large and still halt within our finite constraints. Most of the results were interesting, but I believe further analysis into the fitness metrics used would be desirable.
    ​
    In terms of future work, there are a lot of improvements to make. Among them being: creating documentation for the paclet, implementing the other mutation strategies, and creating new presets to find different kinds of hypergraph structures.

    Acknowledgements

    I am extremely grateful to all of the help that my mentor Alejandra has given me. I would not have made it this far without her. I would also like to thank Willem for helping me think through and understand his previous work on this subject. Finally, I’d like to thank Stephen Wolfram for the project idea which guided me here, and Xerxes for his extremely interesting lectures on the physics project.

    References

    1
    .
    A. Daggelinckx (2025), “[WSS25] Adaptive Evolution of Hypergraph Rewriting Systems,” Wolfram Community. https://community.wolfram.com/groups/-/m/t/3497465.
    2
    .
    S. Wolfram (2020), “A Class of Models with the Potential to Represent Fundamental Physics,” Wolfram Physics Project, https://www.wolframphysics.org/technical-introduction/.
    3
    .
    Willem Nielsen (2025), “Hypergraph Rewriting and Computational Formalizations in Biology”, https://amoeba.wolfram.com/index.php/s/RFajdxPCb3SRnRY?dir=undefined&openfile=36774140 .
    4
    .
    S. Wolfram (2002), ”A New Kind of Science”, Wolfram Media (p. 509).
    5
    .
    Registry of Notable Universe Models: https://www.wolframphysics.org/universes/ .

    AI Disclosure

    The following generative AI tools were used in this project: [Claude Fable 5, ChatGPT-5.6 Sol)]. They were used for editing prose, brainstorming different mutation strategies and fitness metrics, and debugging code. The code used to generate the tables and pipeline flowchart were generated using Claude Fable 5. Each of these tables and and the pipeline flowchart are accurate. All code and written content was reviewed, understood and approved by the author.

    CITE THIS NOTEBOOK

    Structure-Adaptive Evolutionary Framework for Navigating the Rule-space of Hypergraphs​
    by Samuel Frerichs​
    Wolfram Community, STAFF PICKS, July 16, 2026
    ​https://community.wolfram.com/groups/-/m/t/3763652