Back to Experiments

Dual Agent Architecture: Order vs Chaos

Overview

Two opposing agents act on a viscous Burgers simulation: a chaos agent (injects perturbation \(\varepsilon\), probes fragility) and an order agent (adds artificial viscosity \(\nu_{\text{art}}\), enforces smoothness). Neither alone is sufficient — chaos alone causes blow-up, order alone causes stagnation. The optimal balance defines a learnable annealing schedule via the meta-gradient \(\partial T_{\text{blowup}} / \partial(\text{chaos} - \text{order})\).

Key Results

ConfigurationBlow-Up TimeLeverage vs Baseline
No agents (baseline)\(T_0\)1.0×
Chaos only\(0.3 \, T_0\)— (accelerates blow-up)
Order only\(3.5 \, T_0\)3.5×
Dual agent (optimal)\(4.2 \, T_0\)4.2×

Optimal Balance

ParameterValueMeaning
Optimal \(\psi = \text{chaos} - \text{order}\)\(-0.018\)Slightly order-dominant
Temperature at optimum\(\approx 0.49\)Near-balanced, marginal order bias
Smoothness extension32.6%Dual beats order-only by this margin
Interpretation. The dual agent outperforms pure order by 32.6% because the chaos agent discovers fragile regions that the order agent then stabilises. The optimal balance \(\psi = -0.018\) is nearly symmetric — the system needs almost equal chaos and order, with a slight tilt toward stability. This is the self-learning annealing schedule: temperature \(= \text{chaos} / (\text{chaos} + \text{order})\) converges to \(\approx 0.49\).

Analysis

  • Order leverage (3.5–4.2×). Artificial viscosity delays blow-up substantially, but cannot prevent it indefinitely. The dual agent squeezes an additional 20% by probing weaknesses first.
  • Adaptive annealing. The meta-gradient \(\partial S / \partial \psi\) provides a learnable signal: the annealing schedule is not hand-tuned but emerges from the dynamics.
  • Neither agent alone suffices. Chaos alone accelerates blow-up by 70%. Order alone stagnates learning. The interplay is the key mechanism.

Reproducibility

../simplex/build/sxc exp_ns_dual_agent.sx -o build/exp_ns_dual_agent.ll

OPENSSL_PREFIX=$(brew --prefix openssl)
clang -O2 build/exp_ns_dual_agent.ll \
  ../simplex/runtime/standalone_runtime.c \
  -o build/exp_ns_dual_agent \
  -lm -lssl -lcrypto -L${OPENSSL_PREFIX}/lib

./build/exp_ns_dual_agent

Related