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.
- A new prompt window appears top right. Enter return.
- 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.
- A prompt window appears top left. Enter return.
- 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).
- Enter q to interrupt and backtrack up the prompt sequence.
- 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).
- At the second prompt after that
Neighborhood size k: mixed-m, or enter 1-13 (def 3): enter 5.
- 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.
- 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 #.
- 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.
- 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.
- At the second prompt,
range of network size-r, else-ret: enter r.
- Enter return until the top center
output parameters banner appears,
then a to restore all defaults, then
d to skip further special options.
- Enter returnto start a range of CA basin of attraction
fields (with the same rule), for increasing sizes from 5 to 12.
- Enter return for the next ``mutant'' CA rule.
- Toggle the display of ``backwards'' space-time patterns and
the state-space matrix previously.
- 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.
- At the very first prompt
forward only/single basin/subtree-s (default field):
enter s.
- At the Neighborhood size... prompt enter 4.
- Enter return until the top center output parameters
banner appears, then a to restore all defaults, then
dto skip further special options.
- Enter return in response to further prompts in top right windows.
- A singe basin for a CA, size 14, is generated.
- Enter return for the next mutant.
- Toggle the display of the ``backwards'' space-time patterns with
sand the state-space matrix with m previously.
- 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.
- At the very first prompt
forward only/single basin/subtree-s (default field):
enter s.
- Enter return in response to further prompts
until the Network size... prompt, select 25.
- At the Neighborhood size... prompt, select 5.
- 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.
- Enter return until the top center
output parameters banner appears,
then a to restore all defaults, then
a to skip further special options.
- At the prompt
backward for subtree-b, forward for basin (def):
select b.
- 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.
- 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.
- Enter return for the next mutant.
- 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.
- 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.
- At the very first prompt
forward only/single basin/subtree-s (default field):
enter s.
- At the enter cell scale in pixels... prompt,
select 1, the smallest scale.
- At the
Network size... prompt, select 150.
- At the Neighborhood size... prompt, select 5.
- Enter return until the top center
output parameters banner appears, then enter s
for space-time pattern only.
- 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.
- # to scroll the space-time pattern.
- g to change the rule to different ``complex'' rule.
- u to toggle the input-entropy - density plot.
- 4 for a new random initial state.
- f to progressively ``filter''
the space-time pattern, and a to restore the unfiltered pattern.
- e and c to expand and contract
the scale of the space-time pattern.
- Try other key presses to change the rule, seed, color,
analysis, size, updating, frozen cells, dimension, etc.
- 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).
- 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.
- At the very first prompt
forward only/single basin/subtree-s (default field):
enter s.
- Enter return until a
top right WIRING prompt window appears,
WIRING: special-s load-l random-r
regular: 3d-3 2d-2 1d-def: select 2 for regular 2-d wiring.
Any previous network and neighborhood size settings will be superseded.
- 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.
- At the next top right prompt,
Neighborhood size k: mixed-m, or enter 1-13 (def 3):
enter 9.
- Enter return until the main sequence prompt for rule selection
appears,
Select k9-rule, empty-e fill-f maj-m Alt-a life-L chain-c rand-r
bits-b hex-h repeat-p load-l (def-rand): select
L for the "game-of-Life".
The lookup-table of
the rule will be displayed as a bit pattern.
- Enter return until the seed prompt appears.
Select SEED (2d ij=56,56), empty-e fill-f rand-r
bits2d-b hex-h repeat-p load-l (def-r):
enter return for a random block.
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.
- Enter return until the top center
output parameters banner appears, then enter s
for space-time pattern only.
- 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.
- t to toggle between the 2d display and a
3d isometric projection
(imagine looking up at a transparent shaft).
- k for a new random central
block. 4 for a fully random seed.
- eand c to expand and contract the
scale of the space-time pattern.
- 3 to toggle between cells colored according
to rule-table lookup (the default) or by value.
- Try other key presses to change the seed,
frozen cells, dimension, updating, rule, etc.
- 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.
- At the very first prompt
forward only/single basin/subtree-s (default field):
enter s.
- Enter return until a
top right WIRING prompt window appears,
WIRING: special-s load-l random-r
regular: 3d-3 2d-2 1d-def: select 2 for regular 2-d wiring.
Any previous network and neighborhood size settings will be superseded.
- 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.
- 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.
- At the totalistic rule-t prompt in the main sequence of prompts,
enter t.
- At the next prompt in the top right window enter return.
- Enter return until
the main sequence prompt appears for selecting the rule as
a totalistic code,
Select k7 totalistic code (def-dec)
maj-m rand-r bits-b hex-h repeat-p: select b.
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.
- Enter return until the seed prompt appears,
Select SEED (2d ij=240,240), empty-e fill-f rand-r
bits2d-b hex-h repeat-p load-l (def-r):
select r for a random seed,
then a for "all" the network,
as opposed to a central block.
- Enter return until the top center
output parameters banner appears, then enter s
for space-time pattern only.
- 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.
- 4 for a new random seed.
- e and c to expand and contract the
scale of the space-time pattern.
- 3 to toggle between cells colored according
to rule-table lookup (the default) or by value.
- Try other key presses to change the updating, frozen cells,
dimension, rule, etc.
- 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.
- At the very first prompt
forward only/single basin/subtree-s (default field):
enter s.
- Enter return until a
top right WIRING prompt window appears,
WIRING: special-s load-l random-r
regular: 3d-3 2d-2 1d-def: select 3 for regular 3d wiring.
Any previous network and neighborhood size settings will be superseded.
- 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.
- 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.
- Enter return until
the main sequence prompt appears for rule selection
appears,
Select k7-rule, empty-e fill-f maj-m Alt-a life-L chain-c rand-r
bits-b hex-h repeat-p load-l (def-rand):
enter return for a random rule.
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.
- Enter return (to accept defaults including the seed)
until the top center
output parameters banner appears, then enter s
for space-time pattern only.
- 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.
- 5 for a new "singleton" seed, a single central 1,
or k for a new random central 3d block.
- r for a new random rule.
- e and c to expand and contract the
scale of the space-time pattern.
- 3 to toggle between cells colored according
to rule-table lookup (the default) or by value.
- Try other key presses to change the updating, frozen cells, dimension, etc.
- 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.
- At the very first prompt
forward only/single basin/subtree-s (default field):
enter s.
- At the Network size... prompt, select 12. (for a faster
computer select 14).
- At the Neighborhood size... prompt, select 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.
- 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.
- 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.
- 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).
- just a wiring-scheme may be set, the rule and k remain
homogeneous, as in CA, by default.
- just a rule-scheme may be set, the local wiring template
and k remain homogeneous, as in CA, by default.
- both a wiring-scheme and rule-scheme may be set,
k remains homogeneous by default. This is what is usually
understood as a ``random Boolean network''.
- a k-mix may be set, which implies a both wiring-scheme
and rule-scheme, but the wiring-scheme remains
local by default.
- a network with a k-mix, a non-local wiring-scheme and
a rule-scheme may be set.
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.
- For a random wiring-scheme in 1d:
At the first top right prompt,
WIRING: special-s load-l random-r
regular: 3d-3 2d-2 1d-def: select r.
- For a random wiring-scheme in 2d or 3d:
At the first top right prompt,
WIRING: special-s load-l random-r
regular: 3d-3 2d-2 1d-def: select s.
At the next top right prompt
3d-3 2d-2 1d-def: select 2 or 3.
At the next top right prompt,
hand wire-h,
regular: 3d-3 2d-2 1d-1, random-def: enter return.
- For a random rule-scheme, at the top right prompt,
RULES: single rule (def), load rule mix-l
mix: no limit-n, or set limit up to 200: regular: enter n.
- 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.
- To examine the resulting network in detail,
at the the top right prompt (or similar),
1d network (n=150),review/revise/learn, wiring and rules
graph-g, matrix: revise-m view-M
graphic: 1d+timestep-1 circle-c, 2d-2:
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