Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: catseye/Jaccia
base: 4dafa1ffd2
...
head fork: catseye/Jaccia
compare: 5657f9a9cd
  • 4 commits
  • 4 files changed
  • 0 commit comments
  • 1 contributor
Showing with 99 additions and 116 deletions.
  1. +1 −0  .hgtags
  2. +81 −82 README.markdown
  3. +6 −7 src/jaccia.alp
  4. +11 −27 src/jacciata.alp
View
1  .hgtags
@@ -1,3 +1,4 @@
d3df0b128810d9a52a7ab64cccf6de1326288aee rel_1_0_2009_0411
0d10ea65e716fbd1c2c966dc3902658da336822b rel_1_0_2010_0205
707a320df6a2c74d7a950d0c40d49a5124f6d005 rel_1_0_2012_0623
+1adc54eb424874a87793693f89c38fa8697bcefb rel_1_1_2013_0320
View
163 README.markdown
@@ -1,82 +1,81 @@
-The Jaccia and Jacciata Cellular Automata
-=========================================
-
-Overview
---------
-
-Jaccia and Jacciata are cellular automata inspired by the Announcement of
-[Scientific Proof that Slime Molds are Intelligent Maze Solvers][].
-
-Basically, the slime mold solves the maze by:
-
-- initially being everywhere in the maze
-- there being food at the entrance and exit of the maze
-- minimizing its surface area by retreating from anywhere it can't get
- food.
-
-Jaccia operates the same way. In the Jaccia automaton, slime cells
-survive if they have immediate neighbours in at least two cardinal
-directions that provide sustenance, i.e. are either food or other slime
-cells. The result is the same: paths of slime cells that lead down dead
-ends have one end which provides no sustenance and dies off. Eventually,
-only paths of slime cells that reach from food to food (or uninterrupted
-circular paths of slime cells) remain. Jacciata is a more involved
-automaton which finds only the shortest path.
-
-[Scientific Proof that Slime Molds are Intelligent Maze Solvers]: http://web.archive.org/web/20020220163303/http://www.riken.go.jp/lab-www/frontier-div/NEWSLETTER/feb2001/ameboid_e.htm
-
-Properties
-----------
-
-Jaccia has the property that, when started from this condition (entire
-maze filled with slime cells), the automaton will eventually reach a
-fixed point (steady state) which contains all possible paths from food
-to food.
-
-Jacciata is similar, but has the property that when it reaches a fixed
-point, it will contain the *shortest* path from food to food, if such a
-path exists and is unique. If no such path exists, or is not unique, the
-result is undefined. It is otherwise similar to Jaccia.
-
-The behaviour of both automata is also undefined if the slime
-configurations are not orthogonal (that is, if there are any diagonal
-slime paths.)
-
-Definition
-----------
-
-Both Jaccia and Jacciata are defined in ALPACA v0.94. Jaccia is defined
-in the file `jaccia.alp` and Jacciata in `jacciata.alp`. The ALPACA
-definition is authoritative; what is given here is merely advisory.
-
-Both automata use basically the same set of symbols. An initial Jaccia
-playfield generally serves as an initial Jacciata playfield with the
-same kind of solution.
-
-- ` ` - empty space
-- `#` - wall (purely decorative)
-- `%` - slime mold
-- `F` - food
-- `S` - "start" food (needed in Jacciata, optional in Jaccia)
-- `-` - exploratory head (Jacciata only)
-- `?` - exploratory body (Jacciata only)
-- `@` - solved (Jacciata only)
-
-Discussion
-----------
-
-Jacciata's definition is not very elegant, especially when compared to
-Jaccia. In order for it to work, the two sources of food need to be
-labelled differently (`S` and `F`), there needs to be a "head" of an
-exploratory shoot that looks for solutions, and so on. It could probably
-be made more elegant with some work.
-
-The definition of these automata in ALPACA suggests some possible
-improvements to that meta-language, particularly the definition of
-neighbourhoods different from the assumed von Neumann neighbourhood, and
-their use in the count operator.
-
-Happy intelligence! Such as it is.
-Chris Pressey
-April 11, 2009
-Bellevue, WA
+The Jaccia and Jacciata Cellular Automata
+=========================================
+
+Overview
+--------
+
+Jaccia and Jacciata are cellular automata inspired by the Announcement of
+[Scientific Proof that Slime Molds are Intelligent Maze Solvers][].
+
+Basically, the slime mold solves the maze by:
+
+- initially being everywhere in the maze
+- there being food at the entrance and exit of the maze
+- minimizing its surface area by retreating from anywhere it can't get
+ food.
+
+Jaccia operates the same way. In the Jaccia automaton, slime cells
+survive if they have immediate neighbours in at least two cardinal
+directions that provide sustenance, i.e. are either food or other slime
+cells. The result is the same: paths of slime cells that lead down dead
+ends have one end which provides no sustenance and dies off. Eventually,
+only paths of slime cells that reach from food to food (or uninterrupted
+circular paths of slime cells) remain. Jacciata is a more involved
+automaton which finds only the shortest path.
+
+[Scientific Proof that Slime Molds are Intelligent Maze Solvers]: http://web.archive.org/web/20020220163303/http://www.riken.go.jp/lab-www/frontier-div/NEWSLETTER/feb2001/ameboid_e.htm
+
+Properties
+----------
+
+Jaccia has the property that, when started from this condition (entire
+maze filled with slime cells), the automaton will eventually reach a
+fixed point (steady state) which contains all possible orthogonal paths
+from food to food. (Orthogonal paths means, a diagonal isn't considered
+a path.)
+
+Jacciata is similar, but has the property that when it reaches a fixed
+point, it will contain the *shortest* path from food to food, if such a
+path exists and is unique. If no such path exists, or is not unique, the
+result is undefined. It is otherwise similar to Jaccia.
+
+Definition
+----------
+
+Both Jaccia and Jacciata are defined in ALPACA v1.0. Jaccia is defined
+in the file `jaccia.alp` and Jacciata in `jacciata.alp`. The ALPACA
+definition is authoritative; what is given here is merely advisory.
+
+Both automata use basically the same set of symbols. An initial Jaccia
+playfield generally serves as an initial Jacciata playfield with the
+same kind of solution.
+
+- ` ` - empty space
+- `#` - wall (purely decorative)
+- `%` - slime mold
+- `F` - food
+- `S` - "start" food (needed in Jacciata, optional in Jaccia)
+- `-` - exploratory head (Jacciata only)
+- `?` - exploratory body (Jacciata only)
+- `@` - solved (Jacciata only)
+
+Discussion
+----------
+
+Jacciata's definition is not very elegant, especially when compared to
+Jaccia. In order for it to work, the two sources of food need to be
+labelled differently (`S` and `F`), there needs to be a "head" of an
+exploratory shoot that looks for solutions, and so on. It could probably
+be made more elegant with some work.
+
+[New in 1.1] The definition of these automata in ALPACA 0.94 suggested some
+possible improvements to ALPACA, particularly the definition of
+neighbourhoods different from the assumed von Neumann neighbourhood, and
+their use in the count operator. The Jaccia and Jacciata descriptions were
+rewritten in ALPACA 1.0, and do now take advantage of these features in order
+to be written more succinctly.
+
+Happy intelligence! Such as it is.
+Chris Pressey
+April 11, 2009
+Bellevue, WA
View
13 src/jaccia.alp
@@ -1,10 +1,14 @@
/*
- * The Jaccia automaton, expressed in ALPACA.
+ * The Jaccia automaton, expressed in ALPACA 1.0.
* Inspired by the Scientific Announcement that
* Slime Molds are Intelligent Maze-Solvers.
* April 11 2009, Chris Pressey, Cat's Eye Technologies.
+ * Updated to ALPACA 1.0 on March 20, 2013.
*/
+neighbourhood VonNeumann
+ (^ v < >);
+
class Sustainer;
state Space " ";
@@ -15,9 +19,4 @@ state Food2 "S"
is Sustainer;
state Slime "%"
is Sustainer
- to Space when not ((^ is Sustainer and > is Sustainer) or
- (^ is Sustainer and v is Sustainer) or
- (^ is Sustainer and < is Sustainer) or
- (> is Sustainer and v is Sustainer) or
- (> is Sustainer and < is Sustainer) or
- (v is Sustainer and < is Sustainer)).
+ to Space when not 2 in VonNeumann is Sustainer.
View
38 src/jacciata.alp
@@ -2,8 +2,12 @@
* The Jacciata automaton, expressed in ALPACA.
* Inspired by Jaccia.
* April 11 2009, Chris Pressey, Cat's Eye Technologies.
+ * Updated to ALPACA 1.0 on March 20, 2013.
*/
+neighbourhood VonNeumann
+ (^ v < >);
+
class Starter;
class Sustainer;
class Sassy;
@@ -19,20 +23,10 @@ state Wall "#"; /* purely decorative */
*/
state Slime "%"
is Sustainer
- to Space when not ((^ is Sustainer and > is Sustainer) or
- (^ is Sustainer and v is Sustainer) or
- (^ is Sustainer and < is Sustainer) or
- (> is Sustainer and v is Sustainer) or
- (> is Sustainer and < is Sustainer) or
- (v is Sustainer and < is Sustainer))
- or /* this part lets conflicts be resolved */
- ((^ Head and > Head) or
- (^ Head and v Head) or
- (^ Head and < Head) or
- (> Head and v Head) or
- (> Head and < Head) or
- (v Head and < Head)),
- to Head when (v is Starter or ^ is Starter or > is Starter or < is Starter);
+ to Space when (not 2 in VonNeumann is Sustainer)
+ /* this part lets conflicts be resolved */
+ or 2 in VonNeumann Head,
+ to Head when 1 in VonNeumann is Starter;
state Head "-"
is Starter
@@ -49,13 +43,8 @@ state Head "-"
state Body "?"
is Starter
is Sassy
- to Solved when (v is Solution or ^ is Solution or > is Solution or < is Solution),
- to Space when not ((^ is Sassy and > is Sassy) or
- (^ is Sassy and v is Sassy) or
- (^ is Sassy and < is Sassy) or
- (> is Sassy and v is Sassy) or
- (> is Sassy and < is Sassy) or
- (v is Sassy and < is Sassy));
+ to Solved when 1 in VonNeumann is Solution,
+ to Space when not 2 in VonNeumann is Sassy;
/*
* Solved cells survive on the same rules as body cells.
@@ -63,12 +52,7 @@ state Body "?"
state Solved "@"
is Sassy
is Solution
- to Space when not ((^ is Sassy and > is Sassy) or
- (^ is Sassy and v is Sassy) or
- (^ is Sassy and < is Sassy) or
- (> is Sassy and v is Sassy) or
- (> is Sassy and < is Sassy) or
- (v is Sassy and < is Sassy));
+ to Space when not 2 in VonNeumann is Sassy;
state Start "S"
is Starter

No commit comments for this range

Something went wrong with that request. Please try again.