diff --git a/demos/epiplexity-01-emergent-objects/README.md b/demos/epiplexity-01-emergent-objects/README.md new file mode 100644 index 0000000..1dce97b --- /dev/null +++ b/demos/epiplexity-01-emergent-objects/README.md @@ -0,0 +1,80 @@ +# Demo 1: Emergent Discovery — LLM as Scientific Observer + +An LLM observes Conway's Game of Life and acts as a scientist — describing patterns, predicting future states, and building theories about hidden rules. Memory transforms a confused observer into a competent one. + +Validates **Paradox 1** from Finzi et al. (2026) *"From Entropy to Epiplexity"*: deterministic micro-rules expose extractable macro-structure to a computationally bounded observer with memory. + +## Research Link + +- Paper: *From Entropy to Epiplexity: Rethinking Information for Computationally Bounded Intelligence* (Finzi, Qiu, Jiang, Izmailov, Kolter, Wilson, 2026) +- arXiv: https://arxiv.org/abs/2601.03220 + +## Prerequisites + +- **Ollama** running locally: https://ollama.ai +- **Qwen model** pulled: + ```bash + ollama pull qwen3.5:9b + ``` +- Verify Ollama is serving: + ```bash + curl http://localhost:11434/api/tags + ``` + +## What the Model Does + +- Runs Conway's Game of Life on a 50x50 grid with three dramatic seeds: + - **R-pentomino** (center) — 5-cell methuselah that explodes into chaos, producing gliders, blinkers, blocks as emergent byproducts + - **Gosper glider gun** (top-left) — continuously emits gliders every 30 ticks + - **Pulsar** (bottom-right) — period-3 oscillator with dramatic rhythmic pulsing +- A single LLM observer scans the grid through a 5x5 local window +- Each tick, the observer: + 1. **Describes** what it sees in free text (`llm:chat-with-template`) + 2. **Predicts** the next 5x5 grid state (`llm:chat-with-template`) + 3. **Reflects** periodically to update its theory of the world + +## Memory Modes + +- **Bounded**: Clears LLM history every tick. The observer has amnesia — perpetually confused. +- **Persistent**: Accumulates history across ticks. The observer builds context, recognizes patterns, develops theories. + +Switch between modes live using the `memory-mode` chooser. + +## Run Instructions + +1. Start Ollama: `ollama serve` +2. Open `game_of_life.nlogox` in NetLogo 7 +3. Click **Setup** to initialize the grid and observer +4. Click **Test LLM** to verify Ollama connectivity +5. Start in **bounded** mode, click **Go** +6. After ~10 ticks, switch to **persistent** mode +7. Watch the LLM Theory monitor evolve and accuracy diverge + +## What to Expect + +- **Bounded mode**: LLM descriptions are generic, predictions are random, theory never develops +- **Persistent mode**: LLM starts recognizing patterns — "stable 2x2 blocks", "oscillating lines", "shapes that move diagonally" +- **The Plot**: Bounded accuracy (red) stays flat. Persistent accuracy (blue) climbs. The gap = the epiplexity signal. +- **The Killer Moment**: The LLM Theory monitor shows the observer independently discovering GoL patterns through pure observation with memory. + +## Files + +- `game_of_life.nlogox` — NetLogo model +- `config.txt` — Ollama provider/model settings +- `templates/describe.yaml` — prompt for pattern description +- `templates/predict_grid.yaml` — prompt for next-state prediction +- `templates/reflect.yaml` — prompt for theory generation +- `results/` — CSV output directory + +## CSV Schema + +`tick, observer_x, observer_y, window_pattern, llm_description, llm_predicted_grid, ground_truth_label, grid_match_percent, memory_mode, llm_provider, llm_model` + +## Controls + +| Control | Type | Purpose | +|---------|------|---------| +| memory-mode | chooser | Switch bounded/persistent live | +| show-observations? | switch | See raw LLM input in output area | +| reflect-every | slider (3-10) | How often the LLM updates its theory | +| episode-length | slider (20-200) | Total ticks per run | diff --git a/demos/epiplexity-01-emergent-objects/game_of_life.nlogox b/demos/epiplexity-01-emergent-objects/game_of_life.nlogox new file mode 100644 index 0000000..3871e40 --- /dev/null +++ b/demos/epiplexity-01-emergent-objects/game_of_life.nlogox @@ -0,0 +1,899 @@ + + + + foreach (list -1 1) [ sy -> + ;; Horizontal bars (3 cells each, at rows +/-2 and +/-6) + set-alive-cell (x + sx * 2) (y + sy * 1) + set-alive-cell (x + sx * 3) (y + sy * 1) + set-alive-cell (x + sx * 4) (y + sy * 1) + set-alive-cell (x + sx * 2) (y + sy * 6) + set-alive-cell (x + sx * 3) (y + sy * 6) + set-alive-cell (x + sx * 4) (y + sy * 6) + ;; Vertical bars (3 cells each, at cols +/-2 and +/-6) + set-alive-cell (x + sx * 1) (y + sy * 2) + set-alive-cell (x + sx * 1) (y + sy * 3) + set-alive-cell (x + sx * 1) (y + sy * 4) + set-alive-cell (x + sx * 6) (y + sy * 2) + set-alive-cell (x + sx * 6) (y + sy * 3) + set-alive-cell (x + sx * 6) (y + sy * 4) + ] + ] +end + +to set-alive-cell [x y] + let px wrap-coordinate x min-pxcor max-pxcor + let py wrap-coordinate y min-pycor max-pycor + ask patch px py [ + set alive? true + ] +end + +;;; ============ OBSERVER SETUP ============ + +to setup-observer + create-observers 1 [ + setxy observer-target-x observer-target-y + set shape "circle" + set color yellow + set size 2 + set label "" + ] +end + +;;; ============ LLM CONFIG ============ + +to load-llm-configuration + carefully [ + llm:load-config config-file + set llm-config-loaded? true + ] [ + output-print (word "LLM config warning: " error-message) + ] + capture-active-model + output-print (word "Config: " config-file " | " active-provider "/" active-model) +end + +to capture-active-model + carefully [ + let active llm:active + if is-list? active [ + if length active >= 2 [ + set active-provider item 0 active + set active-model item 1 active + ] + ] + ] [ + ; silent + ] +end + +;;; ============ MAIN GO LOOP ============ + +to go + if ticks >= episode-length [ stop ] + if not llm-config-loaded? [ + output-print "LLM config not loaded. Check config.txt." + stop + ] + + ;; 1. Memory mode transition (BEFORE any LLM calls per Codex review) + ask observers [ + ifelse memory-mode = "bounded" [ + llm:clear-history + ] [ + ;; Persistent: cap history at last 20 exchanges + let hist llm:history + if length hist > 20 [ + llm:set-history sublist hist (length hist - 20) (length hist) + ] + ] + ] + + ;; 2. Position observer (move BEFORE observing per Codex review) + move-observer-to-waypoint + + ;; 3. Refresh display with observer at final position + refresh-patch-colors + highlight-observer-window + + ;; 4. Observe current window and capture ground truth BEFORE any state changes + let window-grid observe-window + let ws (word (2 * window-radius + 1)) + let truth classify-window current-window-rows + let truth-rows current-window-rows + + ;; 5. LLM DESCRIBE + ask one-of observers [ + carefully [ + let vars (list + (list "window_size" ws) + (list "window_grid" window-grid) + ) + set current-description llm:chat-with-template "templates/describe.yaml" vars + set llm-call-count llm-call-count + 1 + ] [ + if member? "rate_limit" error-message [ + output-print "Rate limited - waiting 2s..." + wait 2 + stop + ] + output-print (word "Describe error: " error-message) + set current-description "(error)" + ] + ] + + if show-observations? [ + output-print (word "=== Tick " ticks " [" memory-mode "] ===") + output-print window-grid + output-print (word "LLM: " current-description) + ] + + ;; 6. Update observation buffer AFTER describe so reflect sees current tick + update-observation-buffer ticks current-description + + ;; 7. LLM PREDICT + ask one-of observers [ + carefully [ + let vars (list + (list "window_size" ws) + (list "window_grid" window-grid) + (list "description" current-description) + ) + set current-prediction llm:chat-with-template "templates/predict_grid.yaml" vars + set llm-call-count llm-call-count + 1 + ] [ + if member? "rate_limit" error-message [ + output-print "Rate limited - waiting 2s..." + wait 2 + stop + ] + output-print (word "Predict error: " error-message) + set current-prediction "" + ] + ] + + ;; 8. LLM REFLECT (periodic, isolated from main history) + if ticks > 0 and (ticks mod reflect-every = 0) [ + ask one-of observers [ + let saved-hist llm:history + llm:clear-history + carefully [ + let vars (list + (list "observation_history" format-observation-buffer) + (list "previous_theory" current-theory) + ) + set current-theory llm:chat-with-template "templates/reflect.yaml" vars + set llm-call-count llm-call-count + 1 + ] [ + if member? "rate_limit" error-message [ + output-print "Rate limited - waiting 2s..." + wait 2 + ] + output-print (word "Reflect error: " error-message) + ] + llm:set-history saved-hist + ] + ] + + ;; 9. Score prediction against actual next state + compute-next-state + let actual-next-rows next-window-rows + set current-grid-match grid-match-percent current-prediction actual-next-rows + + ;; 10. Advance GoL + apply-next-state + + ;; 11. Log CSV (using pre-captured truth from before GoL advance) + let ox round [xcor] of one-of observers + let oy round [ycor] of one-of observers + let row (list + ticks ox oy + (rows-to-hash truth-rows) + current-description + current-prediction + truth + current-grid-match + memory-mode + active-provider + active-model + ) + append-output-row output-file-path row + + ;; 12. Narrate + if not show-observations? [ + output-print (word "Tick " ticks " [" memory-mode "] truth=" truth " match=" (precision current-grid-match 1) "%") + ] + + tick +end + +;;; ============ OBSERVER MOVEMENT ============ + +to move-observer-to-waypoint + ;; Update waypoint target periodically + if ticks > 0 and (ticks mod ticks-per-waypoint = 0) [ + set current-waypoint-index (current-waypoint-index + 1) mod (length pattern-waypoints) + let wp item current-waypoint-index pattern-waypoints + set observer-target-x item 0 wp + set observer-target-y item 1 wp + ] + + ;; Integer-stepped movement toward target (1 cell per tick per axis) + ask observers [ + let curr-x round xcor + let curr-y round ycor + let new-x curr-x + let new-y curr-y + + if curr-x < observer-target-x [ set new-x curr-x + 1 ] + if curr-x > observer-target-x [ set new-x curr-x - 1 ] + if curr-y < observer-target-y [ set new-y curr-y + 1 ] + if curr-y > observer-target-y [ set new-y curr-y - 1 ] + + setxy new-x new-y + ] +end + +;;; ============ DISPLAY ============ + +to refresh-patch-colors + ask patches [ + ifelse alive? [ set pcolor white ] [ set pcolor black ] + ] +end + +to highlight-observer-window + let ox round [xcor] of one-of observers + let oy round [ycor] of one-of observers + let r window-radius + let y-off (- r) + while [ y-off <= r ] [ + let x-off (- r) + while [ x-off <= r ] [ + let px wrap-coordinate (ox + x-off) min-pxcor max-pxcor + let py wrap-coordinate (oy + y-off) min-pycor max-pycor + ask patch px py [ + if (abs x-off = r) or (abs y-off = r) [ + set pcolor yellow - 2 + ] + ] + set x-off x-off + 1 + ] + set y-off y-off + 1 + ] +end + +;;; ============ GAME OF LIFE RULES ============ + +to compute-next-state + ask patches [ + let live-neighbors count neighbors with [ alive? ] + ifelse alive? [ + set next-alive? ((live-neighbors = 2) or (live-neighbors = 3)) + ] [ + set next-alive? (live-neighbors = 3) + ] + ] +end + +to apply-next-state + ask patches [ set alive? next-alive? ] +end + +;;; ============ WINDOW OBSERVATION ============ + +to-report current-window-rows + let ox round [xcor] of one-of observers + let oy round [ycor] of one-of observers + report window-rows-at ox oy false +end + +to-report next-window-rows + let ox round [xcor] of one-of observers + let oy round [ycor] of one-of observers + report window-rows-at ox oy true +end + +to-report observe-window + report rows-to-ascii current-window-rows +end + +to-report window-rows-at [cx cy use-next-state?] + let rows [] + let y-offset (- window-radius) + while [ y-offset <= window-radius ] [ + let row "" + let x-offset (- window-radius) + while [ x-offset <= window-radius ] [ + let px wrap-coordinate (cx + x-offset) min-pxcor max-pxcor + let py wrap-coordinate (cy + y-offset) min-pycor max-pycor + let target patch px py + let is-live false + ifelse use-next-state? [ + set is-live [next-alive?] of target + ] [ + set is-live [alive?] of target + ] + set row word row (ifelse-value is-live ["X"] ["."]) + set x-offset x-offset + 1 + ] + set rows lput row rows + set y-offset y-offset + 1 + ] + report rows +end + +to-report rows-to-ascii [rows] + if empty? rows [ report "" ] + let text first rows + foreach but-first rows [ row -> + set text (word text "\n" row) + ] + report text +end + +to-report rows-to-hash [rows] + if empty? rows [ report "" ] + let text first rows + foreach but-first rows [ row -> + set text (word text "/" row) + ] + report text +end + +to-report wrap-coordinate [value lo hi] + let span (hi - lo + 1) + report lo + (((value - lo) mod span + span) mod span) +end + +;;; ============ GROUND TRUTH CLASSIFIERS ============ + +to-report classify-window [rows] + let alive-count count-live-in-rows rows + if alive-count = 0 [ report "empty" ] + if has-block? rows [ report "stable" ] + if has-blinker? rows [ report "oscillator" ] + if has-glider-shape? rows [ report "glider-like" ] + if alive-count < 3 [ report "unknown" ] + report "chaotic" +end + +to-report count-live-in-rows [rows] + let total 0 + foreach rows [ row -> + let idx 0 + while [ idx < length row ] [ + if substring row idx (idx + 1) = "X" [ set total total + 1 ] + set idx idx + 1 + ] + ] + report total +end + +to-report has-block? [rows] + let y 0 + while [ y <= 3 ] [ + let x 0 + while [ x <= 3 ] [ + if (cell-at rows x y = "X") and + (cell-at rows (x + 1) y = "X") and + (cell-at rows x (y + 1) = "X") and + (cell-at rows (x + 1) (y + 1) = "X") [ + report true + ] + set x x + 1 + ] + set y y + 1 + ] + report false +end + +to-report has-blinker? [rows] + report has-horizontal-triple? rows or has-vertical-triple? rows +end + +to-report has-horizontal-triple? [rows] + let y 0 + while [ y < length rows ] [ + let row item y rows + let x 0 + while [ x <= (length row - 3) ] [ + if (substring row x (x + 1) = "X") and + (substring row (x + 1) (x + 2) = "X") and + (substring row (x + 2) (x + 3) = "X") [ + report true + ] + set x x + 1 + ] + set y y + 1 + ] + report false +end + +to-report has-vertical-triple? [rows] + let x 0 + while [ x < length (first rows) ] [ + let y 0 + while [ y <= (length rows - 3) ] [ + if (cell-at rows x y = "X") and + (cell-at rows x (y + 1) = "X") and + (cell-at rows x (y + 2) = "X") [ + report true + ] + set y y + 1 + ] + set x x + 1 + ] + report false +end + +to-report has-glider-shape? [rows] + let y 0 + while [ y <= 2 ] [ + let x 0 + while [ x <= 2 ] [ + if member? (subgrid-hash rows x y) glider-pattern-hashes [ + report true + ] + set x x + 1 + ] + set y y + 1 + ] + report false +end + +to-report subgrid-hash [rows start-x start-y] + let pieces [] + let y start-y + while [ y < start-y + 3 ] [ + let row "" + let x start-x + while [ x < start-x + 3 ] [ + set row (word row (cell-at rows x y)) + set x x + 1 + ] + set pieces lput row pieces + set y y + 1 + ] + report rows-to-hash pieces +end + +to-report cell-at [rows x y] + if y >= length rows or y < 0 [ report "." ] + let row item y rows + if x >= length row or x < 0 [ report "." ] + report substring row x (x + 1) +end + +;;; ============ PREDICTION SCORING ============ + +to-report grid-match-percent [predicted-text actual-rows] + if predicted-text = "" or predicted-text = nobody [ report 0 ] + + ;; Extract only X and . characters from predicted text + let predicted-chars [] + let i 0 + while [ i < length predicted-text ] [ + let ch substring predicted-text i (i + 1) + if ch = "X" or ch = "." [ + set predicted-chars lput ch predicted-chars + ] + set i i + 1 + ] + + ;; Build flat list of actual chars + let actual-chars [] + foreach actual-rows [ row -> + let j 0 + while [ j < length row ] [ + set actual-chars lput (substring row j (j + 1)) actual-chars + set j j + 1 + ] + ] + + let window-size (2 * window-radius + 1) + let expected-count window-size * window-size + if length predicted-chars < expected-count [ report 0 ] + + let matches 0 + let k 0 + while [ k < expected-count ] [ + if (item k predicted-chars) = (item k actual-chars) [ + set matches matches + 1 + ] + set k k + 1 + ] + + report (matches / expected-count) * 100 +end + +;;; ============ OBSERVATION BUFFER ============ + +to update-observation-buffer [tick-num desc] + if desc = "" [ set desc "(no observation yet)" ] + set observation-buffer lput (list tick-num desc) observation-buffer + if length observation-buffer > 10 [ + set observation-buffer sublist observation-buffer (length observation-buffer - 10) (length observation-buffer) + ] +end + +to-report format-observation-buffer + if empty? observation-buffer [ report "No observations yet." ] + let text "" + foreach observation-buffer [ entry -> + let t item 0 entry + let d item 1 entry + ifelse text = "" [ + set text (word "Tick " t ": " d) + ] [ + set text (word text "\nTick " t ": " d) + ] + ] + report text +end + +;;; ============ CSV LOGGING ============ + +to initialize-output-file [path] + if file-exists? path [ file-delete path ] + file-open path + file-print csv:to-row [ + "tick" + "observer_x" + "observer_y" + "window_pattern" + "llm_description" + "llm_predicted_grid" + "ground_truth_label" + "grid_match_percent" + "memory_mode" + "llm_provider" + "llm_model" + ] + file-close +end + +to append-output-row [path row] + file-open path + file-print csv:to-row row + file-close +end + +;;; ============ UTILITIES ============ + +to-report to-lower-case [str] + let upper "ABCDEFGHIJKLMNOPQRSTUVWXYZ" + let lower "abcdefghijklmnopqrstuvwxyz" + let result "" + let i 0 + while [ i < length str ] [ + let ch substring str i (i + 1) + let pos position ch upper + ifelse (pos != false) [ + set result (word result substring lower pos (pos + 1)) + ] [ + set result (word result ch) + ] + set i i + 1 + ] + report result +end + +to test-llm + if not llm-config-loaded? [ + output-print "LLM not configured. Click Setup first." + stop + ] + let window-grid observe-window + let ws (word (2 * window-radius + 1)) + ask one-of observers [ + ;; Isolate test call so it does not pollute persistent history + let saved-hist llm:history + llm:clear-history + carefully [ + let vars (list (list "window_size" ws) (list "window_grid" window-grid)) + let result llm:chat-with-template "templates/describe.yaml" vars + output-print (word "LLM test OK: " result) + ] [ + output-print (word "LLM test FAILED: " error-message) + ] + llm:set-history saved-hist + ] +end]]> + + + + + + + + + + + + + classify-window current-window-rows + current-description + current-grid-match + ticks + llm-call-count + + + + + + + if memory-mode = "bounded" [ plot current-grid-match ] + + + + if memory-mode = "persistent" [ plot current-grid-match ] + + + observe-window + current-prediction + current-theory + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + setup + diff --git a/demos/epiplexity-01-emergent-objects/results/.gitkeep b/demos/epiplexity-01-emergent-objects/results/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/demos/epiplexity-01-emergent-objects/results/demo-output.csv b/demos/epiplexity-01-emergent-objects/results/demo-output.csv new file mode 100644 index 0000000..59122a5 --- /dev/null +++ b/demos/epiplexity-01-emergent-objects/results/demo-output.csv @@ -0,0 +1,285 @@ +tick,observer_x,observer_y,window_pattern,llm_description,llm_predicted_grid,ground_truth_label,grid_match_percent,memory_mode,llm_provider,llm_model +0,25,25,...../..X../.XX../..XX./.....,"I observe a pattern resembling a growing or spreading structure, similar to how bacteria might spread in a petri dish experiment.","..... +..X.. +.XXX. +..XX. +.....",oscillator,84,bounded,ollama,qwen2.5:7b +1,25,25,...../.XX../.X.../.XXX./.....,"I observe a pattern resembling a tilted V or inverted triangle, with the base on the right side. This resembles the growth patterns seen in certain types of bacterial colonies under microscopy.","..... +.XXX. +..XXX +...XX +.....",oscillator,64,bounded,ollama,qwen2.5:7b +2,25,25,...../.XX../X..X./.XX../..X..,"I observe a symmetrical pattern with ""X"" cells forming a hollow diamond shape, similar to Gosper glider in Conway's Game of Life.","..... +.XX.. +X.XX. +.XX.. +..X..",chaotic,88,bounded,ollama,qwen2.5:7b +3,25,25,...../.XX../X..X./.XXX./.XX..,"I observe a pattern resembling a simplified tree or branching structure, with a central stem and branches extending outward. This is similar to observed patterns in natural growth processes.","..... +.XX.. +X.XX. +.XXX. +.XX..",stable,76,bounded,ollama,qwen2.5:7b +4,25,25,...../.XX../X..X./X..X./.X.X.,"I observe a symmetrical pattern with X cells forming a cross shape, centered in the 5x5 grid. This resembles a simple cruciform or plus sign pattern.","..... +.XX.. +X.X.X +X.X.X +..... +",oscillator,72,bounded,ollama,qwen2.5:7b +5,25,25,...../.XX../X..X./XX.XX/..X..,"I observe a pattern resembling a simple ""plus sign"" or cross, centered in the 5x5 grid. This is similar to the ""+"" symbol.","..... +.XX.. +X.X.X +.XX.. +..... +",chaotic,64,bounded,ollama,qwen2.5:7b +6,25,25,...../.XX../X..XX/XX.XX/.XXX.,"I observe a pattern resembling intersecting lines or an X formation, similar to the intersection of two diagonals.","..... +.XX.. +X.XXX +XXX.X +.XX.. + +This represents the next state based on common cellular automata rules, such as Conway's Game of Life.",stable,60,bounded,ollama,qwen2.5:7b +7,25,25,...../.XXX./X...X/X..../XX.XX,"I see a pattern resembling a ""plus sign"" or cross, with two connected 'T' shapes at the bottom right and top left corners. This resembles the intersection pattern seen in cellular automata like Conway's Game of Life.","..... +.XXX. +X..X. +.XXX. +X.X.X",oscillator,64,bounded,ollama,qwen2.5:7b +8,25,25,..X../.XXX./X.XX./X..XX/XXXX.,"I observe a pattern resembling a growing or expanding structure, possibly similar to cellular automata rules like Conway's Game of Life, with central growth and peripheral decay.","..XXX +X.XXX +XX.XX +XXXX. +XXXX.",stable,28.000000000000004,bounded,ollama,qwen2.5:7b +9,25,25,.XXX./...../X..../....X/.....,"The pattern resembles a simple ladder or staircase, with 'X' forming vertical and horizontal lines in a sparse grid-like structure.",".XXX. +..... +X.... +....X +.....",oscillator,72,bounded,ollama,qwen2.5:7b +10,25,25,..X../XXX../X..../...../X....,"I see a pattern resembling a growing or spreading structure, possibly similar to bacterial colonies observed in petri dishes under microscopes.","..X.. +XXX.. +X.... +.X... +X....",oscillator,84,bounded,ollama,qwen2.5:7b +11,25,25,..XX./X.X../...../...../X....,"I observe a pattern resembling a simple ladder or stairs, with two vertical lines and horizontal bars connecting them at the top left and bottom right.","..XX. +.X.X. +..... +..... +X...X",chaotic,84,bounded,ollama,qwen2.5:7b +12,25,25,.XXX./.XXX./...../...../.....,"I observe a symmetrical pattern with 'X' characters forming vertical lines in the first three rows, resembling columns or towers. This pattern is similar to structures seen in other 2D cellular automata simulations.",".XXX. +.XXX. +..... +..... +.....",stable,80,bounded,ollama,qwen2.5:7b +13,25,25,XX.X./XX.X./..X../...../.....,"This pattern resembles a series of steps or stairs, with 'X's forming vertical and horizontal lines that intersect at the center.","XX.X. +XX.X. +..X.. +..... +.....",stable,80,bounded,ollama,qwen2.5:7b +14,25,25,X..X./...X./XXX../...../.....,"I observe a pattern resembling a sideways 'E' or the letter 'F', with one vertical bar and a horizontal bar at the top.","X.... +...X. +XXXX. +..X.. +....X",oscillator,68,bounded,ollama,qwen2.5:7b +15,24,26,....X/.XXX./..X../XX.../X....,"I observe a pattern resembling a simplified tree or branching structure, with one trunk and multiple branches. This is similar to patterns seen in fractal geometry.","....X +.XX.. +..X.. +XX... +X....",oscillator,76,bounded,ollama,qwen2.5:7b +16,23,27,..XXX/.X..X/.XX../XXX../.....,"I observe a pattern resembling a growing or spreading structure, possibly similar to cellular automata like Conway's Game of Life, with a central cluster expanding outward.","..XXX +.XX.X +XX... +XXXX. +.....",stable,52,bounded,ollama,qwen2.5:7b +17,22,28,.XX../....X/X..X./.XX../.....,"The pattern resembles a symmetrical arrangement with two diagonal crosses intersecting at the center, reminiscent of an X shape.",".XX.. +....X +X..X. +.XX.. +.....",chaotic,68,bounded,ollama,qwen2.5:7b +18,21,29,.XXXX/XXXXX/.XXX./...../.....,"The pattern resembles a simple column with a missing bottom-right cell, similar to a tower with a missing block at the base.",".XXXX +XXXXX +.XXX. +..... +.....",stable,40,bounded,ollama,qwen2.5:7b +19,20,30,...../.X.../...X./...../.....,"I observe a symmetrical pattern with 'X' cells at the top and bottom midpoints, resembling a mirrored V-shape. This pattern is similar to binary or mirror symmetry observed in some cellular automata rules.","..... +.X... +...X. +.X... +.....",unknown,84,bounded,ollama,qwen2.5:7b +20,19,31,...../...../...../...../.....,"The window shows a uniform, empty grid with no cells present. This is a baseline or starting state often seen in cellular automata simulations.","..... +..... +..... +..... +.....",empty,100,bounded,ollama,qwen2.5:7b +21,18,32,...../...../...../...../.....,"This 5x5 grid is entirely empty, with no cells present. This pattern is uniform and homogeneous.","..... +..... +..... +..... +.....",empty,100,bounded,ollama,qwen2.5:7b +22,17,33,...../...../...../...../.....,"The window shows a uniform grid with no cells present, resembling empty space.","..... +..... +..... +..... +.....",empty,100,bounded,ollama,qwen2.5:7b +23,16,34,...../...../...../...../.....,"The window shows a uniform, empty grid with no cells present. This is similar to initial states in cellular automata like Conway's Game of Life before any evolution occurs.","..... +..... +..... +..... +.....",empty,100,bounded,ollama,qwen2.5:7b +24,15,35,...../...../...../...../.....,"This 5x5 grid is entirely empty, with no cells present. This pattern is uniform and homogeneous.","..... +..... +..... +..... +.....",empty,100,bounded,ollama,qwen2.5:7b +25,14,36,...../...../...../...../.....,"The window shows a uniform, empty grid with no cells present. This is similar to initial states in cellular automata like Conway's Game of Life before any evolution occurs.","..... +..... +..... +..... +.....",empty,100,bounded,ollama,qwen2.5:7b +26,13,37,...../...../...../...../.....,"The window shows a uniform grid with no cells present. This is a blank or empty state, similar to starting conditions in cellular automata like Conway's Game of Life.","..... +..... +..... +..... +.....",empty,100,bounded,ollama,qwen2.5:7b +27,12,38,...../...../...../...../....X,"A single cell (X) is located at the bottom-right corner of a 5x5 grid, with all other cells empty. This pattern resembles isolation.","..... +..... +..... +..... +X....",unknown,92,bounded,ollama,qwen2.5:7b +28,11,39,...../...../...../...../....X,"A single cell (X) is located at the bottom right corner of a 5x5 grid, with all other cells empty. This resembles the initial state of simple growth or isolation patterns seen in cellular automata like Conway's Game of Life.","..... +..... +..... +..... +X....",unknown,92,bounded,ollama,qwen2.5:7b +29,10,40,...../...../...../...../....X,"A single cell (X) is located at the bottom-right corner of a 5x5 grid, with all other cells empty. This resembles a simple pattern often seen in initial states of cellular automata like Conway's Game of Life.","..... +..... +..... +..... +X....",unknown,88,bounded,ollama,qwen2.5:7b +30,11,39,...../...../...../....X/...X.,"A single cell is located at the bottom-right corner of the grid, with one neighbor to its left. This resembles isolated cells often seen in simple cellular automata like Conway's Game of Life.","..... +..... +..... +..X.. +X...X",unknown,84,bounded,ollama,qwen2.5:7b +31,12,38,...../...../...../...../...X.,"A single cell (X) is located at the bottom edge of the grid, with four empty rows above it. This pattern resembles a simple vertical alignment often seen in initial states of cellular automata like Conway's Game of Life.","..... +..... +..... +..X.. +....",unknown,0,bounded,ollama,qwen2.5:7b +32,13,37,...../...../...../...../.....,"The window shows a uniform, empty grid with no cells present. This pattern is similar to initial states often used in cellular automata to study system evolution from a neutral state.","..... +..... +..... +..... +.....",empty,100,bounded,ollama,qwen2.5:7b +33,14,36,...../...../...../...../.....,I observe a uniform grid with no cells present. This pattern is similar to an empty state or initial condition often seen in cellular automata simulations.,"..... +..... +..... +..... +.....",empty,100,bounded,ollama,qwen2.5:7b +34,15,35,...../...../...../...../.....,"The window shows a uniform, empty grid with no cells present. This is a baseline or starting state often seen in cellular automata simulations.","..... +..... +..... +..... +.....",empty,100,bounded,ollama,qwen2.5:7b +35,16,34,...../...../...../...../.....,"The window shows a uniform grid with no cells present, resembling empty space.","..... +..... +..... +..... +.....",empty,100,bounded,ollama,qwen2.5:7b +36,17,33,...../...../...../...../.....,"The window shows a uniform grid with no cells present, resembling empty space.","..... +..... +..... +..... +.....",empty,100,bounded,ollama,qwen2.5:7b +37,18,32,...../...../...../...../.....,"The window shows a uniform, empty grid with no cells present. This pattern is similar to initial states often seen in cellular automata simulations at the start or after reset.","..... +..... +..... +..... +.....",empty,100,bounded,ollama,qwen2.5:7b +38,19,31,...../...../...../...../.....,"The window shows a uniform grid with no cells present, resembling empty space.","..... +..... +..... +..... +.....",empty,100,bounded,ollama,qwen2.5:7b +39,20,30,...../...../...../...../.....,"The window shows a uniform, empty grid with no cells present. This pattern is similar to initial states in cellular automata like Conway's Game of Life before any evolution occurs.","..... +..... +..... +..... +.....",empty,100,bounded,ollama,qwen2.5:7b +40,21,29,...../...../...../...../.....,"The window shows a uniform, empty grid with no cells present. This is a baseline or starting state often seen in cellular automata simulations.","..... +..... +..... +..... +.....",empty,100,bounded,ollama,qwen2.5:7b +41,22,28,...../...../...../...../.....,"The window shows a uniform, empty grid with no cells present. This pattern is similar to initial states often seen in cellular automata simulations at the start or after reset.","..... +..... +..... +..... +.....",empty,100,bounded,ollama,qwen2.5:7b +42,23,27,..XX./...../...../...../....X,"You observe a pattern resembling a ""V"" shape, with two diagonal lines of cells meeting at the bottom right corner. This is similar to patterns seen in simple cellular automata like Conway's Game of Life.","....X +...X. +..X.. +.X... +.....",chaotic,72,bounded,ollama,qwen2.5:7b +43,24,26,X..X./X.X../...../...../....X,"I observe a pattern resembling a simple ""V"" shape, with two diagonal lines intersecting at the bottom right corner and extending upwards to meet at a point. This is similar to patterns seen in cellular automata like Conway's Game of Life.","X.... +.X... +..X.. +...X. +....X",chaotic,84,bounded,ollama,qwen2.5:7b +44,25,25,X..../.XX../X..../...../.....,"The pattern resembles a simple horizontal line of cells with some empty space above and below, similar to a row in a Conway's Game of Life configuration.","..... +.XX.. +..... +..... +.....",chaotic,80,bounded,ollama,qwen2.5:7b +45,24,25,XXX../X.X../XXX../...../.....,"This pattern resembles a sideways ""N"" or mirrored ""V"". It's similar to patterns seen in cellular automata like Conway's Game of Life, where simple rules can generate complex shapes.","XXXX. +X...X +X.... +..... +.....",oscillator,72,bounded,ollama,qwen2.5:7b +46,23,25,.X.X./X...X/.X.X./..X../.....,"The pattern resembles a series of crosses or plus signs, with some empty spaces, reminiscent of a simple cellular automaton configuration like in Conway's Game of Life.",".X.X. +.X.X. +..X.. +.X.X. +.....",chaotic,68,bounded,ollama,qwen2.5:7b +47,22,25,..XXX/.XX.X/..XXX/...X./.....,"I observe a pattern resembling a simplified version of the letter 'A'. This is similar to patterns seen in Conway's Game of Life, where simple geometric shapes can emerge from basic configurations.","..XXX +.XX.X +..XXX +...X. +.....",oscillator,52,bounded,ollama,qwen2.5:7b +48,21,25,..X../..X../..X../...XX/.....,"I see a pattern resembling ""fingers"" or ""tentacles,"" similar to structures observed in biological systems like hyphae in fungi.","..X.. +..X.. +.X... +...XX +....X",oscillator,76,bounded,ollama,qwen2.5:7b +49,20,25,...X./..XXX/...X./....X/.....,"I observe a pattern resembling a simplified tree or a Y-branch, with one trunk and three branches. This resembles the branching seen in natural trees or certain cellular automata configurations.","..... +X.X.. +.X... +..... +.....",oscillator,80,bounded,ollama,qwen2.5:7b +50,19,25,...X./...X./...X./X..../X....,"I observe a pattern resembling a stepped pyramid or a series of overlapping triangles, similar to the ""glider"" in Conway's Game of Life.","...X. +...X. +X.... +X.... +X....",oscillator,84,bounded,ollama,qwen2.5:7b +51,18,25,...../...XX/...../XX.../XX...,"I observe a symmetrical pattern with two diagonal lines of cells intersecting at the center, resembling a cross or an X.","..... +...XX +..... +XX... +XX...",stable,88,bounded,ollama,qwen2.5:7b +52,17,25,...../...../...../.XX../.XX..,"I observe a symmetrical pattern with two ""X"" cells forming a vertical line, surrounded by empty spaces. This resembles a simplified version of certain biological structures or could be reminiscent of basic cellular automata patterns like those found in Conway's Game of Life.","..... +..... +.XX.. +.XX.. +.....",stable,80,bounded,ollama,qwen2.5:7b +53,16,25,...../...../...../..XX./..XX.,"I observe a symmetrical pattern with two ""X"" cells vertically aligned in the bottom half of the 5x5 grid, resembling a pair of touching dots or small pillars.","..... +..... +..... +..XX. +..XX.",stable,100,bounded,ollama,qwen2.5:7b +54,15,25,...../...../...../...XX/...XX,"I observe a symmetrical pattern with two ""X"" cells aligned horizontally in the bottom row, surrounded by empty spaces. This resembles a simple bar or line segment.","..... +..... +..... +.XXX. +.XXX.",stable,76,bounded,ollama,qwen2.5:7b +55,15,25,...../...../...../...XX/...XX,"I observe a pattern resembling two adjacent cells in the fourth and fifth rows, similar to how organisms might cluster together for protection or resource sharing.","..... +..... +..... +XX... +XX...",stable,68,bounded,ollama,qwen2.5:7b diff --git a/demos/epiplexity-01-emergent-objects/templates/describe.yaml b/demos/epiplexity-01-emergent-objects/templates/describe.yaml new file mode 100644 index 0000000..2003b03 --- /dev/null +++ b/demos/epiplexity-01-emergent-objects/templates/describe.yaml @@ -0,0 +1,10 @@ +system: | + You are a scientific observer of a 2D cellular world. + Describe what you see concisely. Name patterns you recognize. + If you've seen similar patterns before, say so. + One paragraph, under 50 words. +template: | + === CURRENT WINDOW ({window_size}x{window_size}) === + {window_grid} + + Describe what you observe. What patterns do you see? diff --git a/demos/epiplexity-01-emergent-objects/templates/predict_grid.yaml b/demos/epiplexity-01-emergent-objects/templates/predict_grid.yaml new file mode 100644 index 0000000..a8c4aa6 --- /dev/null +++ b/demos/epiplexity-01-emergent-objects/templates/predict_grid.yaml @@ -0,0 +1,13 @@ +system: | + You are predicting the next state of a cellular world window. + Return ONLY the grid rows. Use X for alive cells and . for dead cells. + No other text, no explanation, no markdown. +template: | + === CURRENT WINDOW ({window_size}x{window_size}) === + {window_grid} + + === YOUR DESCRIPTION === + {description} + + Predict the exact {window_size}x{window_size} grid for the NEXT tick. + Return ONLY {window_size} rows of {window_size} characters (X or .), nothing else. diff --git a/demos/epiplexity-01-emergent-objects/templates/reflect.yaml b/demos/epiplexity-01-emergent-objects/templates/reflect.yaml new file mode 100644 index 0000000..7398d85 --- /dev/null +++ b/demos/epiplexity-01-emergent-objects/templates/reflect.yaml @@ -0,0 +1,13 @@ +system: | + You are a scientist building a theory of how a 2D cellular world works. + Based on all your observations so far, update your theory. + Be specific: name the types of patterns you've discovered and their behaviors. + Under 100 words. +template: | + === RECENT OBSERVATIONS === + {observation_history} + + === YOUR PREVIOUS THEORY === + {previous_theory} + + Update your theory. What rules govern this world? What types of patterns exist?