""" Quark-Arranged Skyrms Walker Personality Model Five walkers. Ten bosons. Quark confinement. Settlement to Nash equilibrium. A personality is not what you are. It is what you are not. The void boundary -- the accumulated rejections across five dimensions of irreversible choice -- IS the person. Hot off Lean 4. Zero sorry. """ import gradio as gr import numpy as np import matplotlib matplotlib.use("Agg") import matplotlib.pyplot as plt from dataclasses import dataclass, field import json # ─── AeonOS Dark Theme ────────────────────────────────────────────────────── DARK_RC = { "figure.facecolor": "#09090b", "axes.facecolor": "#111114", "axes.edgecolor": "#1f1f23", "axes.labelcolor": "#a1a1aa", "text.color": "#fafafa", "xtick.color": "#71717a", "ytick.color": "#71717a", "grid.color": "#1f1f23", "grid.alpha": 0.3, "figure.dpi": 100, "savefig.facecolor": "#09090b", "font.family": "sans-serif", } WALKER_NAMES = ["Try", "Choose", "Commit", "LetGo", "Learn"] WALKER_COLORS = ["#3b82f6", "#22c55e", "#a855f7", "#ef4444", "#f59e0b"] PRIMITIVES = ["Fork", "Race", "Fold", "Vent", "Interfere"] PARAMS = ["eta", "temperature", "commitGain", "decayRate", "feedbackGain"] BOSON_PAIRS = [ (0,1,"Try↔Choose"), (0,2,"Try↔Commit"), (0,3,"Try↔LetGo"), (0,4,"Try↔Learn"), (1,2,"Choose↔Commit"), (1,3,"Choose↔LetGo"), (1,4,"Choose↔Learn"), (2,3,"Commit↔LetGo"), (2,4,"Commit↔Learn"), (3,4,"LetGo↔Learn"), ] PRESETS = { "Explorer": [0.9, 0.4, 0.3, 0.7, 0.8], "Builder": [0.4, 0.7, 0.9, 0.2, 0.6], "Creative": [0.8, 0.3, 0.4, 0.8, 0.9], "Anxious": [0.3, 0.2, 0.7, 0.1, 0.5], "Balanced": [0.5, 0.5, 0.5, 0.5, 0.5], "Custom": [0.6, 0.6, 0.6, 0.6, 0.6], } # ─── Core Model ────────────────────────────────────────────────────────────── def compute_bosons(walkers): """Compute ten boson tensions (|w_a - w_b| for all pairs).""" bosons = [] for a, b, _ in BOSON_PAIRS: bosons.append(abs(walkers[a] - walkers[b])) return np.array(bosons) def system_energy(bosons): """Total system energy = sum of all boson tensions.""" return float(np.sum(bosons)) def is_confined(walkers): """All walkers must be present (> 0). The sliver guarantees this.""" return all(w > 0 for w in walkers) def complement_distribution(void_boundary, eta=3.0): """Compute complement target from void boundary (rejection counts).""" weights = np.array([max(1, total - rej + 1) for total, rej in zip([sum(void_boundary)] * len(void_boundary), void_boundary)], dtype=float) # Softmax with eta exp_w = np.exp(eta * (weights / max(weights.max(), 1e-8) - 0.5)) return exp_w / exp_w.sum() def settle_personality(initial_walkers, max_rounds=100, epsilon=0.001): """Settle five walkers to Skyrms Nash equilibrium via rejection.""" walkers = np.array(initial_walkers, dtype=float) walkers = np.clip(walkers, 0.01, 0.99) # the sliver # Per-walker void boundaries (20 levels each) resolution = 20 voids = [np.zeros(resolution) for _ in range(5)] history = [walkers.copy()] energies = [system_energy(compute_bosons(walkers))] gaits = [["stand"] * 5] for round_idx in range(max_rounds): new_walkers = walkers.copy() round_gaits = [] for i in range(5): # Propose new value from complement distribution dist = complement_distribution(voids[i]) proposal_idx = np.random.choice(resolution, p=dist) proposal = (proposal_idx + 0.5) / resolution # Would this reduce energy? test = new_walkers.copy() test[i] = proposal old_energy = system_energy(compute_bosons(walkers)) new_energy = system_energy(compute_bosons(test)) if new_energy < old_energy: # Accept: update walker new_walkers[i] = proposal gait = "gallop" if (old_energy - new_energy) > 0.1 else "trot" else: # Reject: update void boundary reject_idx = min(int(walkers[i] * resolution), resolution - 1) voids[i][reject_idx] += 1 gait = "stand" round_gaits.append(gait) walkers = np.clip(new_walkers, 0.01, 0.99) bosons = compute_bosons(walkers) energy = system_energy(bosons) history.append(walkers.copy()) energies.append(energy) gaits.append(round_gaits) # Convergence check if len(energies) > 2 and abs(energies[-1] - energies[-2]) < epsilon: break return { "walkers": walkers.tolist(), "bosons": compute_bosons(walkers).tolist(), "energy": system_energy(compute_bosons(walkers)), "confined": is_confined(walkers), "rounds": len(history) - 1, "history": [h.tolist() for h in history], "energies": energies, "gaits": gaits, "voids": [v.tolist() for v in voids], } # ─── Visualization ────────────────────────────────────────────────────────── def plot_walkers(result): """Radar chart of final walker values.""" with plt.rc_context(DARK_RC): fig, ax = plt.subplots(figsize=(6, 6), subplot_kw=dict(projection='polar')) angles = np.linspace(0, 2 * np.pi, 5, endpoint=False).tolist() angles += angles[:1] values = result["walkers"] + [result["walkers"][0]] ax.plot(angles, values, 'o-', color='#06b6d4', linewidth=2, markersize=8) ax.fill(angles, values, alpha=0.15, color='#06b6d4') ax.set_xticks(angles[:-1]) ax.set_xticklabels([f"{n}\n({p})" for n, p in zip(WALKER_NAMES, PRIMITIVES)], size=9) ax.set_ylim(0, 1) ax.set_title("Five Walkers (Settled)", pad=20, fontsize=14, color='#fafafa') ax.grid(True, alpha=0.2) fig.tight_layout() return fig def plot_bosons(result): """Bar chart of ten boson tensions.""" with plt.rc_context(DARK_RC): fig, ax = plt.subplots(figsize=(10, 4)) labels = [bp[2] for bp in BOSON_PAIRS] values = result["bosons"] colors = ['#ef4444' if v > 0.3 else '#f59e0b' if v > 0.15 else '#22c55e' for v in values] bars = ax.bar(range(10), values, color=colors, alpha=0.8, edgecolor='#1f1f23') ax.set_xticks(range(10)) ax.set_xticklabels(labels, rotation=45, ha='right', fontsize=7) ax.set_ylabel("Tension |w_a - w_b|") ax.set_title(f"Ten Bosons (Energy = {result['energy']:.3f})", fontsize=12) ax.set_ylim(0, 1) ax.axhline(y=0.3, color='#ef4444', linestyle='--', alpha=0.3, label='High tension') fig.tight_layout() return fig def plot_convergence(result): """Energy convergence over settlement rounds.""" with plt.rc_context(DARK_RC): fig, (ax1, ax2) = plt.subplots(1, 2, figsize=(12, 4)) # Energy ax1.plot(result["energies"], color='#06b6d4', linewidth=2) ax1.set_xlabel("Round") ax1.set_ylabel("System Energy") ax1.set_title(f"Settlement ({result['rounds']} rounds)", fontsize=12) ax1.grid(True, alpha=0.2) # Walker trajectories history = np.array(result["history"]) for i in range(5): ax2.plot(history[:, i], color=WALKER_COLORS[i], linewidth=1.5, label=WALKER_NAMES[i]) ax2.set_xlabel("Round") ax2.set_ylabel("Walker Value") ax2.set_title("Walker Trajectories", fontsize=12) ax2.legend(loc='upper right', fontsize=8) ax2.set_ylim(0, 1) ax2.grid(True, alpha=0.2) fig.tight_layout() return fig def format_summary(result): """Text summary of the settled personality.""" w = result["walkers"] lines = [ "QUARK-ARRANGED SKYRMS WALKER PERSONALITY", "=" * 50, "", f"Settlement: {result['rounds']} rounds | Energy: {result['energy']:.4f} | Confined: {result['confined']}", "", "FIVE WALKERS (settled values):", ] for i, (name, prim, param) in enumerate(zip(WALKER_NAMES, PRIMITIVES, PARAMS)): bar = "█" * int(w[i] * 20) lines.append(f" {name:8s} ({prim:10s}) = {w[i]:.3f} {bar}") lines.extend(["", "TEN BOSONS (pairwise tensions):"]) for i, (a, b, label) in enumerate(BOSON_PAIRS): v = result["bosons"][i] indicator = "🔴" if v > 0.3 else "🟡" if v > 0.15 else "🟢" lines.append(f" {indicator} {label:20s} = {v:.3f}") lines.extend(["", "THEOREMS (all proved in Lean 4, zero sorry):", " THM-FIVE-MAP-TO-FIVE: walkers = primitives = hyperparameters", " THM-NO-FREE-QUARKS: cannot remove one walker (confinement)", " THM-GAUGE-WALKER-AGREE: gauge field peak = walker peak", f" THM-WIREFRAME-IS-VACUUM: all equal → energy = 0 (balanced = {result['energy'] < 0.01})", ]) # Dominant personality interpretation dominant = WALKER_NAMES[np.argmax(w)] weakest = WALKER_NAMES[np.argmin(w)] lines.extend(["", f"INTERPRETATION:", f" Dominant axis: {dominant} (strongest pull)", f" Shadow axis: {weakest} (most rejected, deepest void)", f" The void boundary of {weakest} contains the most information.", ]) return "\n".join(lines) # ─── Gradio App ────────────────────────────────────────────────────────────── def run_settlement(preset, try_v, choose_v, commit_v, letgo_v, learn_v, max_rounds): if preset != "Custom": vals = PRESETS[preset] try_v, choose_v, commit_v, letgo_v, learn_v = vals result = settle_personality( [try_v, choose_v, commit_v, letgo_v, learn_v], max_rounds=int(max_rounds), ) return ( plot_walkers(result), plot_bosons(result), plot_convergence(result), format_summary(result), try_v, choose_v, commit_v, letgo_v, learn_v, ) CSS = """ .gradio-container { max-width: 1100px !important; margin: 0 auto !important; } .gradio-container, .dark { background: #09090b !important; } footer { display: none !important; } """ with gr.Blocks(css=CSS, theme=gr.themes.Base(primary_hue="cyan", neutral_hue="zinc"), title="Quark Personality") as demo: gr.HTML("""
Five walkers. Ten bosons. Quark confinement. Settlement to Nash equilibrium.
A personality is not what you are. It is what you are not.
The void boundary -- accumulated rejections across five dimensions of irreversible choice -- IS the person.
Hot off Lean 4. Zero sorry.
THM-FIVE-MAP-TO-FIVE · THM-NO-FREE-QUARKS · THM-GAUGE-WALKER-AGREE · THM-WIREFRAME-IS-VACUUM
Whitepaper · The Void · Glossolalia · Metacog · Five Bules · Void Attention
φ² = φ + 1
Copyright 2026 forkjoin.ai