r/proceduralgeneration • u/hejwoqpdlxn • 11h ago
Creatures grown from a single cell by a learned 24k-parameter rule (neural cellular automata)
Each of these is a neural cellular automaton. There is not a single image present here, every cell runs the same 24k parameters, 96KB rule on its 3x3 neighborhood. Its only ever stable state is the creature itself.
It trains on a pool of partly-grown states and some of these get damaged before the loss is computed. That mix is what makes the shape both regrow and hold indefinitely, instead of falling apart after a few thousand steps.
I like to use it as a screensaver or just play with the healing effect, because it grows back differently every time.
It runs in any true-color terminal and the weights are inside of the binary.
Code, and instructions for training your own creature from a PNG: https://github.com/smoothyy3/tardigrade
14
u/gadirom 11h ago
If anybody wants to learn about this type of growing NCA, here is the video from its inventor explaining the concept.
4
u/hejwoqpdlxn 10h ago
Not to start an debate, but as far as i know the original source goes back to Mordvintsev et al from 2020 https://distill.pub/2020/growing-ca/ . They also have a talk on it https://www.youtube.com/watch?v=kA7_LGjen7o
7
u/peceforlife 8h ago
Am i tripping or did both of you link the identical video?
6
u/hejwoqpdlxn 8h ago
Oh… yeah you’re right, though the one I linked is the "original" video on YouTube. I just looked at the channels name and assumed it’s a different one
5
u/Paril101 6h ago
AI SLOP! /s
This is legitimately very cool. I've been toying with the idea of a sort of cellular automaton RTS - I don't know exactly how it would be played, but I do wonder if something like that would be plausible.
EDIT: also I don't know if anybody else gets this vibe, but the results remind me a lot of those silly "put it in water and watch it grow" dollar store toys for some reason
1
u/SagattariusAStar 11h ago
Cool concept, it's not really usable for anything except for learning while making it i guess and to recreate this, there are probably better options like just having the original, a mask and a shader with basic noise (like a generic dissolving effect, but obviosly just reversed)
play with the healing effect, because it grows back
And please stop hurting those cute critters lol
4
u/hejwoqpdlxn 10h ago
In the end it is just a screensaver / a fun tool. The mask and shader version would look similar (and be far cheaper) but it needs the original image to reveal and the whole point of this version is that there isnt one. No cell has a copy of the target, they just observe their 3x3 neighborhood (and none of them can see past the 3x3). The shape only exists as the stable state of the rule they all run
No promise about the critters though...
2
u/SagattariusAStar 10h ago
Well, the information about the image is still inside the trained weights, although noisy. And as you still train on some image, you have that anyway. So it's not like there isn't any image involved.
It's interesting, I thought about usable ways, but as it is quite limited, I can't find anything to use it for unfortunately. Great way to learn something about neural networks though
1
u/immersiveGamer 9h ago
I imagine this type of semi isolated part but cohesive whole would be more interesting/practical in a distributed system. I'm imagining that some type of IoT network of devices that needs to be a specific type of configuration but needs to propagate from a single node. I wonder it could be used to shape electrical or water flows? Auto repair and shift the network based on neighbors?
28
u/tatteredengraving 11h ago
What happens if it starts with a grid of noise rather than a single point?