
# OpenWorm Minecraft: C. elegans Virtual Brain
Meet the first worm in Minecraft that is *wired like the real thing*.
The C. elegans worm is driven by a simulated nervous system based on OpenWorm data, not a scripted AI. Touch and smell enter through real sensory neurons, travel through the network, reach the motor neurons and muscles, and bend the worm's body. What you see is the result of the simulation.
## Features
- **A real connectome:** 302 neurons, thousands of chemical synapses and gap junctions, and 95 body-wall muscles from Cook et al. (2019), the dataset used by OpenWorm's c302 framework.
- **Conductance-based neurons:** c302 Level C style cells (Hodgkin-Huxley-type ion channels with a calcium pool) and graded synapses as in Level C1. Nothing here is random.
- **Brain to muscles to body:** a 12-segment articulated body that bends from muscle activity.
- **Senses:** head, tail and body touch, plus smell. The worm detects Bacterial Colony blocks by a concentration gradient that falls off with distance.
- **Brain viewer (press K):** live membrane potential of all 302 neurons, active neuron count, simulation time and update rate, dorsal and ventral muscle activity per body segment, and sensory input. Hover a neuron to see its name and voltage.
- **Performance:** one shared simulation thread (not one per neuron or per worm), a configurable cap on active brains, and an authoritative server. Clients only receive the data needed for rendering and the viewer.
- **Multiplayer ready.**
## Content
- **C. elegans** (mob) and its **Spawn Egg** (Spawn Eggs creative tab)
- **Bacterial Colony** (block, a food source)
## Commands (permission level 2)
| Command | What it does |
|---|---|
| `/openworm spawn [n]` | Spawn one or n worms |
| `/openworm stats` | Simulation statistics |
| `/openworm brain` | Info about the nearest worm's brain |
| `/openworm debug` | Toggle diagnostics |
| `/openworm feed` | Experimental food stimulus |
| `/openworm pause` / `resume` | Pause or resume the simulation |
## Requirements
Minecraft 1.20.1, Fabric Loader 0.14.21+, Fabric API, Java 17.
## What is real and what is an approximation
**From OpenWorm data:** the connectome (neuron identities, directed connections, weights), the cell and channel parameters from c302, and the graded-synapse and gap-junction models.
**Our approximations for Minecraft:**
- Our own numerical integrator, not jNeuroML.
- Muscle calcium is turned into contraction by a simple function, and the 95 muscles are grouped into 12 segments.
- The body uses a simplified resistive-force physics model, not Sibernetic.
- Which neurons receive which Minecraft stimulus is a documented approximation.
- Inhibition is limited to GABAergic neurons, from a literature list.
- Collision and odor sensing, and the speed conversion to blocks per tick, are auxiliary code, not emergent behavior.
- The simulation runs slower than real time.
**Honest limitation:** the untuned c302 network produces strong bending and turning but weak forward propulsion. Forward and reverse crawling are not reliably emergent. This is a science-flavored sandbox, not a perfect worm.
## Credits
OpenWorm (c302, CElegansNeuroML, muscle_model, ConnectomeToolbox), Cook et al. 2019 (Nature), Boyle and Cohen 2008, and NeuroML2. Inspired by the idea of the FruitFly Brain mod, with no code or assets copied.
*This is an unofficial community project and is not affiliated with or endorsed by OpenWorm.*
## Source and licenses
Source code and full attribution are in the project repository.