Chapter 12: Cellular Automata from Scratch¶
Part III — Discrete Spatial Modeling
Learning Objectives¶
By the end of this chapter you will be able to:
- Implement Conway's Game of Life with a pure Python loop
- Understand the .past semantics (snapshot before update)
- Identify the performance bottleneck of cell-by-cell iteration
{note}
This chapter intentionally uses no framework. The reader must feel the pain before seeing the solution.
In [ ]:
Copied!
# Standard imports — add chapter-specific imports below
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
# Standard imports — add chapter-specific imports below
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
What Is a Cellular Automaton?¶
TODO: write content.
In [ ]:
Copied!
# Code for section: What Is a Cellular Automaton?
# Code for section: What Is a Cellular Automaton?
Conway's Game of Life: Rules¶
TODO: write content.
In [ ]:
Copied!
# Code for section: Conway's Game of Life: Rules
# Code for section: Conway's Game of Life: Rules
Implementation: Pure Python Loop¶
TODO: write content.
In [ ]:
Copied!
# Code for section: Implementation: Pure Python Loop
# Code for section: Implementation: Pure Python Loop
The .past Semantics¶
TODO: write content.
In [ ]:
Copied!
# Code for section: The .past Semantics
# Code for section: The .past Semantics
Running and Visualizing¶
TODO: write content.
In [ ]:
Copied!
# Code for section: Running and Visualizing
# Code for section: Running and Visualizing
Benchmarking the Naive Implementation¶
TODO: write content.
In [ ]:
Copied!
# Code for section: Benchmarking the Naive Implementation
# Code for section: Benchmarking the Naive Implementation
Further Reading¶
- TODO: add references.