Tresvita can be downloaded here.
A cellular automata is a lattice of cells which are used as both memory and processing elements. This lattice of cells can exist in any dimension and can be of infinite size. At any given time each cell can be in one of any of a finite number of states. The transitions between states from one time step to the next (from one iteration to the next) depends upon the state of the cell and the neighbouring cells states. Each state is defined by clear rules, and these rules apply to all the cells on the lattice and at all times. The configuration of cells in the next time step is determined entirely by the current arrangement of cells past arrangements have no direct influence over future cell arrangements.
Perhaps the most famous cellular automata was developed by John Conway. In Conway's "Life", which is played in an infinite two dimensional board where each cell is a square (and therefore has eight neighbouring squares). There exist only two possible cell states: on ("alive") or off ("dead"). The rules are very simple: if a cell is off it remains off in the next time step unless there are exactly three neighbouring cells in the on state, if a cell is on it remains on unless there are more than three "on" neighbours or if there are less than two "on" neighbours. The patterns produced from these simple rules are amazing, with many structures emerging (such as gliders which "walk" diagonally across the board).
Tresvita is a three dimensional cellular automata toolkit. It supports plug-ins which allow the user to quickly and easily model their ideas using Tresvita's sophisticated and intuitive user interface.
Tresvita no longer supports the old 68K Macintosh computers, requiring a Power Macintosh computer.
Tresvita requires a minimum of System 7.0 to run. If you are running Tresvita using a version of the system software older than System 7.5 you will need to install the Thread Manager extension available free from many sources.
The minimum amount of free memory needed to safely run Tresvita is 1Mb, but at least 4Mb is suggested if you wish to run several large grids at once.
First load Tresvita (if you have not already done so) by double clicking on the application's icon. To start a new growth select New from the File menu (or press command-N). A dialog box will appear.
When you are satisfied with the settings in the dialog box click on the OK button (or press return) to start the growth. Press the Cancel button to cancel.
Clicking on the rule-set pop-up menu allows you to select between two built-in rule-sets (the "Sequential" and "Scattered" rules) along with any plug-in rules (which should be placed in the "Plug-In Folder" folder). Information on the currently selected rule-set can be obtained by clicking on the Info... button.
The four text boxes display the current rule set (in the picture above they contain the numbers "6", "8", "3" and "5"). You can change these values by either typing in a new number or using the arrows to the left of the text box.
What do these values mean? In Conway's "Life" there were only two dimensions, so each cell only had eight neighbours, however in Tresvita there are three dimensions. This means that each cell has twenty-six neighbouring cells.
The numbers in the four text boxes allow you to customise the rule set that will be used. You can enter a maximum value of twenty-six, and an minimum value of zero. There are basically two sets of rules to define the number of neighbours a cell needs to survive, and how many neighbouring cells are needed for growth. The text boxes allows you to define the minimum and maximum values for each.
For example, if you wanted to set the rules so that the values were the same as those for Conway's "Life" you would set the values as follows:
This setup is exactly the same as the rules described for "Life" but don't forget that these values probably won't yield interesting results since the rules were devised for a two dimensional board where there are only eight neighbours, now we are dealing with a three dimensional board with twenty-six neighbours.
The sequential rule set basically allows you to select ranges of values for survival and neighbours, but what happens if, for example, you want to only allow reproduction when a cell has an odd number of neighbours? This is when a scattered rule set comes in useful. The scattered rule set method can be selected from the pop up menu at the top of the New Growth dialog box.
By using the check boxes it is possible to create many new and diverse rule sets using the scattered method.
Tresvita also lets you change the size of the grid the growth is ran on. Although a cellular automata is ideally ran on an infinite sized grid this is impractical using a modern computer. In the picture of the dialog box above the grid size is set to 10x10x10 the number of cells along the x axis is 10, the number along the y axis is 10, and the number along the z axis is 10.
The size of the grid can be easily changed. Hold down on the pop up menu and you can select one of a number of predefined grid sizes.
By selecting "Other..." from the pop up menu you can enter a customised grid size. Please note that the maximum value for each dimension is 200, and the minimum is 1.
The Seed Density (%) value allows the user to set an initial, random, starting population size for the growth. In the snap shot above the seed density is set to 3%; this means that approximately 3% of the cells on the grid will be on and the remaining 97% will be off. The activated cells are chosen at random. By setting the seed density to 0% you will be presented with a blank grid, at 50% approximately half the cells are on, and a setting of 100% would activate all of the cells.
Note that the effect of the seed density value may be different for other plug-in rule sets. Also, some plug-ins (such as the "Falastructor" plug-in) no not make use of the seed density option and so it is dimmed.
The bottom left hand corner of the "New" dialog box shows the rule set's lambda value. This number represents the degree of information movement and retention on a 0 to 1 scale. The lambda value depends solely upon the rule set chosen. If the lambda value is very low then information (ie. the state of cells on the grid) is static; it is easily retained through time, but moves little. On the other hand a high lambda value represents a chaotic regime. Information is moved freely, but retaining it is difficult. However there is a certain point in between where complexity runs riot. Conway's "Life" has a lambda value of 0.273.
Note that the lambda value is only calculated for the two built in rule-sets "Sequential" and "Scattered".
The "Save Movie" check box allows you to save a movie of your growth to disk. This movie is saved in Apple QuickTime format and can be played back using many applications (including Tresvita, SimpleText, MoviePlayer). This is a useful feature for very large grids or for growths which run over a long period of time.
The "Save Report" check box allows you to save a simple text report about the growth. A text report will record the rule set, the size of the grid and the lambda value. Also the population size and probability of a change in state will be recorded. The text report can be easily copied and pasted into a spreadsheet program so accurate graphs can be plotted.
The text report is always arranged in the same way, with lines added to the bottom each iteration concerning the population size and probability of a change in state.
When you run a Tresvita growth, the window is arranged as below.
The window behaves like a normal Macintosh window, with scroll bars, a title bar and so on. The only non standard parts of the window are the iteration counter, the play/pause button, the speed controller and the actual growth displayed in the window.
The growth shown in the window is draw to the current render mode and is updated each iteration. A Tresvita growth is drawn as a 3 dimensional shape with the viewer looking down upon the shape from the front, top-left hand side of the growth.
The iteration counter displays the current iteration. When a new growth is started, or a file opened, the iteration counter reads 0.
The speed controller allows you to control the rate at which the iterations pass by.
The play/pause button allows the calculation on the growth to be paused or started. When a new window is opened the growth will be in the paused state. Clicking once on the "play" button () will start the growth running, and the iteration counter will start counting. You can use the speed controller to slow down the iteration rate if you wish. The play button will change to a "pause" button (). Clicking on the pause button will stop all calculation on the growth once the current iteration has been computed.
When the growth is paused the mouse can be used to select cells in the growth window. Once selected, a group of cells can be cut, copied, pasted or cleared using the Edit menu in exactly the same way as in any Macintosh application. Selected cells may also be moved to a new location using the mouse or the arrow keys/numerical key pad.
Cells can be selected by clicking and holding the mouse button, then moving the mouse to drag out an area exactly the same technique as when making a selection in a graphics program. Movements of the mouse are "locked" onto the current z-plain. This means that mouse movements are simply interpreted as x, y movements. If you which to move through the z-axis, hold down the shift key whilst moving the mouse. This will cause the mouse movements to be interpreted as changes in the z-axis as well as the x, y plain.
Once a selection of cells has been made it can then be dragged using the mouse or moved using the cursor keys or numerical key pad.
When you copy a selection of cells you can then paste them into another Tresvita growth or paste them into a graphics application. If you choose to paste them into a graphics application they will be pasted as a picture. Should you then copy this picture you will not be able to paste the cells back into a Tresvita growth since the 3D information which is used internally by Tresvita will be lost.
To display the population window for the front most growth (ie. the currently active window) choose Show Population Graph from the Grid menu. This will display the population window.
To hide the population window either click on its close box, or select Hide Population Graph from the Grid menu.
The population window shows a simple bar graph of the growth population over the past 100 iterations. At the top of the window (underneath the title bar) the title of the corresponding growth window is displayed.
The graph is useful when identifying patterns in a growth, looking for blinkers, or when attempting to find long term population trends.
Clicking and holding down the mouse button on the population graph window brings up a pop-up menu which allows you to select the scale on the graph (a choice of 50%, 100%, 150%, 200% or 500%).
N.B. For a more accurate population graph use the "Save Report" feature in the New dialog and plot a graph using a spread sheet program.
To display the rule set window for the front most growth (ie. the currently active window) choose Show Rule Set from the Grid menu. This will display the rule set window.
To hide the rule set window either click on its close box, or select Hide Rule Set from the Grid menu.
The rule set window is very simple. It displays the rule set for the growth, as well as the lambda value (to 5 decimal places). At the top of the window the title of the corresponding growth window is displayed.
To display the cell state key window for the front-most growth choose Show Cell State Key from the Grid menu (note that this menu option replaces the "Show Rule-Set" menu item when the growth is using a plug-in rule). This will display a window showing which cell colours are assigned to which cell states.
To display the probability of a change in state window for the front most growth (ie. the currently active window) choose Show State Change from the Grid menu. This will display the state change window.
To hide the state change window either click on its close box, or select Hide State Change from the Grid menu.
The state change window shows what the probability of any cell on the grid changing its state during the last iteration was. A change in state is when an "alive" cell "dies", or when an empty cell becomes "alive". A probability of 1 indicates no similarities between the current iteration and the previous one, a probability of 0 indicates a stable pattern. The overall rate of change of the grid increases from static to random and can be used to judge whether a growth has become predictable or not. At the top of the window (underneath the title bar) the title of the corresponding growth window is displayed.
N.B. For a more accurate view of the probability of change of state use the "Save Report" feature in the New dialog and plot a graph using a separate spread sheet program.
It is often necessary to "seed" a grid with a simple pattern, and often interesting to watch a pattern of cells you arranged grow and change under the influence of the rule set. You can edit the arrangement of cells in a grid by selecting Edit Grid from the Grid menu. This will display a dialog box enabling you to add and remove cells to the currently selected window's grid.
The interface for the grid editor is relatively straight forwards, however there are a few features which need pointing out.
The grid editor contains three scroll bars. Two are for the normal horizontal and vertical scrolling (the two inactive scroll bars in the image above). The third scroll bar (positioned to the left) allows scrolling through the 'z' axis of the grid. How does this work? Image the grid is a series of cards in a filing system. By using the 'z' scroll bar we can select anyone of the cards to work on, then the card is inserted back into the filing system; back into the correct 'z' axis position. By moving though the 'z' axis layer by layer you can build up quite complicated shapes.
The numbers displayed in the top right hand corner of the grid editor show the current z axis position, as well as showing the cursor's position in the x and y axes. In the screen shot above the mouse cursor is over the the cells matching co ordinates (10, 13, 8) in the grid.
By clicking over an "alive" cell (yellow) you can turn that individual cell off, or by clicking and dragging turn a number of cells off. By clicking over a "dead" cell you can turn it on ("alive") or, by clicking and dragging, turn a number of cells on.
Clicking on the Clear button will turn off every cell in the grid.
Clicking on the Save As... button will save the grid you have designed to disk, but will not effect the file currently being used. This allows you to design a number of different grids easily within the grid designer without changing the currently open grid.
When you are finished click on OK to put the changes you have made into effect, or click on Cancel to ignore any changes you have made to the grid's cells.
(Note that the Grid Editor may not be supported by some plug-in rules, so the "Edit Grid" menu item will be dimmed.)
By selecting Resize Grid from the Grid menu, the grid size of the currently active growth can be resized.
The old grid will be centred in the new grid. Please be aware that if you specify a new grid that is smaller than the old grid size then some of the cells may well be cropped.
If you do not want the old grid to be centred in the new grid then use the "advanced" options. These can be displayed by clicking on the swivel arrow in the top right hand corner of the "Resize Grid" dialog box. These options are quite involved and allow you to accurately choose which cells will be pasted where in the new grid.
(Note that some plug-ins may not support grid resizing. If this is the case then the "Resize Grid" menu item will be dimmed.)
The Render menu allows the user to change the way Tresvita displays the grid. All changes to the Render menu take place on the currently selected window. The default render settings are Depth Render switched on, Display Grid switched off and the Solid Cell render mode selected, with the cell size set to 100%.
The Render menu is divided into two parts separated by a separator line. The top part has three render options that apply to any render mode. These are the cell size option (Draw at 50% or Draw at 100%), the Depth Render option and the Display Grid option. Their effects are shown bellow (the Solid Cell render mode is being used, but the effects would be similar whatever the mode).
The second part of the Render menu consists of a variety of drawing modes. These are Wire Frame, Solid Cell, and Solid Object. Only one of these modes can be selected at a time. Their effects are shown below.
At the bottom on the Render menu is a submenu, Draw State. If the current rule-set has more than the standard on/off cell states (for example, the "3D Prisoner's Dilemma" plug-in which has four cell states corresponding to four cell colours) you can use this submenu to select which states will be drawn.
The Edit menu is used mainly when the growth is paused. It can then be used to cut, copy, paste and clear selections of cells in the Tresvita growth window.
This menu functions in exactly the way you would expect it to in any Macintosh application.
The File menu contains all the items you would expect in a Macintosh application (the only exception being the omission of a Print option).
Selecting New will open a dialog box allowing you to set the rule set, grid size etc. for a new Tresvita growth. This menu item is disabled if there are already 10 growths running, since Tresvita can not handle more than 10 growths at a time.
Selecting Open... allows you to select a file to view. This can be a Tresvita growth previously saved to disk, or it can be a QuickTime movie. This file will be disabled if there are already 10 growths running, since Tresvita can not handle more than 10 growths (including QuickTime movies) at a time.
Selecting Close will close the front window. If no windows are open, this menu item is disabled.
Save will save any changes you have made to the currently open file. If you have made changes to a new Tresvita file (ie. one created with the New... item rather than a file that has been opened) this item will behave like the Save As... item. This item is disabled if no windows are open.
Save As... will save the current growth as a new file. Any later calls to Save will update this saved file. This item is disabled if no windows are open.
(Note that some plug-ins may not support the saving of growths.)
Quit exits Tresvita. You will be asked whether you want to save changes any open files.
I would like to offer a special thank you to Simon Fraser for the help and advice he gave whilst I was programming earlier versions of Tresvita.
The glider files accompanying Tresvita are taken from Carter Bayes' paper: