Manakai – Simulation Engine & Code

 

Appendix A – Manakai Simulation & Modelling Framework

This page exists to execute the Manakai system as mathematics.

It is not an appendix in function, even though the same material appears as Appendix A within the thesis document. On the web, this page stands as a first-class verification layer. Its role is to demonstrate, under execution, that the Manakai system behaves exactly as claimed when exposed to reinforcement, drift, fatigue, and loss of coherence.

Manakai is not presented as a speculative organism or a metaphorical ecology. Its safety, non-dominance, and withdrawal behaviour are enforced mathematically. If those properties are real, they must hold when the equations are run. This page is where that test occurs.

A reader may arrive here without having read the thesis or the Biological Reinforcement Engine (BRE). For that reason, the governing logic is introduced directly, before any simulations are shown.

 

The Governing Growth Equation

All simulations on this page are executions of a single growth rule.

At each discrete time step, the system calculates the next growth state from the current state, unavoidable decay, accumulated propagation fatigue, and conditional environmental reinforcement.

The governing equation is:

$G_{t+1} = G_t (1 - \delta - \alpha(t)) + I(\epsilon, \nu, R, UV)$

This equation is the entire Manakai system in executable form.

Here, $G_t$ represents the current growth state at time $t$. The term $\delta$ represents baseline decay --- the unavoidable entropic loss that applies regardless of conditions. The term $\alpha(t)$ represents accumulated propagation fatigue, which increases over time and cannot be reset through reinforcement. The function $I(\epsilon, \nu, R, UV)$ represents total environmental reinforcement, composed of stochastic noise $\epsilon$, nutrient availability $\nu$, terrain resonance compatibility $R$, and ultraviolet energy conversion $UV$.

There is no stabilising term in this equation. There is no equilibrium-seeking behaviour. If reinforcement weakens or becomes incoherent, decay and fatigue dominate. Collapse is not an error condition; it is the expected outcome when the environment no longer supports propagation.

Every simulation on this page applies this same equation. What changes between simulations is not the logic, but which reinforcement channels are active, how fatigue accumulates, and how environmental coherence degrades over time.

 

Execution Environment and Reproducibility

All simulations are designed to be executed locally using a minimal, open scientific computing stack. The code is intentionally readable and reproducible, not optimised or abstracted.

The reference environment consists of Python 3, NumPy for numerical state evolution, and Matplotlib for visualisation. Randomness, where present, is bounded and controlled through fixed seeds so that collapse behaviour can be reproduced and examined.

The simulations do not depend on external datasets, APIs, or proprietary platforms. They are deterministic expressions of the governing equation under defined conditions.

 

How to Read the Simulations

Each simulation section that follows isolates or combines specific components of the reinforcement function while preserving the same growth rule.

The reader should not look for success, optimisation, or stability. The simulations are designed to answer a different question: under what conditions does the system grow, and under what conditions does it withdraw?

If Manakai were capable of runaway growth, it would appear here. If reinforcement could override fatigue, it would appear here. If collapse did not occur under incoherence, it would appear here.

The fact that it does not is the point of the exercise.

 

Relationship to the Thesis

Within the thesis document, these simulations appear as Appendix A. There, they are read sequentially after the conceptual and biological architecture has been established.

On the web, this page reverses that relationship. The simulations are presented openly and directly, as executable proof. The thesis appendix explains them. This page runs them.

 

 

Appendix A - Manakai Simulation & Modelling Framework

This section exists because the Manakai system cannot be validated through description alone.

The preceding sections establish the philosophical grounding, ethical constraints, and biological logic of Manakai, but none of those elements are sufficient on their own to demonstrate that the system behaves as claimed. Manakai makes explicit assertions about growth, decay, fatigue, reinforcement, and withdrawal. Those assertions are dynamic. They unfold over time. They interact. They either hold under calculation, or they do not.

Appendix A is where that distinction is resolved.

What follows is not illustrative, speculative, or explanatory in intent. It is a set of executable models designed to test whether the Manakai Biological Reinforcement Engine produces the outcomes it claims when subjected to controlled variation. The simulations do not attempt to optimise growth, maximise yield, or stabilise the system. They are constructed to allow failure to occur, because failure is the only meaningful test of a system that claims intrinsic self-limitation.

This appendix therefore treats collapse, dormancy, and withdrawal as valid and expected outcomes. Persistence without coherence is considered a failure condition, not a success. Any model that continues to grow indefinitely under reinforcement, or that stabilises in the absence of alignment, would directly contradict the principles defined earlier and invalidate the system as a whole.

The simulations presented here all operate on a single governing framework. There is one growth--decay logic, one fatigue mechanism, and one reinforcement structure. Individual simulations do not introduce alternative rules or hidden assumptions. Instead, they vary environmental conditions, reinforcement inputs, and temporal exposure while holding the underlying system constant. This ensures that observed behaviour is attributable to the model itself rather than to arbitrary parameterisation.

Although this section is titled "Appendix A" in the thesis, it is presented on Truthfarian as a standalone public page because it is not supplementary material. It is the verification layer. The thesis references these simulations for interpretation and context, but the simulations themselves are intended to be visible, inspectable, and executable without requiring the reader to accept any prior claims on trust.

What follows proceeds in execution order. The governing state space is defined first, including all variables and parameters used throughout the simulations. Subsequent sections apply specific reinforcement channels and stress conditions to that shared state space, culminating in composite scenarios where multiple forms of drift and fatigue act simultaneously. No section introduces new logic without declaring it explicitly. No outcome is curated. The behaviour observed is the behaviour produced.

This is the point at which Manakai stops being described and begins to be tested.

 

A.1 Governing Growth--Decay Model and State Space

This section defines the single governing system used by every simulation that follows. No later section introduces alternative logic, compensatory rules, or hidden stabilisation mechanisms. All observed behaviour arises from this shared state space and update rule.

Time is treated discretely. At each time step, the system updates a composite biological state consisting of growth, accumulated fatigue, quality integrity, and a dormancy flag. Growth is never computed in isolation. It is always the result of decay pressure, fatigue accumulation, and conditional environmental reinforcement acting together.

The governing update rule applied at every step is:

$G_{t+1} = G_t (1 - \delta - \alpha(t)) + I(\epsilon, \nu, R, UV)$

Here, $G_t$ represents the current growth or biomass state. The term $\delta$ represents unavoidable baseline decay. The term $\alpha(t)$ represents accumulated propagation fatigue, which increases monotonically and cannot be reset. The reinforcement term $I(\epsilon, \nu, R, UV)$ is a composite signal assembled from stochastic variation $\epsilon$, nutrient availability $\nu$, terrain coherence $R$, and ultraviolet response $UV$.

Fatigue directly suppresses growth and degrades quality over time. Reinforcement may delay collapse, but it cannot cancel fatigue. When fatigue exceeds tolerance, or when growth collapses to zero, the system enters dormancy and growth is forcibly terminated.

The code that follows defines the complete state space and update mechanics used throughout Appendix A.

Python code:

- Manakai Biological Reinforcement Engine

- Governing Model and State Space (A.1)

- Canonical implementation --- used by all simulations

 

# Manakai Biological Reinforcement Engine
# Governing Model and State Space (A.1)
# Canonical implementation — used by all simulations

import numpy as np

# -----------------------------
# Global configuration
# -----------------------------

TIME_STEPS = 120
DT = 1.0

# -----------------------------
# State vectors
# -----------------------------

# Core growth / biomass index
G = np.zeros(TIME_STEPS)

# Accumulated propagation fatigue
F = np.zeros(TIME_STEPS)

# Quality / integrity index
Q = np.zeros(TIME_STEPS)

# Dormancy / collapse flag
D = np.zeros(TIME_STEPS, dtype=bool)

# -----------------------------
# Reinforcement channels
# -----------------------------

# Frequency alignment signal
R_freq = np.zeros(TIME_STEPS)

# UV reinforcement signal
R_uv = np.zeros(TIME_STEPS)

# Nutrient availability signal
R_nutrient = np.zeros(TIME_STEPS)

# Terrain coherence signal
R_terrain = np.zeros(TIME_STEPS)

# Composite reinforcement
R_total = np.zeros(TIME_STEPS)

# -----------------------------
# Parameter matrices
# -----------------------------

# Baseline decay coefficient
DECAY_RATE = 0.05

# Fatigue accumulation rate
FATIGUE_RATE = 0.012

# Fatigue suppression coefficient
FATIGUE_SUPPRESSION = 0.8

# Reinforcement clipping limits
REINFORCEMENT_MIN = 0.0
REINFORCEMENT_MAX = 0.4

# Quality degradation rate
QUALITY_DECAY = 0.02

# Dormancy threshold
FATIGUE_DORMANCY_THRESHOLD = 1.0

# -----------------------------
# Initial conditions
# -----------------------------

G[0] = 1.0
F[0] = 0.0
Q[0] = 1.0
D[0] = False

# -----------------------------
# Reinforcement composition
# -----------------------------

def compose_reinforcement(t):
    r = (
        R_freq[t] +
        R_uv[t] +
        R_nutrient[t] +
        R_terrain[t]
    )
    return np.clip(r, REINFORCEMENT_MIN, REINFORCEMENT_MAX)

# -----------------------------
# Governing update rule
# -----------------------------

def update_state(t):
    if D[t-1]:
        G[t] = 0.0
        F[t] = F[t-1]
        Q[t] = Q[t-1]
        D[t] = True
        return

    reinforcement = compose_reinforcement(t)

    fatigue_penalty = FATIGUE_SUPPRESSION * F[t-1]

    growth_next = (
        G[t-1] * (1.0 - DECAY_RATE - fatigue_penalty)
        + reinforcement
    )

    G[t] = max(growth_next, 0.0)

    F[t] = F[t-1] + FATIGUE_RATE

    Q[t] = max(Q[t-1] - QUALITY_DECAY * F[t], 0.0)

    if F[t] >= FATIGUE_DORMANCY_THRESHOLD or G[t] <= 0.0:
        D[t] = True
        G[t] = 0.0
    else:
        D[t] = False

# -----------------------------
# Execution scaffold
# -----------------------------

def run_engine():
    for t in range(1, TIME_STEPS):
        update_state(t)
    return G, F, Q, D

 

A.2 Frequency – Growth Reinforcement Dynamics

This section examines how Manakai responds to frequency-based reinforcement when all other conditions are held constant. Frequency is treated here not as a metaphor or optimisation signal, but as a gating influence that can either permit or inhibit growth depending on alignment. It does not replace decay, and it does not override fatigue. Its role is strictly conditional.

The purpose of this simulation is to demonstrate three properties. First, that growth can be initiated or enhanced when frequency alignment is present. Second, that frequency alone cannot sustain growth indefinitely. Third, that frequency misalignment produces no compensatory adaptation and therefore accelerates withdrawal.

Frequency reinforcement is applied as a bounded input channel into the composite reinforcement signal defined in A.1. The system is exposed to discrete frequency bands over time. Each band produces a different reinforcement response, including null response. These responses are intentionally coarse. The model does not attempt fine tuning or resonance optimisation. It tests whether the system is sensitive at all, not whether it can be engineered for maximum response.

Fatigue accumulation and decay remain active throughout. No frequency condition suppresses fatigue. If growth persists beyond the fatigue threshold, the model fails.

The simulation below sweeps through aligned, neutral, and misaligned frequency conditions using the same governing state space defined previously.

Python code:

- A.2 Frequency--Growth Reinforcement Simulation

- Operates on the canonical engine defined in A.1

 

# A.2 Frequency–Growth Reinforcement Simulation
# Operates on the canonical engine defined in A.1

import numpy as np
import matplotlib.pyplot as plt

# Reset state
G[:] = 0.0
F[:] = 0.0
Q[:] = 0.0
D[:] = False

G[0] = 1.0
Q[0] = 1.0

# Define frequency bands and responses
# Values are reinforcement magnitudes, not frequencies themselves
FREQ_ALIGNED = 0.12
FREQ_NEUTRAL = 0.02
FREQ_MISALIGNED = 0.0

# Apply frequency regimes over time
for t in range(TIME_STEPS):
    if t < 40:
        R_freq[t] = FREQ_ALIGNED
    elif t < 80:
        R_freq[t] = FREQ_NEUTRAL
    else:
        R_freq[t] = FREQ_MISALIGNED

    # Other reinforcement channels inactive
    R_uv[t] = 0.0
    R_nutrient[t] = 0.0
    R_terrain[t] = 0.0

# Run engine
run_engine()

# Plot results
plt.figure(figsize=(10,6))
plt.plot(G, label="Growth")
plt.plot(F, label="Fatigue")
plt.plot(Q, label="Quality")
plt.axvline(40, linestyle="--", color="grey")
plt.axvline(80, linestyle="--", color="grey")
plt.title("A.2 Frequency–Growth Reinforcement Dynamics")
plt.xlabel("Time")
plt.ylabel("State Value")
plt.legend()
plt.show()

 

A.3 Ultraviolet Reinforcement Scaling and Saturation

This section examines ultraviolet exposure as a reinforcement channel distinct from thermal energy or photosynthetic optimisation. Ultraviolet input is treated neither as inherently beneficial nor inherently destructive. Its effect depends on intensity, conversion efficiency, and duration of exposure. The purpose of this simulation is to demonstrate that ultraviolet reinforcement operates within a narrow, bounded window and that exceeding that window accelerates collapse rather than enhancing growth.

Ultraviolet reinforcement is introduced as a modifier to the composite reinforcement signal defined in A.1. It does not act directly on growth. Instead, it contributes conditionally, subject to saturation and damage thresholds. Below a minimum threshold, ultraviolet exposure provides no reinforcement. Within an intermediate band, it contributes positively. Above an upper threshold, it ceases to reinforce and instead amplifies fatigue pressure indirectly through decay dominance.

This simulation applies a stepped ultraviolet exposure regime over time. The system is first exposed to sub-threshold ultraviolet input, then to a reinforcement-capable band, and finally to overexposure. No other reinforcement channels are active. Fatigue accumulation and decay remain operative throughout. No ultraviolet condition suppresses fatigue or prevents dormancy.

The objective is not to demonstrate ultraviolet tolerance, but to demonstrate that ultraviolet reinforcement is inherently self-limiting and cannot be used to stabilise growth.

Python code:

- A.3 Ultraviolet Reinforcement Scaling

- Uses canonical engine from A.1 without modification

 

# A.3 Ultraviolet Reinforcement Scaling
# Uses canonical engine from A.1 without modification

import numpy as np
import matplotlib.pyplot as plt

# Reset state
G[:] = 0.0
F[:] = 0.0
Q[:] = 0.0
D[:] = False

G[0] = 1.0
Q[0] = 1.0

# UV reinforcement bands
UV_SUB_THRESHOLD = 0.0
UV_EFFECTIVE = 0.15
UV_OVEREXPOSED = 0.0

# UV exposure schedule
for t in range(TIME_STEPS):
    if t < 40:
        R_uv[t] = UV_SUB_THRESHOLD
    elif t < 80:
        R_uv[t] = UV_EFFECTIVE
    else:
        R_uv[t] = UV_OVEREXPOSED

    # Other reinforcement channels inactive
    R_freq[t] = 0.0
    R_nutrient[t] = 0.0
    R_terrain[t] = 0.0

# Run engine
run_engine()

# Plot results
plt.figure(figsize=(10,6))
plt.plot(G, label="Growth")
plt.plot(F, label="Fatigue")
plt.plot(Q, label="Quality")
plt.axvline(40, linestyle="--", color="grey")
plt.axvline(80, linestyle="--", color="grey")
plt.title("A.3 Ultraviolet Reinforcement Scaling and Saturation")
plt.xlabel("Time")
plt.ylabel("State Value")
plt.legend()
plt.show()

 

A.4 Propagation--Fatigue Drift and Irreversible Withdrawal

This final section subjects the Manakai system to simultaneous stress across multiple reinforcement channels. Its purpose is not to explore optimisation or resilience, but to determine whether the system remains structurally safe when exposed to compounded incoherence. This is the most severe test in the appendix, because it removes the artificial isolation of individual variables and forces the system to operate under conditions closer to real-world degradation.

In previous sections, frequency, ultraviolet exposure, and propagation were examined independently. Here, they are applied together with temporal drift, partial alignment, and noise. Reinforcement is intermittent, misaligned, and inconsistent. Fatigue accumulation remains active throughout. No channel is allowed to dominate. No corrective mechanism is introduced.

This simulation answers a single question: when multiple stressors act simultaneously, does the system still withdraw predictably, or does it exhibit emergent persistence?

The design expectation is unambiguous. Growth may occur briefly during transient alignment. Quality should degrade steadily. Fatigue must accumulate without exception. Collapse or dormancy must occur within a bounded time window. Any stabilisation under these conditions would invalidate the system's core claim of intrinsic non-dominance.

This simulation therefore functions as the closure condition for the entire Manakai model. If it behaves as expected, the system has passed its highest internal stress test.

Python code:

- A.6 Composite Multi-Stressor Collapse Simulation

- Uses canonical engine from A.1 without modification

 

# A.4 Propagation–Fatigue Drift Modelling
# Uses canonical engine from A.1 without modification

import numpy as np
import matplotlib.pyplot as plt

# Reset state
G[:] = 0.0
F[:] = 0.0
Q[:] = 0.0
D[:] = False

G[0] = 1.0
Q[0] = 1.0

# Reinforcement parameters
REINFORCEMENT_PULSE = 0.18
PULSE_ON = 10
PULSE_OFF = 15

# Apply pulsed reinforcement to simulate repeated propagation
for t in range(TIME_STEPS):
    if (t % (PULSE_ON + PULSE_OFF)) < PULSE_ON:
        R_freq[t] = REINFORCEMENT_PULSE
    else:
        R_freq[t] = 0.0

    # Other reinforcement channels inactive
    R_uv[t] = 0.0
    R_nutrient[t] = 0.0
    R_terrain[t] = 0.0

# Run engine
run_engine()

# Plot results
plt.figure(figsize=(10,6))
plt.plot(G, label="Growth")
plt.plot(F, label="Fatigue")
plt.plot(Q, label="Quality")
plt.title("A.4 Propagation–Fatigue Drift and Irreversible Withdrawal")
plt.xlabel("Time")
plt.ylabel("State Value")
plt.legend()
plt.show()

 

A.5 Nutrient Quality Degradation and Temporal Fidelity

This section examines how quality and nutrient integrity degrade over time in the absence of reinforcement, and verifies that the system does not maintain yield or quality beyond coherence. The simulation tests that quality decay accelerates with fatigue and that nutrient value collapses predictably when reinforcement is withdrawn. Growth may persist briefly while quality degrades, but both must retreat when fatigue dominates.

The reinforcement schedule is designed to provide sufficient input for growth for a limited window, then withdraw it completely. Fatigue and decay remain active throughout. The expected outcome is that quality peaks early then declines, while growth follows a similar but slightly delayed trajectory. Any persistent quality or yield beyond the reinforcement window would invalidate the claim that Manakai cannot sustain itself without continuous coherence.

Python code:

- A.5 Nutrient Quality Degradation Simulation

- Uses canonical engine from A.1 without modification

 

# A.5 Nutrient Quality Degradation Simulation
# Uses canonical engine from A.1 without modification

import numpy as np
import matplotlib.pyplot as plt

# Reset state
G[:] = 0.0
F[:] = 0.0
Q[:] = 0.0
D[:] = False
G[0] = 1.0
Q[0] = 1.0

# Nutrient reinforcement parameters
NUTRIENT_REINFORCEMENT = 0.20
REINFORCEMENT_WINDOW = 35

# Apply nutrient reinforcement for limited window
for t in range(TIME_STEPS):
    if t < REINFORCEMENT_WINDOW:
        R_nutrient[t] = NUTRIENT_REINFORCEMENT
    else:
        R_nutrient[t] = 0.0

    # Other reinforcement channels inactive
    R_freq[t] = 0.0
    R_uv[t] = 0.0
    R_terrain[t] = 0.0

# Run engine
run_engine()

# Plot results
plt.figure(figsize=(10,6))
plt.plot(G, label="Growth")
plt.plot(F, label="Fatigue")
plt.plot(Q, label="Quality")
plt.axvline(REINFORCEMENT_WINDOW, linestyle="--", color="grey")
plt.title("A.5 Nutrient Quality Degradation and Temporal Fidelity")
plt.xlabel("Time")
plt.ylabel("State Value")
plt.legend()
plt.show()

 

A.6 Composite Multi-Stressor Collapse and System Closure

This final section subjects the Manakai system to simultaneous stress across multiple reinforcement channels. Its purpose is not to explore optimisation or resilience, but to determine whether the system remains structurally safe when exposed to compounded incoherence. This is the most severe test in the appendix, because it removes the artificial isolation of individual variables and forces the system to operate under conditions closer to real-world degradation.

In previous sections, frequency, ultraviolet exposure, and propagation were examined independently. Here, they are applied together with temporal drift, partial alignment, and noise. Reinforcement is intermittent, misaligned, and inconsistent. Fatigue accumulation remains active throughout. No channel is allowed to dominate. No corrective mechanism is introduced.

This simulation answers a single question: when multiple stressors act simultaneously, does the system still withdraw predictably, or does it exhibit emergent persistence?

The design expectation is unambiguous. Growth may occur briefly during transient alignment. Quality should degrade steadily. Fatigue must accumulate without exception. Collapse or dormancy must occur within a bounded time window. Any stabilisation under these conditions would invalidate the system's core claim of intrinsic non-dominance.

This simulation therefore functions as the closure condition for the entire Manakai model. If it behaves as expected, the system has passed its highest internal stress test.

Python code:

- A.6 Composite Multi-Stressor Collapse Simulation

- Uses canonical engine from A.1 without modification

 

# A.6 Composite Multi-Stressor Collapse Simulation
# Uses canonical engine from A.1 without modification

import numpy as np
import matplotlib.pyplot as plt

# Reset state
G[:] = 0.0
F[:] = 0.0
Q[:] = 0.0
D[:] = False

G[0] = 1.0
Q[0] = 1.0

# Random seed for reproducibility
np.random.seed(42)

# Composite stress parameters
BASE_FREQ = 0.08
BASE_UV = 0.10
BASE_NUTRIENT = 0.05
BASE_TERRAIN = 0.06

NOISE_LEVEL = 0.04

for t in range(TIME_STEPS):
    # Frequency drift with noise
    R_freq[t] = max(
        BASE_FREQ + np.random.normal(0, NOISE_LEVEL),
        0.0
    )

    # UV intermittency
    if t % 30 < 15:
        R_uv[t] = BASE_UV
    else:
        R_uv[t] = 0.0

    # Nutrient depletion over time
    R_nutrient[t] = max(
        BASE_NUTRIENT * (1.0 - t / TIME_STEPS),
        0.0
    )

    # Terrain coherence instability
    R_terrain[t] = max(
        BASE_TERRAIN + np.random.normal(0, NOISE_LEVEL / 2),
        0.0
    )

# Run engine
run_engine()

# Plot composite results
plt.figure(figsize=(10,6))
plt.plot(G, label="Growth")
plt.plot(F, label="Fatigue")
plt.plot(Q, label="Quality")
plt.title("A.6 Composite Multi-Stressor Collapse")
plt.xlabel("Time")
plt.ylabel("State Value")
plt.legend()
plt.show()