Category : Windows 3.X Files
Archive   : TERMITE.ZIP
Filename : TERMITE.DOC

 
Output of file : TERMITE.DOC contained in archive : TERMITE.ZIP

--==[ TERMITE v1.0 ]==--

Hans Kellner
Scottsdale, AZ
September 1990


This is another little inspiration from Scientific American.
You will find the article in the Computer Recreations column
of the September 1989 issue. The program models one form of
a "Turing machine". Watching the program in action is fun
but the most fun is received when you create your own state
table termite. The process can be completely random or some
thinking can be applied to the states in the tables.

The state tables for an individual Termite are contained in a
text file. By default the program will load a state file
named DEFAULT.MIT. You may load any other table by using the
file open menu option and then selecting a file. Initially
there will only be one termite. Pressing the insert key will
add new termites to the display. The delete key will remove
them. A maximum of 25 termites and a minimum a one are the
current limits. This can be changed in the code.

The format of a state table file is shown below:

NumberOfRows NumberOfColumns
StateTable [Rows][Columns]
ColorTable [Rows][Columns]
MovementTable [Rows][Columns]

Each table contains #Rows by #Columns elements. An example
is shown below:

2 4

1 2 3 0
2 3 0 1

1 0 2 3
2 1 0 3

0 1 0 2
2 0 1 0

Values are indexed from the tables by matching the current
state to the row and the current color to the column. Values
in the state table must be in the range 0 to #Rows-1. The
values in the color table must be in the range 0 to #Columns-1.
Note, the number of columns should not exceed the number of
colors. There is a one to one mapping of the column number to
the color used for the termite.

Values in the movement table are mapped as follows:

0 = Move forward one square (pixel)
1 = Turn 90 degrees left, then move forward
2 = Turn 90 degrees right, then move forward

The cycle of a Termite is shown below:

1) Read the current color at the current position.
2) Find the new color from the color table.
3) Set the new color at the current position.
4) Get the direction to move from the movement table.
5) Move to the new position.
6) Get the new state from the state table.
7) Loop back to 1.

This is a rough description but there is an excellent one in
the Scientific American column. I have included the source code
so that you may take a look at works. I am using some of my
own graphics routines but it would be very easy to use Turbo BGI
or similiar graphics routines. I am releasing this program into
the Public Domain world of software. It may be distributed for
fun and thrill. Have fun. Note, the author assumes no liability
in the use of this program.

- Hans Kellner -

Note: Sept, 1990 - This is a modified version from my original.
It has been tweeked to run under MS Windows. The original
used my own windowing environment.



  3 Responses to “Category : Windows 3.X Files
Archive   : TERMITE.ZIP
Filename : TERMITE.DOC

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/