home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Education
/
collectionofeducationcarat1997.iso
/
COMPUSCI
/
NERVES.ZIP
/
NS.DOC
< prev
next >
Wrap
Text File
|
1991-01-22
|
19KB
|
352 lines
NERVOUS SYSTEM CONSTRUCTION KIT FOR IBM COMPATIBLES
VERSION 2.0, 1-22-91
>>>>FOR A COPY OF THE MOST RECENT VERSION OF THE PROGRAM AND TURBO-
C/C++ SOURCE CODE (PLEASE SPECIFY DISK TYPE REQUIRED: 360KB, 1.2MB, OR
720KB), SEND $10.00 (U.S.$15.00 FOR DELIVERY OUTSIDE NORTH AMERICA);
REQUIRES EGA OR VGA; SOURCE CODE CAN BE COMPILED WITH BORLAND'S TURBO
C VERSION 2 OR TURBO C++ VERSION 1<<<<
By Pat and Greg Williams, Rt. 1, Box 302, Gravel Switch, KY 40328,
606-332-7606. Based on the ideas of Randall D. Beer, Department of
Computer Engineering and Science, Case Western Reserve University,
Cleveland, Ohio, as found in his INTELLIGENCE AS ADAPTIVE BEHAVIOR: AN
EXPERIMENT IN COMPUTATIONAL NEUROETHOLOGY, Academic Press, 1990 (ISBN
0-12-084730-2; to order, you can phone A.P. toll-free at 1-800-321-
5068).
READ THIS FIRST: These executable programs, source code files, and
associated documentation are supplied AS IS, WITHOUT WARRANTY. All
consequences of their use (or misuse) are solely the responsibilities
of the users, and in no case shall Pat Williams, Greg Williams,
Randall Beer, or Academic Press be liable for damages arising
therefrom. Modification of the source code is hereby permitted and
encouraged (we do hope you will share your additions and corrections
with us and with others). You may distribute copies of the original
distribution disk as you wish.
FILES ON DISK(S)
EXECUTABLES AND AUXILIARY FILES (IN ROOT DIRECTORY):
EGAVGA.BGI - Borland graphics file used by NS87.EXE, NS.EXE, and
NSPLAY.EXE (must be in default directory)
NS87.EXE - main program for computers with math coprocessors
NS.EXE - main program for computers without math coprocessors
NSPLAY.EXE - animation playback program
NSPRINT.EXE - utility program to print neuron parameters and
connections
L3R3.NEU, EDGE3.NEU, APP3.NEU - sample neuron files
L3R3.ENV, EDGE3.ENV, APP3.ENV - sample environment files
SINCOS.TAB - data file used by NS.EXE (must be in default directory)
NS10.SAV - sample animation data file
SOURCE AND AUXILIARY FILES FOR COMPILING NS87.EXE (IN "87" DIRECTORY):
*.C - C SOURCE FILES
*.H - C HEADER FILES
NS87.PRJ - PROJECT FILE FOR TURBO C++
NS87.PJC - PROJECT FILE FOR TURBO C (MEDIUM MODEL)
SOURCE AND AUXILIARY FILES FOR COMPILING NS.EXE (IN "NO87" DIRECTORY):
*.C - C SOURCE FILES
*.H - C HEADER FILES
NS.PRJ - PROJECT FILE FOR TURBO C++
NS.PRC - PROJECT FILE FOR TURBO C (MEDIUM MODEL)
SOURCE AND AUXILIARY FILES FOR COMPILING NSPLAY.EXE (IN "PLAY"
DIRECTORY):
*.C - C SOURCE FILES
*.H - C HEADER FILES
NSPLAY.PRJ - PROJECT FILE FOR TURBO C++
NSPLAY.PRC - PROJECT FILE FOR TURBO C (LARGE MODEL)
SOURCE AND AUXILIARY FILES FOR COMPILING NSPRINT.EXE (IN "PRINT"
DIRECTORY):
*.C - C SOURCE FILES
DEFN.H - C HEADER FILE (MEDIUM MODEL)
I. INTRODUCTION
When we came upon Dr. Beer's beautifully done book (a revision of his
1989 dissertation), we immediately decided to attempt a PC-replication
of his computer simulation of the real-time behavior of a simplified
cockroach. The simulation is the first we've seen which starts at the
level of (reasonably realistically modeled) individual neurons and
ends up with whole-organism behavior. Dr. Beer's hexapod bug walks
with various gaits, wanders, follows edges, moves toward "food" when
its "energy" supply is low, "eats," and manages to avoid conflicts
among its various types of behavior. As programmed by Dr. Beer, the
bug has about 80 neurons, with about 150 connections and about 500
user-settable parameters. The program allows arbitrary connection of
neurons (and, via modifications to the source code [Turbo C compiler
needed for this], arbitrary specification of organism and environment
models), making it a general "construction kit" for small artificial
neural networks. Note that these networks are NOT of the generalized
type beloved by "connectionism," but rather are designed to perform
specific functions within the context of an organism's ecological
niche. Psychological control theory enthusiasts should note that Dr.
Beer's bug's nervous system isn't organized as a Powersian
hierarchical control system (see William T. Powers, BEHAVIOR: THE
CONTROL OF PERCEPTION, Aldine, Chicago, 1973), but networks organized
in that way certainly can be constructed using the program. TO
UNDERSTAND THE PROGRAM, YOU WILL NEED TO READ (AT LEAST PARTS OF)
INTELLIGENCE AS ADAPTIVE BEHAVIOR.
Suggestions, questions, modifications, etc., are welcome. Let us know
your thoughts about this stuff... down the road possibilities include
simulations of nematodes (having only a few hundred neurons in their
entire nervous system), Aplysia (modifiable synapses), spiders (prey-
catching, web building?), and op-amp-circuit realization of neurons
(for speedier computations in parallel).
We recommend INTELLIGENCE AS ADAPTIVE BEHAVIOR not only for its
development of the bug model, but for its extended critique of
traditional approaches in Artificial Intelligence. Here's the
foundation for a new field, folks: non-verbal AI. Thank you, Dr. Beer!
II. RUNNING THE PROGRAM
The executable files are NS.EXE (if you don't have a math coprocessor)
and NS87.EXE (if you have a coprocessor). Results of simulations with
the two files are quite similar BUT NOT IDENTICAL, because of round-
off and other differences between integer and long calculations in the
former and float and double calculations in the latter. Actually, you
can run either file on computers with or without coprocessors, but
NS.EXE runs about half as fast as NS87.EXE with a coprocessor, and
NS87.EXE runs about five times slower than NS.EXE without a
coprocessor.
With one of the executable files (and the Borland graphics file
EGAVGA.BGI, included on the distribution disk) on the default drive,
at the DOS prompt, type NS or NS87, as appropriate, and press ENTER.
Within a short time, you should see a menu of eight possibilities,
each of which can be accessed by pressing the key corresponding to its
first letter. For example, to quit the program, press Q.
There are two types of data files used by NS.EXE or NS87.EXE: neuron
files, which provide descriptions of particular nervous system
designs, and environment files, which provide descriptions of
particular environment ("world") configurations and initial
conditions. Three sets of neuron and environment files are included:
WANDER.NEU and WANDER.ENV, EDGE3.NEU and EDGE3.ENV, and APP3.NEU and
APP3.ENV. You can recall these files, and you can save and recall new
neuron and environment files.
To see the program in action, press R (for "Read files") and then, at
the prompt for a neuron file spec, key in WANDER.NEU and press ENTER.
At the prompt for an environment file spec, key in WANDER.ENV and
press ENTER. The current neuron and environment files appear at the
bottom of the menu screen. Now press S (for "Simulate"); you should
see an EGA-graphics-mode screen with a representation of a bug near
the lower left corner. To begin the simulation, press ENTER. The bug
will begin to move, and plots will be drawn at the right side of the
screen. Each of the plots except the bottom one shows the firing
frequency of a named neuron in the bug's nervous system (i.e., neuron
RBR) vs. (simulated, not real) time. The bottom plot shows the gait
pattern of the bug's legs -- a line means the foot is up (swing mode),
while no line means the foot is down (stance mode).
As shown at the bottom of the simulation screen, you can press SPACE
to enter single-stepping mode; each time you subsequently press SPACE,
another point will appear on each plot (corresponding to an increment
of 0.010 seconds of simulated time; actually, this increment
corresponds to two "internal" integration intervals, each 0.005
simulated seconds long). To return to continuous simulation, press
ENTER.
You can get back to the menu screen at any time by pressing Esc, but
don't do that just yet. First, note