# PBRF Layer 2 NBM v0.8 Initial Simulation Plan ## 1. Objective This document outlines the plan for initial computational experiments using the DCIN v0.8 formalism [[archive/projects/PBRF/0247_PBRF_L2_NBM_Definition_v0.8]]. The primary goals are to test the newly implemented **weight-based repulsion mechanism** (`α_R`, `g_R`): 1. **Verification:** Verify conservation (`Σ S_i`) with the repulsive term active. 2. **Repulsion Effect:** Determine if the repulsion term effectively limits cluster density and prevents indefinite merging/collapse observed in previous versions. 3. **Stable Structures:** Investigate whether the balance between attraction (`α_S`, `α_P`) and repulsion (`α_R`) leads to stable clusters with characteristic sizes and separations. 4. **Interaction Modification:** Re-examine the interaction between two clusters to see if repulsion introduces a stable separation distance or modifies the merging dynamics. ## 2. Formalism Recap (DCIN v0.8) * Core rules for `S_i`, `P_i`, `Φ_i`, `Context_i`, `Flow_{ji}` are as in v0.7. * **Key Change:** Weight Update Rule: `Δw_{ji} = [α_S*(S_j*S_i) + α_P*(P_j*P_i)] - [α_R*(S_j*S_i)^2] - [λ*w_{ji}]` `w_{ji}(t+1) = min( w_max, max(0, w_{ji}(t) + Δt * Δw_{ji}) )` * `α_R ≥ 0` controls repulsion strength. `g_R = (S_j*S_i)^2` is the proposed repulsion function. ## 3. Simulation Setup * **Environment:** Standard scientific computing environment. * **Time:** Discrete steps `t`. `Δt = 1`. * **Default Parameters:** `γ = 0.1`, `δ = 0.1`, `β = 0`, `ε = 0`, `λ = 0.01`, `w_max = 10.0`. Aggregation parameters `α_S`, `α_P` set to values known to cause clustering (e.g., `α_S=1.0, α_P=0.5`). `α_R` will be varied. * **Initial Conditions:** * `S_i(0)`: Uniform random noise `U(0, 0.1)` or specific patterns (two peaks). * `P_i(0)`: `P_i(0) = δ`. * `w_ji(0)`: Uniformly low `w_ji(0) = 0.1`. * **Network Topology:** 2D grid (e.g., 40x40), nearest-neighbor (8) connections, periodic boundaries. ## 4. Proposed Experiments **Experiment 1: Conservation Verification (v0.8)** * **Objective:** Verify `Σ S_i` conservation with `α_R > 0`. * **Network:** Small closed network (e.g., 5x5 grid, periodic). * **Parameters:** Activate all mechanisms including `α_R > 0` (e.g., `α_R=1.0`). Random initial `S_i(0)`. * **Procedure:** Run T=200 steps. Track `TotalS(t) = Σ_i S_i(t)`. * **Expected Outcome:** `TotalS(t)` constant within machine precision. * **Analysis:** Plot `TotalS(t)`. **Experiment 2: Effect of Repulsion Strength (`α_R`) on Aggregation** * **Objective:** Observe how varying `α_R` affects cluster formation from random noise. * **Network:** 40x40 grid, periodic. * **Parameters:** Fix strong aggregation (`α_S=1.0, α_P=0.5, λ=0.01, w_max=10.0`). Set `β=0, ε=0`. Vary `α_R` (e.g., 0, 0.1, 0.5, 1.0, 2.0, 5.0). Random initial `S_i(0)`. * **Procedure:** Run simulation until quasi-steady state (e.g., T=3000). * **Expected Outcome (Hypothesis):** * `α_R = 0`: Should replicate v0.6/v0.7 results (potentially large, merged clusters). * `α_R > 0`: Should limit the maximum density `S` within clusters and the maximum internal weights `w`. This might lead to smaller, more numerous clusters that resist merging. There might be an optimal `α_R` for forming well-defined, stable, separated clusters. Very high `α_R` might suppress aggregation altogether. * **Analysis:** Visualize final `S` and `w` distributions. Compare cluster statistics (size, number, density, separation distance) across different `α_R` values. Plot average `S` and `w` within identified clusters vs. `α_R`. **Experiment 3: Two-Cluster Interaction with Repulsion** * **Objective:** Re-examine the interaction of two clusters (v0.7 Exp 4) with repulsion active. * **Network:** 50x50 grid, periodic. * **Parameters:** Use parameters known to form clusters (`α_S=1, α_P=0.5, λ=0.01, w_max=10.0`). Set `β=0, ε=0`. Compare `α_R = 0` vs. `α_R = 1.0` (or another value found effective in Exp 2). * **Initial Condition:** Two distinct Gaussian `S` peaks separated by some distance. `w_ji(0)` low. * **Procedure:** Run simulation (e.g., T=3000). * **Expected Outcome (Hypothesis):** * `α_R = 0`: Clusters should attract and merge (as seen in v0.7 results). * `α_R > 0`: The repulsion term `α_R*(S_j*S_i)^2` should counteract the attractive `α_S*(S_j*S_i)` term when clusters get close (high `S` on adjacent nodes). This might prevent merging and establish a stable separation distance between the clusters. * **Analysis:** Visualize time evolution. Track distance between cluster centers. Analyze inter-cluster edge weights `w_ji(t)`. Compare final state for `α_R=0` vs. `α_R>0`. **Experiment 4: Form of `g_R` (Optional/If Time Permits)** * **Objective:** Compare `g_R = (S_j*S_i)^2` with an alternative, e.g., `g_R = S_j*S_i * max(0, S_j+S_i - S_{thresh})`. * **Setup:** Repeat parts of Exp 2 or 3 with the alternative `g_R`. * **Analysis:** Compare resulting cluster morphology and stability. ## 5. Outputs and Analysis * Conservation plot (Exp 1). * Visualizations (heatmaps) of `S`, `P`, `w` for different `α_R` values (Exp 2). * Cluster statistics vs. `α_R`: size distribution, number, average density, average separation distance (Exp 2). * Time evolution plots/animations of two-cluster interaction with and without repulsion (Exp 3). Inter-cluster distance vs. time. * Comparison of different `g_R` forms if Exp 4 is performed. ## 6. Scope and Limitations * Focus specifically on testing the implemented repulsion mechanism. * Static node topology. * Limited exploration of the full parameter space interactions (e.g., combined effects of `α_R`, `β`, `ε`). * Physical interpretation remains qualitative. Results will demonstrate whether the weight-based repulsion provides the intended effect of stabilizing separated clusters and preventing collapse, adding a crucial capability to the DCIN formalism. This directly addresses the need for substantial progress. **Next Step:** Implement and execute these experiments. Create node `0249_PBRF_L2_NBM_v0.8_Initial_Sim_Results`.