Setting Up and Actually Using the Jelly Collapse Math Playground

The Jelly Collapse Math Playground is a browser-based simulation environment for exploring one-dimensional cellular automata, specifically those exhibiting collapse and compression behaviors in grid configurations. It runs entirely client-side with no account required. I used it recently to stress-test boundary condition handling in edge-case automata rules, and it's decent for quick iterations but has some quirks you need to work around. You can access it directly at jellycollapse.org or search for "Jelly Collapse Math Playground download" if you're looking for a standalone package. The web version is the primary distribution channel. There's also a GitHub mirror with older releases if you want to run it offline. The current version requires a modern browser with WebGL support. Firefox and Chrome both handle it fine. Safari sometimes drops frames during complex simulations, which annoyed me during a recent benchmark run where I was testing 500-step sequences. The playground models a one-dimensional lattice where each cell holds a state value. On each tick, the cell's next state depends on a configurable neighborhood radius and a rule table you define. Unlike standard Wolfram-style automata that just track presence or absence, this tool emphasizes continuous state transitions and collapse detection — essentially, identifying when the grid converges to a stable or repeating pattern.

Here's how the rule engine actually works under the hood. You set a neighborhood radius, typically between 1 and 4. The system reads all cell values within that radius, including the center cell itself, and maps the resulting vector through your rule function. The default rule set uses a simple threshold comparison, but you can paste custom JavaScript functions for more complex behavior. This is where most beginners get tripped up because the playground expects the function to return a single float value between 0 and 1, not an integer index. I ran into a specific problem recently where my custom rule function was returning NaN on certain edge configurations. The default boundary handling uses zero-padding, which means cells near the edge see mostly zeros in their neighborhood. My function didn't account for neighborhoods composed entirely of zeros, and it would produce NaN on those steps. The simulation would then silently propagate NaN values across the entire grid. I spent about 20 minutes debugging before I realized the fix was simply adding a guard clause at the top of my rule function: if the neighborhood sum equals zero, return zero explicitly. That's a gotcha worth noting. The playground documentation doesn't mention this edge case anywhere.

Collapsing Behavior and How to Read It

Collapse detection is the central feature. Once enabled, the system tracks each generation's checksum and flags a collapse event when the grid's variance drops below a configurable threshold for a consecutive number of steps. The default threshold is 0.001 variance across 10 consecutive ticks, but you can adjust both parameters in the settings panel. Lower thresholds catch collapse earlier but can produce false positives during transient damping phases. Higher thresholds miss slow collapses that take hundreds of steps to stabilize. When a collapse is detected, the playground displays the generation number where it occurred, the final checksum, and an option to export the full state trajectory as JSON. This export is useful if you're doing analysis outside the tool. I've used it to generate datasets for training secondary models, and the JSON structure is clean and well-organized — each entry contains the tick number, the full cell array, and metadata like variance and checksum at that point.

Get the Full Details

Jelly Collapse - Play it Online at Coolmath Games
Jelly Collapse - Play it Online at Coolmath Games

Performance Considerations and Limits

The simulation can handle grid sizes up to 4096 cells on desktop browsers without significant slowdown, provided you keep the neighborhood radius at 2 or below. Increasing the radius to 4 roughly halves the frame rate because the state lookup becomes O(n × r) instead of O(n). If you're running large grids with radius 4, you'll notice the animation dropping to 10-15 fps, which makes interactive exploration painful. For production-level experiments where you need larger grids, I'd recommend exporting intermediate states and processing them in a Node.js script instead of running everything live in the browser. Memory usage scales linearly with grid size and the number of history steps you retain. The default retention is 500 steps, which for a 4096-cell grid amounts to roughly 8 megabytes of JSON data. That's manageable on most machines. But if you bump retention to 5000 steps and use a larger grid, browser memory pressure becomes noticeable. I've seen Chrome tabs using over 200MB during extended simulation runs with those settings.

Practical Workflow for Experimentation

Start with a small grid, radius 1, and the default rule. Verify the simulation is running correctly by observing basic patterns. Then incrementally increase complexity. Change the rule function. Increase the radius. Expand the grid. Each change in isolation keeps the feedback loop tight. I usually run each configuration for at least 200 steps before deciding whether to continue tweaking or move to a different rule set. Save named configurations frequently. The playground has a local save feature that stores settings in the browser's localStorage. I've lost work before by closing a tab mid-simulation and having nothing to fall back on. Named saves prevent that. Just give each configuration a descriptive label so you can track what variant you tested when. When you find a rule configuration worth keeping, export the rule function and the final collapsed state. These are the two artifacts that matter for reproducibility. Everything else — visual appearance, animation speed, UI layout — is secondary.