Inspiration

There has been some interest in neural cellular automata in recent years from the field of machine learning, particularly to run computations and solve reasoning tasks. I've been interested in cellular automata for a while, and I wanted to make a tool that integrates this paradigm seamlessly with PyTorch to help people run experiments more easily.

What it does

It's a Python package. As a user, you define a Dish object with methods that read and write from the mutable state. Then you have to define an update function which uses the current mutable and immutable states to produce the next mutable state. There is also a collection of tools commonly used in the field such as fixed attention and Sobel filtering, as well as plug-and-play visualization functions for debugging and viewing pleasure.

How we built it

Python, PyTorch, with a little help from Claude (Sonnet 5.5) and Copilot (GPT-6 Luna).

Challenges we ran into

Package design is not straightforward at all. I wanted the package to provide enough structure while also giving users freedom to explore, which is a hard balance to strike. Training NCAs was also much harder than I thought (despite the added convenience from TorchDish), as these things don't train like normal models and can be really unpredictable.

Accomplishments that we're proud of

This is my first solo hackathon, so I'm glad I didn't get too sidetracked. I trained a MNIST classifier with close to 90% accuracy using only a 3-channel cellular automata with a 3-channel immutable state. It also just looks sick as heck when it's running computations.

What we learned

A really good use of AI is to let it be the test user of your package. When it can't do the thing it wants, it often implements workarounds which you might be able to implement into the real thing.

What's next for TorchDish

The next thing would be implementing specialized training utilities, particularly for the sample pool method that is supposed to be more stable than what I'm doing right now. I want to keep growing (pun not intended) this project into an open-source package. I already know some people who might be interested in contributing. I've also discovered some interesting emergent properties of neural cellular automata in the process, so these might be worth playing with in the future.

Acknowledgements

Special thanks to the Unemployed Wizards for their feedback and company.

Built With

Share this project:

Updates

Submission history