Lesson 3 of 20
Letting time run — what 'all at once' really means
Trajectories, and the trap that ordering sets
Once you have rules you can let time run. It goes like this.
- Read the state now
- Compute the next value of every gene, each on its own
- Only once all the computing is done, swap them in all together
Step 3 is the crux. If you overwrite values while you are still computing, the genes computed later end up reading values that have already changed. The result then depends on the order in which you happened to list the genes. Biology has no such order, so that is a bug in the model.
This scheme is called synchronous update. It is the most common and the easiest to compute. There is a price, and lesson 10 is where you pay it.
The left-hand version took one step in one tick; the right-hand version took two.
Python
Runs in your browser
trace prints every time step as a table. It stops as soon as nothing changes any more.
Python
Runs in your browser
It is this property that lets us start from any state at all. That is the key to the next lesson.
Python
Runs in your browser
🎮 Clock bench
Pick an initial state and press ▶ to let time run one tick at a time.
🤔 Check yourself
What must you always respect when computing new values under synchronous update?
Answer Swapping values in mid-computation lets the order you wrote in your code change the answer. Biology has no such order, so that is not a model, it is a bug.
🤔 Check yourself
In a synchronous model, what happens if you run the same initial state twice?
Answer It is deterministic. There is no randomness at all. That is exactly what makes exhaustive enumeration possible.
🤔 Check yourself
Why did Cancer_Growth drop to 0 even though we started it at 1?
Answer The initial value is used at t=0 and nowhere else. From t=1 the rules overwrite it. A state the rules do not support does not survive.