Overview


What is a Cellular Automaton?

A Cellular Automaton (CA) is a discrete computational model consisting of a grid of cells, each holding a finite state. At each time step, every cell updates its state according to a fixed transition function that depends on the cell’s current state and the states of its immediate neighbors.

Despite their simple rules, cellular automata can produce remarkably complex behavior — making them a powerful tool for modeling natural phenomena such as population dynamics, fluid flow, landslides, and lava flows.

Formal definition

A Cellular Automaton is formally described as the quadruple <Zd, S, X, σ>:

Symbol Meaning In JCAL
Zd A d-dimensional grid of cells DefaultCell[][] inside CellularAutomata
S The finite set of possible cell states DefaultStatus instances
X The neighborhood — which cells are considered “neighbors” DefaultNeighborhood subclass
σ The transition function — one step of evolution CellularAutomataExecutor subclass

Neighborhood strategies

The two most common neighborhood shapes are:

You can also define a fully custom neighborhood by subclassing DefaultNeighborhood.

Further reading


What is JCAL?

JCAL was born from the author’s work during a master’s thesis, where a C++ library for Cellular Automata was developed and used by physicists, geologists, and researchers across multiple departments. That library was comprehensive but complex.

JCAL brings the same ideas to Java in a smaller, simpler, and more accessible form.

Design goals

  • Minimal boilerplate — define a working CA in a few lines of Java.
  • Idiomatic Java — fluent builder API, abstract base classes, standard collections.
  • Extensible — swap in custom states, neighborhood shapes, or parallel execution with minimal code changes.
  • Complex CA support — custom state objects and a refinement hook enable rich, multi-value simulations beyond simple binary-state automata.

See also