restore forming-animation hero; flatten claim wording
Browse files
CARD.md
CHANGED
|
@@ -13,17 +13,15 @@ tags:
|
|
| 13 |
|
| 14 |
# physarum
|
| 15 |
|
| 16 |
-
*Physarum polycephalum* (slime mould) on the CPU, two ways. The **
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
|
| 22 |
-
![
|
| 23 |
|
| 24 |
-
*
|
| 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
|
| 53 |
-
|
| 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 |
|
| 77 |
-
| survive any single edge cut | a tree cannot
|
| 78 |
|
| 79 |

|
| 80 |
|
| 81 |
-
The flow model
|
| 82 |
-
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
|
| 86 |
-
|
| 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 |
+

|
| 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 |

|
| 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 **
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
|
| 22 |
-
![
|
| 23 |
|
| 24 |
-
*
|
| 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
|
| 53 |
-
|
| 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 |
|
| 77 |
-
| survive any single edge cut | a tree cannot
|
| 78 |
|
| 79 |

|
| 80 |
|
| 81 |
-
The flow model
|
| 82 |
-
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
|
| 86 |
-
|
| 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 |
+

|
| 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 |

|
| 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 |
|