So I'm writing some code to try and produce a cellular automaton which will model an oscillatory chemical reaction, but I'm trying to set up the initial conditions of the grid so that I can vary them to see how they change the behavior.
Basically my method has been to use Table to generate a series of nested lists which give the x and y coordinates of the bottom left corner of a grid square, and also attached to those coordinates is a value which can run from 0 to some integer - it is this number that I will be updating to make the automaton evolve. So I essentially have a list that looks like;
But what I want to do is to specify a list of initial conditions, so that the initial domain might look something more like;
Just for argument's sake.
I've tried a few different ways of doing this - using replacement rules and whatnot, but none of it has worked. Does anybody have any suggestions?