Artificial Worm Brain AI's icon

Artificial Worm Brain AI v2.0.1 Tools 4.2 Community

Submitted by user leparlon; MIT; 2026-04-13

Description

WormBrain is a Godot plugin that adds a worm to your 2D scene, one whose movement is driven by a simulation of the C.
elegans neural connectome. C. elegans is a tiny nematode whose complete neural wiring has been mapped and published:
302 neurons, roughly 4,000 synaptic connections. WormBrain uses that wiring to decide how the worm moves: where it
steers, when it speeds up, when it reverses.

The result is something that navigates, forages, and reacts, not because it was scripted to, but because the network
says so. It is closer to a playground than a simulation.

Based on https://github.com/heyseth/worm-sim by Seth Miller.

---
Quick Start

1. Copy addons/worm_brain_plugin into your project's addons folder.
2. Enable the plugin under Project → Project Settings → Plugins.
3. Add a WormNode to any 2D scene and run the project.

Explore the Inspector to customize the worm's body shape, sensors, speed, and hunger behavior. The node also emits
signals you can listen to: food detection, nose touch, hunger state so your own code can react to what the worm
experiences.

---
Notes / Limitations

- Collision is advisory. When the worm touches an Area2D, it receives a neural signal, but there is no hard physics
boundary. If the neural output says keep going, it will. To contain the worm inside your level, set limiting_area in
the Inspector (default: Rect2(50, 50, 1000, 1000)).
- Eating. The worm eats any Area2D belonging to the worm_food group when it overlaps it. Removing the eaten food from
the scene is handled by your code.
- Not scientifically accurate. The connectome data is real, but the mapping from neural activity to on-screen movement
involves significant simplification. This is an interactive experiment, not a research tool.


View files Download Submit an issue Recent Edits