File: cell_automata

package info (click to toggle)
xlockmore 4.09-3
  • links: PTS
  • area: main
  • in suites: hamm
  • size: 5,440 kB
  • ctags: 6,552
  • sloc: ansic: 54,180; sh: 1,624; makefile: 689; tcl: 439; java: 269; perl: 149
file content (161 lines) | stat: -rw-r--r-- 6,979 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
There are a few modes devoted to cellular automata.
I also added a bunch of options.  So I am providing a little explanation
so it is not overwhelming.  I also say a little something at the top of the
C file of each.  If your favorite little automaton is not here (or you think
it should be enhanced)... let me know.
The modes are ant, bug, demon, dilemma, life, life1d, life3d, loop, voters,
wator and wire.
use -install if netscape is stealing all your colors... :)
"xlock -help" may be helpful too.

ant: Turing Machines where the tape is the screen.
 Special options:
  -truchet: this shows the path (good to use with -size at
    least 10)  Truchet option turned off if its not Turk's ants.

 Mode options:
  -delay <int>: controls the length of a cycle in microsec
  -batchcount <int>: number of ants
  -cycles <int>: how many cycles before a new ant
  -size <int>: size of ant in pixels
  
  -neighbors <int>: 0 random, 4 ants, 3 & 6 bees, (8, 9, and 12
    are also available, but in my opinion, produces nonsence)
  -verbose: verbose help identify ant  (good to use with -inwindow or -debug)

bug: Evolving bugs learn to walk straight (except in the garden) unlike
   other modes there is no wrapping
 Mode options:
  -delay <int>: controls the length of a cycle in microsec
  -batchcount <int>: number of bugs
  -cycles <int>: how many cycles before a new world
  -size <int>: size of bug in pixels

  -neighbor <int>: option has no effect.  Currently supports only a hexagonal
    arrangement (6)  (other neighborhoods currently in development)

demon: A simple modulo automata
 Mode options:
  -delay <int>: controls the length of a cycle in microsec
  -batchcount <int>: number of states
  -cycles <int>: how many cycles before a new screen
  -size <int>: size of cell in pixels

  -neighbors <int>: 0 random, 4 & 8 rectangular, 6 hexagonal, 3, 9 & 12
    triangular

dilemma: Happy (good) and Mean (bad) cells compete for domination
 Special options:
  -conscious: (default) uses its own state in calculation of payoff
  +conscious: does not use its own state in calculation of payoff
  -bonus <flt>: payoff for defecting
 Mode options:
  -delay <int>: controls the length of a cycle in microsec
  -batchcount <int>: number of bad or defecting initial cells
  -cycles <int>: how many cycles before a new screen
  -size <int>: size of cell in pixels (mean faces and happy faces become
    polygons and circles if not 0)

  -neighbors <int>: 0 random, 4 & 8 rectangular, 6 hexagonal, 3, 9 & 12
    triangular (mean faces and happy faces become polygons and circles if
    not 4 or 8)

life:
 Special options:
  -rule <string>: survival and birth parameters formated
    S<neighborhood>/B<neighborhood>, so Conways rule is S23/B3.
    Two format exceptions:
      -rule P:  Picks a random rule from all rules that have known patterns
      -rule G:  Picks a random rule from all rules that have known gliders
  -callahan: Paul Callahan's B2a/S2b34 hexagonal life
  -andreen: Bob Andreen's B2a3a4b/S2a2b4a hexagonal life
  -lifefile <filename>: only the #P format of xlife
    There is a limit of 128 initial live cells set by NUMFILEPTS in life.c.

 Mode options:
  -cycles <int>: how many cycles before a new lifeform
  -batchcount <int>: number of cycles before glider (if one exists)
  -delay <int>: controls the length of a cycle in microsec
  -size <int>: size of cell in pixels, if 0 may default to bitmap

  -neighbors <int>: 0 random, 4 & 8 rectangular, 6 hexagonal, 3, 9 & 12
    triangular
  -verbose: verbose help identify life (to be referenced with the source code)
    (good to use with -inwindow or -debug)

life1d: 1 dimensional life
 Special options:
  -totalistic: (default) totalistic 1d life
  +totalistic: LCAU collection  These rules may not be symmetric and are
    more general (totalistic is a subset).

 Mode options:
  -delay <int>: controls the length of a cycle in microsec
  -cycles <int>: how many pages before a new lifeform
  -size <int>: size of cell in pixels, if 0 may default to bitmap

  -verbose: verbose to help identify life (to be referenced with the source
    code) (good to use with -inwindow or -debug)

life3d: 3 dimensional life
 Special options:
  -rule3d <string>: survival and birth parameters formated
    S<neighborhood>/B<neighborhood>, so Bays' rules are S45/B5, S567/B6,
    S56/B5, and S67/B67.  There is currently no way of accessing the
    neighborhoods 10 to 27.
    Two format exceptions:
      -rule3d P:  Picks a random rule from all rules that have known patterns
      -rule3d G:  Picks a random rule from all rules that have known gliders
  -life3dfile <filename>: similar to the #P format of xlife, 3 integers are
    required to center, sequential linefeeds imply a depth change
    There is a limit of 84 initial live cells set by NUMFILEPTS in life3d.c.

 Mode options:
  -delay <int>: controls the length of a cycle in microsec
  -batchcount <int>: number of cycles before glider (if one exists)
  -cycles <int>: how many cycles before a new lifeform

  -verbose: verbose to help identify life (to be referenced with the source
    code) (good to use with -inwindow or -debug)

loop: Chris Langton's loops, its always the same but oriented 4 ways
    this is far as I know is the best example of a self-generating life form.
    Caution: this may cause you to question G-d's existence. :)
 Mode options:
  -delay <int>: controls the length of a cycle in microsec
  -cycles <int>: how many cycles before it starts over
  -size <int>: size of cell in pixels

voters: your political belief is influenced by your neighbor
 Mode options:
  -delay <int>: controls the length of a cycle in microsec
  -batchcount <int>: number of parties 2 or 3 (3 may not be available)
  -cycles <int>: how many cycles before a new world starts
  -size <int>: size of cell in pixels (elephants and donkeys become
    squares and circles if not 0, hammer/sickle unavailable)

  -neighbors <int>: 0 random, 4 & 8 rectangular, 6 hexagonal, 3, 9 & 12
    triangular (elephants and donkeys become squares and circles if
    not 4 or 8, hammer/sickle unavailable)

wator: sharks and fish on a water torus planet
 Mode options:
  -delay <int>: controls the length of a cycle in microsec
  -batchcount <int>: breed time for the fish
  -cycles <int>: how many cycles before a new world starts
  -size <int>: size of cell in pixels (sharks and fish become polygons
    and circles if not 0)

  -neighbors <int>: 0 random, 4 & 8 rectangular, 6 hexagonal, 3, 9 & 12
    triangular (sharks and fish become polygons and circles if not 4 or 8)

wire: (this mode lacks a good circuit generator)  unlike other modes there
   is no wrapping
 Mode options:
  -delay <int>: controls the length of a cycle in microsec
  -batchcount <int>: length of random circuit
  -cycles <int>: how many cycles before a circuit
  -size <int>: size of cell in pixels

  -neighbors <int>: 0 random, 4 & 8 rectangular, 6 hexagonal, 3, 9 & 12
    triangular