home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Interactive Guide / c-cplusplus-interactive-guide.iso / c_ref / csource4 / 275_01 / lcau.doc < prev    next >
Encoding:
Text File  |  1980-01-01  |  14.4 KB  |  283 lines

  1. LCAU.DOC 
  2.  
  3. This disk is a supplement to the disk "LCA.C" which was released in 
  4. Summer, 1987. The original disk contained 9 programs written in "C" to 
  5. calculate and display the evolution of linear cellular automata. 
  6. Although the programs represented a point in the evolution of the 
  7. course Fortran III offered during the past several semesters, and were 
  8. promoted at the XVI Feria de Puebla, they also had a strong 
  9. inspiration in an article in the December, 1986, issue of Byte magazine 
  10. which explained how cellular automata could lead to interesting 
  11. abstract mathematical art. 
  12.  
  13.     Kenneth E. Perry, Abstract mathematical art, Byte, 
  14.     December 1986, pages 181-192. 
  15.  
  16. The 9 programs in the LCAkr.C set ran through the range of 2, 3, and 4 
  17. states per cell, as well as interactions between first, second, or 
  18. third neighbors. The combinations (4,1) and (4,2) are probably the most 
  19. colorful, but the binary first neighbor version (2,1) is more amenable 
  20. to an exhaustive analysis.
  21.  
  22. Programs in the new series are named LCAU to distinguish them from 
  23. members of the old series. 
  24.  
  25. In the old series, In all cases except for (2,1), only totalistic rules 
  26. were considered. Totalistic rules are those for which the transition 
  27. depends only on the number of cells of different kinds in each 
  28. neighborhood, but not on their precise arrangement. More exactly, each 
  29. state gets assigned an integer in the range 0 to k-1 as a weight, the 
  30. actual transition being a function of the weighted sum of all the 
  31. neighbors (including the evolving cell). The artistic effects arise 
  32. from assigning colors to each of cell values. 
  33.  
  34. Although the use of totalistic rules serves to reduce the enormous 
  35. number of possible automata greatly, it excludes many interesting 
  36. possiblilities arising from a more detailed specification of the 
  37. evolutionary rules. When k, the number of states per cell is small, 
  38. there is not too much which is possible in the way of design, but once 
  39. it reaches 4 or beyond some interesting constructions become possible. 
  40. LCA41.C in particular, contains enhanced rule and line editing menus 
  41. which allow experimentation with the design of rules.
  42.  
  43. Certain of the demonstrations in LCAU41.C show how the design process 
  44. can be used. There is an example of a "binary counter'" which consists 
  45. of a glider gun together with bistable targets. In one state the target 
  46. absorbs the glider and changes to the other state. In the second state 
  47. the target passes the glider, reverting to the first state. Thus half 
  48. the gliders are lost to each target, whose state forms a binary counter 
  49. whose carry is represented by the gliders which are allowed to pass. 
  50.  
  51. Another demonstration shows how a bouncing glider may shuttle between 
  52. two obstacles - still lifes - drawing them ever closer together. Just 
  53. as the glider is about to be crushed, the walls coalesce but the glider 
  54. escapes to one side, seeking new walls to conquer. Multiple gliders may 
  55. go about their business, competing for the wall if they lie on opposite 
  56. sides or hastening the squeeze if they lie on the same side.
  57.  
  58. A third demonstration shows a slow glider propelled by an intrenal 
  59. glider or gliders bouncing back and forth - a sort of Mexican jumping 
  60. bean. When a fast glider overtakes a slower glider, they coalesce, 
  61. producing an even slower glider. 
  62.  
  63. A fourth demonstration shows gliders of two different velocities, which
  64. can be used to set up a remote still life whose reaction to further 
  65. gliders gives it a life of its own. 
  66.  
  67. Such constructions can be used to generate interesting patterns, but 
  68. they also serve theoretical ends as well. For example, the binary 
  69. counters establish the existence of structures with both exponentially 
  70. long transients and exponentially long cycles. Since they still use 
  71. several cells to establish the basic components and their spacings, 
  72. they still do not reach theoretical maxima; but they do lie within 
  73. certain factors of such maxima.
  74.  
  75. When k becomes larger still, universal Turing machines can be 
  76. programmed, but this probably requires a k of at least 6 or 8.
  77.  
  78. Another extensive addition which has been made to the programs is to be 
  79. found in the series PROB.C, which can be invoked by typing "t" in the 
  80. main menu (the old totalistic rule number can still be utilized by 
  81. typing "T"); in fact their inclusion more than doubles the size of the 
  82. programs. These new programs permit a statistical survey of the 
  83. properties of the automaton. Originally they calculated simple 
  84. probabilities on the basis of ideas which go by the name of "mean field 
  85. theory," whose results were plausible but not entirely convincing.
  86.  
  87. Since then two interesting articles have appeared [the second as a 
  88. preprint]:
  89.  
  90.     W. John Wilbur, David J. Lipman and Shihab A. Shamma, On the 
  91.     prediction of local patterns in cellular automata, Physica 
  92.     19D 397-410 (1986).
  93.  
  94.     Howard A. Gutowitz, Jonathan D. Victor and Bruce W. Knight,
  95.     Local structure theory for cellular automata, Physica 28D 
  96.     18-48 (1987). 
  97.  
  98. These articles, from differing points of view, show how to take 
  99. correlations between cells into account by calculating the 
  100. probabilities of strings of cells. Rather than taking individual 
  101. probabilties as fundamental and deducing the probabilities of 
  102. combinations, the process is inverted; self consistent probabilities 
  103. for strings (or blocks) of a certain length are found from which the 
  104. probabilities of individual cells are obtained by averaging.
  105.  
  106. The calculations of these articles have been included among the options 
  107. of the "t" submenu, so that probabilities derived from blocks of length 
  108. up to 6 can be compared with simpler estimates and with the actual 
  109. performance of the automaton.
  110.  
  111. A third feature of the new series is the incorporation of the de Bruijn 
  112. diagrams within the main program, together with a visual representation 
  113. in terms of chords of a circle. It is still not possible to transfer 
  114. the cycles obtained back to the main program without copying them on 
  115. paper and editing the initial line with the option "l". Limitations of 
  116. space and time severely restrict the lengths of periods which can be 
  117. analyzed. Although interesting gliders and cycles are found within the 
  118. accessible range of the program, there are many others of longer 
  119. periods which manifest themselves experimentally when the evolutions 
  120. are run. It would be nice if the exhaustive analysis afforded by the 
  121. de Bruijn diagrams were feasible for the longer periods that show up on 
  122. the screen, but they would really require a faster computer, more 
  123. memory, and probably programs incorporating finer details of the 
  124. algorithms used. 
  125.  
  126. The programs contain a bare minimum of help facilities, in the sense 
  127. that menus of one type or another are presented at various stages in 
  128. the evolution of the programs, and others are sometimes available by 
  129. typing a question mark, just as a slash will often clear portions of 
  130. the screen. 
  131.  
  132. A manual consisting of the lecture notes for Fortran III is in 
  133. preparation, for which chapters are planned describing the accompanying 
  134. programs. As is well known, the preparation of manuals always lags the 
  135. evolution of the programs which they are supposed to describe.
  136.  
  137. There are still some interesting problems of presentation - recall that 
  138. Fortran III is supposed to be dedicated to graphical techniques! 
  139. Presentation of simple evolution is easily solved, since the resolution 
  140. and velocity of the graphics controllers included as standard equimpent 
  141. in IBM PC's and clones is adequate. Unfortunately color monitors and 
  142. their controllers are sometimes seen as premium equipment which was not 
  143. included in a given installation, so that a monochromatic rendering of 
  144. the color displays must be endured.
  145.  
  146. Even so, the speed and screen resolution which is available in the 
  147. present generation of equipment is only marginally satisfactory, having 
  148. only a fraction of the resolution of pen and ink plotters which have 
  149. been commonly available. Once statistics pertaining to the evolution of 
  150. automata are to be presented, it is found that there are many more 
  151. parameters than are comfortable, which leads to the use of shading, 
  152. complex surface representations, even stereographic views. It is in 
  153. this area that some interesting results can be obtained, but mostly 
  154. ones which whet one's appetite for the next generation of equipment.
  155.  
  156. Likewise the use of the de Bruijn diagram and the reduced evolution 
  157. diagram, even without their probabilistic versions, requires line 
  158. drawings of a complexity which quickly surpasses the capability of the 
  159. present generation of graphical displays. Although the complexity of 
  160. these diagrams increases exponentially - making even modest values of 
  161. parameters permanently inaccessible; still, even moderately better 
  162. graphics equipment will permit an instructive display of the simplest 
  163. cases.
  164.  
  165. Although the menus vary slightly from program to program, they 
  166. generally conform to the following pattern:
  167.  
  168. The Copyright Notice - The initial screen in all programs bears a 
  169. copyright notice and a very short description of the program. While the 
  170. inexperienced user is reading the screen, a random number generator is 
  171. wasting time, so that there will usually be a different display every 
  172. time the program is run, likewise a different sequence of random rules 
  173. and initial lines. No effort has been made to see how much this initial 
  174. idling degenerates the performance of the random number generator.
  175.  
  176. The Main Menu - The main menu generally offers the following selection: 
  177.  
  178.     r - edit the rule 
  179.     l - edit the line 
  180.     q - quit 
  181.     g - graph the evolution 
  182.     x - generate a random rule 
  183.     y - generate a random line 
  184.     u - generate a sparse line
  185.     T - edit a totalistic rule number
  186.     D - display all stored rules in sequence 
  187.  
  188.     #nn - execute stored rule number nn 
  189.     @nn - execute totalistic rule number nn 
  190.     $nn - execute 12 totalistic rules starting with number nn 
  191.     wnn - execute Wolfram rule number nn (LCAU21 only) 
  192.  
  193.     t - enter probabilistic submenu 
  194.     d - enter de Bruijn submenu 
  195.  
  196. Additional commands are present in different programs, but they are not 
  197. publicized because they are generally experimental. In future versions 
  198. of the programs they may be officially documented. Anyone persisting in 
  199. a desire to use them at their own risk may discover them by studying 
  200. the source code. For example, a Z will sometimes clear the line of 
  201. cells, a dot will often execute a single generation of evolution but 
  202. still within the main menu. 
  203.  
  204. The Rule Editing Menu - To edit a rule, either general or totalistic, 
  205. one may move the cursor and insert values for the cell above the 
  206. cursor. Some programs have a more elaborate cursor, with tabs, 
  207. wraparound, and the possibility of flagging values which will not be 
  208. altered by using the random rule generator x (X overrides the flags).
  209. Again these features are experimental, and may possibly be confirmed in 
  210. future versions of the programs. 
  211.  
  212. The Line Editing Menu - Lines are edited by essentially the same 
  213. procedures that the rules are, but the long line of 320 cells is broken 
  214. down into 8 lines 40 cells, to make movement across the line using the 
  215. up and down arrows more rapid. LCAU41, which corresponds to one of the 
  216. simplest automata for which rules may be designed to order, has many 
  217. additional line editing options, all experimental, which can be used to 
  218. facilitate the design. No doubt more will be added before the existence 
  219. of all of them is officially announced. 
  220.  
  221. The Probabilistic submenu - By typing t one arrives at a separate 
  222. display, implemented in the programs PROB.C, which will perform several 
  223. statistical analyses of their automata. The programs vary considerably 
  224. with the number of states, since they attempt to represent the relative 
  225. probabilities as points within a simplex. For two states, the results 
  226. are trivial, for three states the diagrams are planar and interesting, 
  227. for four states the graphical capabilities of the screen are strained; 
  228. for five and beyond some other representation would be requiered. 
  229.  
  230. The generic options are: 
  231.  
  232.     a - a priori estimates 
  233.     m - evolution of cells and pairs 
  234.     M - 50 generation evolution of cells and pairs 
  235.     g - 50 feneration evolution of single cells
  236.     G - 200 generation evolution of single cells
  237.     s - graph probabilities in stereo 
  238.     t - graph probabilities, show contours in simplex 
  239.     1 - 1-block local structure theory iterations 
  240.     2 - 2-block local structure theory iterations 
  241.     3 - 3-block local structure theory iterations 
  242.     4 - 4-block local structure theory iterations 
  243.     5 - 5-block local structure theory iterations 
  244.     6 - 6-block local structure theory iterations 
  245.     + - select red-green-yellow
  246.     - - select blue-cyan-white
  247.     e - show 16 lines of evolution 
  248.     / - clear screen
  249.     ? - show menu
  250.     carriage return - exit 
  251.  
  252. Options 5 or 6 may not be available if they require too much time or 
  253. space, t shows two-block probabilities for k=2 automata, and there may 
  254. be variants on s. For k=2, the commands x, y, z, w, v, i, and j produce 
  255. graphs for self-consistent 1-block probabilities for varying numbers of 
  256. generations and numbers of iterations. 
  257.  
  258. The de Bruijn submenu - There are two kinds of de Bruijn diagrams that 
  259. can be computed - those showing the counterimages of a uniform string, 
  260. and those which isolate strings satisfying a certain combination of 
  261. shifting and periodicity. Letters are assigned to them consecutively, 
  262. but the combination of period and displacement varies widely because of 
  263. the differing number of combinations possible. Generally 
  264.  
  265.     1,2,...        generates a de Bruijn diagram of n stages
  266.     a,b,c,...    shows cyclic counterimages
  267.     A,B,C,...    shows all counterimages 
  268.     other letters    show (p,d) cycles 
  269.     +,1        selects the color palette 
  270.     ?,/        clears screen, shows menu
  271.     carriage return exits
  272.  
  273. To obtain information from the de Bruijn submenu will probably require 
  274. the use of pencil and paper, or the use of the screen dump program. 
  275. Although the program lists all the links in the de Bruijn diagram, the 
  276. ring diagram is generally too cluttered to use directly from the screen 
  277. and should be redrawn. Usually the resulting diagram can be further 
  278. simplified, often it contains many redundant loops. Used casually, it 
  279. still shows whether there will be many or few periods of a given type.
  280.  
  281. Harold V. McIntosh
  282. April 15, 1988
  283.