Skip to content

Add Physarum slime mold at /slime#169

Merged
ianalloway merged 2 commits into
mainfrom
claude/slime-mold-729tge
Jul 22, 2026
Merged

Add Physarum slime mold at /slime#169
ianalloway merged 2 commits into
mainfrom
claude/slime-mold-729tge

Conversation

@ianalloway

Copy link
Copy Markdown
Owner

Summary

  • Adds /slime — the classic Physarum (Jones model) simulation: thousands of agents deposit and chase pheromone, self-organizing into living vein networks
  • src/features/slime/physarum.ts: flat typed-array world (positions, headings, pheromone field), three-sensor steering, deposit, evaporation with a cheap horizontal blur; agents spawn in a centered outward-facing disk
  • src/pages/Slime.tsx: half-resolution sim rendered through ImageData and upscaled, agent-count presets (4k/10k/20k), sensor-angle and persistence sliders applied live, pause/reseed
  • src/App.tsx: lazy-loaded /slime route with SEO metadata

How it works

  • Each agent samples the trail field at three sensors (ahead, left, right), turns toward the strongest reading, moves, and deposits pheromone; the field evaporates and blurs each frame
  • These four local rules — no communication, no coordination — produce ring blooms, tendrils, and eventually a shifting vein network, the same behavior real Physarum uses to build efficient transport networks
  • Sensor angle reshapes morphology (narrow → fine filaments, wide → thick blobby veins); persistence controls how long trails survive (high → dense stable webs, low → sparse fleeting wisps)
  • Typed arrays and a half-resolution field keep 20k agents at 60fps

Test plan

  • Load /slime — 10k agents bloom outward from the center, then collapse into vein networks within ~10 seconds
  • Veins continuously merge and reroute — the network is alive, never static
  • Sensor angle low — fine filaments; high — thick blobs
  • Persistence high — dense web; low — wispy trails
  • 20k agents stays smooth; 4k is sparser
  • Pause freezes; reseed re-blooms from the center
  • Resize rebuilds the world at the new size

Generated by Claude Code

Classic Jones-model Physarum: each agent samples the pheromone field at
three sensors (front/left/right), turns toward the strongest reading,
moves, and deposits; the field evaporates with a cheap horizontal blur
each frame. Flat Float32Array world at half display resolution keeps
20k agents at 60fps. Agents spawn in a centered disk pointing outward
so the sim blooms into a ring before collapsing into vein networks.
Sensor-angle and persistence sliders reshape the morphology live;
agent-count presets 4k/10k/20k rebuild the world; reseed restarts.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WgEKRuVdor8KhaiPkv38aQ
@netlify

netlify Bot commented Jul 19, 2026

Copy link
Copy Markdown

Deploy Preview for ianalloway ready!

Name Link
🔨 Latest commit 6177815
🔍 Latest deploy log https://app.netlify.com/projects/ianalloway/deploys/6a614b9db0e0d400080b14e0
😎 Deploy Preview https://deploy-preview-169--ianalloway.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@vercel

vercel Bot commented Jul 19, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
ian-web-forge Ready Ready Preview, Comment Jul 22, 2026 11:00pm

@ianalloway
ianalloway marked this pull request as ready for review July 20, 2026 15:09
Copilot AI review requested due to automatic review settings July 20, 2026 15:09
@cursor

cursor Bot commented Jul 20, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@ianalloway
ianalloway merged commit 582a356 into main Jul 22, 2026
4 of 5 checks passed
@ianalloway
ianalloway deleted the claude/slime-mold-729tge branch July 22, 2026 23:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants