Iterating Simple Rules

The rule depicted below tells us how the center box changes according to the values of it and its two neighbors.  i.e. If a square and both of its neighbors are black at time t, the square becomes white at time t+1.

RulePlot[CellularAutomaton[30]]

We iterate this rule from the InitialRow to see the long-term behavior.

timesteps = 3;
InitialRow={1, 1}

ArrayPlot[CellularAutomaton[30,{InitialRow,0},timesteps]]

Dogs Barking in a Quiet Neighborhood
Greenberg-Hastings: Excitable Media.

In this system, there are three possible states: 
0 -> quiet.  2-> barking. 1->whimpering.
The rule goes as follows:
1) A dog that is quiet (0), will start barking (2) if one of its four neighbors is barking.  
2) A dog that is barking (2) will start whimpering (1). 
3) A dog that is whimpering (1) will become quiet (0).  
4) A dog that is quiet (0) will stay quiet if all of its neighbors are quiet (0) or whimpering (1).

The size of the grid.

n = 16;

This is how you specify the beginning board: below is how we would begin with dogs barking at positions (7, 7), (3, 4).

Board=Table[Table[{i, j, 0}, {j, 1, n}], {i, 1, n}];
Board[[7, 7]]={7, 7, 2};
Board[[3, 4]]={3, 4, 2};

ArrayPlot[Table[Board[[i]][[j]][[3]], {i, 1, n}, {j, 1, n}], ColorRules->{0->White, 1-> Blue, 2-> Red}]

Val[i_, j_]:=Piecewise[{{Board[[i]][[j]][[3]], And[1 ≤ i ≤ n, 1 ≤ j ≤ n]}, {0, Or[i == 0, j ==0, i ==n+1 j==n+1]}}]

S[{i_, j_, v_}]:= Piecewise[{{{i, j, 0}, And[Val[i, j]==0 ,Val[i+1, j] ≠ 2 , Val[i-1, j] ≠ 2,  Val[i, j+1] ≠ 2, Val[i, j-1] ≠ 2 ]},{{i, j, 2},  Val[i, j]==0 &&Or[Val[i+1, j] ==2,Val[i-1, j] == 2, Val[i,j+1] == 2,Val[i, j-1] == 2]},
 {{i, j, 1}, Val[i, j]==2},
 {{i, j, 0}, Val[i, j]==1}}]

ArrayPlot[Table[Board[[i]][[j]][[3]], {i, 1, n}, {j, 1, n}], ColorRules->{0->White, 1-> Blue, 2-> Red}]
i = 1

Board=Map[S, Board, {2}];
i = i + 1
ArrayPlot[Table[Board[[i]][[j]][[3]], {i, 1, n}, {j, 1, n}], ColorRules->{0->White, 1-> Blue, 2-> Red}]