home *** CD-ROM | disk | FTP | other *** search
/ The Fred Fish Collection 1.5 / ffcollection-1-5-1992-11.iso / ff_disks / 200-299 / ff239.lzh / JGoodies / Evolution / ReadMe < prev    next >
Text File  |  1989-08-21  |  7KB  |  128 lines

  1.                          EVOLUTION4, by R.R.YOST
  2.                               29 JULY, 1989
  3.  
  4.     Evolution4 is a "final" revision and upgrading of Evolution3
  5. that was included in BUGS3.ARC.  It now incorporates improvements added
  6. by Delta Research, Phil Burk and Mike Haas and also (in Bugs3)
  7. incorporated a number of ideas suggested by a similar program,
  8. JITTER, by Don Reble and Chris Gray, downloaded from USENET, and
  9. also available on CompuServe and Fred Fish Disk #201. The basic
  10. idea for the program was conceived by Michael Palmiter, a high
  11. school teacher from Temple City, CA.  It was described by A. K.
  12. Dewdney in his column, Computer Recreations, in Scientific
  13. American, May, 1989.
  14.  
  15.     A few words on the background of Evolution4:  The program
  16. simulates evolution (or adaptation).  "Bugs" move around the
  17. computer screen, eating "Bacteria", which gives them "energy" for
  18. motion.  Each bug has 6 "genes", which determine the bug's
  19. response to a "turn stimulation" signal applied before each step
  20. of motion.  The turn stimulation is a random number and the set of
  21. genes determine the relative probability that the bug will react
  22. to the stimulation by changing its direction of travel by 0, 60,
  23. 120, 180, 240, or 300 degrees. A bug's genes do not change, but if
  24. he survives long enough (measured in terms of the moves he has
  25. made) and has accumulated enough energy, he splits into two
  26. "children", whose genes are copied from their parent, but are
  27. slightly altered.  One child has a random one of his 6 genes cut
  28. in half, while the other has a random (probably different) gene
  29. doubled.  These modifications may make a child better adapted at
  30. finding bacteria, enabling him to survive and pass on his genes to
  31. his offspring.
  32.  
  33.     A bug always starts with 40 energy units, and gains 40 each
  34. time he "eats" a bacterium.  Each move costs him 1 energy unit. He
  35. is mature enough to split if he has completed 200 moves and is
  36. strong enough if his energy is greater than 400 units.  He is
  37. limited to 600 energy units.
  38.  
  39.     He dies if his energy reaches zero, or if his "age" exceeds
  40. 2000 moves.  The bugs are maintained in a circularly linked list
  41. that requires a minimum of two bugs, so the last two bugs do not
  42. die when their energy reaches zero, and their subsequent movements
  43. do not cost them any energy.  As will be seen below, when the
  44. number of bugs is small, an excess of bacteria are supplied, so
  45. the population of two bugs will eventually grow.
  46.  
  47.     The bacteria are scattered uniformly over the screen in the
  48. "normal" mode, but in a "Garden of Eden" mode, they are
  49. concentrated in one area.  With the uniform distribution, bugs
  50. evolve that tend to move straight ahead, or (occasionally seen)
  51. have a nearly equal chance of turning 60 or 300 ( - 60) degrees. 
  52. This occurs because a twirling bug soon eats all the bacteria in
  53. his neighborhood, then cannot move to more remote areas.  In the
  54. Garden of Eden mode, the bugs survive better if they stay near the
  55. high concentration, so bugs evolve that tend to turn one
  56. direction, or else by 180 degrees.
  57.  
  58.     Bacteria are supplied at a controllable rate per total
  59. movements of all the bugs.  The default rate is 1 per twice the
  60. number of bugs in existence.  As a bug must capture 1 bacterium
  61. each 40 moves, the default feed rate will support about 20 bugs,
  62. but the number of bugs on the screen will fluctuate considerably.
  63.  
  64.     My version of this program was written in a version of the
  65. Forth computer language,  JForth Professional V2.0, for the Amiga
  66. A2000 with AmigaDOS V1.3.  JForth is available from Delta
  67. Research, PO Box 1051, San Rafael, CA 94915, (415)-485-6867.  The
  68. load module, Evolution4, has been stripped of all JForth
  69. proprietary matter and IS FREELY DISTRIBUTABLE, with appropriate
  70. credit given to the author.  THE SOURCE FILE IS SIMILARLY NON-
  71. PROPRIETARY AND IS HEREBY RELEASED IN THE PUBLIC DOMAIN.
  72.  
  73.     To run the program, from the CLI or Shell, type the name,
  74. EVOLUTION4  followed by pressing the <return> key.  The program can
  75. also be run from the WorkBench by clicking on its icon.  750 bacteria
  76. will first be scattered over the screen, then ten bugs will appear
  77. and start moving about.  A bug's color indicates the state of his
  78. energy, as follows:  White indicates the energy is 120 units or
  79. higher, red indicates an energy level between 40 and 120, while
  80. black indicates an energy level less than 40 units, possibly
  81. foretelling approaching death.  Offspring will usually immediately
  82. turn black, making splitting fairly easy to detect.
  83.  
  84. [Note: The colors indicated may be different on your screen, depending
  85. on the settings in your preferences file.]
  86.  
  87.     The screen includes 3 "buttons", white rectangles labelled Inc.,
  88. Dec., and Uniform/Conc. Clicking once in these rectangles has the
  89. following effects:
  90.  
  91.      Inc. : Increases the rate at which bacteria are added. The number
  92.             of bugs that can be supported at the survival level by the
  93.             added bacteria is reported on the screen.
  94.  
  95.      Dec. : Decreases the rate at which bacteria are added.
  96.  
  97.      Uniform/Conc : Toggles between the uniform distribution mode and
  98.                     the "Garden of Eden" mode.
  99.  
  100.  
  101.     The program can be exited by clicking in the close
  102. gadget in the upper left corner of the display screen.
  103.  
  104.     In the Garden of Eden mode, bacteria are deposited in a
  105. pseudo-Rayleigh distribution (x and y are generated by summing 12
  106. uniformly distributed random numbers) in the center of the window. 
  107. If a selected position is occupied by another bacterium or a bug,
  108. another location is tried.  However, after 10 tries, the attempt
  109. to place a bacterium is abandoned.  Thus, when the area gets
  110. painted solid, the rate of supply falls off. Apparently for this
  111. reason, it seems to be better to use the Inc. button  to
  112. increase the bacteria supply rate in the Garden of Eden mode.
  113. No bacteria are fed to the rest of the screen.
  114.  
  115.     When a button is clicked and also when a split or death occurs,
  116. the number of bugs on the screen is reported, and the averages of their
  117. six genes are listed, under headings of the corresponding degrees (ccw)
  118. of turn.  The genes are reported as decimals that add to 1.0.
  119. (Actually, the genes are stored in the bug structure as 6 accumulations
  120. of integers and their total; the probability of a given turn is related
  121. to the difference between the corresponding gene as stored and the
  122. preceding gene;this approach permits integer processing and enhances
  123. processing speed.)
  124.  
  125.     The bacteria feed rate is also listed.  The distribution mode
  126. is evident from the pattern of the bacteria.
  127.  
  128.