home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD2.mdf / c / library / xplatfrm / tierra / readme.t1 < prev    next >
Encoding:
Text File  |  1992-04-26  |  36.1 KB  |  796 lines

  1. /* READMET  28-10-91  documentation for the Tierra Simulator */
  2. /** Tierra Simulator V3.0: Copyright (c) 1991 Thomas S. Ray **/
  3.  
  4. sccsid: @(#)READMET    1.3 10/7/91
  5.  
  6. This file contains the following sections:
  7.  
  8. 1)  LICENSE AGREEMENT
  9. 2)  WHAT THIS PROGRAM IS
  10. 3)  RELATED SOFTWARE (IMPORTANT)
  11. 4)  QUICK START (UNIX AND DOS VERSIONS)
  12. 5)  RUNNING TIERRA
  13.   5.1) Startup
  14.   5.2) The Assembler/Disassembler
  15.   5.3) The Standard Output
  16.   5.4) The Birth-Death Output
  17.   5.5) The Genebank Output
  18.   5.6) The Interrupt Handler
  19.   5.7) Using the Turbo Debugger as a Frontend
  20.   5.8) Restarting an Old Run
  21. 6)  LISTING OF DISTRIBUTION FILES
  22. 7)  SOUP_IN PARAMETERS
  23. 8)  THE ANCESTOR & WRITING A CREATURE
  24.   8.1) The Ancestor
  25.   8.2) Writing a Creature
  26. 9)  IF YOU WANT TO MODIFY THE SOURCE CODE
  27.   9.1) Creating a Frontend
  28.   9.2) Creating New Instruction Sets
  29.   9.3) Creating New Slicer Mechanisms
  30.   9.4) Creating a Sexual Model
  31.   9.5) Creating a Multi-cellular Model
  32. 10) KNOWN BUGS
  33. 11) IF YOU HAVE PROBLEMS
  34.   11.1) Problems with Installation
  35.   11.2) Problems Running Tierra
  36.  
  37. 1)  LICENSE AGREEMENT
  38.  
  39. /* 
  40.  * Tierra Simulator V3.0: Copyright (c) 1991 Thomas S. Ray
  41.  * 
  42.  * by Tom Ray, ray@brahms.udel.edu (the bulk of the code)
  43.  *    Tom Uffner, tom@genie.slhs.udel.edu (rework of genebanker & assembler)
  44.  *    Dan Pirone, cocteau@life.slhs.udel.edu (the interrupt handler)
  45.  *    Marc Cygnus, cygnus@udel.edu (connections to the ALmond monitor)
  46.  * 
  47.  * This code and documentation is copyrighted and is not in the public domain.
  48.  * All rights reserved.  This package may be freely copied and distributed
  49.  * without fees, subject to the following restrictions:
  50.  * 
  51.  * - This notice may not be removed or altered.
  52.  * 
  53.  * - You may not try to make money by distributing the package or by using the
  54.  *   process that the code creates.
  55.  * 
  56.  * - You may not prevent others from copying it freely.
  57.  * 
  58.  * - You may not distribute modified versions without clearly documenting your
  59.  *   changes and notifying the principal author.
  60.  * 
  61.  * - The origin of this software must not be misrepresented, either by
  62.  *   explicit claim or by omission.  Since few users ever read sources,
  63.  *   credits must appear in the documentation.
  64.  * 
  65.  * - Altered versions must be plainly marked as such, and must not be
  66.  *   misrepresented as being the original software.  Since few users ever read
  67.  *   sources, credits must appear in the documentation.
  68.  * 
  69.  * - The University and the authors are not responsible for the
  70.  *   consequences of use of this software, no matter how awful, even if they
  71.  *   arise from flaws in it.
  72.  * 
  73.  * - Neither the name of the University, nor the authors of
  74.  *   the code may be used to endorse or promote products derived from this
  75.  *   software without specific prior written permission.
  76.  * 
  77.  * - The provision of support and software updates is at our discretion.
  78.  * 
  79.  * Please contact Tom Ray (full address below) if you have
  80.  * questions or would like an exception to any of the above restrictions.
  81.  * 
  82.  * If you make changes to the code, or have suggestions for changes,
  83.  * let us know!  If we use your suggestion, you will receive full credit
  84.  * of course.
  85.  * 
  86.  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
  87.  * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
  88.  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  89.  *
  90.  *    Tom Ray
  91.  *    University of Delaware
  92.  *    School of Life & Health Sciences
  93.  *    Newark, Delaware  19716
  94.  *    ray@tierra.slhs.udel.edu
  95.  *    ray@life.slhs.udel.edu
  96.  *    ray@brahms.udel.edu
  97.  *    302-451-2281 (FAX)
  98.  *    302-451-2753 (Phone)
  99.  */
  100.  
  101. 2)  WHAT THIS PROGRAM IS
  102.  
  103.      This problem is under very active development.  The source code in the
  104. ftp site will probably be updated on a roughly weekly basis.  We urge you
  105. to pick up the latest version frequently if you use the program.  Very
  106. significant improvements are in the works.
  107.  
  108.      The C source code creates a virtual computer and its operating system,
  109. whose architecture has been designed in such a way that the executable
  110. machine codes are evolvable.  This means that the machine code can be mutated
  111. (by flipping bits at random) or recombined (by swapping segments of code
  112. between algorithms), and the resulting code remains functional enough of the
  113. time for natural (or presumably artificial) selection to be able to improve
  114. the code over time.
  115.  
  116.      Along with the C source code which generates the virtual computer, we
  117. provide four programs written in the assembler code of the virtual computer.
  118. One of these was written by a human and does nothing more than make copies
  119. of itself in the RAM of the virtual computer.  The other three evolved from
  120. the first, and are included to illustrate the power of natural selection.
  121.  
  122.      The virtual machine is an emulation of a MIMD (multiple instruction
  123. stream, multiple data stream) computer.  This is a massively parallel computer
  124. in which each processor is capable of executing a sequence of operations
  125. distinct from the other processors.  The parallelism is only emulated by
  126. time slicing, but there really are numerous virtual CPUs.  One CPU will be
  127. created and assigned to each ``creature'' (self-replicating algorithm)
  128. living in the RAM of the virtual computer.  The RAM of the virtual computer
  129. is known as the ``soup''.
  130.  
  131.      The operating system of the virtual computer provides memory management
  132. and timesharing services.  It also provides control for a variety of factors
  133. that affect the course of evolution: three kinds of mutation rates,
  134. disturbances, the allocation of CPU time to each creature, the size of the
  135. soup, etc.  In addition, the operating system provides a very elaborate
  136. observational system that keeps a record of births and deaths, sequences
  137. the code of every creature, and maintains a genebank of successful genomes.
  138. The operating system also provides facilities for automating the ecological
  139. analysis, that is, for recording the kinds of interactions taking place
  140. between creatures.
  141.  
  142.      The version of the software currently being distributed is considered
  143. to be a research grade implementation.  This means two things: 1) It is
  144. under very rapid development, and is not bug free.  2) We have chosen to
  145. go with modifiability and modularity over speed of execution.
  146.  
  147.      If you find bugs in the code, please report them to us.  By the time
  148. you find them and report them, we may have eliminated them, and would be
  149. able to provide you with a fixed version.  If not, we will be able to fix
  150. the bug, and would like to make the fix available to other users.
  151.  
  152.      We have chosen modifiability over speed primarily because we know that
  153. the current version of the virtual computer is very poorly designed, except
  154. with respect to the features that make it evolvable.  Specifically, consider
  155. that one third of the present instruction set is taken up by pushing and
  156. popping from the stack; there are only two inter-register moves, ax to bx and
  157. cx to dx; dx isn't used for anything; there is no I/O; and there is no
  158. way of addressing a data segment (in the original version, dx was used to
  159. set the template size, but that has been abandoned).
  160.  
  161.      In August, 100% of the original virtual CPU code was replaced, with
  162. new code that does exactly the same thing.  However, the new code is written
  163. in a generalized way that will make it trivial to alter the machine
  164. architecture.  With the new implementation of the virtual computer, it will
  165. be possible for anyone to painlessly swap in their favorite CPU architecture
  166. and instruction set, and their innovation will be seamlessly embedded within
  167. the heart of the elaborate observational software.  Knowing how bad the
  168. original design was, there was a temptation to fix it when the virtual computer
  169. was reworked, but the original implementation was retained for historical
  170. reasons.  In spite of its shortcomings, life proliferated in the environment
  171. that it created.  Things should get interesting as we improve the
  172. architecture.  The new organization of the code should make that easy.
  173.  
  174.      The bulk of the code and documentation was written by Tom Ray, whose
  175. address is listed at the end of this file.  Substantial contributions have
  176. been made by Tom Uffner, tom@genie.slhs.udel.edu, who has been reworking the
  177. genebanker.  Dan Pirone, cocteau@life.slhs.udel.edu, has written the
  178. interrupt handler and is now working on a frontend for the DOS release.
  179. Marc Cygnus, cygnus@udel.edu, developed the ALmond monitor, a separate
  180. piece of software that displays activity in a running Tierra (see below).
  181.  
  182.      The behavior of this software is described in the following publications:
  183.  
  184. Ray, T. S.  1991.  ``Is it alive, or is it GA?''
  185. Proceedings of the 1991 International Conference on Genetic Algorithms,
  186. Eds. Belew, R. K., and L. B. Booker, San Mateo, CA: Morgan Kaufmann, 527-534.
  187.  
  188. Ray, T. S.  1991.  ``An approach to the synthesis of life.''
  189. Artificial Life II, Santa Fe Institute Studies in the Sciences of
  190. Complexity, vol. XI, Eds. Farmer, J. D., C. Langton, S. Rasmussen, &
  191. C. Taylor, Redwood City, CA: Addison-Wesley, 371-408.
  192.  
  193. Ray, T. S.  1991.  ``Population dynamics of digital organisms.''
  194. Artificial Life II Video Proceedings,  Ed. C.G. Langton,
  195. Redwood City, CA: Addison Wesley.
  196.  
  197. Ray, T. S.  In Press.  ``Evolution and optimization of digital
  198. organisms.''  1990 IBM Supercomputing Competition: Large Scale
  199. Computing Analysis and Modeling Conference Proceedings, Ed. H. Brown,
  200. University of Georgia Press.
  201.  
  202.      This research was also reported in the August 10 issue of Science News,
  203. the August 27 issue of the New York Times in the Science Times section,
  204. and the April issue of Technology Review.
  205.  
  206. 3)  RELATED SOFTWARE (IMPORTANT)
  207.  
  208.      The Tierra simulator is the central piece of a growing set of programs.
  209. The accessory programs aid in observing the results of Tierra runs.  We have
  210. rushed to make the Tierra source available, however, the related software has
  211. not been placed in the ftp site yet.  We hope to have the other programs in
  212. the ftp site within the next few weeks.  When they are available, you will
  213. want to select one or both of the following:
  214.  
  215.   3.1) The Beagle Explorer which graphically displays the output that Tierra
  216.    saves to disk.  Beagle runs only on DOS systems, and while the heart of
  217.    the source code is available, Beagle uses the Greenleaf DataWindows
  218.    interface, and that source can not be distributed (available from
  219.    Greenleaf Software, 16479 Dallas Parkway, Bent Tree Tower Two, Suite 570,
  220.    Dallas, Texas, 75248, phone: 214-248-2561).  Beagle would normally be
  221.    distributed in the executable form.  Beagle is currently configured only
  222.    for the CGA or VGA graphics modes, but can be extended on request, in time.
  223.    A "pre-release" version of Beagle in already in the ftp site in the
  224.    directory /tierra/beagle.
  225.  
  226.   3.2) The ALmond Monitor which displays activity in a running Tierra
  227.    simulator.  ALmond runs as a simultaneous but independent process (from
  228.    Tierra) on the same or on a seperate machine, and establishes network socket
  229.    communication with Tierra.  ALmond can be attached to and detached from a
  230.    running Tierra simulator without interrupting the simulation.  ALmond runs
  231.    only on unix systems supporting X Windows.  The entire ALmond source code is
  232.    available.  Almond was developed and tested on Sun 3 and Sun 4 machines.  It
  233.    was developed under X11R4 by Marc Cygnus.
  234.  
  235. 4)  QUICK START (UNIX AND DOS VERSIONS)
  236.  
  237.      UNIX QUICK START (for DOS see below)
  238.  
  239.   4.1)  You should have a directory containing the source code and two
  240. subdirectories: tiedat and geneban1
  241. The tiedat directory is where a record of births and deaths will be written
  242. The geneban1 directory contains the initial genomes used to innoculate the
  243. soup, and the genebanker will save new genomes to this directory.
  244.  
  245.   4.2)  You must compile the assember/disassembler, arg, and the simulator,
  246. tierra.  Two executable files, ccarg and cctierra are included which
  247. perform the compilation.  You may have to alter the flags for your system.
  248. Just type ccarg, then type cctierra to get the programs compiled.
  249. There is also a Makefile include which is preferable, if it works on your
  250. system.  If you can use the Makefile, type: make, and follow instructions.
  251.  
  252.   4.3)  You must assemble the initial genomes, as binaries are not portable.
  253. To do this, go into the geneban1 directory and type:
  254.  
  255. ../arg c 0080.gen 80 0080aaa.tie
  256. ../arg c 0045.gen 45 0045aaa.tie
  257.  
  258. This will create the two binary files 0080.gen and 0045.gen which contain two
  259. creatures that you can use to innoculate the soup, the ancestor 0080aaa
  260. and a parasite that evolved from the ancestor, 0045aaa.  You can check to
  261. see if this worked by disassembling the two genomes, by typing:
  262.  
  263. ../arg x 0080.gen aaa
  264. ../arg x 0045.gen aaa
  265.  
  266. This will create the two ascii files 0080aaa and 0045aaa.  Compare them to
  267. the originals, 0080aaa.tie and 0045aaa.tie.  Before you start a run, copy
  268. 0080.gen to 0080gen.ori and copy 0045.gen to 0045gen.ori, in order to have
  269. virgin copies for use later when you start another run.
  270.  
  271. cp 0045.gen 0045gen.ori
  272. cp 0080.gen 0080gen.ori
  273.  
  274.   4.4)  Go back to the source code directory and examine the file soup_in.
  275. This file contains all of the parameters that control the run.  It is currently
  276. set up to innoculate the soup with one cell of genotype 0080aaa, and to run
  277. for 50 million instructions in a soup of 60,000 instructions.
  278.  
  279.   4.5)  Run the simulator by typing:
  280.            tierra
  281.        or: tierra &           (to run it in the background)
  282.        or: tierra > tieout &  (to run it in background, and save the output
  283.                                in a file called tieout)
  284.  
  285.   4.6)  When the run is over, if you want to start a new run, you should
  286. clean up the genebank, because the simulator will read in all genomes in the
  287. genebank at startup.  The best way to do this is to go into the geneban1
  288. directory and remove all .gen and .tmp files, and then copy the backup
  289. version of the 0080.gen file:
  290.  
  291. cd geneban1
  292. rm *.gen
  293. rm *.tmp
  294. cp 0080gen.ori 0080.gen
  295. cp list80 list
  296.  
  297.      DOS QUICK START (for UNIX see above)
  298.  
  299.   4.1)  You should have a directory containing the source code and two
  300. subdirectories: tiedat and geneban1
  301. The tiedat directory is where a record of births and deaths will be written
  302. The geneban1 directory contains the initial genomes used to innoculate the
  303. soup, and the genebanker will save new genomes to this directory.
  304.  
  305.   4.2)  You must compile the assember/disassembler, arg, and the simulator,
  306. tierra.  We include the two Turbo C V 2.0 project files: tierra.prj and
  307. arg.prj.  If you are using a Borland C++ file you will have to make your
  308. own .prj file, listing the files in the .prj files that we have included.
  309. Compile these projects using the large memory model.  Put the executables
  310. in the path.
  311.  
  312.   4.3)  You must assemble the initial genomes, as binaries are not portable.
  313. To do this, go into the geneban1 directory and type:
  314.  
  315. arg c 0080.gen 80 0080aaa.tie
  316. arg c 0045.gen 45 0045aaa.tie
  317.  
  318. This will create the two binary files 0080.gen and 0045.gen which contain two
  319. creatures that you can use to innoculate the soup, the ancestor 0080aaa
  320. and a parasite that evolved from the ancestor, 0045aaa.  You can check to
  321. see if this worked by disassembling the two genomes, by typing:
  322.  
  323. arg x 0080.gen aaa
  324. arg x 0045.gen aaa
  325.  
  326. This will create the two ascii files 0080aaa and 0045aaa.  Compare them to
  327. the originals, 0080aaa.tie and 0045aaa.tie.  Before you start a run, copy
  328. 0080.gen to 0080gen.ori and copy 0045.gen to 0045gen.ori, in order to have
  329. virgin copies for use later when you start another run.
  330.  
  331. copy 0045.gen 0045gen.ori
  332. copy 0080.gen 0080gen.ori
  333.  
  334.   4.4)  Go back to the source code directory and examine the file soup_in.
  335. This file contains all of the parameters that control the run.  It is currently
  336. set up to innoculate the soup with one cell of genotype 0080aaa, and to run
  337. for 50 million instructions in a soup of 60,000 instructions.  You will need
  338. a text editor to do this.  If you use a regular word processor, be sure that
  339. you write the file back out as a plain ASCII text file.
  340.  
  341.   4.5)  Run the simulator by typing: tierra
  342.  
  343.   4.6)  When the run is over, if you want to start a new run, you should
  344. clean up the genebank, because the simulator will read in all genomes in the
  345. genebank at startup.  The best way to do this is to go into the geneban1
  346. directory and remove all .gen and .tmp files, and then copy the backup
  347. version of the 0080.gen file:
  348.  
  349. cd geneban1
  350. del *.gen
  351. del *.tmp
  352. copy 0080gen.ori 0080.gen
  353. copy list80 list
  354.  
  355. 5)  RUNNING TIERRA
  356.  
  357.      This section has the following sub-sections:
  358.  
  359.   5.1) Startup
  360.   5.2) The Assembler/Disassembler
  361.   5.3) The Standard Output
  362.   5.4) The Birth-Death Output
  363.   5.5) The Genebank Output
  364.   5.6) The Interrupt Handler
  365.   5.7) Using the Turbo Debugger as a Frontend
  366.   5.8) Restarting an Old Run
  367.  
  368.   5.1) Startup
  369.  
  370.      The first steps in running Tierra are described briefly above.  One must
  371. place the genomes in the geneban1 directory, and one must have created the
  372. tiedat directory to receive the output of birth and death data.  The genome
  373. files are supplied in the form of ASCII assembler code files.  These must
  374. be assembled into binary form to be able to execute on the virtual machine.
  375. If you type arg, the assembler will give you a brief listing of assembler
  376. options.  More complete documentation of the assembler follows:
  377.  
  378.   5.2) The Assembler/Disassembler
  379.  
  380.      This documentation was written by Tom Uffner.  A troff version is
  381. included in arg.1
  382.  
  383. Arg(1)                   USER COMMANDS                     Arg(1)
  384.  
  385. NAME
  386.      arg - genbank archive utility
  387.  
  388. SYNOPSIS
  389.      arg c|r[vo12...9] afile size file1 [file2...]
  390.      arg x|t[vo12...9] afile [gen1 [gen2...]]
  391.  
  392. DESCRIPTION
  393.      The arg utility is used to manipulate the genebank  archives
  394.      that  are used by tierra(1).  It is used to assemble or dis-
  395.      sasemble tierra code, list the genomes contained in a  file,
  396.      and also to convert between the old and new file formats.
  397.  
  398.      The arg commands are:
  399.  
  400.           c - create afile and add genomes in file1...filen
  401.  
  402.           r - replace  in  afile  (or  add  to  end)  genomes  in
  403.                file1...filen
  404.  
  405.           x - extract entire contents or specified  genomes  from
  406.                afile
  407.  
  408.           t - list entire contents or specified genomes in afile
  409.  
  410.      The optional modifiers are:
  411.  
  412.           v - verbose output
  413.  
  414.           o - old. will cause c & r to expect an old-style genome
  415.                file  rather  than assembly code, and x to produce
  416.                old format rather than disassembled  listing,  has
  417.                no effect on t.
  418.  
  419.           1,2...9 - instruction set (defaults to INST == 1)
  420.  
  421.      Where filen and afile are any legal filenames, genn is  a  3
  422.      character genome label, and size is a decimal integer. (Note
  423.      that tierra(1) expects archives to have names consisting  of
  424.      4 digits, and an extension of .gen, .tmp, or .mem.
  425.  
  426. FILES
  427.      GenebankPath/nnnn.gen permanantly saved genomes
  428.      GenebankPath/nnnn.tmp genomes from periodic saves
  429.      GenebankPath/nnnn.mem genomes swapped to disk
  430.  
  431. SEE ALSO
  432.      An Approach to the Synthesis of Life
  433.      tierra(1), ov(1X), beagle(1DOS), genio(3), arg(5)
  434.  
  435. BUGS
  436.      Genome extraction and internal  search  functions  could  be
  437.      faster, and will be in the next release.
  438.  
  439. Tierra, V 3.0      Last change: 7 October 1991                  2
  440.  
  441.   5.3) The Standard Output
  442.  
  443.      When Tierra runs it produces output to the console that looks like this:
  444.  
  445. Using instruction set (INST) = 1
  446. sizeof(Instruction)   = 1
  447. sizeof(struct cell)   = 180
  448. sizeof(struct mem_fr) = 16
  449.     60000 bytes allocated for soup
  450.     108000 bytes allocated for cells
  451.     8000 bytes allocated for mem_fr
  452. tsetup: arrays allocated without error
  453. beginning of GetNewSoup
  454. seed = 686777517
  455. init of soup complete
  456. GetNewSoup: about to read 80 instructions of cell 0
  457. InstExeC = 0  Generations = 0  NumCells = 1  Sun Oct  6 15:31:57 1991
  458.     RateMut = 4787  RateMovMut = 1280  RateFlaw = 25600
  459.     num_gen = 1  num_genq = 0  num_genl = 1  AverageSize = 80
  460. tsetup: soup gotten
  461. extract: about to save genome 0080aao = 8
  462. InstExeC = 1  Generations = 3  NumCells = 265  Sun Oct  6 15:33:05 1991
  463.     births = 828  deaths = 564  AvgPop = 256  AvgSize = 79
  464.     RateMut = 6615  RateMovMut = 1264  RateFlaw = 25280
  465.     num_gen = 2  num_genq = 151  num_genl = 152  AverageSize = 79
  466.     MaxGenPop = 80aaa = 150  MaxGenMem = 80aaa = 150
  467. InstExeC = 2  Generations = 5  NumCells = 298  Sun Oct  6 15:34:17 1991
  468.     births = 825  deaths = 792  AvgPop = 318  AvgSize = 80
  469.     RateMut = 7628  RateMovMut = 1280  RateFlaw = 25600
  470.     num_gen = 2  num_genq = 163  num_genl = 164  AverageSize = 80
  471.     MaxGenPop = 80aaa = 147  MaxGenMem = 80aaa = 147
  472. extract: about to save genome 0080abq = 7
  473. extract: about to save genome 0080acv = 7
  474. extract: about to save genome 0080aew = 8
  475. extract: about to save genome 0080adh = 6
  476. extract: about to save genome 0080abk = 7
  477. InstExeC = 3  Generations = 8  NumCells = 338  Sun Oct  6 15:35:25 1991
  478.     births = 808  deaths = 768  AvgPop = 318  AvgSize = 80
  479.     RateMut = 8652  RateMovMut = 1280  RateFlaw = 25600
  480.     num_gen = 7  num_genq = 179  num_genl = 180  AverageSize = 80
  481.     MaxGenPop = 80aaa = 127  MaxGenMem = 80aaa = 127
  482. extract: about to save genome 0081aab = 7
  483. extract: about to save genome 0079aab = 7
  484. extract: about to save genome 0080abp = 7
  485. InstExeC = 4  Generations = 10  NumCells = 259  Sun Oct  6 15:36:35 1991
  486.     births = 781  deaths = 860  AvgPop = 318  AvgSize = 80
  487.     RateMut = 6630  RateMovMut = 1280  RateFlaw = 25600
  488.     num_gen = 10  num_genq = 184  num_genl = 185  AverageSize = 80
  489.     MaxGenPop = 80aaa = 92  MaxGenMem = 80aaa = 92
  490. extract: about to save genome 0080ads = 6
  491. extract: about to save genome 0080aei = 6
  492. extract: about to save genome 0080aab = 7
  493. InstExeC = 5  Generations = 13  NumCells = 315  Sun Oct  6 15:37:44 1991
  494.     births = 828  deaths = 772  AvgPop = 314  AvgSize = 80
  495.     RateMut = 8064  RateMovMut = 1280  RateFlaw = 25600
  496.     num_gen = 13  num_genq = 206  num_genl = 207  AverageSize = 80
  497.     MaxGenPop = 80aaa = 101  MaxGenMem = 80aaa = 101
  498.  
  499.      The meaning of each different kind of information is described below:
  500.  
  501. > Using instruction set (INST) = 1
  502.  
  503.      Because we are likely to proliferate instruction sets in the near
  504. future, the system lets us know which one it is using.
  505.  
  506. > sizeof(Instruction)   = 1
  507. > sizeof(struct cell)   = 180
  508. > sizeof(struct mem_fr) = 16
  509.  
  510.      The size in bytes of each of the main structures, of which the system
  511. will allocate large arrays at startup.
  512.  
  513. >     60000 bytes allocated for soup
  514. >     108000 bytes allocated for cells
  515. >     8000 bytes allocated for mem_fr
  516.  
  517.      The total number of bytes used for each of the three main arrays of
  518. structures.
  519.  
  520. > tsetup: arrays allocated without error
  521.  
  522.      Statement indicating that the arrays were allocated without error.
  523.  
  524. > beginning of GetNewSoup
  525.  
  526.      Statement indicating that the program is entering the GetNewSoup()
  527. function.
  528.  
  529. > seed = 686777517
  530.  
  531.      A record of the seed of the random number generator used in this run.
  532. This can be used to repeat the run if desired.
  533.  
  534. > init of soup complete
  535.  
  536.      A statement indicating that the soup has been initialized.
  537.  
  538. > GetNewSoup: about to read 80 instructions of cell 0
  539.  
  540.      A statement indicating that the system is innoculating the soup with
  541. a creature of size 80.  There will be a comparable line for every creature
  542. used in innoculating the soup at startup.
  543.  
  544. > InstExeC = 0  Generations = 0  NumCells = 1  Sun Oct  6 15:31:57 1991
  545. >     RateMut = 4787  RateMovMut = 1280  RateFlaw = 25600
  546. >     num_gen = 1  num_genq = 0  num_genl = 1  AverageSize = 80
  547. > tsetup: soup gotten
  548.  
  549.      These lines indicate the starting conditions of several variables which
  550. will be explained below.
  551.  
  552. > extract: about to save genome 0080aao = 8
  553.  
  554.      This line indicates that the genotype 0080aao crossed one of the
  555. frequency thresholds set in the soup_in file, SavThrMem or SavThrPop,
  556. and that there were eight adult creatures of this genotype in the soup
  557. at the threshold frequency.  This genotype has been assigned a permanent
  558. name and is being saved to disk in the 0080.gen file in the geneban1
  559. directory.
  560.  
  561. > InstExeC = 1  Generations = 3  NumCells = 265  Sun Oct  6 15:33:05 1991
  562. >     births = 828  deaths = 564  AvgPop = 256  AvgSize = 79
  563. >     RateMut = 6615  RateMovMut = 1264  RateFlaw = 25280
  564. >     num_gen = 2  num_genq = 151  num_genl = 152  AverageSize = 79
  565. >     MaxGenPop = 80aaa = 150  MaxGenMem = 80aaa = 150
  566.  
  567.      A statement of this form is printed after every million instructions
  568. executed by the system.  See the plan() function in the bookeep.c module
  569. for more details on this.
  570.  
  571.      InstExeC = 1 tells us that one million instructions have been executed
  572. in this run.  Generations = 3 tells us that roughly three generations of
  573. creatures have passed during this run.  NumCells = 265 tells us that there
  574. were 265 adult cells (and a roughly equal number of daughter cells) at this
  575. point in the run.  Sun Oct  6 15:33:05 1991 tells us the time and date at
  576. this point in the run.
  577.  
  578.      births = 828 tells us that during the last million instructions, there
  579. were 828 births.  deaths = 564 tells us that during the last million
  580. instructions, there were 564 deaths.  AvgPop = 256 tells us that during the
  581. last million instructions the average population was 256 adult cells.
  582. AvgSize = 79 tells us that during the last million instructions the average
  583. adult cell size was 79 instructions.
  584.  
  585.      RateMut = 6615 tells us that the actual average background (cosmic ray)
  586. mutation rate for the upcoming million instructions will be one mutation per
  587. 6615/2 instructions exectued.  RateMovMut = 1264 tells us that the actual
  588. average move mutation rate (copy error) for the upcoming million instructions
  589. will be one mutation for every 1264/2 instructions copied.  RateFlaw = 25280
  590. tells us that the actual average flaw rate for the upcoming million
  591. instructions will be one flaw for every 25280/2 instructions exectued.  The
  592. reason that these numbers represent twice the average mutation rates is that
  593. they are used to set the range of a uniform random variate determining the
  594. interval between mutations.
  595.  
  596.      num_gen = 2 tells us that there are two permanent genotype names saved
  597. to disk.  num_genq = 151 tells us that there are 151 distinct genotype names
  598. and genomes stored in the RAM genebank.  num_genl = 152 tells us that there
  599. are 152 genotype names in the list stored in RAM.  AverageSize = 79 tells us
  600. that at this time the average size of adult cells is 79 instructions.
  601.  
  602.      MaxGenPop = 80aaa = 150 tells us that at this time, the genotype with
  603. the largest population is 80aaa, and that it has a population of 150 adult
  604. cells.  MaxGenMem = 80aaa = 150 tells us that the genotype whose adult cells
  605. occupy the largest share of space in the soup is 80aaa, and that it has a
  606. population of 150 adult cells.
  607.  
  608.   5.4) The Birth-Death Output
  609.  
  610.      During a run, if the DiskOut parameter is non-zero, a record of births
  611. and deaths will be written to disk in the path specified by OutPath, to
  612. files whose names depend on the BrkupSiz parameter.  The format of this
  613. file is a bit cryptic, so it will be explained here.  The file has either
  614. three or four columns of output, depending on whether the GeneBnker parameter
  615. is set.  Three of the columns remain the same either way: 1) elapsed time
  616. since last birth or death event in instructions, output in hexidecimal format.
  617. 2) a `b' or a `d' depending on whether this is a birth or a death.  3) the size
  618. of the creature in instructions, output in decimal format.  If the genebanker
  619. is on, then there will be a fourth column containg the three letter code
  620. identifying the genotype of the creature.  Mutations in appear in the
  621. birth-death record as the death of one genotype followed by the birth of
  622. another, with an elapsed time of zero between the two events.
  623.  
  624.      What makes the file cryptic, and also compact, is that columns are
  625. implied to be identical in successive records unless otherwise indicated.
  626. Only the first column, elapsed time since last record, must be printed on
  627. every line, and only the first record must have all three or four columns.
  628. Therefore, if there is a series of successive births, only the first birth
  629. record in the series will contain the b.  Notice that at the beginning of
  630. the file, there will generally be many lines with just one column, because
  631. at the outset, all records are of births of the same size and genotype.
  632.  
  633.      The record of births and deaths is read by the Beagle program, and
  634. converted into a variety of graphic displays: frequency distributions over
  635. time, phase diagrams of the interactions between pairs of sizes or genotypes,
  636. or diversity and related measures over time.
  637.  
  638.   5.5) The Genebank Output
  639.  
  640.      If the GeneBnker parameter is set to a non-zero value, then as each
  641. creature is born, its genome will be sequenced and compared to that of its
  642. mother.  If they are identical, the daughter will be assigned the same name
  643. as the mother.  If they are different, the genome of the daughter will be
  644. compared to the same size genomes held in the RAM genebank.  If the daughter
  645. genome is found in the bank, it will be given the same name as the matching
  646. genome in the bank.  If the daughter genome is not found in the RAM genebank,
  647. it will be compared to any same size genomes stored on the disk that are not
  648. in the RAM genebank.  If the daughter genome is found in the disk genebank,
  649. ti will be given the same name as the matching genome in the bank.  If the
  650. daughter genome does not match the mother or any genome in either the RAM
  651. or disk banks, then it will be assigned an arbitrary but unique three letter
  652. code for identification.
  653.  
  654.      The genebank keeps track of the frequency of each size class and each
  655. genotype is the soup.  If a genotype exceeds one of the two genotype frequency
  656. thresholds, SavThrMem or SavThrPop, its assigned name will be made permanent,
  657. and it will be saved to disk.  Genotypes are grouped into individual files on
  658. the basis of size.  For example, all permanent genotypes of size 80 will be
  659. stored together in binary form in a file called 0080.gen.
  660.  
  661.      When the simulator comes down, or when the state of the simulator is
  662. saved periodically during a run, all genotypes present in the soup which have
  663. not been assigned permanent names will be stored in files with a .tmp
  664. extension.  For example, all temporary genotype names of size 45 would be
  665. stored in binary form in a file called 0045.tmp.
  666.  
  667.      The binary genebank files can be examined with the assembler-disassembler
  668. arg (see the relevant documentation, section 5.2 above).  Also, the Beagle
  669. Explorer program contains utilities for examing the structure of genomes.
  670. One tool condenses the code by pulling out all instructions using templates,
  671. which can reveal the pattern of control flow of the algorithm.  Another
  672. function allows one genome to be used as a probe of another, to compare
  673. the similarities and differences between genomes, or to look for the presence
  674. of a certain sequence in a genome.
  675.  
  676.   5.6) The Interrupt Handler
  677.  
  678.      When Tierra is running in the foreground it is possible to interrupt
  679. it on either DOS or UNIX, usually by typing Ctrl C (^C).  When you do this
  680. you will get a brief message listing your options, which looks something
  681. like this:
  682.  
  683.         TIERRA: traped a signal! # 2 @ 128519
  684.         TIERRA: port 4072
  685.         TIERRA: traped a signal! # 2 @ 128519
  686.         TIERRA: port 4072
  687. Variable | siZe info | Save soup | save & Quit |
  688. Exit     | Continue  | {v,z,s,q,e,c}
  689.  
  690.      You must now choose one of the options by typing one of the corresponding
  691. letters: vzsqec.  When you type the letter, the simulator will either prompt
  692. you for more input or do the requested operation.  The six options are:
  693.  
  694. Variable: allows you to alter the value of any of the variables in the
  695.      soup_in file at any point during a run.
  696.  
  697. siZe info: will display some information about creatures of the indicated
  698.      size.  This option is not currently implemented.
  699.  
  700. Save soup: will cause the state of the system to be saved at this point, and
  701.      then continue the run.
  702.  
  703. save & Quit: will cause the state of the system to be saved at this point, and
  704.      then exit from the run.
  705.  
  706. Exit: will exit immediately without saving the state of the system.
  707.  
  708. Continue: continue the run.
  709.  
  710.   5.7) Using the Turbo Debugger as a Frontend
  711.  
  712.      If you run Tierra under DOS, it is best to run Tierra under the Turbo
  713. Debugger (386 virtual version).  This provides a very flexible and handy
  714. frontend, and does not degrade the performance of the system.  If you try
  715. to run Tierra under the regular (non-virtual) debugger, you will probably
  716. have memory problems unless you run a very small soup.
  717.  
  718.      I suggest the following setup for viewing the run:  Startup the
  719. debugger with the tierra program.  Then do the following:
  720.  
  721. Ctrl F7
  722. InstExe (Enter)
  723. Ctrl F7
  724. NumCells (Enter)
  725.  
  726.      This will place the variables InstExe and NumCells into the watch
  727. window (2) at the bottom of the screen.  InstExe records the number of
  728. instructions executed by the system (see the structure definition in tierra.h).
  729. NumCells records the current number of cells.  Then type:
  730.  
  731. Ctrl S
  732. TimeSlice (Enter)
  733.  
  734.      This will search for the TimeSlice routine which is the central loop
  735. of the simulator.  This is the best place to watch the action.  Now place
  736. the cursor on the line: ce = cells + ci; and type F4.  This will cause the
  737. simulator to start up, and then stop execution at the current line.  Now
  738. place the cursor on the variable cells on the current line, and type:
  739.  
  740. Ctrl I
  741. Ctrl R
  742. 0, 400 (Enter)
  743. F5
  744.  
  745.      This will allow you to inspect the cells array, which is where the
  746. most useful information is contained.  See the tierra.h module for the
  747. structure definitions.  You should adjust the size of the cells array window
  748. so that it does not overlap the watch window.  You do this by using the
  749. Scroll Lock and arrow keys.  Now type F9 to continue the run.  Whenever you
  750. want to see how things are going type Ctrl Break to stop the run.  It is
  751. likely that the CPU window will pop up.  The best thing to do when this
  752. happens is to type Alt 2 followed by Alt 3, which will cause the windows you
  753. want to see to be above the CPU window.
  754.  
  755.   5.8) Restarting an Old Run
  756.  
  757.      When you start Tierra by typing tierra to the prompt, you may provide
  758. an optional command line argument, which is the name of the file to use as
  759. input.  This is the file that contains the startup parameters.  The default
  760. file name is soup_in.  When a simulator comes down, and periodically during
  761. a run, the complete state of the machine is saved so that the simulator can
  762. start up again where it left off.  In order to do this you must have the
  763. simulator read the file soup_out on startup.  This means that you must type:
  764.  
  765. tierra soup_out
  766.  
  767.      That is all there is to it.
  768.  
  769.      It appears that this does not work for the version of the current
  770. distribution.  Check again later.  We have this working in the newer version
  771. currently under development.
  772.  
  773. 11) IF YOU HAVE PROBLEMS
  774.  
  775.   11.1) Problems with Installation
  776.  
  777.      Read the installation instructions carefully.  Where we present
  778. alternative methods, try them all.  If it still doesn't work, please
  779. let us know.  We would like to help people with installation, and make
  780. sure that our instructions are clear.  If you are using a compiler or
  781. machine we have not tested, we may not be able to help you, but we want
  782. to accomodate these additional conditions.  We would like to help you
  783. find a solution and incorporate the solution in future releases.
  784.  
  785.   11.2) Problems Running Tierra
  786.  
  787.      Read all of the README files.  You may find the answer there.  If a
  788. problem still persists, get a new copy of the source code out of the ftp
  789. site.  It is likely that the source code will be updated on a roughly
  790. weekly basis as we continue to improve the program.  By the time you are
  791. sure there is a problem, we may already have fixed it and placed a fix
  792. in the ftp site.
  793.  
  794.      If the problem still persists after you have tested the latest version
  795. of the software, let us know about the problem.  We would like to fix it.
  796.