How monashdeepneuron/neural-cellular-automata works
Main Components
• Training System (TorchModels)
– This includes submodules for Image Segmentation, MedNCA, PersistingGCA, RebuildingGCA, Texture generation, and Toolbox utilities.
– Emphasize that this part is built with PyTorch to experiment with, train, and produce neural network weights and biases.
• Web Simulation & Visualization Platform (web)
– Built as a Next.js/React application which utilizes WebGPU shaders (in web/shaders) to render various Cellular Automata simulations.
– The web directory includes modular simulators (e.g., continuous, conway, larger, lifelike, texture) and shared UI components.
• Cellular Automata Core Library (CAs)
– Contains several variations (e.g., Continuous, ConwaysLife, Larger, LifeLike) that define the simulation logic.
– Includes a Shared subdirectory with common managers (BufferManager, DeviceManager, EventManager, etc.) that are likely used to manage simulation state, WebGPU pipelines, and shaders.
And Represent Relationships and Interactions
• A directional flow from the Training System to the Web Simulation Platform:
– Indicate that trained model weights (and possibly biases) generated in TorchModels are converted into a format usable by the website (notably stored or referenced in web/public/weights).
• CAs directory with both the Training and Web components:
– In the simulation engine, the JavaScript implementations of CAs are used to run the interactive demos.
– In some experiments or training setups, similar CA algorithms might be used as baselines.
• If relevant, include external components such as:
– External dependencies (e.g., PyTorch, WebGPU, Next.js).
Architectural Patterns and Technologies
• Separation of concerns:
– Training Code: Focused on models and experiments implemented in Python and PyTorch.
– Web Frontend: Focused on real-time simulation and visualization using WebGPU and React-based components.
• Use of modular design:
– Both the simulation code and training experiments are partitioned into modules. In TorchModels, each experiment (Image Segmentation, MedNCA, etc.) is self-contained. In web, each simulator (continuous, conway, etc.) is managed within its own folder with client and page definitions.
• Version control and development process:
– Although not an architectural “component” of the running system, consider adding a small block representing Git branching strategy (Main, Dev, Feature Branches) to capture overall process management if desired.