git @ Cat's Eye Technologies noit-o-mnain-worb / dea5a20
Spiff up the README and add LICENSE file to please GitHub. Chris Pressey 2 years ago
4 changed file(s) with 164 addition(s) and 129 deletion(s). Raw diff Collapse all Expand all
0 BSD 3-Clause License
1
2 Copyright (c) 2000-2018, Chris Pressey, Cat's Eye Technologies.
3 All rights reserved.
4
5 Redistribution and use in source and binary forms, with or without
6 modification, are permitted provided that the following conditions are met:
7
8 * Redistributions of source code must retain the above copyright notice, this
9 list of conditions and the following disclaimer.
10
11 * Redistributions in binary form must reproduce the above copyright notice,
12 this list of conditions and the following disclaimer in the documentation
13 and/or other materials provided with the distribution.
14
15 * Neither the name of the copyright holder nor the names of its
16 contributors may be used to endorse or promote products derived from
17 this software without specific prior written permission.
18
19 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22 DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
23 FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
25 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
26 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
27 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+0
-129
README.markdown less more
0 noit o' mnain worb
1 ==================
2
3 Language version 1.1. Distribution version 2018.0123.
4 Copyright ©2000-2018, Chris Pressey, Cat's Eye Technologies.
5 All rights reserved.
6
7 What is this?
8 -------------
9
10 This is the reference distribution of *noit o' mnain worb*, a
11 probabilistic particle automaton described (awkwardly) in the next
12 section.
13
14 It contains the reference implementation, as a Perl script which
15 uses the (included) Console::Virtual library, in the `script`
16 directory.
17
18 It also contains an implementation in Javascript/HTML5, using
19 modules (also included) from [yoob.js](https://github.com/catseye/yoob.js),
20 in the `impl/worb.js` directory.
21
22 It used to contain, but no longer contains, an implementation in Java.
23 This implementation can now be found in
24 [the yoob distribution](https://github.com/catseye/yoob).
25
26 What is noit o' mnain worb?
27 ---------------------------
28
29 The noit o' mnain worb language is a probabilistic particle automaton
30 based on brownian motion (or entropy).
31
32 A noit o' mnain worb runtime has an orthogonal gridwork playfield (of
33 any reasonable size or number of dimensions) which is populated by any
34 number of bobules. Bobules are solid elements in this grid — that is, no
35 two bobules may occupy the same location. Bobules are also capable of
36 motion — in fact they can hardly avoid it — and it is important to note
37 that they are stateless. As such, they have no idea which direction they
38 are going, nor what they are going to do when they get there.
39
40 Each time quantum, or tick, each bobule chooses an adjacent square to
41 move to, at random (in two dimensions, that's 8 possibilities plus the
42 possibility of not moving = 9 possibilities.) If, during some tick, this
43 randomly-chosen new location does not allow entry — that is, if it is
44 already occupied by a solid element (a bobule or a wall) — the bobule
45 does not move during that tick.
46
47 [Implementation note: each tick that a bobule is blocked from moving,
48 its "pressure" increases, although this is merely for visual effect.]
49
50 The playfield is made more interesting by the addition of:
51
52 - `#` *walls* which are merely static solid elements that take up space
53 and do not move;
54 - `^v><` *diodes* which disallow bobules from passing through them
55 backwards;
56 - `+-` *sources & sinks* which represent large repositories or vacancies
57 of bobules; and
58 - `!` *loads* which represent something that the bobules can 'do'.
59
60 Notes
61 -----
62
63 [Historical note: In version 1.0 (Jul 5 2000) of the language, which was
64 released only on the Cat's Eye Technologies Mailing List, `+-` had much
65 different (and much more myopic) semantics than they do in v1.1.]
66
67 The sources and sinks are simply convenient 'macros', so that you can
68 build something like:
69
70 ###
71 ###+###
72
73 instead of saying something like:
74
75 #######
76 #.....#
77 #.....#
78 #.....#
79 ###.###
80 #.#
81 ###v###
82
83 Using the `+` sources and `-` sinks simply saves you from specifying
84 large chambers of bobules or emptiness explicitly.
85
86 [Implementation note: It is not the intention of the `+` element to
87 violate entropy, but the fact that, in the reference implementation, `+`
88 keeps producing bobules indefinately at a uniform rate of 10% chance per
89 tick does bend the rules a bit. In a more "entropically correct"
90 implementation, the chance per tick should decrease over time. Note that
91 the language proper does not specify any particular rate of bobule
92 creation, but encourages implementations to be flexible on this point.]
93
94 The `!` loads simply cause the implementation to react in some noticable
95 way when a bobule enters into their location, so that the noit o' mnain
96 worb programmer can pretend to themselves that their bobules are 'doing
97 something' during program runs.
98
99 [Implementation note: The reference interpreter simply outputs an ASCII
100 BEL character when this happens. On most terminals, this affects a
101 beeping sound.]
102
103 The idea is that the bobules, spaces, walls, and diodes alone constitute
104 a (nearly) Turing-Complete system¹.
105
106 I say "nearly" because it's actually missing a dimension in this form.
107 The noit o' mnain worb language isn't dimensionally-independent.
108 Notably, it doesn't work in one dimension at all.
109
110 It *almost* works in two dimensions, but the fact is that if you do not
111 address the 'wire-crossing problem' (see
112 [Befunge-93](http://catseye.tc/projects/befunge93/)'s `#` instruction),
113 you cannot guarantee being able to connect two arbitrarily-chosen paths
114 in two dimensions. You need to have a way for coincident paths to cross,
115 which is not strictly just two dimensions anymore.
116
117 [Theoretical note: we suspect, but would surely have a hard time
118 proving, that this limitation is somehow related to the four-colour map
119 theorem.]
120
121 So, it really only works in three dimensions and above. For that reason,
122 adding 'wormholes' to the noit o' mnain worb playfield is a possible
123 future extension, to simulate three dimensions a la 'wire crossing'.
124
125 - - - -
126
127 ¹given a playfield which is initially populated with a suitable infinite
128 pattern, of course, à la Wireworld and such.
0 noit o' mnain worb
1 ==================
2
3 _Try it online_ [@ catseye.tc](https://catseye.tc/installation/noit_o&#39;_mnain_worb)
4 | _See also:_ [Cyclobots](https://github.com/catseye/Cyclobots#readme)
5 ∘ [Chzrxl](https://github.com/catseye/Chzrxl#readme)
6
7 ![screenshot](https://static.catseye.tc/images/screenshots/noit_o_mnain_worb.jpg)
8
9 Language version 1.1. Distribution version 2018.0123.
10 Copyright ©2000-2018, Chris Pressey, Cat's Eye Technologies.
11 All rights reserved.
12
13 What is this?
14 -------------
15
16 This is the reference distribution of *noit o' mnain worb*, a
17 probabilistic particle automaton devised in the year 2000 and
18 described (awkwardly) in the next section.
19
20 It contains the reference implementation, as a Perl script which
21 uses the (included) Console::Virtual library, in the `script`
22 directory.
23
24 It also contains an implementation in Javascript/HTML5, using
25 modules (also included) from [yoob.js](https://github.com/catseye/yoob.js),
26 in the `impl/worb.js` directory.
27
28 It used to contain, but no longer contains, an implementation in Java.
29 This implementation can now be found in
30 [the yoob distribution](https://github.com/catseye/yoob).
31
32 What is noit o' mnain worb?
33 ---------------------------
34
35 The noit o' mnain worb language is a probabilistic particle automaton
36 based on brownian motion (or entropy).
37
38 A noit o' mnain worb runtime has an orthogonal gridwork playfield (of
39 any reasonable size or number of dimensions) which is populated by any
40 number of bobules. Bobules are solid elements in this grid — that is, no
41 two bobules may occupy the same location. Bobules are also capable of
42 motion — in fact they can hardly avoid it — and it is important to note
43 that they are stateless. As such, they have no idea which direction they
44 are going, nor what they are going to do when they get there.
45
46 Each time quantum, or tick, each bobule chooses an adjacent square to
47 move to, at random (in two dimensions, that's 8 possibilities plus the
48 possibility of not moving = 9 possibilities.) If, during some tick, this
49 randomly-chosen new location does not allow entry — that is, if it is
50 already occupied by a solid element (a bobule or a wall) — the bobule
51 does not move during that tick.
52
53 [Implementation note: each tick that a bobule is blocked from moving,
54 its "pressure" increases, although this is merely for visual effect.]
55
56 The playfield is made more interesting by the addition of:
57
58 - `#` *walls* which are merely static solid elements that take up space
59 and do not move;
60 - `^v><` *diodes* which disallow bobules from passing through them
61 backwards;
62 - `+-` *sources & sinks* which represent large repositories or vacancies
63 of bobules; and
64 - `!` *loads* which represent something that the bobules can 'do'.
65
66 Notes
67 -----
68
69 [Historical note: In version 1.0 (Jul 5 2000) of the language, which was
70 released only on the Cat's Eye Technologies Mailing List, `+-` had much
71 different (and much more myopic) semantics than they do in v1.1.]
72
73 The sources and sinks are simply convenient 'macros', so that you can
74 build something like:
75
76 ###
77 ###+###
78
79 instead of saying something like:
80
81 #######
82 #.....#
83 #.....#
84 #.....#
85 ###.###
86 #.#
87 ###v###
88
89 Using the `+` sources and `-` sinks simply saves you from specifying
90 large chambers of bobules or emptiness explicitly.
91
92 [Implementation note: It is not the intention of the `+` element to
93 violate entropy, but the fact that, in the reference implementation, `+`
94 keeps producing bobules indefinately at a uniform rate of 10% chance per
95 tick does bend the rules a bit. In a more "entropically correct"
96 implementation, the chance per tick should decrease over time. Note that
97 the language proper does not specify any particular rate of bobule
98 creation, but encourages implementations to be flexible on this point.]
99
100 The `!` loads simply cause the implementation to react in some noticable
101 way when a bobule enters into their location, so that the noit o' mnain
102 worb programmer can pretend to themselves that their bobules are 'doing
103 something' during program runs.
104
105 [Implementation note: The reference interpreter simply outputs an ASCII
106 BEL character when this happens. On most terminals, this affects a
107 beeping sound.]
108
109 The idea is that the bobules, spaces, walls, and diodes alone constitute
110 a (nearly) Turing-Complete system¹.
111
112 I say "nearly" because it's actually missing a dimension in this form.
113 The noit o' mnain worb language isn't dimensionally-independent.
114 Notably, it doesn't work in one dimension at all.
115
116 It *almost* works in two dimensions, but the fact is that if you do not
117 address the 'wire-crossing problem' (see
118 [Befunge-93](http://catseye.tc/projects/befunge93/)'s `#` instruction),
119 you cannot guarantee being able to connect two arbitrarily-chosen paths
120 in two dimensions. You need to have a way for coincident paths to cross,
121 which is not strictly just two dimensions anymore.
122
123 [Theoretical note: we suspect, but would surely have a hard time
124 proving, that this limitation is somehow related to the four-colour map
125 theorem.]
126
127 So, it really only works in three dimensions and above. For that reason,
128 adding 'wormholes' to the noit o' mnain worb playfield is a possible
129 future extension, to simulate three dimensions a la 'wire crossing'.
130
131 - - - -
132
133 ¹given a playfield which is initially populated with a suitable infinite
134 pattern, of course, à la Wireworld and such.