The simulation continues to run until it reaches the desired number of iterations. Temporal Perception One tricky aspect of the simulation is modeling temporal behavior. It needs to do some type of simple frequency detection. For instance, an agent who is supposed to whistle every 2 claps needs to listen to other agents and try to detect their clapping frequency. It seems obvious that agents need memory in order to be able to infer from the environment their neighbors frequency.
Agents use the temporal information of neighbors to compute their own action frequencies.
For each of the last sixteen time steps, it sums up the number of claps made by neighbors during each clock tick. Therefore a majority rule is applied when determining this frequency. In fact, this rule seems to be what we humans do when trying to determine a global behavior of a group. It then decides when it needs to clap next to satisfy it's goal. If the agent can't find two time steps that have more claps than the rest, it randomly decides when to clap next.