Welcome to Celite
Overview
Celite is a collection of three cellular automaton simulators: Parallel Wolfram's Nearest Neighbor, Sequential Wolfram's Nearest Neighbor, and Game of Life. Each of these simulators serves as an educational and research tool to assist the exploration of emergent behaviors, computational universality, and mathematical insights within cellular automata. The program allows users to experiment with distinct rulesets, from Conway's Game of Life, which illustrates complex behavior through simple birth and survival rules, to Wolfram's Nearest Neighbor models that explore pattern formation and complexity using rule-based evolution. The Sequential Wolfram model updates cells one at a time, while the Parallel Wolfram model updates all cells simultaneously, showcasing the impact of synchronous versus asynchronous evolution. The goal of the program is to be an interactive platform for studying behavioral diversity in cellular automata, encouraging insights into the foundations of computation and the dynamics of self-organizing systems.
Parallel Wolfram's Nearest Neighbor
Wolfram's Nearest Neighbor cellular automata, developed by Stephen Wolfram, are simple rule-based systems where each cell in a 1D grid updates its state based on its current state and the states of its two immediate neighbors. The parallel model updates all cells simultaneously at each step, following a predetermined rule number (0-255) that dictates how states transition. These rules give rise to various patterns, ranging from stable, repeating forms to chaotic, complex behavior, making the Parallel Wolfram model an ideal tool for exploring fundamental concepts in pattern formation, symmetry, and computational complexity.
Sequential Wolfram's Nearest Neighbor
The Sequential Wolfram Nearest Neighbor model, like the parallel version, operates on a 1D grid where each cell's new state depends on its own state and those of its two neighbors according to a specific rule (0-255). However, in the sequential model, cells update one at a time in a configured order, creating a distinct dynamic as each update immediately affects subsequent cells. This asynchronous updating introduces unique patterns and transitional behavior that highlight the effects of sequential processing, making it useful for studying the role of update order in cellular automata and the emergence of complex, non-repetitive patterns.
Game of Life
Conway's Game of Life, created by mathematician John Conway in 1970, is a cellular automaton that simulates evolving cell patterns on a 2D grid through simple rules. Each cell is either alive or dead, and transitions based on the states of its neighbors: live cells survive with two or three live neighbors, while overpopulation or underpopulation leads to death, and dead cells with exactly three neighbors become alive. From simple initial configurations, the game produces complex and often unpredictable patterns, including static shapes, oscillators, and spaceships that move across the grid. The Game of Life, known for its Turing completeness, serves as a model for studying complexity, computation, and emergent behaviors, making it a popular tool for exploring mathematical and computational concepts.
General Wolfram's Nearest Neighbor
Boundary Conditions
Infinite: The lattice is conceptually, and in this simulation, visibly extended infinitely in horizontal direction. Upon iteration, the lattice expands to the left and right side in order to simulate an infinitely sized lattice, as in, a lattice with infinite dead cells (white, 0). Since a cells state depends on its left and right neighbor, the infinite simulation expands on the edges per iteration so that the edge cells always have a left and right neighbor.
Note: Infinite simulations are only available for Parallel Wolfram's Nearest Neighbor.
Warning: Large lattice sizes and iteration amounts may result in performance issues or simulation issues upon iteration. Performances issues are computational or memory bottlenecks that may result in delay, lag, or application crashes. Simulation issues entail an appearance of an all black canvas that is caused by an abundance of alive cells (black, 0) and a small cell size. Handle both issues by lowering iteration amounts and/or lattice sizes.
Finite: The lattice has a fixed size such that the cells at the edges of the lattice do not have neighbors beyond the boundaries. Therefore, there must be a method to handle the edge cells such as a periodic or null boundary conditions.
Periodic: The lattice is treated as if it were wrapped around, forming a torus-like shape. When a cell reaches the edge of the lattice, its neighbors on the opposite side of the lattice are considered as its direct neighbors. This creates a seamless continuity in the behavior as if the lattice repeats itself indefinitely.
Null: Imposes a fixed value zero for cells beyond the edges of the lattice. Thus, every edge cell with an out of bounds neighbor considers the neighbor to be dead (white, 0) and will use it in the next cell state calculation. This effectively creates a "wall" at the edges of the lattice.
Boundary conditions may be selected on the right side of the primary toolbar. For Parallel Wolfram's Nearest Neighbor, finite condition checkboxes appear and canvas will be reset upon toggle.
Keyboard Shortcut: ALT + U (Parallel Wolfram's Nearest Neighbor)
Log Box
Loaded Information: For all input boxes, including "Iterations," "Rule," and "Lattice," the log box will display the value stored once the submit button is clicked. An error messgae will be displayed if the input is not valid. The loaded information logs are designed to inform of input errors and document the input submissions. Users should utilize the log box to ensure the program is functioning properly and that correct information has been entered.
Successful Actions: All button clicks and toggles will display a log message upon success. This includes "Start," "Iterate," "Clear," "Download PDF," "Download PNG," "Lattice Fill," "Random Fill," "Cell Color," and all toggle bars. Additional messages are provided in Sequential Wolfram's Nearest Neighbor for setup mode. The log will include a specific message regarding the success of the action and what was completed. The success log may be useful in debugging simulation errors and tracking previous operations.
Errors: All error messages will be printed in red. Error messages are only produced during invalid input events for the "Iterations," "Rule," and "Lattice," input boxes. Additional error messages are provided in Sequential Wolfram's Nearest Neighbor for setup mode. Thus, any input that is not a number or outside of the range for the input box will produce an error message with the provided invalid input.
Only three log box messages will be displayed at a time and the most recent message is displayed at the top of the log box. Once the log box is full, a new message will push out the oldest message, such that the new message will appear at the top, the bottom message will be deleted, and the rest will slide down. All successful logs including loaded information logs will be printed in black text, while error logs will be printed in red text.
Canvas
General Description: The canvas is the gray region enclosed by a black border below the primary and secondary toolbars. It has a fixed width and a dynamic height. Changing the lattice size will not impact the width of the canvas. Rather, cells will be added until they reach the edge of the canvas, then the cells will be evenly resized to fit the fixed canvas width. As for the height, the canvas will dynamically extend downard as space is needed (as iterations occur). Upon using the "Iterate" button, the canvas will seemingly expand and simulate in the same instance, but using the "Start" will show a slower expansion prioir to the simulation.
Cell State Toggle: While inside the canvas, clicking cells will toggle them between dead (white, 0) and alive (balck, 1) states to set a starting position (index = 0) for the simulation. Only the starting state cells can be toggled. Cells can be toggled even if a simulation has already completed; clicking "Start" or "Iterate" will overwrite the canvas. Cell borders will automatically be removed on the starting lattice for lattice sizes over 200.
Zoom: While inside the canvas, using the scroll wheel on a mouse will zoom on a specified location. The x-axis mouse location determines the horizontal zoom focus and the y-axis mouse location determines the vertical zoom focus. When only the starting iteration is present on the canvas (index = 0), the y-axis mouse location has no impact on the zoom focus location; the vertical zoom focus, in this case, will always be on the starting lattice in the canvas. Scroll up to zoom in and scroll down to zoom out. The maximum outward zoom is set to the default zoom factor for the canvas.
Warning: The zoom feature may encounter performance issues with large lattice sizes and iteration amounts. Performances issues are computational or memory bottlenecks that may result in delay, lag, or application crashes.
An iteration counter that displays the current iteration index can be found above the top left border of the canvas.
Algorithm Rule
The Wolfram Nearest Neighbor algorithm works by updating the state of each cell, which can either be dead (0) or alive (1), in a one-dimensional lattice based on the state of that cell and its immediate neighbors (left and right). For each cell in the lattice, we consider it together with its left and right neighbors as a triplet. For example, if the left cell is 1, the current cell is 0, and the right cell is 1, the triplet is 101. The key idea is that each triplet of cells (left, current, right) forms a 3-bit binary number, which is used to determine the next state of the current cell according to a rule. The rule outcomes are determined by the binary conversion of the rule number such that the possible outcomes in a state change table (read top to bottom) stem from the binary digits of the 8-bit binary representation (read left-to-right). The 8-bit binary representation of the rule number allows for eight possible outcomes and also restricts rule numbers to be within 2^8 [0, 255]. The rule is essentially a lookup table that specifies the next state of the current cell based on the triplet. The algorithm determines the next state of the current cell by looking at the triplet with its neighbors and using the rule table to map that triplet to a new state.
For example, here is the state change table for rule 30:
If the left cell is 1, the current cell is 1, and the right cell is 1 (111), the next state of the current cell is 0.
If the left cell is 1, the current cell is 1, and the right cell is 0 (110), the next state of the current cell is 0.
If the left cell is 1, the current cell is 0, and the right cell is 1 (101), the next state of the current cell is 0.
If the left cell is 1, the current cell is 0, and the right cell is 0 (100), the next state of the current cell is 1.
If the left cell is 0, the current cell is 1, and the right cell is 1 (011), the next state of the current cell is 1.
If the left cell is 0, the current cell is 1, and the right cell is 0 (010), the next state of the current cell is 1.
If the left cell is 0, the current cell is 0, and the right cell is 1 (001), the next state of the current cell is 1.
If the left cell is 0, the current cell is 0, and the right cell is 0 (000), the next state of the current cell is 0.
*Notice that this example uses rule 30, which has an 8-bit binary number of 00011110. The binary number from left-to-right is the output of the state table above, read top down. This is the case for all possible rule numbers 0 - 255, as the 8-bit binary representation of the rule number determines the state change table output.
The algorithm follows the steps:
1. Initialize the lattice with an initial configuration.
2. For each time step and cell in the lattice, identify the left neighbor, the current cell, and the right neighbor, form the triplet and convert it to a binary number, then use the rule table to determine the next state of the current cell.
3. Update the lattice synchronously (all cells are updated simutaneously after each time step) for parallel simulation or asynchronously (cells are updated sequentially in a particular order after each time step) for sequential simulation.
4. Repeat for the desired number of time steps (iteration amount).
For parallel simulation (synchronous updating), all the cells in the lattice are updated at the same time based on the current state of the system. This means that the next state for each cell is computed based on the neighbors' values before any updates happen. All cells are updated simultaneously in a single time step. For sequential simulation (asynchronous updating), the cells are updated one at a time in some configured sequence. This means that by the time a given cell is updated, some of its neighbors might have already been updated, while others have not. The next state of each cell is computed based on the most recent available states of its neighbors, which could include updated cells.
Parallel Wolfram's Nearest Neighbor
Iteration Input Box: Enter the number of iterations to complete. Manipulating the iteration amount will change emerging patterns by limiting or expanding the application of a rule. The iteration amount is inclusive such that it goes the entered number of iterations beyond the starting iteration (starting state, index = 0). Using the "Start" or "Iterate" buttons will simulate up to the entered iteration amount.
Finite Input Restrictions: Non-negative real numbers in range [0, 9000]. Decimal values will be truncated.
Infinite Input Restrictions: Non-negative real numbers in range [0, 3500]. Decimal values will be truncated.
Keyboard Shortcut: ALT + J
Rule Input Box: Enter a rule number to determine the behavior of the cellular automaton. The rule number encodes the transition rules for each cell based on its neighborhood configuration. Upon input, the rule numbers are converted into eight digit binary numbers, then the binary number is reversed and indexed. For a current time step, the cell and its direct neighbors are taken in as a binary representation (Dead - White - 0, Alive - Black - 1). The three binary numbers are read left-to-right and converted to decimal, and the decimal value (range [0,7]) corresponds to an index in the reversed binary number. The value at the given index is the new state of the cell. The rule is applied as a parallel update, meaning every cell in the lattice is updated simutaneously upon each iteration.
Input Restrictions: Non-negative real numbers in range [0, 255]. Decimal values will be truncated.
Keyboard Shortcut: ALT + K
Lattice Input Box: Enter the lattice size set the number of cells in the lattice (row of cells). Manipulating the lattice size will impact the complexity of the system as it will change the interactions and possibilities for emergent patterns and may impact the affects of the boundary condition. The size of the individual cells will decrease as the lattice size increases to fit the lattice in the canvas region.
Input Restrictions: Non-negative real numbers in range [1, 1000]. Decimal values will be truncated.
Keyboard Shortcut: ALT + L
Must click the "Submit" button to the right of each input box to apply the input. The canvas will be reset upon submit.
Keyboard Shortcut: ENTER (submits input box in focus or submits all if none in focus)
Start/Stop Button: Click "Start" to incrementally iterate up to the total iteration amount (x iterations beyond starting lattice, index = 0). The iterations will complete at the delay rate, defaulted to 750 ms. Upon green "Start" button click, the button will convert to a red "Stop" button. Clicking the "Stop" button will pause the simulation such that the iterations will stop. The button will then convert back to a "Start" button and, if clicked, will resume iterating until the total iteration amount. Upon completion of the total iteration amount, the button will be set back to a "Start" button.
Keyboard Shortcut: ALT + ENTER
Iterate Button: Click "Iterate" to immediately (in time of process completion) iterate up to the total iteration amount (x iterations beyond starting lattice, index = 0). The delay rate will not impact the iteration speed upon click of the "iterate" button.
Recommendations: In consideration of lattice size, process completion may be take long for large total iteration amounts. Consider limiting the total iteration amount or adjusting lattice size as needed.
Keyboard Shortcut: ALT + I
Clear/Reset Button: Click "Clear" to refresh the canvas, as in, remove the results of the simulation and default the starting state. All iterations beyond the starting iteration (index = 0) will be deleted and the starting iteration will be set to all dead cells (white, 0). The currently stored values for "Iterations," "Rule," and "Lattice" will remain, as they are not impacted by the clear event. Upon Iteration beyond the starting lattice, the "Clear" button is converted to a "Reset" button. Click the "Reset" button to clear all iterations, except for the starting lattice. Thus, the simulation is cleared but the state of the initial starting lattice remains, acting as a simulation reset. Clicking the "Reset" button will convert it back to a "Clear" button.
Keyboard Shortcut: ALT + C
About Button: Click "About" to open an overlaying window to describe the simulator. The window contains information about the background of Wolfram's Nearest Neighbor Parallel, the purpose of its use and study, and a summary of its application. The window may be longer than the page, so a vertical scroll bar will be available to navigate the entire window. The window may be closed by clicking the "x" at the top right of the window or clicking anywhere outside the windows borders.
Keyboard Shortcut: ALT + A
Options
Download PDF Button: Click "Download PDF" to download a PDF file containing an extraction of the canvas. Even if the canvas, after a simulation, is very large, the pdf will contain the entire canvas in one scaled PDf page. The PDF file will be placed in the downloads folder on the local device.
File Name: "ParallelWNN" + "I" + Number of Iterations + "R" + Rule Number + "L" + Lattice Size + ".pdf"
Keyboard Shortcut: ALT + N
Download PNG Button: Click "Download PNG" to download a PNG file containing an extraction of the canvas. Even if the canvas, after a simulation, is very large, the PNG will contain the entire canvas in one scaled PNG image. The PNG file will be placed in the downloads folder on the local device.
File Name: "ParallelWNN" + "I" + Number of Iterations + "R" + Rule Number + "L" + Lattice Size + ".png"
Keyboard Shortcut: ALT + P
Lattice Fill Button: Click "Lattice Fill" to completely fill the starting lattice with alive cells (black, 1). Every cell in the starting lattice will be set to alive, despite the lattice size. Essentially, this acts as an inverse default starting position and may work well with some rules. The Canvas will reset upon click.
Keyboard Shortcut: ALT + G
Random Fill Button: Click "Random Fill" to randomly fill the starting lattice with alive cells (black, 1). Each cell in the starting lattice will have a 50% chance to be set to alive. In theory, as the lattice size increases, about half of the cells will be dead and about half will be alive. The Canvas will reset upon click.
Keyboard Shortcut: ALT + M
Cell Position Toggle: Click the toggle bar labeled "Cell Position" to toggle the hovering cell position box on and off. The cell position is a hovering iteration number and cell index calculator that follows the mouse inside the canvas. Anytime the mouse is on a lattice within the canvas, the box will update with the lattice iteration that is being hovered, and the cell index, starting at index 0. Lattice iteration and cell index are seperated by a colon (iteration number : cell index).
Format : Lattice Iteration : Cell Index
Keyboard Shortcut: ALT + W
Cell Border Toggle: Click the toggle bar labeled "Cell Border" to toggle the black borders that enclose a cell. The border will only be toggled for cells in iterations beyond the starting state such that the starting state cells (index = 0) are not impacted by the toggle. This may be useful in improving the appearance of an image generated with a larger lattice size on the canvas and may help with pattern recognition and analysis. The Canvas will be updated upon click.
Keyboard Shortcut: ALT + X
Delay Slider: Click and hold the slider labeled "Delay" to alter the delay time (ms) between iterations when using the "Start" button. Alternatively, click the slider and use the left and right arrow keys to change the delay value. Larger delays may be useful in analysing the transitions between iterations. Smaller delays display transitions between iterations very rapidly and is useful for documenting more general change over long intervals.
Input Restrictions: Values are in milliseconds in range [0, 2000].
Keyboard Shortcut: ALT + Y, then Left Arrow to decrease and Right Arrow to increase the value.
Cell Color Boxes: Click any of the four color boxes labeled "Alive Cell," "Dead Cell," "Alive Border," and "Dead Border" to open a color picker window. In the window, depending on the web-browser, there is a color selector that allows for full color customization for the selected region. The color picker uses a RGB based GUI built into HTML that allows for precise color selection, then applies the color to the specified cell region.
Sequential Wolfram's Nearest Neighbor
Iteration Input Box: Enter the number of iterations to complete. Manipulating the iteration amount will change emerging patterns by limiting or expanding the application of a rule. The iteration amount is inclusive such that it goes the entered number of iterations beyond the starting iteration (starting state, index = 0). Using the "Start" or "Iterate" buttons will simulate up to the entered iteration amount.
Input Restrictions: Non-negative real numbers in range [0, 9000]. Decimal values will be truncated.
Keyboard Shortcut: ALT + J
Rule Input Box: Enter a rule number to determine the behavior of the cellular automaton. The rule number encodes the transition rules for each cell based on its neighborhood configuration. Upon input, the rule numbers are converted into eight digit binary numbers, then the binary number is reversed and indexed. For a current time step, the cell and its direct neighbors are taken in as a binary representation (Dead - White - 0, Alive - Black - 1). The three binary numbers are read left-to-right and converted to decimal, and the decimal value (range [0,7]) corresponds to an index in the reversed binary number. The value at the given index is the new state of the cell. The rule is applied as a parallel update, meaning every cell in the lattice is updated simutaneously upon each iteration.
Input Restrictions: Non-negative real numbers in range [0, 255]. Decimal values will be truncated.
Keyboard Shortcut: ALT + K
Lattice Input Box: Enter the lattice size set the number of cells in the lattice (row of cells). Manipulating the lattice size will impact the complexity of the system as it will change the interactions and possibilities for emergent patterns and may impact the affects of the boundary condition. The size of the individual cells will decrease as the lattice size increases to fit the lattice in the canvas region. Changing the lattice size will automatically switch from simulate mode to setup mode to allow for the new lattice be configured with a cell ordering.
Input Restrictions: Non-negative real numbers in range [1, 1000]. Decimal values will be truncated.
Keyboard Shortcut: ALT + L
Must click the "Submit" button to the right of each input box to apply the input. The canvas will be reset upon submit.
Keyboard Shortcut: ENTER (submits input box in focus or submits all if none in focus)
Start/Stop Button: Click "Start" to incrementally iterate up to the total iteration amount (x iterations beyond starting lattice, index = 0). The iterations will complete at the delay rate, defaulted to 750 ms. Upon green "Start" button click, the button will convert to a red "Stop" button. Clicking the "Stop" button will pause the simulation such that the iterations will stop. The button will then convert back to a "Start" button and, if clicked, will resume iterating until the total iteration amount. Upon completion of the total iteration amount, the button will be set back to a "Start" button.
Keyboard Shortcut: ALT + ENTER
Iterate Button: Click "Iterate" to immediately (in time of process completion) iterate up to the total iteration amount (x iterations beyond starting lattice, index = 0). The delay rate will not impact the iteration speed upon click of the "iterate" button.
Recommendations: In consideration of lattice size, process completion may be take long for large total iteration amounts. Consider limiting the total iteration amount or adjusting lattice size as needed.
Keyboard Shortcut: ALT + I
Clear/Reset Button: Click "Clear" to refresh the canvas, as in, remove the results of the simulation and default the starting state. All iterations beyond the starting iteration (index = 0) will be deleted and the starting iteration will be set to all dead cells (white, 0). The currently stored values for "Iterations," "Rule," and "Lattice" will remain, as they are not impacted by the clear event. Upon Iteration beyond the starting lattice, the "Clear" button is converted to a "Reset" button. Click the "Reset" button to clear all iterations, except for the starting lattice. Thus, the simulation is cleared but the state of the initial starting lattice remains, acting as a simulation reset. Clicking the "Reset" button will convert it back to a "Clear" button.
Keyboard Shortcut: ALT + C
Setup Button: Click "Setup" to switch out of simulate mode and into setup mode. In setup mode, the cell ordering for the sequential algorithm may be selected. Click, or click and drag, the cells to chronologically number the cells in a desired order. A library of presets is available for quick and convenient cell ordering. Exit setup mode and enter simulate mode by clicking the "Simulate" button. For more information, click the "Help" button in setup mode.
Keyboard Shortcut: ALT + U
Setup Mode
Simulate Button: Click "Simulate" to switch out of setup mode and into simulate mode. In simulate mode, the dead and alive cells for sequential simulation may be selected. Click, or click and drag, the cells to toggle them between dead and alive. After switching to simulate mode, the configured cell ordering will automatically save, meaning that starting a simulation will use the selected ordering for the sequential algorithm. Note that if all cells were not ordered in setup mode, the cell ordering will default to a left-to-right order.
Keyboard Shortcut: ALT + ENTER
Clear Button: Click "Clear" to refresh the canvas, as in, remove all cell orderings from the order lattice to produce the default starting state. Note that there is not a reset feature to retrieve the previously cleared ordering.
Keyboard Shortcut: ALT + C
Library Button: Click "Library" to open an overlaying window with selectable preset cell ordering that will apply to the lattice. The window will contain a list of images and descriptions of cell orderings for sequential simulation that help produce unique and intriguing patterns in concordance with the rule selected in simulate mode. Click any of the images in the library to load the preset ordering to the lattice. The current cell ordering in the lattice will be cleared before applying the preset ordering from the Library. The window may be longer than the page, so a vertical scroll bar will be available to navigate the entire window. The window may be closed by clicking the "x" at the top right of the window or clicking anywhere outside the windows borders.
Keyboard Shortcut: ALT + L
Help Button: Click "Help" to open an overlaying window with information about setup mode. The information includes four main sections that provide answers to common questions about setup mode. It outlines the purpose and functionality of setup mode, how it relates to sequential simulation, how to configure the cell ordering, and how to utilize the ordering preset library. The window may be longer than the page, so a vertical scroll bar will be available to navigate the entire window. The window may be closed by clicking the "x" at the top right of the window or clicking anywhere outside the windows borders.
Keyboard Shortcut: ALT + P
Options
Download PDF Button: Click "Download PDF" to download a PDF file containing an extraction of the canvas. Even if the canvas, after a simulation, is very large, the pdf will contain the entire canvas in one scaled PDf page. The PDF file will be placed in the downloads folder on the local device.
File Name: "SequentialWNN" + "I" + Number of Iterations + "R" + Rule Number + "L" + Lattice Size + ".pdf"
Keyboard Shortcut: ALT + N
Download PNG Button: Click "Download PNG" to download a PNG file containing an extraction of the canvas. Even if the canvas, after a simulation, is very large, the PNG will contain the entire canvas in one scaled PNG image. The PNG file will be placed in the downloads folder on the local device.
File Name: "SequentialWNN" + "I" + Number of Iterations + "R" + Rule Number + "L" + Lattice Size + ".png"
Keyboard Shortcut: ALT + P
Lattice Fill Button: Click "Lattice Fill" to completely fill the starting lattice with alive cells (black, 1). Every cell in the starting lattice will be set to alive, despite the lattice size. Essentially, this acts as an inverse default starting position and may work well with some rules. The Canvas will reset upon click.
Keyboard Shortcut: ALT + G
Random Fill Button: Click "Random Fill" to randomly fill the starting lattice with alive cells (black, 1). Each cell in the starting lattice will have a 50% chance to be set to alive. In theory, as the lattice size increases, about half of the cells will be dead and about half will be alive. The Canvas will reset upon click.
Keyboard Shortcut: ALT + M
Cell Position Toggle: Click the toggle bar labeled "Cell Position" to toggle the hovering cell position box on and off. The cell position is a hovering iteration number and cell index calculator that follows the mouse inside the canvas. Anytime the mouse is on a lattice within the canvas, the box will update with the lattice iteration that is being hovered, and the cell index, starting at index 0. Lattice iteration and cell index are seperated by a colon (iteration number : cell index).
Format : Lattice Iteration : Cell Index
Keyboard Shortcut: ALT + W
Cell Border Toggle: Click the toggle bar labeled "Cell Border" to toggle the black borders that enclose a cell. The border will only be toggled for cells in iterations beyond the starting state such that the starting state cells (index = 0) are not impacted by the toggle. This may be useful in improving the appearance of an image generated with a larger lattice size on the canvas and may help with pattern recognition and analysis. The Canvas will be updated upon click.
Keyboard Shortcut: ALT + X
Delay Slider: Click and hold the slider labeled "Delay" to alter the delay time (ms) between iterations when using the "Start" button. Alternatively, click the slider and use the left and right arrow keys to change the delay value. Larger delays may be useful in analysing the transitions between iterations. Smaller delays display transitions between iterations very rapidly and is useful for documenting more general change over long intervals.
Input Restrictions: Values are in milliseconds in range [0, 2000].
Keyboard Shortcut: ALT + Y, then Left Arrow to decrease and Right Arrow to increase the value.
Cell Color Boxes: Click any of the four color boxes labeled "Alive Cell," "Dead Cell," "Alive Border," and "Dead Border" to open a color picker window. In the window, depending on the web-browser, there is a color selector that allows for full color customization for the selected region. The color picker uses a RGB based GUI built into HTML that allows for precise color selection, then applies the color to the specified cell region.
Game of Life
Start/Stop Button: Click "Start" to incrementally iterate, one iteration at a time, until stopped. The iterations will complete at the delay rate, defaulted to 250 ms. Upon green "Start" button click, the button will convert to a red "Stop" button. Clicking the "Stop" button will pause the simulation such that the iterations will stop. The button will then convert back to a "Start" button and, if clicked, will resume iterating by one until stopped.
Keyboard Shortcut: ALT + ENTER
Iterate Button: Click "Iterate" to immediately iterate a single time such that one application of the state change algorithm will be applied. The delay rate will not impact the iteration speed upon click of the "iterate" button.
Recommendations: In consideration of lattice size, process completion may be take long for large total iteration amounts. Consider limiting the total iteration amount or adjusting lattice size as needed.
Keyboard Shortcut: ALT + I
Clear/Reset Button: Click "Clear" to refresh the canvas, as in, remove all alive cells (black, 1) from the canvas to produce the default starting state; all cells will be set to dead state (white, 0). Upon Iteration beyond the starting state (iteration count > 0), the "Clear" button is converted to a "Reset" button. Click the "Reset" button to revert back to the starting position prior to iterating, as in, the previous configuration of dead and alive cells. Thus, the resulting canvas from the simulation is cleared but the state of the initial starting position remains, acting as a simulation reset. Clicking the "Reset" button will convert it back to a "Clear" button.
Keyboard Shortcut: ALT + C
Library Button: Click "Library" to open an overlaying window with selectable starting positions that will apply to the canvas. The window will contain a list of images and descriptions of starting positions that produce unique and intriguing patterns for the Game of Life simulation. Click any of the images in the library to load that preset to the canvas. The current canvas position will be cleared before applying the preset position from the Library. The window may be longer than the page, so a vertical scroll bar will be available to navigate the entire window. The window may be closed by clicking the "x" at the top right of the window or clicking anywhere outside the windows borders.
Keyboard Shortcut: ALT + L
About Button: Click "About" to open an overlaying window to describe the simulator. The window contains information about the background of Conway's Game of Life, the purpose of its use and study, and a summary of its application. The window may be longer than the page, so a vertical scroll bar will be available to navigate the entire window. The window may be closed by clicking the "x" at the top right of the window or clicking anywhere outside the windows borders.
Keyboard Shortcut: ALT + A
Delay Slider: Click and hold the slider labeled "Delay" to alter the delay time (ms) between iterations when using the "Start" button. Alternatively, click the slider and use the left and right arrow keys to change the delay value. Larger delays may be useful in analyzing the transitions between iterations. Smaller delays display transitions between iterations very rapidly and is useful for documenting more general change over long intervals.
Input Restrictions: Values are in milliseconds in range [0, 500].
Keyboard Shortcut: ALT + Y, then Left Arrow to decrease and Right Arrow to increase the value.
Zoom Slider: Click and hold the slider labeled "Zoom" to alter the zoom factor measured by percentage. Moving the slider to the left will decrease the zoom percentage factor and zoom outward, and moving the slider to the right will increase the zoom percentage factor and zoom inward. Using the zoom slider will always center the zoom to the center of the canvas.
Input Restrictions: Values are percentages in range [1, 100].
Keyboard Shortcut: ALT + Z, then Left Arrow to decrease and Right Arrow to increase the value.
Canvas
General Description: The canvas is the gray region enclosed by a black border below the primary toolbar. It has a fixed width and height for a given screen size, designed to fit the screen after scrolling below the header. The cells will always be evenly resized to fit the canvas dimensions. Thus, the amount of cells displayed in the canvas grid for the default 50% zoom factor is relative to the hight and width determined by the screen size. To adequately simulate the Game of Life, a buffer region calculates cell states beyond the visable canvas boundaries. If the computational boundary of the buffer region is reahced, the simulation will be forced to a halt (the state is no longer iterable) in order to maintain an accurate Game of Life enviornment.
Cell State Toggle: While inside the canvas, clicking cells will toggle them between dead (white, 0) and alive (balck, 1) states to set a starting position (index = 0) for the simulation. Additionally, click and hold, then move the cursor in any direction on the canvas to toggle all hovered cells to alive. Cells can be toggled at any point before, during, or after a session of iterations. Thus, a cell that is toggled at any point will impact the following iteration such that it will be applied to the state change algorithm. Cell borders will automatically be removed upon a zoom out action if the cells become too small.
Zoom: While inside the canvas, using the scroll wheel on a mouse will zoom on a specified location. The x-axis mouse location determines the horizontal zoom focus and the y-axis mouse location determines the vertical zoom focus. Scroll up to zoom in and scroll down to zoom out. If scrolled to the maximum outward zoom, the canvas will stop zooming out and recenter the view point. Additionally, while inside the canvas and holding the SHIFT key, click and hold, then move the cursor in any direction to traverse the canvas in the specified direction.
An iteration counter that displays the current iteration index can be found above the top left border of the canvas.
Algorithm Rule
The Game of Life is represented on a 2D grid where each cell has eight neighbors (top, bottom, left, right, and the four diagonals). A cell on the grid can either be dead (0) or alive (1), and the state of the cells change over discrete time steps according to the states of neighboring cells. Specifically, the state of each cell at the next time step is determined by its current state of the cell and the number of alive neighbors.
The algorithm Update Rules:
1. Underpopulation: A living cell with fewer than 2 alive neighbors dies (due to loneliness).
2. Survival: A living cell with 2 or 3 alive neighbors remains alive (survival).
3. Overpopulation: A living cell with more than 3 alive neighbors dies (due to overcrowding).
4. Reproduction: A dead cell with exactly 3 alive neighbors becomes a live cell (a new cell is born).
The algorithm follows the steps:
1. Initialize: Set up the grid with some configuration: some cells marked as alive (1) and others as dead (0).
2. Count Neighbors: For each cell, count the number of live neighbors in its neighborhood grid (eight neighbors).
3. Apply Rules: For each cell, apply the rules to determine whether the cell will be alive or dead in the next time step.
4. Update Grid: Update the grid to reflect the new states after applying the rules.
5. Repeat: Continue iterating for multiple time steps to observe how the patterns evolve.
For example, consider a 3x3 grid with the initial configuration [(0,1,0), (0,1,0), (0,1,0)] (Flattened 2D array.)
In this case, cells (1,0), (1,1), and (1,2) are alive (1), and the rest are dead (0).
Results after algorithm application:
Cell (0,0): Dead (0), with 2 alive neighbors (0,1) and (1,0). It remains dead.
Cell (0,1): Alive (1), with 1 alive neighbor (1,1). It dies due to underpopulation.
Cell (0,2): Dead (0), with 2 alive neighbors (0,1) and (1,2). It remains dead.
Cell (1,0): Alive (1), with 1 alive neighbor (1,1). It dies due to underpopulation.
Cell (1,1): Alive (1), with 2 alive neighbors (1,0) and (1,2). It survives.
Cell (1,2): Alive (1), with 1 alive neighbor (1,1). It dies due to underpopulation.
Cell (2,0): Dead (0), with 2 alive neighbors (1,0) and (2,1). It remains dead.
Cell (2,1): Alive (1), with 2 alive neighbors (1,1) and (2,0). It survives.
Cell (2,2): Dead (0), with 2 alive neighbors (1,2) and (2,1). It remains dead.
Updated grid after one iteration: [(0,0,0), (1,1,1), (0,0,0)].
In this case, cells (0,1), (1,1), and (2,1) are alive (1), and the rest are dead (0).
In this new state, a horizontal line of living cells has formed, showing the transformation from a vertical line of alive cells to a horizontal line after one iteration.
Insights & FAQS
Frequently Asked Questions
What is the difference between infinite and finite simulation and periodic and null boundary conditions?
Infinite simulation conceptually and visibly extends the lattice in a horizontal direction.Upon iteration, the lattice expands to the left and right side in order to simulate an infinitely sized lattice, as in, a lattice with infinite dead cells (white, 0). Since a cells state depends on its left and right neighbor, the infinite simulation expands on the edges per iteration so that the edge cells always have a left and right neighbor. For finite simulation, the lattice has a fixed size such that the cells at the edges of the lattice do not have neighbors beyond the boundaries. Therefore, there must be a method to handle the edge cells such as a periodic or null boundary conditions. Note that infinite simulation is only available in Sequential Wolfram's Nearest Neighbor. With the periodic boundary, the lattice is treated as if it were wrapped around, forming a torus-like shape. When a cell reaches the edge of the lattice, its neighbors on the opposite side of the lattice are considered as its direct neighbors. This creates a seamless continuity in the behavior as if the lattice repeats itself indefinitely. As for the null boundary condition, it imposes a fixed value zero for cells beyond the edges of the lattice. Thus, every edge cell with an out of bounds neighbor considers the neighbor to be dead (white, 0) and will use it in the next cell state calculation. This effectively creates a "wall" at the edges of the lattice.
Why does the Game of Life simulation abruptly terminate and disable the 'start' and 'iterate' buttons?
The Game of Life algorithm will come to a force halt and disable further iterations when the computational boundary is met by a dead cell (Black, 1). Since the Game of Life requires an infinite grid size, as in, no boundary, but there is a computational limit to what can be effectively simulated, a computational boundary was set. The computational boundary is located well beyond the visable canvas boundary and was implemented to allow for a seemingly infinite simulation space as objects can go off the visible grid and come back into the visible canvas region. Once the computational boundary for the grid is reached, further iterations can not occur, so to continue simulating the 'Reset' or 'Clear' button must be used to remove the dead cell from the computational boundary region and enable iterations.
What is the prupose of the 'setup' and 'simulate' buttons, and why are they distinguished colors?
'Setup' and 'Simulate' are mode switch buttons. They switch between the standard simulation mode where the algorithm is applied to the lattice upon iteration, and the pre-simulation (setup) mode where a cell ordering is configured to prepare for simulation. These buttons are different colors, compared to the standard feature buttons, as they are not features, but mode switches that change the available features. The distinguishing colors are used to indicate the significance of the buttons and to seperate them from the simulation/pre-simulation features.
Why is the application experiencing performance issues, such as slowness, lag, or crashes?
Performance issues can arise from computational or memory bottlenecks, particularly since this application is coded in JavaScript. JavaScript runs locally on the user's device rather than on a server, so the application's performance heavily depends on the device's processing power, available memory, and other local resources. If the device is underpowered, running multiple intensive processes, or lacks sufficient memory or computational power, it can lead to slowness, lag, or crashes. Consider lowering controllable simulation factors such as lattice size or iteration amounts to lessen memory and computational demands. Additionally, restarting the device or closing other applications or web-browser tabs may improve performance.
What is the difference between sequential and parallel for Wolfram's Nearest Neighbor?
In Wolfram's Nearest Neighbor, the parallel (synchronous) model updates all cells at once, creating patterns based on the entire grid's current state, which keeps each update consistent across cells. This parallel updating can produce symmetrical and often stable or repeating patterns. In contrast, the sequential (asynchronous) model updates cells one at a time in a set order, meaning each cell's update immediately influences the next. This can lead to unique, sometimes chaotic patterns that diverge from the parallel model due to the cumulative effect of each cell's change. Thus, parallel updating leads to consistent evolution, while sequential updating can introduce variations and complex transitions.
Why does the mode switch to 'Setup' when the button is not clicked?
The program automatically switches from 'Simulate' to 'Setup' mode whenever the lattice size changes. This is because altering the lattice size affects the number and arrangement of cells, and the sequential simulation requires a specific cell order. Without reconfiguring the cell order for the new lattice size, the program cannot correctly simulate the sequential algorithm. Therefore, switching to 'setup' mode ensures that a new configuration is established to support accurate simulation.
Why are the values written in the input boxes not being used?
The values entered in the input boxes may not be applied in the simulation for two reasons. First, they might fall outside the accepted range specified in the simulation documentation (found in the primary toolbar). More commonly, the issue arises if the 'Submit' button is not clicked after entering new values. For changes to take effect, either click the 'Submit' button or press the ENTER key. Pressing ENTER while an input box is selected will submit only that value, while pressing ENTER with no box selected will submit all entered values.
What are the rule numbers and why are there 256 rules?
The rule numbers (0-255) in Wolfram's Nearest Neighbor model represent the 256 possible rules for updating each cell based on its current state and the states of its two neighbors. Each rule defines a unique way for a cell to transition between alive and dead based on the neighbor combinations. Since there are three cells in each neighborhood (the cell itself and its two neighbors), there are 2^3 = 8 possible configurations of neighbor states, and each configuration can result in either a 0 (dead) or 1 (alive) outcome. This gives 2^8 = 256 possible rules in total, each represented by a unique number from 0 to 255.
Why is the canvas entirely black after simulation?
The canvas likely only appears to be entirely black as zooming in on the canvas may reveal the accurate simulation visualization. This can occur when the there is an abundance of alive cells (black, 0) and a small cell size. This may be the result of a large iteration amount and/or lattice size in combination with a rule number that tends to simulate large quantities of alive cells (black, 0), especially when using infinite simulation. This adverse event is not an incorrect simulation; it is a visual issue caused by the overwhelming contrast of numerous alive cells (black, 0) on a crowded canvas (many small cells).
Why is the cell order not saving?
The cell order configuration will only be saved when all cells in the lattice are fully ordered. For the sequential simulation to work accurately, each cell must have a specific position in the sequence. If the configuration leaves any cells unordered, clicking 'Simulate' will instead apply a default left-to-right ordering across the lattice. To ensure the custom order is saved, verify that every cell is assigned a position before starting the simulation.
Keyboard Shortcuts
Sequential Wolfram's Nearest Neighbor
Simulate Mode
Submit: ENTER
Iteration Input Box: ALT + J
Rule Input Box: ALT + K
Lattice Input Box: ALT + L
Start/Stop Button: ALT + ENTER
Iterate Button: ALT + I
Clear Button: ALT + C
Options Button: ALT + O
Setup Button: ALT + U
Download PDF Button: ALT + N
Download PNG Button: ALT + P
Lattice Fill Button: ALT + G
Random Fill Button: ALT + M
Iteration Toggle: ALT + W
Border Toggle: ALT + X
Delay Slider: ALT + Y
Setup Mode
Simulate Button: ALT + ENTER
Clear Button: ALT + C
Library Button: ALT + L
Help Button: ALT + P
Parallel Wolfram's Nearest Neighbor
Submit: ENTER
Iteration Input Box: ALT + J
Rule Input Box: ALT + K
Lattice Input Box: ALT + L
Start/Stop Button: ALT + ENTER
Iterate Button: ALT + I
Clear Button: ALT + C
Options Button: ALT + O
About Button: ALT + A
Download PDF Button: ALT + N
Download PNG Button: ALT + P
Lattice Fill Button: ALT + G
Random Fill Button: ALT + M
Bound Toggle: ALT + U
Iteration Toggle: ALT + W
Border Toggle: ALT + X
Delay Slider: ALT + Y
Game of Life
Submit: ENTER
Start/Stop Button: ALT + ENTER
Iterate Button: ALT + I
Clear/Reset Button: ALT + C
Library Button: ALT + L
About Button: ALT + A
Delay Slider: ALT + Y
Zoom Slider: ALT + Z