|
1 | | -PUTMAN Model Pipeline Visual Simulator |
| 1 | +# PUTMAN Visual Simulator |
2 | 2 |
|
3 | | -A deterministic, local-only simulator for the PUTMAN pipeline: |
| 3 | +**Live demo:** https://putmanmodel.github.io/putman-visual-sim/ |
4 | 4 |
|
5 | | -M = (V, E, w, t) + context C -> activation S -> beam reconstruction -> interpretation I -> shift metric Delta |
| 5 | +A deterministic, local-only visual simulator for the PUTMAN Model pipeline — showing how a context signal activates a graph, gets pruned by rigidity, reconstructed via a beam, and produces an interpretation shift metric (Δ) over recursive steps. |
6 | 6 |
|
7 | | -The app is a single-page React + TypeScript interface that consumes a framework-agnostic core engine from /core, visualizes the synthetic graph via SVG, and exports reproducible artifacts. |
| 7 | +## Pipeline (high level) |
8 | 8 |
|
9 | | -What it demonstrates |
10 | | -- Seeded synthetic graph generation with configurable node count, edge density, and prior/new overlap. |
11 | | -- Activation scoring from context and weighted structure. |
12 | | -- Rigidity pruning (rho) over weak nodes/edges. |
13 | | -- Beam reconstruction with width k. |
14 | | -- Recursive updates across depth d. |
15 | | -- Interpretation summaries (I) and per-step shift metric (Delta) using cosine distance between interpretation centroids. |
16 | | -- Deterministic runlogs with per-step internals and export support. |
17 | | -ç |
18 | | -Project layout |
19 | | -- /core: Framework-agnostic TypeScript simulation engine. |
20 | | -- /app: Vite + React + TypeScript UI and Vitest tests. |
21 | | -- /specs: Preset JSON configs (stable, drift, collapse). |
| 9 | +M + C → S → Beam → I → Δ |
22 | 10 |
|
23 | | -Run locally |
| 11 | +Where: |
| 12 | +- M = graph structure (nodes/edges/weights) |
| 13 | +- C = context / cue input |
| 14 | +- S = activation state |
| 15 | +- I = interpretation summary |
| 16 | +- Δ = measured shift across steps |
24 | 17 |
|
25 | | -``` |
26 | | -cd app |
27 | | -npm install |
28 | | -npm run dev |
29 | | -``` |
30 | | - |
31 | | -Build and tests: |
32 | | - |
33 | | -``` |
34 | | -npm run build |
35 | | -npm run test |
36 | | -``` |
| 18 | +## What you can do in the demo |
| 19 | +- Generate a seeded synthetic graph (reproducible) |
| 20 | +- Tune rigidity (ρ), beam width (k), and depth (d) |
| 21 | +- Watch active/pruned structure update step-by-step |
| 22 | +- See Δ change over time (shift / drift / collapse behavior) |
37 | 23 |
|
38 | | -Reproduce presets |
39 | | -1. Start the app. |
40 | | -2. Click one preset button in the left panel: |
41 | | -- stable: low drift, moderate rigidity. |
42 | | -- drift: high drift and stronger recursive movement. |
43 | | -- collapse: high rigidity, aggressive pruning. |
44 | | -3. Click Run to regenerate with that preset. |
45 | | -4. Use Export SVG for the current graph view and Export JSON Runlog for full step traces. |
| 24 | +**Exports** |
| 25 | +- SVG of the current view |
| 26 | +- JSON runlog with per-step internals (for replay + analysis) |
46 | 27 |
|
47 | | -Determinism check |
| 28 | +## Presets |
| 29 | +Use the preset buttons as “stories”: |
| 30 | +- Stable — low drift, moderate pruning |
| 31 | +- Drift — stronger recursive movement and interpretation shift |
| 32 | +- Collapse — aggressive pruning and structural loss |
48 | 33 |
|
49 | | -Vitest includes core determinism assertions in: |
| 34 | +## Repo layout |
| 35 | +- core/ — framework-agnostic TypeScript engine (deterministic) |
| 36 | +- app/ — React + Vite UI (SVG visualization + exports) |
| 37 | +- specs/ — preset parameter configs |
50 | 38 |
|
51 | | -app/tests/core.determinism.test.ts |
| 39 | +## Run locally |
| 40 | +Run from the repo root: |
52 | 41 |
|
53 | | -It verifies: |
54 | | -- same seed + params => identical runlog and hash |
55 | | -- different seeds => different runlog hashes |
| 42 | +``` |
| 43 | + cd app |
| 44 | + npm install |
| 45 | + npm run dev |
| 46 | +``` |
56 | 47 |
|
57 | | -GitHub Pages |
| 48 | +## Build + test |
58 | 49 |
|
59 | | -GitHub Actions workflow: |
| 50 | +``` |
| 51 | + npm run build |
| 52 | + npm run test |
| 53 | +``` |
60 | 54 |
|
61 | | -.github/workflows/deploy-pages.yml |
| 55 | +## Determinism |
| 56 | +A determinism test verifies: |
| 57 | +- same seed + params → identical runlog hash |
| 58 | +- different seeds → different runlog hash |
62 | 59 |
|
63 | | -On pushes to main, it builds /app and deploys static output to GitHub Pages. |
| 60 | +See: app/tests/core.determinism.test.ts |
64 | 61 |
|
65 | | -License |
| 62 | +## Related work |
| 63 | +- PUTMAN Model papers (Zenodo): https://doi.org/10.5281/zenodo.15634339 |
| 64 | +- PUTMAN Model repo: https://github.com/putmanmodel/putman-model-paper |
66 | 65 |
|
67 | | -This project is licensed under Creative Commons Attribution–NonCommercial 4.0 International (CC BY-NC 4.0). |
| 66 | +## License |
| 67 | +CC BY-NC 4.0 — Creative Commons Attribution–NonCommercial 4.0 International. |
68 | 68 | See LICENSE. |
69 | 69 |
|
70 | | -Contact |
71 | | - |
72 | | -putmanmodel@pm.me |
| 70 | +Contact: putmanmodel@pm.me |
0 commit comments