Generating Pseudorandom Numbers with Elementary Cellular Automata
Requires a Wolfram Notebook System
Interact on desktop, mobile and cloud with the free Wolfram Player or other Wolfram Language products.
This Demonstration generates a pseudorandom number using various class-3 and class-4 elementary cellular automata from initial conditions. The black and white squares from the central column are converted to base 2 to give a number between 0 and 1. You can increase the number of digits with the "size" control.
Contributed by: Andrew Dai (February 2020)
Based on a program by: Chris Boucher (see Related Links)
After work by: Stephen Wolfram
Open content licensed under CC BY-NC-SA
The initial condition seed is converted to base 2 and placed as a row, where 1 is a black square and 0 is a white square. The rule is generated from this initial condition, and a column is taken from the plot based on the column seed. The column is taken as a binary number and converted into decimal to generate a random number between 0 and 1. The first bit in the column is not used in the generation.
This was a project for Advanced Topics in Mathematics II, 2019–2020, Torrey Pines High School, San Diego, CA.
 S. Wolfram, A New Kind of Science, Champaign, IL: Wolfram Media Inc., 2002.