A nucleus in the middle emits a neutron in a random direction, if it hits another nucleus it is absorbed, that hit nucleus emits two neutrons and dies.
A full chain reaction, involving essentially all the nuclei, is much more likely to occur with a bigger piece of material. In real life, with trillions of trillions of nuclei (at least) there is a precise critical size at which the reaction "goes critical" and explodes.
With our far smaller grids the random fluctuations are large, so we can just get the general idea. For the smallest grid, you'll find most times not much happens. For the largest grid, almost all the nuclei will explode. Try it!
Code by Atallah Hezbor