Discrete Dynamics Lab

Quick Start Examples

This is a version of chapter 4 (Quick Start Examples) of the new Manual, briefly describes the DDLab graphical use interface, and gives a number of examples of DDLab functions. Try these examples first, to get the flavor of DDLab, before reading the detailed program reference (chapters 4-35).
Contents


The DDLab screen

In Unix, Linux, Irix, or Windows(3.1, 95, 98), DDLab occupies a window within the monitor screen, in DOS the whole screen is occupeid. For simplicity we will refer to the DDLab ``screen'', and various panels which appear from time to time within the screen as ``windows''. The location of a window within the screen is usually indicated, for example ``bottom'', ``top right'' etc.

When DDLab is run with no program parameters, the screen appears with a black background. The program parameter -w gives a white background, i.e. enter ddlab -w. Descriptions of colors in this manual assume a white background. A title bar is displayed across the bottom of the screen. A series of prompts are presented to set up the network, functions to be performed, presentation. These prompts appear either in a main sequence for the most common settings, or in various windows that automatically open up.

The mouse cursor (if detected) is used to set bits in rule-tables and network states, for ``drawing'' bit patterns in 2d networks, for dragging nodes in the network graph and meta-graph, and for some other functions, but most user inputs are from the keyboard.

User Input

The flashing cursor (usually green) prompts for input. Enter appropriate input from the keyboard.

To revise the input, press q, backspace, or right mouse button.

To accept the input, and move on to the next prompt or routine, press return or left mouse button. If no input was entered, or if the input was inappropriate, a default input is automatically selected.

Backtrack

To backtrack to the preceding prompt, to revise, or interrupt a running routine such as space-time patterns or attractor basin, press q, or right mouse button.

You can backtrack to any stage in the prompt sequence with q (or right mouse button), eventually to exit the program.

Quitting DDLab

To quit DDLab immediately (except in DOS) enter Ctlr-q at any prompt, followed by q. Otherwise backtrack with q to the start of the program, then enter q to exit.

The graphics setup - DOS

Its recomended that you run DDLab in pure DOS mode. In Windows95 use the option ``Restart the computer in MS-DOS mode''. In a DOS window in Windows95, run DDLab in the default low resolution only. If you expand to full screen (toggle Alt-Enter) you may use higher resolutions but the mouse cursor will probably not be visible. Be sure to revert to low resolution before changing from full screen back to the DOS window.

In DOS, the background can be changed between black and white, and the resolution between 640x480, 800x600, and 1024x768 pixels, given the necessary monitor, graphics card and driver.

The DDLab screen will start up at a resolution of 640x480 (VGA) with a black background, if no program parameters are set. Program parameters may be added for SVGA as follows: -h (for high, 1024x768) and -m (for medium, 800x600), i.e. for high resolution start DDLab by entering ddlabx23 -h at the DOS prompt. For a white background enter ddlabx23 -w, or ddlabx23 -h -w for both high resolution and a white background.

To change the resolution or background after DDLab has started, at the first prompt select g for graphics. A graphics setup screen will appear. Enter b to toggle the background. Other options allow changing the resolution, font size and text line spacing and cursor flash speed.

The graphics setup - Unix, Linux, Irix

The screen will start with a black background if no program parameters were set, and with a resolution automatically selected to comfortably fit the monitor. For example, on my 1024x768 laptop running linux, the resolution of the DDLab window is 925x694.

To change the background after DDLab has started, at the first prompt select g for graphics. A graphics setup screen will appear. Enter b to toggle the background. Other options allow changing the resolution, font size and text line spacing and cursor flash speed. The screen can also be resized with the mouse in the usual way.


Basin of attraction fields

From the first prompt keep accepting defaults with return or left mouse button (about 13 presses), until the top center output parameters banner appears, and a top right window with a list of options starting with accept all basin defaults -d. Enter d to skip these special options.

  1. A new prompt window appears top right. Enter return.
  2. The basin of attraction field will be generated for a 1d 3-neighbor CA rule, n=10. The rule (chosen at random by default) appears in a window at bottom of the screen. A top right window shows brief data on the field once it is generated. A progress bar below this window shows the proportion of state-space as it is used up. Vertical lines on this bar indicate the states used to seed the basins.
  3. A prompt window appears top left. Enter return.
  4. Another basin of attraction field is generated, a one bit ``mutant'' of the previous rule, with corresponding data. This process can continue indefinitely (it can be set on automatic).
  5. Enter q to interrupt and backtrack up the prompt sequence.
  6. Try this routine again with an increased network size n and neighborhood size k. At the prompt Network size (length) max 31, default 10: enter 14 (for example).
  7. At the second prompt after that Neighborhood size k: mixed-m, or enter 1-13 (def 3): enter 5.
  8. Then repeat the steps as above. The basins of attraction will take longer to generate. Their scale and position can be fine-tuned with the special options that were skipped.


``Backwards'' space-time patterns, and state-space matrix

While the attractor basins are generating, various display settings can be changed on-the-fly. These are indicated on the right of the bottom title bar. If the attractor basin generates to fast, backtrack to slightly increase the network size n or neighborhood k.

  1. Enter s to toggle the ``backwards'' space-time pattern on-off, and see predecessors (pre-images) being generated on the left of the screen as a space-time pattern. Initially the attractor states will be displayed, then each state (black) and its set of pre-images (red). Expand or contract the scale of the space-time pattern with eand e. Toggle scrolling with #.
  2. Enter m to toggle the display of the state-space matrix in the lower right corner. This reveals interesting symmetries. Different colors represent states in different basins.
  3. Enter q to interrupt and backtrack up the prompt sequence.


Basin of attraction fields for a range of network sizes

Backtrack with q(or right mouse button) to the start of the program.

  1. At the second prompt, range of network size-r, else-ret: enter r.
  2. Enter return until the top center output parameters banner appears, then a to restore all defaults, then d to skip further special options.
  3. Enter returnto start a range of CA basin of attraction fields (with the same rule), for increasing sizes from 5 to 12.
  4. Enter return for the next ``mutant'' CA rule.
  5. Toggle the display of ``backwards'' space-time patterns and the state-space matrix previously.
  6. Enter q to interrupt and backtrack up the prompt sequence.


A single basin of attraction

Backtrack with q (or right mouse button) to the start of the program.

  1. At the very first prompt forward only/single basin/subtree-s (default field): enter s.
  2. At the Neighborhood size... prompt enter 4.
  3. Enter return until the top center output parameters banner appears, then a to restore all defaults, then dto skip further special options.
  4. Enter return in response to further prompts in top right windows.
  5. A singe basin for a CA, size 14, is generated.
  6. Enter return for the next mutant.
  7. Toggle the display of the ``backwards'' space-time patterns with sand the state-space matrix with m previously.
  8. Enter q to interrupt and backtrack up the prompt sequence.


A subtree

(see examples for ordered, complex and chaotic dynamics)

Backtrack with q (or right mouse button) to the start of the program.

  1. At the very first prompt forward only/single basin/subtree-s (default field): enter s.
  2. Enter return in response to further prompts until the Network size... prompt, select 25.
  3. At the Neighborhood size... prompt, select 5.
  4. Enter return in response to further prompts until the Select SEED... window appears. Enter r for a "random seed" a to set all cells at random.
  5. Enter return until the top center output parameters banner appears, then a to restore all defaults, then a to skip further special options.
  6. At the prompt backward for subtree-b, forward for basin (def): select b.
  7. At the next prompt
      forwards before backwards?
      how many steps (default 0, max 4096): select 2.
    This runs the CA forward by 2 time-steps (from the ``seed''), before running backward from the state reached. The original randomly selected seed is likely to be a ``garden-of Eden'' state with no predecessors, so not much use as the root of a sub-tree.
  8. Enter return in response to further prompts in top right windows. The subtree is generated with its "root" state highlighted as a bit pattern. To generate a bigger sub-tree, enter a greater number of forward time-steps at the previous prompt. However, this might reach an attractor state. In this case the whole basin will be generated with the message subtree=basin in the top right data window. If this is taking too long, enter q to interrupt and backtrack to reduce the number of forward time-steps.
  9. Enter return for the next mutant.
  10. While the subtree is being generated, toggle the display of "backwards" space-time patterns with s and the state-space matrix m as described previously.
  11. Enter qto interrupt and backtrack up the prompt sequence.


1d Space-time patterns

(see example (a) which includes the 1d CA in the network graph (circle) layout)

Backtrack with q (or right mouse button) to the start of the program.

  1. At the very first prompt forward only/single basin/subtree-s (default field): enter s.
  2. At the enter cell scale in pixels... prompt, select 1, the smallest scale.
  3. At the Network size... prompt, select 150.
  4. At the Neighborhood size... prompt, select 5.
  5. Enter return until the top center output parameters banner appears, then enter s for space-time pattern only.
  6. At the next prompt, FORWARDS ONLY options:..., the top center accept defaults-d banner appears, enter d to skip yet more special options.

    The space-time pattern is generated from the top down, on the left of the screen. To the right is a histogram of the lookup frequency relating to a window of 10 time-steps, and a plot of the entropy of this histogram, the input-entropy. An on-the-fly key index on the right of the screen gives a list of key presses to change settings on-the-fly. Try the following key presses to see what happens.

  7. Try other key presses to change the rule, seed, color, analysis, size, updating, frozen cells, dimension, etc.
  8. To show the 1d CA according to the "network graph" (circle layout), enter q to show the top right interupt prompts, one of which is tog graph-g. Enter g to show the network graph with the default circle layout, then q to return to normal space-time patterns. The CA will be simultaneously displayed in network graph layout as in example (a).
  9. Enter q to interrupt and backtrack up the prompt sequence.


2d space-time patterns ("game-of-Life")

(see examples (a) and (b))

Backtrack with q (or right mouse button) to the start of the program.

  1. At the very first prompt forward only/single basin/subtree-s (default field): enter s.
  2. Enter return until a top right WIRING prompt window appears, Any previous network and neighborhood size settings will be superseded.
  3. Enter returnuntil the top right prompt, 2d, enter width (def-40): depth (def 40): set, say, 56x56. For a slow computer accept the default 40x40.
  4. At the next top right prompt, Neighborhood size k: mixed-m, or enter 1-13 (def 3): enter 9.
  5. Enter return until the main sequence prompt for rule selection appears, The lookup-table of the rule will be displayed as a bit pattern.
  6. Enter return until the seed prompt appears. Alternatively select e to "empty" all cells to zero, then l to load a seed, then enter the file name "pento" at the LOAD SEED... prompt. This is the "r-pentomino" pattern that guarantees gliders.
  7. Enter return until the top center output parameters banner appears, then enter s for space-time pattern only.
  8. At the next prompt, FORWARDS ONLY options:..., a top center accept defaults-d banner appears, enter d to skip yet more special options.

    The 2d space-time pattern is generated in the top left hand corner of the screen. The on-the-fly key index on the right of the screen gives a list of key presses to change settings on-the-fly. Try the following to see what happens.

  9. Try other key presses to change the seed, frozen cells, dimension, updating, rule, etc.
  10. Enter q to interrupt and backtrack up the prompt sequence.


2d Space-time patterns (reaction-diffusion)

(see examples (a) and (b))

Backtrack with q (or right mouse button) to the start of the program.

  1. At the very first prompt forward only/single basin/subtree-s (default field): enter s.
  2. Enter return until a top right WIRING prompt window appears, Any previous network and neighborhood size settings will be superseded.
  3. Enter return until the top right prompt, 2d, enter width (def-40): depth (def 40): enter 240x240, or a smaller size for a slow computer.
  4. At the next top right prompt, Neighborhood size k: mixed-m, or enter 1-13 (def 3): enter 7.

    This results in a triangular 2d array, where each cell has 6 nearest neighbors. Although shown orthogonally the underlying grid is effectively triangular.

  5. At the totalistic rule-t prompt in the main sequence of prompts, enter t.
  6. At the next prompt in the top right window enter return.
  7. Enter return until the main sequence prompt appears for selecting the rule as a totalistic code, A flashing cursor will appear over a row of 8 gray squares. These represent the outputs of the 8 possible totals given 7 inputs, from 7-0, the totalistic code lookup-table. Set 1s in the table with key 1 (the square will turn red), set 0s with key 0 (the square with turn gray). Arrow keys move the cursor between squares. For space-time patterns as in examples (a) and (b) enter (a) 11110000, or (b) and 11101000.
  8. Enter return until the seed prompt appears,
  9. Enter return until the top center output parameters banner appears, then enter s for space-time pattern only.
  10. At the next prompt, FORWARDS ONLY options:..., a top center accept defaults-d banner appears, enter d to skip yet more special options.

    The 2d space-time pattern is generated in the top left hand corner of the screen. The on-the-fly key index on the right of the screen gives a list of key presses to change settings on-the-fly. Try the following to see what happens.

  11. Try other key presses to change the updating, frozen cells, dimension, rule, etc.
  12. Enter q to interrupt and backtrack up the prompt sequence.


3d space-time patterns

(see examples (a) and (b))

Backtrack with q (or right mouse button) to the start of the program.

  1. At the very first prompt forward only/single basin/subtree-s (default field): enter s.
  2. Enter return until a top right WIRING prompt window appears, Any previous network and neighborhood size settings will be superseded.
  3. Enter return until the top right prompt, to sets the size of the 3d lattice,
    3d, enter width (def-9): depth (def 9): height (def 9): enter the width depth and height. The maximum cube would be 40x40x40. The array has 3-torus boundary conditions.
  4. At the next top right prompt, Neighborhood size k: mixed-m, or enter 1-13 (def 3): enter 7. The neighborhood is arranged as a 3d cross.
  5. Enter return until the main sequence prompt appears for rule selection appears, Alternatively follow the steps in section in section 2d Space-time patterns (reaction-diffusion) to set the "totalistic code". The lookup-table of the rule will be displayed as a bit pattern.
  6. Enter return (to accept defaults including the seed) until the top center output parameters banner appears, then enter s for space-time pattern only.
  7. At the next prompt, FORWARDS ONLY options:..., a top center accept defaults-d banner appears, enter d to skip yet more special options.

    The 3d space-time pattern is generated in the top left of the screen. An on-the-fly key index on the right of the screen gives a list of key presses to change settings on-the-fly. Try the following to see what happens.

  8. Try other key presses to change the updating, frozen cells, dimension, etc.
  9. Enter q to interrupt and backtrack up the prompt sequence.


"Screen-saver" demo

(see example (a))

The ``screen-saver'' demo provides a continuous show of attractor basins ``boiling'' on the screen. Backtrack with q (or right mouse button) to the start of the program.

  1. At the very first prompt forward only/single basin/subtree-s (default field): enter s.
  2. At the Network size... prompt, select 12. (for a faster computer select 14).
  3. At the Neighborhood size... prompt, select 4.
  4. Enter return until the top center output parameters banner appears, then a to restore all defaults, then return until the savescreen demo -s prompt; enter s to accept the option.
  5. Then enter d twice (or return) to accept all further defaults. The demo will start. The rule picked at random will be shown in the bottom rule-window.
  6. While the demo is in progress, toggle the display of the ``backwards'' space-time pattern with key s, and the state-space matrix with key m as described in section ``Backwards'' space-time patterns, and state-space matrix.
  7. Enter q to interrupt and backtrack up the prompt sequence.


Random Boolean Networks

(see examples (a) and (b))

Until now, the Quick Start Examples have described cellular automata, which have a homogeneous local wiring template and a single rule throughout the network. A random Boolean network (RBN) departs from CA network architecture (the default in DDLab) by allowing each cell in the network to have different nonlocal wiring, a different rule, and different k (the number of inputs), or any combination of the above. The network can be assigned a wiring-scheme, rule-scheme and k-mix in a variety of ways, including randomly (with or without biases).

To generate attractor basins and space-time patterns for RBN, or any combination of parameters listed above, the preceding examples in sections Basin of attraction fields to "Screen-saver" demo can be adapted as described below.

Note that because running RBN backwards imposes a greater computational load than for CA, when generating attractor basins for RBN, both n and k should be kept small, and 2d or 3d networks should be avoided.

  1. For a random wiring-scheme in 1d: At the first top right prompt,

  2. For a random wiring-scheme in 2d or 3d: At the first top right prompt, At the next top right prompt 3d-3 2d-2 1d-def: select 2 or 3.
    At the next top right prompt,

  3. For a random rule-scheme, at the top right prompt,

  4. For a random k-mix for a 1d network, at the main sequence prompt,
    Neighborhood size k: mixed-m, or enter 1-13 (def 3): enter m.
    Various further options to bias the k-mix are presented. If in doubt enter return.

  5. To examine the resulting network in detail, at the the top right prompt (or similar),

    Enter 1, c, 2 or 3 to review the network as a wiring graphic, using the arrow keys to examine the wiring and rules for chosen elements in the network. For 3d networks, the square bracket keys [ and ] move up and down in the 3d volume.

    Enter m or M to review the network as a wiring matrix.

    Enter g to review the network as a graph, which can be rearanged by dragging nodes with the mouse.

    These options are also available for CA.


    back to the start
    back to the DDLab home page
    Last modified: July 2001