Time

Representing Temporal Dynamics in Simulations

The real world is PARALLEL, things are happening simultaneously, all at once,
but our desktop computers are SERIAL, and can only deal with one thing at a time.
So how can we represent simultaneous parallel agency (multiple causation) on a serial machine?

It's really not too difficult if we divide time into an endless stream of very small slices or steps.
At each slice of time we figure out what the world will look like at the next step.
Let's assume that in our world we have a population of agents that interact with one another.
How do we schedule their interactions? How do we poll each of the agents to give each a turn?
We give each individual agent a chance to act, but when and in what order?
How can we provide each agent with anfair, unbiased and equal opportunity to make its move?

There are several ways to schedule (poll) agent actions in an artificial world.
Each method has its own unique advantages and disadvantages in terms of:
ease of coding
computational efficiency
and bias.

The granularity of time is important too.
Our simulations will become more precise as we cut time into the smallest slices, but our applications will run more slowly.
Our simulations will run more quickly as we cut time into larger slices, but we will loose precision.

Simulations may produce different behaviors when using different representations of time.

There are three common ways to represent time:
Sequential
Scheduling
Random
Scheduling
Cinematic
Scheduling

We poll agents in a fixed sequence within each time step. We repeat the sequence in the same order every time.

• Easy to code.
• Quick to execute.
• Each agent gets an equal number of turns.

• Each agent always leads or follows the same other agent. Agents always influence or are influenced by the same individuals.
Example:

Growth: Diffusion Limited Aggregation.

We poll agents randomly within each time step or we do away with time steps altogether. Agents rarely follow or are lead by the same agent.

• The order is always changing in an unpredictable way.

• If we do away with time steps, each agent may not always get the same number of turns. Some agents will have more opportunities to act and some will have fewer opportunities to act.

Example:

Shelling's Segregation Model.

We break time down into frames much like those in a movie film. Within one frame we ask each agent what it would like to do in the next frame. We resolve any unrealistic influences or collisions before we create the next frame.

• Each agent has an equal number of turns.
• No agent unduly influences or is influenced by any other.

• Coding can be a bit annoying.

Example:

Cellular Automata:
Conway's Game of Life

Cinematic Scheduling is the most Realistic

As in a movie film, if the time steps represented by an individual frame are more finely grained than the nuances of behavior we wish to observe, the result will be a appear as smooth and seamless action. Consequently, if we construct time steps in a simulation of a size much smaller than the time slices of behavior we wish to simulate, we can expect a realistically precise simulation.

There is evidence that the real world is also divided into indivisible units of space and time.
Physicists refer to these as the Planck length (10-31meters) and the Planck time (10-44 seconds).

How Cinematic Scheduling Works:

To create the visual effect of a frame-by-frame movie that looks like this...

We only need to keep track of two frames at a time...

 We create two frames. One to hold the present state of the world and one to hold its next state. Let's call them thisWorld and nextWorld. We place the current state of the world in thisWorld. In this example it would be frame #3. From the current state of the world, thisWorld (frame #3) we compute the next state of the world, nextWorld (frame #4). We take care to resolve any conflicts that might arise. When nextWorld (frame #4) is complete, we render it to the screen as a visualization. Finally, we copy nextWorld (frame #4), back into frame #3 as the updated thisWorld. The old thisWorld is overwritten. We then we repeat the process as long as we wish...