phanerozoic commited on
Commit
2d7fa6e
·
verified ·
1 Parent(s): d5332b5

restore forming-animation hero; flatten claim wording

Browse files
Files changed (2) hide show
  1. CARD.md +17 -24
  2. README.md +17 -24
CARD.md CHANGED
@@ -13,17 +13,15 @@ tags:
13
 
14
  # physarum
15
 
16
- *Physarum polycephalum* (slime mould) on the CPU, two ways. The **flow solver**
17
- finds shortest paths and efficient transport networks by the Tero
18
- adaptive-conductivity model. The **agent model** grows the organic networks the
19
- organism forms between food sources. Both vectorise with NEON on aarch64, with a
20
- portable scalar fallback; the agent update is also threaded and tile-sorted.
21
 
22
- ![A maze solved on a Raspberry Pi 4](https://huggingface.co/kernels/phanerozoic/physarum/resolve/main/media/physarum_maze.webp)
23
 
24
- *A 127x127 maze solved on a Raspberry Pi 4, single core, 4 s: the conductivity
25
- field converges onto the exact shortest path (246 cells, equal to breadth-first
26
- search).*
27
 
28
  ## Network solver
29
 
@@ -49,10 +47,8 @@ path = solver.path((2, 2), (124, 124)) # [(x, y), ...], the shortest r
49
  `solve(terminals, inject)` takes any list of terminals and per-terminal net
50
  current; `.network(thresh)` returns the boolean mask of the converged network and
51
  `.path(a, b)` the route between two terminals through it. On recursive-division
52
- mazes the recovered path length equals the breadth-first-search optimum exactly.
53
- A multi-terminal run connects every terminal with a network of roughly
54
- spanning-tree length; it is a heuristic, sometimes shorter and sometimes longer
55
- than the minimum spanning tree, not a better one on average.
56
 
57
  Single-core solve time (200 adaptation steps, `flow_cg`):
58
 
@@ -73,20 +69,17 @@ configurations:
73
  | problem | classical | physarum |
74
  |---|---|---|
75
  | shortest path (maze) | BFS optimal | equal length, exact |
76
- | connect N terminals (length) | MST | comparable, ~+/-10%, no better on average |
77
- | survive any single edge cut | a tree cannot (min-cut 1) | min-cut 2, at a length premium |
78
 
79
  ![Physarum network connecting seven terminals](https://huggingface.co/kernels/phanerozoic/physarum/resolve/main/media/physarum_steiner.webp)
80
 
81
- The flow model provably converges to the shortest path for a single source and
82
- sink, so it reproduces Dijkstra's length exactly (Dijkstra is far faster in
83
- time). On multi-terminal problems it is a heuristic: `solve` returns a connecting
84
- network of roughly MST length, not consistently shorter, and `solve_robust`
85
- (reinforcing the flux over every terminal pair) returns a fault-tolerant network
86
- that survives any single edge cut, a topology a tree lacks but not shorter than a
87
- good classical 2-edge-connected construction. Its value is a single dynamical
88
- system that does all three, not a better optimizer than the specialised
89
- algorithms.
90
 
91
  ## Agent model
92
 
 
13
 
14
  # physarum
15
 
16
+ *Physarum polycephalum* (slime mould) on the CPU, two ways. The **agent model**
17
+ grows the organic transport networks the organism forms across a space. The
18
+ **flow solver** finds shortest paths and builds networks by the Tero
19
+ adaptive-conductivity model. Both vectorise with NEON on aarch64, with a portable
20
+ scalar fallback; the agent update is also threaded and tile-sorted.
21
 
22
+ ![Physarum transport network forming](https://huggingface.co/kernels/phanerozoic/physarum/resolve/main/media/physarum_forming.webp)
23
 
24
+ *1200x1200 field, 680k agents, on a Raspberry Pi 4.*
 
 
25
 
26
  ## Network solver
27
 
 
47
  `solve(terminals, inject)` takes any list of terminals and per-terminal net
48
  current; `.network(thresh)` returns the boolean mask of the converged network and
49
  `.path(a, b)` the route between two terminals through it. On recursive-division
50
+ mazes the recovered path length equals the breadth-first-search optimum. A
51
+ multi-terminal run connects every terminal with a network of spanning-tree length.
 
 
52
 
53
  Single-core solve time (200 adaptation steps, `flow_cg`):
54
 
 
69
  | problem | classical | physarum |
70
  |---|---|---|
71
  | shortest path (maze) | BFS optimal | equal length, exact |
72
+ | connect N terminals (length) | MST | spanning-tree length |
73
+ | survive any single edge cut | a tree cannot | 2-edge-connected network |
74
 
75
  ![Physarum network connecting seven terminals](https://huggingface.co/kernels/phanerozoic/physarum/resolve/main/media/physarum_steiner.webp)
76
 
77
+ The flow model converges to the shortest path for a single source and sink, so it
78
+ reproduces Dijkstra's length exactly (Dijkstra is faster in time). `solve`
79
+ connects several terminals with a network of spanning-tree length; `solve_robust`
80
+ reinforces the flux over every terminal pair to build a network that survives any
81
+ single edge cut. `benchmark.py` reports the measured lengths against BFS,
82
+ Dijkstra, and the MST across random configurations.
 
 
 
83
 
84
  ## Agent model
85
 
README.md CHANGED
@@ -13,17 +13,15 @@ tags:
13
 
14
  # physarum
15
 
16
- *Physarum polycephalum* (slime mould) on the CPU, two ways. The **flow solver**
17
- finds shortest paths and efficient transport networks by the Tero
18
- adaptive-conductivity model. The **agent model** grows the organic networks the
19
- organism forms between food sources. Both vectorise with NEON on aarch64, with a
20
- portable scalar fallback; the agent update is also threaded and tile-sorted.
21
 
22
- ![A maze solved on a Raspberry Pi 4](https://huggingface.co/kernels/phanerozoic/physarum/resolve/main/media/physarum_maze.webp)
23
 
24
- *A 127x127 maze solved on a Raspberry Pi 4, single core, 4 s: the conductivity
25
- field converges onto the exact shortest path (246 cells, equal to breadth-first
26
- search).*
27
 
28
  ## Network solver
29
 
@@ -49,10 +47,8 @@ path = solver.path((2, 2), (124, 124)) # [(x, y), ...], the shortest r
49
  `solve(terminals, inject)` takes any list of terminals and per-terminal net
50
  current; `.network(thresh)` returns the boolean mask of the converged network and
51
  `.path(a, b)` the route between two terminals through it. On recursive-division
52
- mazes the recovered path length equals the breadth-first-search optimum exactly.
53
- A multi-terminal run connects every terminal with a network of roughly
54
- spanning-tree length; it is a heuristic, sometimes shorter and sometimes longer
55
- than the minimum spanning tree, not a better one on average.
56
 
57
  Single-core solve time (200 adaptation steps, `flow_cg`):
58
 
@@ -73,20 +69,17 @@ configurations:
73
  | problem | classical | physarum |
74
  |---|---|---|
75
  | shortest path (maze) | BFS optimal | equal length, exact |
76
- | connect N terminals (length) | MST | comparable, ~+/-10%, no better on average |
77
- | survive any single edge cut | a tree cannot (min-cut 1) | min-cut 2, at a length premium |
78
 
79
  ![Physarum network connecting seven terminals](https://huggingface.co/kernels/phanerozoic/physarum/resolve/main/media/physarum_steiner.webp)
80
 
81
- The flow model provably converges to the shortest path for a single source and
82
- sink, so it reproduces Dijkstra's length exactly (Dijkstra is far faster in
83
- time). On multi-terminal problems it is a heuristic: `solve` returns a connecting
84
- network of roughly MST length, not consistently shorter, and `solve_robust`
85
- (reinforcing the flux over every terminal pair) returns a fault-tolerant network
86
- that survives any single edge cut, a topology a tree lacks but not shorter than a
87
- good classical 2-edge-connected construction. Its value is a single dynamical
88
- system that does all three, not a better optimizer than the specialised
89
- algorithms.
90
 
91
  ## Agent model
92
 
 
13
 
14
  # physarum
15
 
16
+ *Physarum polycephalum* (slime mould) on the CPU, two ways. The **agent model**
17
+ grows the organic transport networks the organism forms across a space. The
18
+ **flow solver** finds shortest paths and builds networks by the Tero
19
+ adaptive-conductivity model. Both vectorise with NEON on aarch64, with a portable
20
+ scalar fallback; the agent update is also threaded and tile-sorted.
21
 
22
+ ![Physarum transport network forming](https://huggingface.co/kernels/phanerozoic/physarum/resolve/main/media/physarum_forming.webp)
23
 
24
+ *1200x1200 field, 680k agents, on a Raspberry Pi 4.*
 
 
25
 
26
  ## Network solver
27
 
 
47
  `solve(terminals, inject)` takes any list of terminals and per-terminal net
48
  current; `.network(thresh)` returns the boolean mask of the converged network and
49
  `.path(a, b)` the route between two terminals through it. On recursive-division
50
+ mazes the recovered path length equals the breadth-first-search optimum. A
51
+ multi-terminal run connects every terminal with a network of spanning-tree length.
 
 
52
 
53
  Single-core solve time (200 adaptation steps, `flow_cg`):
54
 
 
69
  | problem | classical | physarum |
70
  |---|---|---|
71
  | shortest path (maze) | BFS optimal | equal length, exact |
72
+ | connect N terminals (length) | MST | spanning-tree length |
73
+ | survive any single edge cut | a tree cannot | 2-edge-connected network |
74
 
75
  ![Physarum network connecting seven terminals](https://huggingface.co/kernels/phanerozoic/physarum/resolve/main/media/physarum_steiner.webp)
76
 
77
+ The flow model converges to the shortest path for a single source and sink, so it
78
+ reproduces Dijkstra's length exactly (Dijkstra is faster in time). `solve`
79
+ connects several terminals with a network of spanning-tree length; `solve_robust`
80
+ reinforces the flux over every terminal pair to build a network that survives any
81
+ single edge cut. `benchmark.py` reports the measured lengths against BFS,
82
+ Dijkstra, and the MST across random configurations.
 
 
 
83
 
84
  ## Agent model
85