Inspiration
Everything we build, we assemble. A chip is placed part by part. A bridge is bolted beam by beam. A building is stacked brick by brick. We've optimized this paradigm for centuries and yet, every artifact it produces shares the same fatal flaw: it cannot heal.
A salamander regrows a lost limb. A forest reseeds after a fire. A cut on your skin closes overnight. None of these systems has a central controller or a master blueprint. They grow from a single cell, following local rules and because the "instructions" live identically in every cell, any surviving fragment knows how to rebuild the whole.
That contrast assembly vs. morphogenesis is the question MORPHOS is built around. What if we stopped designing blueprints and started designing rules whose attractor is the structure we want?
What it does
MORPHOS is a self-repairing matter simulator built on Neural Cellular Automata (NCA).
- Grows a target structure (a heart, any RGBA PNG) from a single seed cell no blueprint, no global controller.
- Heals autonomously when damaged. Cut a chunk out. Watch it regrow the missing geometry from surviving cells alone.
- Holds homeostasis under continuous attack a "living material" that maintains its form while being repeatedly damaged.
- Interactive mode click the grid to damage it live; it repairs in real time.
The key insight: if a local update rule is trained such that the target shape is its attractor, then damage is just a perturbation, and healing is the system flowing back toward equilibrium for free, with no healing logic ever written.
How we built it
MORPHOS implements a Neural Cellular Automaton in pure PyTorch:
Architecture
- 64×64 grid. Each cell carries 16 channels: 4 visible (RGBA) + 12 hidden "chemical" signalling channels.
- Perception: fixed Sobel-x, Sobel-y, and identity filters applied depthwise → 48-dimensional perception vector per cell. No cell sees the whole grid.
- Update rule: a shared 2-layer 1×1 MLP (48→128→16), zero-initialized, mapping perception to a state delta. The organism begins as a "do-nothing" rule and learns to act.
- Stochastic async updates: ~50% of cells update per step, making the rule more robust and biologically plausible.
- Alive masking: a cell is alive only if it or a neighbor has alpha > 0.1.
Training the regeneration curriculum We maintain a pool of 1024 past organism states. Each batch: sample 8 states, reset the worst to a fresh seed (so growth from scratch is always learned), then after step 500 damage half the batch by zeroing random disks (radii 8–18). Run 64–96 steps forward. Compute MSE loss on all 4 RGBA channels against the target. Because damaged states re-enter the loss, the only way to lower error is to learn rules that rebuild missing structure from surviving cells. We checkpoint on best grow-from-seed validation loss, not noisy training loss. Adam lr=2e-3, ×0.3 decay at step 2000, per-parameter gradient normalization.
Training: ~4000 steps, ~7 minutes on a laptop GPU (RTX 3050).
Challenges we ran into
The demo that didn't heal. The first grow→damage→heal video ended half-grown the damage cut was radius 20, centered on the heart, and the model had only trained on radii 8–18. The organism had never seen a bite that large. Fix: keep all demo damage off-center and ≤16 radius. The constraint is a lesson: distribution matters even in inference.
Homeostasis that hollowed itself out. Early continuous-attack mode used bites every 12 steps at radius 6–11 — just fast enough to outpace healing. The heart dissolved into a blob. Calibrating the attack rate (every 22 steps, radius 4–8) to stay just below the healing capacity was trial and error, guided by watching the validation loss on short rollouts.
Dual training runs, one winner. We ran training twice locally on an RTX 3050 and in parallel on Colab. We compared both outputs quantitatively (validation MSE on a clean grow rollout) and visually. The Colab weights produced a more pronounced heart cleft and lower val loss (0.00432 vs 0.00454). We promoted the Colab weights as canonical and re-rendered all demo assets from them.
The loss function that mattered. The original NCA literature composes cells onto a white background before computing RGB loss. We switched to direct RGBA MSE matching the full 4-channel output including alpha. This gave cleaner alpha boundaries and more stable training.
Accomplishments that we're proud of
- A clean, reproducible grow→damage→heal demonstration in a single self-contained Python file no dataset, no config, one command to train and one to demo.
- A homeostasis mode where the organism visibly "wobbles under fire" but maintains its form the closest thing to a "living material" we could build in a weekend.
- A narrated demo designed around one specific beat: after "I damage it," we go silent and let the screen heal. That silence is the whole thesis landing.
- Honest prior art acknowledgment in both the paper and the prototype we name Mordvintsev et al. 2020 and Turing 1952 explicitly. Our contribution is the fabrication thesis, the cross-domain framing, and the tool.
What we learned
- Attractors, not blueprints. The deeper we got into NCA, the clearer it became that the entire act of "design" changes when you're designing a rule rather than a structure. That realization is the paper's thesis.
- The regeneration curriculum is the whole trick. Without damaged states re-entering the loss, the model learns to grow but not to heal. One curriculum change turns a fragile grower into a resilient regenerator.
- Validation checkpointing beats training loss. The damage curriculum injects noise into the training signal. Checkpointing on a clean grow-from-seed validation rollout (no damage, no pool sampling) captures what you actually care about.
- Distribution is destiny. The model heals exactly what it was trained to heal. Push outside the training distribution (too-large cuts, central damage) and healing fails. This is a fundamental constraint of the paradigm and a useful one to communicate honestly.
What's next for MORPHOS
- 3D NCAs the same local-rule principle extends to voxel grids. Self-healing volumetric structures.
- Multi-target / reconfigurable organisms train one rule with multiple attractors; a signal switches the target form. Programmable matter.
- Physical embodiment map the local rule onto modular robotic units that sense neighbors and actuate. The first rung toward matter that actually heals.
- The design tool generalize MORPHOS so an engineer specifies a form and the system learns the rule whose attractor is that form. Designing rules, not blueprints.
- Active materials research collaborate with soft-matter and polymer groups to encode local rules into responsive substrates: self-healing at the material level, not the simulation level.
Log in or sign up for Devpost to join the conversation.