/
redgreen.html
143 lines (111 loc) · 4.5 KB
/
redgreen.html
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!-- encoding: UTF-8 -->
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>The REDGREEN Cellular Automaton</title>
<!-- begin html doc dynamic markup -->
<script type="text/javascript" src="/contrib/jquery-1.6.4.min.js"></script>
<script type="text/javascript" src="/scripts/documentation.js"></script>
<!-- end html doc dynamic markup -->
</head>
<body>
<h1>REDGREEN</h1>
<h2>Cellular Automaton</h2>
<p>REDGREEN is a successor to <a href="/projects/rube/">RUBE</a>.
Unlike RUBE, REDGREEN is proper cellular automaton (CA): the next
state of each cell is determined only by its current state and
the states of its neighbours.</p>
<h2>Implementation</h2>
<p>This implementation of REDGREEN is written in <a href="/projects/alpaca/">ALPACA</a>
and compiled to a Perl script using the reference ALPACA compiler.
As a language for expressing CA's, ALPACA is much, much clearer than
C (the language in which RUBE was implemented.) In fact, the need for
a clear description language for RUBE's successor was one of the driving
forces behind the development of ALPACA.
REDGREEN is an extremely complex automaton, making full use of
ALPACA's "class of states" feature.</p>
<h2>The REDGREEN Universe</h2>
<table>
<tr><td>Air</td><td>  </td><td>
Heavy things like water and pebbles fall through air.
Light things like smoke and steam rise in air.
Air is required for a fire to keep burning.
</td></tr>
<tr><td>Water</td><td> <b><tt>~</tt></b></td><td>
Heavy solid things like pebbles fall into water.
Light things like steam or smoke make rising bubbles in water.
Boils to steam when heated, but also puts out open fires.
Fish can live a John Conway's Life in water.
</td></tr>
<tr><td>Fire</td><td> <b><tt>%</tt></b></td><td>
Heavy things like pebbles fall through fire; water puts it out.
Requires flammable fuel and air to keep burning, otherwise
goes up in smoke. Spreads to adjacent flammables like twigs
and heats up adjacent non-flammables like rock.
</td></tr>
<tr><td>Earth</td><td> <b><tt>#</tt></b></td><td>
Stops things which would otherwise fall from falling. Can be
heated up to magma by adjacent fire.
</td></tr>
<tr><td>Magma</td><td> <b><tt>&</tt></b></td><td>
Heated-up earth, will cool down to earth if no adjacent fire or
magma is present. Can boil water.
</td></tr>
<tr><td>Steam</td><td> <b><tt>s</tt></b></td><td>
From boiling water, rises in air.
</td></tr>
<tr><td>Smoke</td><td> <b><tt>@</tt></b></td><td>
From fire, rises in air.
</td></tr>
<tr><td>Bubble</td><td> <b><tt>o</tt></b></td><td>
From air or steam or smoke, rises in water.
</td></tr>
<tr><td>Fish</td><td> <b><tt>f</tt></b></td><td>
Lives a <a href="/projects/alpaca/eg/life/">John Conway's Life</a> in water.
</td></tr>
<tr><td>Pebble</td><td> <b><tt>.</tt></b></td><td>
Falls through air.
</td></tr>
<tr><td>Two Pebbles</td><td> <b><tt>:</tt></b></td><td>
Two pebbles stacked together, also falls through air.
</td></tr>
<tr><td>Spark</td><td> <b><tt>*</tt></b></td><td>
An electrical phenomenon living a <a href="/projects/alpaca/eg/wireworld/">WireWorld</a> existence.
</td></tr>
<tr><td>Tail</td><td> <b><tt>-</tt></b></td><td>
The trail of a spark.
</td></tr>
<tr><td>Wire</td><td> <b><tt>=</tt></b></td><td>
Conducts electricity (sparks).
</td></tr>
<tr><td>Zappy</td><td> <b><tt>z</tt></b></td><td>
Shot off by sparks. Can set flammables on fire.
</td></tr>
<tr><td>Big Zappy</td><td> <b><tt>Z</tt></b></td><td>
Also shot off by sparks. Can also set flammables on fire.
</td></tr>
<tr><td>Duct Tape</td><td> <b><tt>D</tt></b></td><td>
Flammable. Things can stick to it. It can unravel.
</td></tr>
<tr><td>"Oh No" Tape</td><td> <b><tt>O</tt></b></td><td>
Flammable. Duct tape that's unravelling.
</td></tr>
<tr><td>Twig</td><td> <b><tt>l</tt></b></td><td>
Flammable.
</td></tr>
<tr><td>Conveyor Left</td><td> <b><tt><</tt></b></td><td>
Moves twigs, pebbles etc. on top of it to the left.
</td></tr>
<tr><td>Conveyor Right</td><td> <b><tt>></tt></b></td><td>
Moves twigs, pebbles etc. on top of it to the right.
</td></tr>
<tr><td>Randomizer</td><td> <b><tt>?</tt></b></td><td>
Randomly flips the direction of the Conveyor adjacent
above it.
</td></tr>
<tr><td>Torch</td><td> <b><tt>T</tt></b></td><td>
Provides endless fuel for a fire.
</td></tr>
</table>
</body></html>