git @ Cat's Eye Technologies Troupe / 322e9d4
Convert CRLF line terminators to LFs. catseye 9 years ago
1 changed file(s) with 219 addition(s) and 219 deletion(s). Raw diff Collapse all Expand all
0 Troupe
1 ======
2
3 Troupe is an esolang designed by Chris Pressey on June 25, 2012, in Winnipeg,
4 Canada.
5
6 The name of this esolang is **Troupe** in the UK and Canada and Australia,
7 but in the USA, where they drop the "u" in words where it follows an "o", its
8 name is **Trope**.
9
10 Part I. Hedgehogs
11 -----------------
12
13 We have a troupe of hedgehogs. Each has a position, a colour (in the USA:
14 color), a possible hedgehog to its left, and a possible hedgehog to its
15 right. In this troupe, there is only one hedgehog which has no hedgehog to
16 its left, and only one hedgehog which has no hedgehog to its right, and the
17 following is true: for each hedgehog X, if Y is the hedgehog to X's right
18 (resp. left), then X is the hedgehog to Y's left (resp. right). (i.e. the
19 hedgehogs are in a line formation.)
20
21 For some hedgehog X, the hedgehog to X's left and the hedgehog to X's right
22 are the *neighbours* (in the USA: *neighbors*) of X.
23
24 We may say that a hedgehog is "one of the hedgehogs to the left" (resp.
25 "right") of some other hedgehog; the meaning of this should be evident — it
26 is just the transitive closure of "to its left" (resp. right).
27
28 All hedgehogs share a fixed speed at which they move (when they move), and a
29 fixed radius. Also, the troupe consists of a finite number of hedgehogs at
30 all times, and their colours come from a finite set of possible colours that
31 can be distinguished from one another. (And that there is one distinguished
32 "default" colour, which we will arbitrarily call "white".)
33
34 In the troupe, at any given time, there is either exactly one *leader*
35 hedgehog, or exactly one *leader-elect* hedgehog; never both and never
36 neither.
37
38 The leader hedgehog, when it exists, has a velocity. It moves through space
39 with this velocity, changing its position. All other hedgehogs in the troupe
40 try to "follow" it, which means the following:
41
42 Each hedgehog moves to minimize the distance between it and one of its
43 neighbours (up to a certain point: if the distance between it and its
44 neighbour is less than three times the hedgehog radius, it does not bother
45 to move at all.)
46
47 The neighbour it moves toward is the hedgehog on its left (resp. right), if
48 the leader is one of the hedgehogs to the left (resp. right).
49
50 Part II. Faery Rings
51 --------------------
52
53 We also have a set of faery rings. Each ring has a fixed position, radius,
54 inner colour, and outer colour; it optionally has a signpost, a unit vector
55 pointing in any direction; and it optionally has an orientation, which is
56 either clockwise or counterclockwise.
57
58 Faery rings may not intersect each other *except* if both rings have
59 precisely the same position and radius *and* if they have different outer
60 colours. (They may have the same inner colour.)
61
62 When a leader hedgehog intersects a faery ring (i.e. when the distance
63 between the hedgehog is less than the sum of the hedgehog radius and the
64 particular ring's radius), and if the outer colour of the faery ring is the
65 same as the colour of the leader hedgehog, the following things happen, in
66 this order:
67
68 * The faery ring, and all faery rings which intersect it, become temporarily
69 inactive, in that intersection with a hedgehog does not set off this same
70 sequence of events until it becomes active again.
71
72 * The leader hedgehog's colour is changed to the inner colour of the faery
73 ring.
74
75 * If the faery ring has a counterclockwise (resp. clockwise) orientation,
76 then the hedgehog to the leader hedgehog's left (resp. right) becomes
77 the leader-elect hedgehog.
78
79 (If there *is* no hedgehog to the left (resp. right) of the leader
80 hedgehog, then one pops into existence, at the same position as the
81 leader hedgehog, and with a white colouring; and it becomes the
82 leader-elect hedgehog.)
83
84 When the set of hedgehogs has a leader-elect, the leader-elect moves to
85 minimize its distance to the faery ring that made it leader-elect, and
86 all other hedgehogs follow the leader-elect, as described above.
87
88 Once the leader-elect hedgehog intersects the faery ring which made it
89 the leader-elect (which it will eventually, as it moves to minimize the
90 distance), it becomes the leader hedgehog.
91
92 * If the faery ring has a signpost, the leader hedgehog is given a velocity
93 in accordance with the direction of the signpost.
94
95 * Once the leader hedgehog no longer intersects the faery ring, the faery
96 ring, and all rings that it intersects, become active once again.
97
98 Part III. Hills
99 ---------------
100
101 There are also any number of hills, each with a fixed position and radius.
102 These serve as goals; when the leader hedgehog reaches a hill, the troupe's
103 quest is over, and they are free to break formation and nibble on clover or
104 whatever it is that hedgehogs do for fun.
105
106 Part IV. Computational Class
107 ----------------------------
108
109 The system outlined above should be Turing-complete, as it maps quite
110 readily to the definition of a Turing machine.
111
112 The line of hedgehogs serves as the tape, with their colours being symbols on
113 the tape, and the leader being the tape head.
114
115 The faery rings implement state transition rules, or rather, the parts of
116 transition rules that say "If the symbol on the tape is..." (which in our
117 system translates to "If the leader hedgehog is coloured...") Overlapped
118 faery rings of all possible colours make for a traditional transition rule.
119
120 The state itself is encoded by the leader's position and velocity and which
121 faery ring they're headed toward next. As long as the faery rings are
122 arranged appropriately, we can guarantee that, when the leader hedgehog
123 leaves a faery ring, possibly with a new velocity, it is bound to intersect
124 another faery ring eventually. An example of an appropriate arrangement is:
125
126 * The signpost in each faery ring points in a cardinal direction.
127
128 * All faery rings have the same radius.
129
130 * For each faery ring, there is another faery ring which shares at least
131 one of its coordinates.
132
133 Finally, the hills serve as halt states.
134
135 Part V. Extras
136 --------------
137
138 We can certainly allow for the presence of elements in this world which
139 either do not affect the property of being Turing-complete, or if they do,
140 are not required to be present in any particular instance of the world.
141
142 ### Rest Areas ###
143
144 A rest area has a fixed position and radius.
145
146 If the leader hedgehog enters a rest area, it does not move until no
147 hedgehog in the troupe is impelled to move (i.e. until all hedgehogs are
148 within three times the hedgehog-radius of another hedgehog.) This allows
149 the troupe to "catch up" with the leader.
150
151 Part VI. Discussion
152 -------------------
153
154 This system is, of course, crying out to be implemented with a visual
155 animation of the hedgehogs moving around, possibly in a Java applet, or
156 in an HTML5 canvas with Javascript.
157
158 We have not specified the dimensionality of the space in which these things
159 exist; certainly, two dimensions would be a reasonable restriction,
160 especially for an animated visual implementation.
161
162 The system probably continues to be Turing-complete in one dimension, but
163 I have not convinced myself of that. One of the things that allows this
164 (if it is true) is that hedgehogs are happily allowed to pass right through
165 other hedgehogs as if they didn't exist. If this was not true, then a one-
166 dimensional realization of this world is probably not Turing-complete.
167
168 In two dimensions, however, even if hedgehogs are not allowed to pass
169 through each other, the system is still Turing-complete (cf. Beturing),
170 although we might have to add one proviso. Since, in order to really be
171 Turing-complete, the troupe of hedgehogs needs to be able to grow without
172 bound, it might become intractably large. When the leader hedgehog is not
173 able to make progress because of some other hedgehog in its way, it should
174 act as if it entered a rest area. Also, we may require some "jitter" be
175 introduced in follower hedgehog movements, lest they get stuck.
176
177 We may want to go further, and allow the space itself to expand whenever a
178 hedgehog is added to the troupe — so long as all the relative directions
179 between things are preserved, this should not affect the outcome.
180
181 (The idea for this system came to me sort of all at once when I was thinking
182 about Beturing, specifically that Beturing doesn't address the tape at all
183 in its concerns about wire-crossing. I mean, don't we have to communicate
184 to the tape somehow, and might not those lines of communicate cross other
185 lines of communication? Then I thought, well, it can assume that the tape
186 is *inside* the state pointer somehow. And the rest followed more-or-less
187 naturally.)
188
189 We have not specified, either, whether this system should be implemented with
190 a discrete simulation or a continuous simulation. Actually, either should
191 work, I think; and a continuous simulation would be somewhat interesting, if
192 only for the fact that most language interpreters are discrete. A continuous
193 simulation would use real numbers to measure both duration and distance, and
194 real analysis techniques to discover the evolution of the system. Motion of
195 the hedgehogs would be genuinely continuous except for the points where their
196 velocities change due to one hedgehog approaching another too closely, etc.
197
198 Nor have we said much about the topology of the space all of these things are
199 in. Naturally, the space could be infinite, or it could be mapped onto a
200 torus so that the hedgehogs "wrap around" at the edges. (The fact that the
201 space is finite is not a problem w.r.t. Turing-completeness, so long as there
202 are still an infinite number of possible coordinates, i.e. the space of real
203 or rational numbers; integers, though, would be problematic in a space of
204 finite extent.) Or the space could be mapped onto the surface of a sphere,
205 with appropriate modifications.
206
207 We have also not constrained the sets of faery rings and hills to be finite;
208 so we could have an infinite number of them in an infinite space — but for
209 correspondence with a Turing machine, these should probably be restricted to
210 infinite sets. (Otherwise, if you have, say, an uncountable set of faery
211 rings, specified non-constructively, you could encode all possible
212 computations just in them, and the behaviour of the hedgehogs becomes
213 essentially moot.)
214
215 The initial condition could either consist of the troupe having a leader
216 hedgehog with an initial velocity, or a leader-elect hedgehog with an
217 initially-selected faery ring to which it is attracted. The former is
218 probably more "natural" for some definition of "natural".
0 Troupe
1 ======
2
3 Troupe is an esolang designed by Chris Pressey on June 25, 2012, in Winnipeg,
4 Canada.
5
6 The name of this esolang is **Troupe** in the UK and Canada and Australia,
7 but in the USA, where they drop the "u" in words where it follows an "o", its
8 name is **Trope**.
9
10 Part I. Hedgehogs
11 -----------------
12
13 We have a troupe of hedgehogs. Each has a position, a colour (in the USA:
14 color), a possible hedgehog to its left, and a possible hedgehog to its
15 right. In this troupe, there is only one hedgehog which has no hedgehog to
16 its left, and only one hedgehog which has no hedgehog to its right, and the
17 following is true: for each hedgehog X, if Y is the hedgehog to X's right
18 (resp. left), then X is the hedgehog to Y's left (resp. right). (i.e. the
19 hedgehogs are in a line formation.)
20
21 For some hedgehog X, the hedgehog to X's left and the hedgehog to X's right
22 are the *neighbours* (in the USA: *neighbors*) of X.
23
24 We may say that a hedgehog is "one of the hedgehogs to the left" (resp.
25 "right") of some other hedgehog; the meaning of this should be evident — it
26 is just the transitive closure of "to its left" (resp. right).
27
28 All hedgehogs share a fixed speed at which they move (when they move), and a
29 fixed radius. Also, the troupe consists of a finite number of hedgehogs at
30 all times, and their colours come from a finite set of possible colours that
31 can be distinguished from one another. (And that there is one distinguished
32 "default" colour, which we will arbitrarily call "white".)
33
34 In the troupe, at any given time, there is either exactly one *leader*
35 hedgehog, or exactly one *leader-elect* hedgehog; never both and never
36 neither.
37
38 The leader hedgehog, when it exists, has a velocity. It moves through space
39 with this velocity, changing its position. All other hedgehogs in the troupe
40 try to "follow" it, which means the following:
41
42 Each hedgehog moves to minimize the distance between it and one of its
43 neighbours (up to a certain point: if the distance between it and its
44 neighbour is less than three times the hedgehog radius, it does not bother
45 to move at all.)
46
47 The neighbour it moves toward is the hedgehog on its left (resp. right), if
48 the leader is one of the hedgehogs to the left (resp. right).
49
50 Part II. Faery Rings
51 --------------------
52
53 We also have a set of faery rings. Each ring has a fixed position, radius,
54 inner colour, and outer colour; it optionally has a signpost, a unit vector
55 pointing in any direction; and it optionally has an orientation, which is
56 either clockwise or counterclockwise.
57
58 Faery rings may not intersect each other *except* if both rings have
59 precisely the same position and radius *and* if they have different outer
60 colours. (They may have the same inner colour.)
61
62 When a leader hedgehog intersects a faery ring (i.e. when the distance
63 between the hedgehog is less than the sum of the hedgehog radius and the
64 particular ring's radius), and if the outer colour of the faery ring is the
65 same as the colour of the leader hedgehog, the following things happen, in
66 this order:
67
68 * The faery ring, and all faery rings which intersect it, become temporarily
69 inactive, in that intersection with a hedgehog does not set off this same
70 sequence of events until it becomes active again.
71
72 * The leader hedgehog's colour is changed to the inner colour of the faery
73 ring.
74
75 * If the faery ring has a counterclockwise (resp. clockwise) orientation,
76 then the hedgehog to the leader hedgehog's left (resp. right) becomes
77 the leader-elect hedgehog.
78
79 (If there *is* no hedgehog to the left (resp. right) of the leader
80 hedgehog, then one pops into existence, at the same position as the
81 leader hedgehog, and with a white colouring; and it becomes the
82 leader-elect hedgehog.)
83
84 When the set of hedgehogs has a leader-elect, the leader-elect moves to
85 minimize its distance to the faery ring that made it leader-elect, and
86 all other hedgehogs follow the leader-elect, as described above.
87
88 Once the leader-elect hedgehog intersects the faery ring which made it
89 the leader-elect (which it will eventually, as it moves to minimize the
90 distance), it becomes the leader hedgehog.
91
92 * If the faery ring has a signpost, the leader hedgehog is given a velocity
93 in accordance with the direction of the signpost.
94
95 * Once the leader hedgehog no longer intersects the faery ring, the faery
96 ring, and all rings that it intersects, become active once again.
97
98 Part III. Hills
99 ---------------
100
101 There are also any number of hills, each with a fixed position and radius.
102 These serve as goals; when the leader hedgehog reaches a hill, the troupe's
103 quest is over, and they are free to break formation and nibble on clover or
104 whatever it is that hedgehogs do for fun.
105
106 Part IV. Computational Class
107 ----------------------------
108
109 The system outlined above should be Turing-complete, as it maps quite
110 readily to the definition of a Turing machine.
111
112 The line of hedgehogs serves as the tape, with their colours being symbols on
113 the tape, and the leader being the tape head.
114
115 The faery rings implement state transition rules, or rather, the parts of
116 transition rules that say "If the symbol on the tape is..." (which in our
117 system translates to "If the leader hedgehog is coloured...") Overlapped
118 faery rings of all possible colours make for a traditional transition rule.
119
120 The state itself is encoded by the leader's position and velocity and which
121 faery ring they're headed toward next. As long as the faery rings are
122 arranged appropriately, we can guarantee that, when the leader hedgehog
123 leaves a faery ring, possibly with a new velocity, it is bound to intersect
124 another faery ring eventually. An example of an appropriate arrangement is:
125
126 * The signpost in each faery ring points in a cardinal direction.
127
128 * All faery rings have the same radius.
129
130 * For each faery ring, there is another faery ring which shares at least
131 one of its coordinates.
132
133 Finally, the hills serve as halt states.
134
135 Part V. Extras
136 --------------
137
138 We can certainly allow for the presence of elements in this world which
139 either do not affect the property of being Turing-complete, or if they do,
140 are not required to be present in any particular instance of the world.
141
142 ### Rest Areas ###
143
144 A rest area has a fixed position and radius.
145
146 If the leader hedgehog enters a rest area, it does not move until no
147 hedgehog in the troupe is impelled to move (i.e. until all hedgehogs are
148 within three times the hedgehog-radius of another hedgehog.) This allows
149 the troupe to "catch up" with the leader.
150
151 Part VI. Discussion
152 -------------------
153
154 This system is, of course, crying out to be implemented with a visual
155 animation of the hedgehogs moving around, possibly in a Java applet, or
156 in an HTML5 canvas with Javascript.
157
158 We have not specified the dimensionality of the space in which these things
159 exist; certainly, two dimensions would be a reasonable restriction,
160 especially for an animated visual implementation.
161
162 The system probably continues to be Turing-complete in one dimension, but
163 I have not convinced myself of that. One of the things that allows this
164 (if it is true) is that hedgehogs are happily allowed to pass right through
165 other hedgehogs as if they didn't exist. If this was not true, then a one-
166 dimensional realization of this world is probably not Turing-complete.
167
168 In two dimensions, however, even if hedgehogs are not allowed to pass
169 through each other, the system is still Turing-complete (cf. Beturing),
170 although we might have to add one proviso. Since, in order to really be
171 Turing-complete, the troupe of hedgehogs needs to be able to grow without
172 bound, it might become intractably large. When the leader hedgehog is not
173 able to make progress because of some other hedgehog in its way, it should
174 act as if it entered a rest area. Also, we may require some "jitter" be
175 introduced in follower hedgehog movements, lest they get stuck.
176
177 We may want to go further, and allow the space itself to expand whenever a
178 hedgehog is added to the troupe — so long as all the relative directions
179 between things are preserved, this should not affect the outcome.
180
181 (The idea for this system came to me sort of all at once when I was thinking
182 about Beturing, specifically that Beturing doesn't address the tape at all
183 in its concerns about wire-crossing. I mean, don't we have to communicate
184 to the tape somehow, and might not those lines of communicate cross other
185 lines of communication? Then I thought, well, it can assume that the tape
186 is *inside* the state pointer somehow. And the rest followed more-or-less
187 naturally.)
188
189 We have not specified, either, whether this system should be implemented with
190 a discrete simulation or a continuous simulation. Actually, either should
191 work, I think; and a continuous simulation would be somewhat interesting, if
192 only for the fact that most language interpreters are discrete. A continuous
193 simulation would use real numbers to measure both duration and distance, and
194 real analysis techniques to discover the evolution of the system. Motion of
195 the hedgehogs would be genuinely continuous except for the points where their
196 velocities change due to one hedgehog approaching another too closely, etc.
197
198 Nor have we said much about the topology of the space all of these things are
199 in. Naturally, the space could be infinite, or it could be mapped onto a
200 torus so that the hedgehogs "wrap around" at the edges. (The fact that the
201 space is finite is not a problem w.r.t. Turing-completeness, so long as there
202 are still an infinite number of possible coordinates, i.e. the space of real
203 or rational numbers; integers, though, would be problematic in a space of
204 finite extent.) Or the space could be mapped onto the surface of a sphere,
205 with appropriate modifications.
206
207 We have also not constrained the sets of faery rings and hills to be finite;
208 so we could have an infinite number of them in an infinite space — but for
209 correspondence with a Turing machine, these should probably be restricted to
210 infinite sets. (Otherwise, if you have, say, an uncountable set of faery
211 rings, specified non-constructively, you could encode all possible
212 computations just in them, and the behaviour of the hedgehogs becomes
213 essentially moot.)
214
215 The initial condition could either consist of the troupe having a leader
216 hedgehog with an initial velocity, or a leader-elect hedgehog with an
217 initially-selected faery ring to which it is attracted. The former is
218 probably more "natural" for some definition of "natural".