Home » Recent acquisitions » Acorn ADFS disks » adfs_ArchimedesWorld_199201.adf » January92 » !AWJan92/Goodies/ArcAut/Automatons/Chaos

!AWJan92/Goodies/ArcAut/Automatons/Chaos

This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.

Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.

Tape/disk: Home » Recent acquisitions » Acorn ADFS disks » adfs_ArchimedesWorld_199201.adf » January92
Filename: !AWJan92/Goodies/ArcAut/Automatons/Chaos
Read OK:
File size: 037F bytes
Load address: 0000
Exec address: 0000
File contents
AUTOMATON*

  Chaos

  This uses the Moore neighbourhood & the maximum of 256 cell states. The
  states are partitioned into two sections. On one, evolution occurs by
  averaging & incrementing the cells (as in Rug) & on the other in a
  'approximately' chaotic manner; there is a slight overlap between the two
  resulting bands of states. This leads to competing regions of 'Rug' type
  stability & of 'Chaos'. Try 150x100 & 50x40 windows.

INITIALISATION*

  10DEF PROCdo
  20*SetEval wrap on
  30*SetEval l 96
  40*SetEval k 115
  50*SetEval inc 13
  60ENDPROC

SCREEN*

  10DEF PROCdo
  20PROCsoup(0,256,1)
  30ENDPROC

CODE*

( CELL [<l>/2] < IF ([FNround(2*<k>/<l>*256)] CELL * 8 >> ==)
  CELL  <l>   <= IF ([FNround(2*<k>/<l>*256)] CELL * 8 >>
                     [FNround(2*<k>)] SWAP -              ==)
  READ_NEIG
  SUM_NEIG 3 >> <inc> +                                   ==  )

END*
00000000  41 55 54 4f 4d 41 54 4f  4e 2a 0a 0a 20 20 43 68  |AUTOMATON*..  Ch|
00000010  61 6f 73 0a 0a 20 20 54  68 69 73 20 75 73 65 73  |aos..  This uses|
00000020  20 74 68 65 20 4d 6f 6f  72 65 20 6e 65 69 67 68  | the Moore neigh|
00000030  62 6f 75 72 68 6f 6f 64  20 26 20 74 68 65 20 6d  |bourhood & the m|
00000040  61 78 69 6d 75 6d 20 6f  66 20 32 35 36 20 63 65  |aximum of 256 ce|
00000050  6c 6c 20 73 74 61 74 65  73 2e 20 54 68 65 0a 20  |ll states. The. |
00000060  20 73 74 61 74 65 73 20  61 72 65 20 70 61 72 74  | states are part|
00000070  69 74 69 6f 6e 65 64 20  69 6e 74 6f 20 74 77 6f  |itioned into two|
00000080  20 73 65 63 74 69 6f 6e  73 2e 20 4f 6e 20 6f 6e  | sections. On on|
00000090  65 2c 20 65 76 6f 6c 75  74 69 6f 6e 20 6f 63 63  |e, evolution occ|
000000a0  75 72 73 20 62 79 0a 20  20 61 76 65 72 61 67 69  |urs by.  averagi|
000000b0  6e 67 20 26 20 69 6e 63  72 65 6d 65 6e 74 69 6e  |ng & incrementin|
000000c0  67 20 74 68 65 20 63 65  6c 6c 73 20 28 61 73 20  |g the cells (as |
000000d0  69 6e 20 52 75 67 29 20  26 20 6f 6e 20 74 68 65  |in Rug) & on the|
000000e0  20 6f 74 68 65 72 20 69  6e 20 61 0a 20 20 27 61  | other in a.  'a|
000000f0  70 70 72 6f 78 69 6d 61  74 65 6c 79 27 20 63 68  |pproximately' ch|
00000100  61 6f 74 69 63 20 6d 61  6e 6e 65 72 3b 20 74 68  |aotic manner; th|
00000110  65 72 65 20 69 73 20 61  20 73 6c 69 67 68 74 20  |ere is a slight |
00000120  6f 76 65 72 6c 61 70 20  62 65 74 77 65 65 6e 20  |overlap between |
00000130  74 68 65 20 74 77 6f 0a  20 20 72 65 73 75 6c 74  |the two.  result|
00000140  69 6e 67 20 62 61 6e 64  73 20 6f 66 20 73 74 61  |ing bands of sta|
00000150  74 65 73 2e 20 54 68 69  73 20 6c 65 61 64 73 20  |tes. This leads |
00000160  74 6f 20 63 6f 6d 70 65  74 69 6e 67 20 72 65 67  |to competing reg|
00000170  69 6f 6e 73 20 6f 66 20  27 52 75 67 27 20 74 79  |ions of 'Rug' ty|
00000180  70 65 0a 20 20 73 74 61  62 69 6c 69 74 79 20 26  |pe.  stability &|
00000190  20 6f 66 20 27 43 68 61  6f 73 27 2e 20 54 72 79  | of 'Chaos'. Try|
000001a0  20 31 35 30 78 31 30 30  20 26 20 35 30 78 34 30  | 150x100 & 50x40|
000001b0  20 77 69 6e 64 6f 77 73  2e 0a 0a 49 4e 49 54 49  | windows...INITI|
000001c0  41 4c 49 53 41 54 49 4f  4e 2a 0a 0a 20 20 31 30  |ALISATION*..  10|
000001d0  44 45 46 20 50 52 4f 43  64 6f 0a 20 20 32 30 2a  |DEF PROCdo.  20*|
000001e0  53 65 74 45 76 61 6c 20  77 72 61 70 20 6f 6e 0a  |SetEval wrap on.|
000001f0  20 20 33 30 2a 53 65 74  45 76 61 6c 20 6c 20 39  |  30*SetEval l 9|
00000200  36 0a 20 20 34 30 2a 53  65 74 45 76 61 6c 20 6b  |6.  40*SetEval k|
00000210  20 31 31 35 0a 20 20 35  30 2a 53 65 74 45 76 61  | 115.  50*SetEva|
00000220  6c 20 69 6e 63 20 31 33  0a 20 20 36 30 45 4e 44  |l inc 13.  60END|
00000230  50 52 4f 43 0a 0a 53 43  52 45 45 4e 2a 0a 0a 20  |PROC..SCREEN*.. |
00000240  20 31 30 44 45 46 20 50  52 4f 43 64 6f 0a 20 20  | 10DEF PROCdo.  |
00000250  32 30 50 52 4f 43 73 6f  75 70 28 30 2c 32 35 36  |20PROCsoup(0,256|
00000260  2c 31 29 0a 20 20 33 30  45 4e 44 50 52 4f 43 0a  |,1).  30ENDPROC.|
00000270  0a 43 4f 44 45 2a 0a 0a  28 20 43 45 4c 4c 20 5b  |.CODE*..( CELL [|
00000280  3c 6c 3e 2f 32 5d 20 3c  20 49 46 20 28 5b 46 4e  |<l>/2] < IF ([FN|
00000290  72 6f 75 6e 64 28 32 2a  3c 6b 3e 2f 3c 6c 3e 2a  |round(2*<k>/<l>*|
000002a0  32 35 36 29 5d 20 43 45  4c 4c 20 2a 20 38 20 3e  |256)] CELL * 8 >|
000002b0  3e 20 3d 3d 29 0a 20 20  43 45 4c 4c 20 20 3c 6c  |> ==).  CELL  <l|
000002c0  3e 20 20 20 3c 3d 20 49  46 20 28 5b 46 4e 72 6f  |>   <= IF ([FNro|
000002d0  75 6e 64 28 32 2a 3c 6b  3e 2f 3c 6c 3e 2a 32 35  |und(2*<k>/<l>*25|
000002e0  36 29 5d 20 43 45 4c 4c  20 2a 20 38 20 3e 3e 0a  |6)] CELL * 8 >>.|
000002f0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000300  20 20 20 20 20 5b 46 4e  72 6f 75 6e 64 28 32 2a  |     [FNround(2*|
00000310  3c 6b 3e 29 5d 20 53 57  41 50 20 2d 20 20 20 20  |<k>)] SWAP -    |
00000320  20 20 20 20 20 20 20 20  20 20 3d 3d 29 0a 20 20  |          ==).  |
00000330  52 45 41 44 5f 4e 45 49  47 0a 20 20 53 55 4d 5f  |READ_NEIG.  SUM_|
00000340  4e 45 49 47 20 33 20 3e  3e 20 3c 69 6e 63 3e 20  |NEIG 3 >> <inc> |
00000350  2b 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |+               |
00000360  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000370  20 20 20 20 3d 3d 20 20  29 0a 0a 45 4e 44 2a     |    ==  )..END*|
0000037f