Академический Документы
Профессиональный Документы
Культура Документы
RSIT EIT
VE BR
NI
U
US
E
VRIJ
S EL
SCIE
RAS
EB
NT
IA
N
V IN TE
CERE
Ellie D’Hondt
August 2000
Acknowledgements 1
1 Introduction 2
i
4.2.3 The gpl Illustrator . . . . . . . . . . . . . . . . . . . . 61
4.3 Further Issues . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
4.3.1 Impact of the Domain Layout . . . . . . . . . . . . . . 63
4.3.2 Extensions to gpl . . . . . . . . . . . . . . . . . . . . 65
4.4 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
6 Conclusion 88
ii
List of Figures
iii
5.2 Drawing a quadrangle. . . . . . . . . . . . . . . . . . . . . . . 72
5.3 Several polygons constructed with gpl. . . . . . . . . . . . . 73
5.4 The structure of the diagonal growing point. . . . . . . . . . 76
5.5 The composition of the diagonal growing point. . . . . . . . 77
5.6 A quadrangle’s diagonal. . . . . . . . . . . . . . . . . . . . . . 79
5.7 A camera’s view in an art gallery. . . . . . . . . . . . . . . . . 80
5.8 A polygon with a possible triangulation and 3-colouring. . . . 80
5.9 Triangulation tropisms. . . . . . . . . . . . . . . . . . . . . . 81
5.10 The extract-pheromone procedure. . . . . . . . . . . . . . . 83
5.11 Triangulation of a pentangle and a hexagon. . . . . . . . . . . 86
5.12 Star shapes inscribed in a pentangle and a hexagon. . . . . . 86
iv
Acknowledgements
1
Chapter 1
Introduction
2
CHAPTER 1. INTRODUCTION 3
Amorphous Computing: An
Overview
5
CHAPTER 2. AMORPHOUS COMPUTING: AN OVERVIEW 6
r C
A B
procedure CLUBS ()
ti := R
ri := random[0,R)
while (not follower and not leader)
ti = ti - 1
if ( ri > 0)
ri := ri - 1
if (not empty(msg queue))
if (rst(msg queue) = "recruit")
follower := true
else
leader := true
broadcast("recruit")
while ( ti >= 0)
listen for other leaders
ti = ti - 1
The resulting clubs contain exactly one leader, which guarantees a min-
imum separation of a broadcast radius between leaders and reduces the
overlap between neighbouring clubs. Leadership conflicts may occur when
two processors declare themselves leader at the same time, violating the
minimum separation between leaders. If these conflicts are tolerated, the
time required for the algorithm is simply R. Leadership conflicts can be
eliminated by running the algorithm several times: after a time R, those
regions where a conflict has been detected (by neighbourhood conference)
run another round of overlapping clubs. If a processor detects a collision it
CHAPTER 2. AMORPHOUS COMPUTING: AN OVERVIEW 9
assumes that at least two leaders tried to recruit it at the same time, and
it becomes a follower. During leadership conflict resolution, it determines
who the leaders are. Hence, one can see that the algorithm is robust against
collisions. A result of the overlapping clubs algorithm can be seen in figure
2.2, where each circle presents a club 1 .
(at the first level, a minimum of two communication hops is required for
communication between leaders). The construction of level n groups starts
with a leader selection mechanism at level n − 1 in the same way as de-
scribed for the club algorithm. The main difference here is in the recruiting
mechanism: an extra parameter h determines the diameter bound of the
groups formed in the following way. Once a group is elected as leader, it
becomes a tree root. It then seeds a tree of fixed height h by recruiting its
neighbouring groups as children. The child group then tries to recruit its
own neighbours, unless it is itself at depth h from the root. Hence, when all
level n − 1 groups are either recruited or leader, one obtains level n groups
which are trees with a maximum depth h.
procedure MAIN()
r = random(R) * T
CHAPTER 2. AMORPHOUS COMPUTING: AN OVERVIEW 11
ELECTION LOOP()
procedure RECRUITED(msg)
if ((msg.h < current h) &&(msg.h < MAX H))
broadcast ("recruit", (h+1)) ; recruit neighbours for depth h+1
current h = msg.h
competing = false
DONE()
SEED TREE()
root := true
broadcast ("recruit", 1) ; recruit neighbours for depth 1
DONE()
DONE()
wait for time out
Applications
An amorphous computing hierarchy, established as explained above or in
any other way, simplifies programming an amorphous computer and facili-
tates the analysis of amorphous computing algorithms. This is because such
a hierarchy is really an abstraction of an amorphous computer that simplifies
high level programming. In this way, algorithms already designed for other
CHAPTER 2. AMORPHOUS COMPUTING: AN OVERVIEW 12
// inherited state:
// Members = list of members
group MergeSortGroup {
// state
IntegerArray my_ints
// methods
void sort () {
if (expected_compute_time(my_ints)
< time_to_distribute_problem_to_members)
quicksort()
CHAPTER 2. AMORPHOUS COMPUTING: AN OVERVIEW 13
else
for all members in this.Members, in parallel
{
member.set_my_ints(sublist)
member.sort()
}
merge_member_lists()
// set my_ints to the merge of members my_ints
}
}
Another application follows directly from the clubs algorithm itself, which
can be used to solve the maximum independent set (MIS) problem. This
is so because a set of club leaders with no leadership conflicts is in itself
a MIS. The clubs algorithm can be further extended to solve the problem
known as ∆ + 1 vertex colouring, which is closely related to MIS. In this
problem, the goal is to find a graph colouring which uses at most ∆ + 1
colours, where ∆ is the maximum degree of the graph. This is achieved
by modifying the clubs algorithm so that there are no leaders or followers;
instead, when a processor’s countdown reaches zero, it simply chooses the
”smallest” colour it has not heard and broadcasts that colour. Both the
MIS and the ∆ + 1 vertex colouring algorithms implemented as above on an
amorphous computer are O(logN ), where N is the total number of elements
[CN98a].
walls that cancel noise, it is important that the amorphous computing com-
ponents know their physical location relative to other elements in order to
interpret sensor information. Therefore, the question arises whether it is
possible to establish a global coordinate system within an amorphous com-
puting medium. More precisely, can each processor assign itself a logical
coordinate that maps approximately to its global physical location, starting
from local information only?
Σj∈nbrs(i) hj + hi
si = − 0.5
|nbrs(i)| + 1
Finally, the resulting distances serve as input for a triangulation formula,
such that cartesian coordinates can be determined for each particle.
Figure 2.6 shows the result of the algorithm with three anchors chosen as
shown, and each processor represented by a line with as length the difference
CHAPTER 2. AMORPHOUS COMPUTING: AN OVERVIEW 16
between the actual distance from the anchor and the estimated distance.
There are three main sources of errors in the position estimates
Theoretical analysis in [Nag99] shows the following two key results: there
is a critical minimum average neighbourhood size of 15 for good accuracy,
and there is a fundamental limit on the resolution of any coordinate system
determined strictly from local communication (that is, on the order of the
communication radius). It is also shown that random distributions of pro-
cessors produce significantly better accuracy than regular processor grids,
such as those used by cellular automata. While it is so that larger anchor
triangles generally produce better results, for very large areas the use of a
single anchor triangle may not be feasible because of the time taken and the
accumulation of errors. In this case one can construct a coordinate system
by creating a manifold of multiple overlapping patches of coordinates.
2.3.1 Waves
The two-dimensional scalar wave equation is given by
∂2u
= c2 ∇2 u
∂t2
CHAPTER 2. AMORPHOUS COMPUTING: AN OVERVIEW 18
fij = k(ui − uj )
Hence, after the momentum transaction, each site i can update its amplitude
ui independently, according to the following rule
pi
∆ui =
∆t
m
A possible extension of this model is one where energy as well as momentum
is conserved – we refer to [Rau99] for further details.
3
The simulation of waves in itself will be discussed in section 3.2.1.
CHAPTER 2. AMORPHOUS COMPUTING: AN OVERVIEW 19
A wave ripples out and reflects off the boundaries to interfere with itself.
Different colours represent different amplitudes; between the snapshot, each
processor has made roughly 15 transitions. Figures 2.8 and 2.9 4 represent
the reflection, respectively refraction, of a one-dimensional wave.
In figure 2.8 the right boundary is shaped like a parabola, focusing the
wave into a point before it reflects back.
4
The figures in this section are from [Rau99].
CHAPTER 2. AMORPHOUS COMPUTING: AN OVERVIEW 20
∂u
= k∇2 u + F (u)
∂t
where u is a vector-valued field, which at each time t describes the changing
spatial concentrations of a set of chemical substances. Since it has often
been suggested that reaction-diffusion can explain the mechanisms of mor-
phogenesis5 , these chemical substances are also referred to as morphogens.
The resulting patterns for various reaction specifications F have been widely
simulated and, whether or not reaction-diffusion is the actual mechanism be-
hind morphogenesis, have been shown to produce regular patterns similar
to those found in nature.
U + 2V ← 3V
V ← P
∂u
= ru ∇2 u − uv 2 + f (1 − u)
∂t
∂v
= rv ∇2 v + uv 2
∂t
where p, the concentration of P , can be determined from u and v. These
equations are of the form of a general reaction-diffusion equation, with
F (u) = f (1 − u) and F (v) = −(f + k)v; ru and rv are the (constant)
diffusion rates. On an amorphous computer, each processor is regarded as
a reaction site, maintaining information on the concentration of different
chemical species at that locus [CN98c]. Since reaction-diffusion is a conser-
vative process, we will again work with token exchange, the tokens in this
case being the morphogens. Following the standard regular grid approach,
updating the values for u and v at a certain site i incorporates the whole
processor’s neighbourhood N (i). This is because the discrete approximation
of the term ∇2 u is taken to be the mean neighbour value of u
u(in ) − u(i)
∇2 u(i) ≈
in ∈N (i)
|N (i)|
un+1
i = uni + ∆t(ru (unj − uni ) − uni (vin )2 + f (1 − uni ))
CHAPTER 2. AMORPHOUS COMPUTING: AN OVERVIEW 22
Looking at this specific pattern, one can contemplate the possibility of or-
ganising amorphous computing systems by starting with the particles in a
random state and solving a discrete analog of a reaction-diffusion system,
an intriguing alternative to the clubs algorithm presented in section 2.2.1.
∂u
+ divf = 0
∂t
where, for simplicity, sources of u within G are ignored. The flux function
f is usually made a function of u; for example, if we take f = au, we obtain
7
From http://www.swiss.ai.mit.edu/projects/amorphous/white-paper/amorph-new.
html.
CHAPTER 2. AMORPHOUS COMPUTING: AN OVERVIEW 23
the one-way wave equation, while taking f = a.gradu results in the heat (or
diffusion) equation.
ui
hij
uj
with
8
“densily enough” meaning that when connecting all processors to their neighbours,
the resulting triangles are all acute-angled
CHAPTER 2. AMORPHOUS COMPUTING: AN OVERVIEW 24
1
cij = dsi
|hij | ∂Gi
Furthermore, if ui does not change too fast within Gi , we can make the
following approximation
ui dv ≈ Ai ui
G
where Ai is the area of Gi . Putting all this together, we obtain the following
result
|∆t|
∆ui = − fij hij cij
Ai j∈N (i)
Applying this to the heat equation, in which case fij ≈ haij (uj − ui ) (as a
result of the mean value theorem), the new value of u for processor i is found
by applying the forward Euler equation
a|∆t|
un+1
i = uni − cij (unj − uni )
Ai j∈N (i)
In case of the heat equation, one can prove that the amorphous computing
forward Euler method provides a convergent approximation to the heat con-
servation law problem [Kat99] (this is still true with the cij ’s equal to 1).
Other conservation problems can be treated similarly.
2.4 Summary
Amorphous computing emerged in anticipation of the fast developing disci-
plines of microfabrication and cellular biology. These enable the construc-
CHAPTER 2. AMORPHOUS COMPUTING: AN OVERVIEW 25
Amorphous Computing
Media
26
CHAPTER 3. AMORPHOUS COMPUTING MEDIA 27
1. ORG USERPROG
2. VER FCB \$04
3. PROGBEGIN COMA
4. JSR DELAYINT
5. CMPB \#\$04
6. BHS SENSEHIT
7. TSTB
8. BEQ PROGBEGIN
9. LDAA \#\$7F
10. BRA SENDNEIGHBORS
11. SENSEHIT LDAA \#\$01
12. SENDNEIGHBORS LDAB RBUF
13. INCB
14. JSR LESSAB
15. STAA PORTB
16. LDAB \#\$01
17. JSR BROADCAST
18. BRA SENDNEIGHBORS
19. PROGEND NOP
Here LDAA #$nr and LDAB #$nr denote loading the hexadecimal number nr
into accumulators A and B respectively, CMPA indicates that the subsequent
value should be compared with that in register A, and JSR stands for jump
to subroutine. Hence, DELAYINT, LESSAB and BROADCAST are subroutines
specified elsewhere2 . The full translation of this program is as follows
1. each user program starts with this command
2. accumulators A and B are automatically initialised to 0
3. take the COMplement of A - in order to flash
4. DELAY, but be open to INTerruptions
5. was a sensor hit?
6. if so, goto SENSEHIT
7. did the delay run out without interruptions?
8. then toggle lights and delay again
9. a message was received
1
This example is from [Bee].
2
An overview of these subroutines as well as Gunk programming in general can be
found in [Bee].
CHAPTER 3. AMORPHOUS COMPUTING MEDIA 29
+ -
Power I/O Memory Processor Sensors
+ -
Power Memory Processor Sensors I/O
-
-
+
+
Implementation
An amorphous computer is a huge system of processors which act in paral-
lel and execute their Gunk program independently, if necessary interacting
through local communication. hlsim simulates this parallel activity by asso-
ciating each processor with a different thread. Next to this, a Gunk Scheme
program may itself be multithreaded, starting off with one thread and cre-
ating more whilst executing. This means that there are actually two levels
of threads: on the higher level, there are the processors’ threads, while on
the lower level, there may exist several threads for each processor. All these
threads are synchronised by events, which may be signalled (i.e. associated
with a value) or unsignalled; an event object becomes signalled when its as-
sociated thread terminates. Each processor has the ability to schedule local
events in time using their associated threads. hlsim transforms these local
events into a global schedule, such that the order of events in this sched-
ule is consistent with the order the events would fall in if each processor
were running independently in parallel. That is why the Scheme code for a
Gunk processor cannot be loaded into a simulation directly, but must first
be compiled into continuation passing style. This is a style of writing pro-
grams such that the events in the future, i.e. the rest of the computation,
are passed as an explicit parameter, called the continuation. A continuation
is a procedure that takes the value of the current expression, which repre-
sents the ”past” of the computation, and invokes this with the ”future” of
the computation. Hence, each event is partitioned into a part which has
already been computed, and a part which still has to be computed. As such
one can halt an event at any time, and resume after an arbitrary pause.
This is the mechanism behind the sequential simulation of parallel events.
hlsim pays attention to all the details involved in a particle simultaneously
handling local computation and communication. Each particle is given a
CHAPTER 3. AMORPHOUS COMPUTING MEDIA 33
time slice within which it executes part of its program. Handshaking be-
tween particles through events is used to force an active particle to wait for
cooperation-dependent commands to terminate.
The first line constructs a simulation with 1000 processors and a commu-
nication radius of 0.05 units; the processors are uniformly distributed in
a unit square. Alternatively, one could use the procedures make-sim/j,
make-sim/f or make-sim/c, which produce respectively a fixed grid (with
on optional ”jiggly” factor), a grid with varying neighbourhood density (de-
√
termined by a function f which defaults to ), and a grid which satisfies a
predicate constraint for its neighbourhood density. As a result of the second
step the use of a Scheme graphics window is included, in which each proces-
sor is displayed as a colour-coded dot. Next, the Gunk program in question
is loaded into the simulation, together with the ”init” file, which contains
the initialisation code for a processor and should be loaded into the simula-
tion first. Finally, the last line in the example runs the simulation. Once it
is finished, one can extract certain information by using simulation.eval.
For example, the number of collisions each processor detected is found by
executing (simulation.eval sim ’collisions), which returns a vector
containing the result for each processor. Also, a simulation object may have
additional slots and operations added to it at any time; this is done through
the following procedures
The first two commands are straightforward; the third applies the operation
in the slot name to the given arguments.
its arguments, and waits for all these to terminate. The select form, which
takes as arguments an arbitrary set of clauses, allows a nondeterministic
choice between several events. Each clause can be in one of the following
forms
(guard expression-sequence)
(guard => procedure)
(else expression-sequence)
Establishing a Potential
As a first example4 , let us again consider the implementation for a hop count,
a common ingredient in amorphous computing algorithms (see sections 2.2.2
and 3.1.1). We start with a randomly chosen processor, acting as a source
for a potential, which broadcasts a message containing a potential of 36.
When any other processor receives a message, it compares the potential in
the message with the highest potential it has recorded. If the potential in
the message is greater, the processor updates its highest potential, changes
its color to reflect the potential, and broadcasts a message with a potential
4
This example is from [DeR97].
CHAPTER 3. AMORPHOUS COMPUTING MEDIA 35
one less than that received. If the potential in the received message is less
than or equal to the highest recorded potential, no action is taken. When
a processor detects a collision, it flashes white for 100 time units. This is
reflected in the following loop, which is carried out for all processors apart
from the source:
(select
(global-timeout ’done)
(primitive-message-event
=> (lambda (message)
(event.clear! primitive-message-event)
(if (eq? message ’collision)
(begin (colour-me "white")
(wait (make-timeout-event 100))
(colour-me my-colour))
(if (and (number? message) (> message potential))
(begin
(set! potential message)
(broadcast (-1+ message))
(set! my-colour
(remainder (truncate (/ message 5)) 7))
(colour-me my-colour))))
(propagator-loop)))))
Initially, each processor is coloured blue, while the source is cyan. The
eventual colour of a processor is determined by a number between 0 and 6,
i.e. that number is taken as index for the following vector
(define (club-event-loop)
(select
(global-timeout ’done)
((and still-competing? leader-timeout)
(event.clear! leader-timeout)
CHAPTER 3. AMORPHOUS COMPUTING MEDIA 36
(color-me "red")
(set! still-competing? #F)
(broadcast id) ; a LEADER message
(club-event-loop))
(primitive-message-event
=> (lambda (message)
(event.clear! primitive-message-event)
(if (eq? message ’collision)
(set! collisions (+ collisions 1))
(begin
(set! still-competing? #F)
(set! clubs-i-belong-to
(cons message clubs-i-belong-to))
(color-me (length clubs-i-belong-to))))
(club-event-loop)))))
Processor id’s are chosen as random numbers in a large interval. Both global-
timeout and leader-timeout are defined with make-timeout-event, such that
leader-timeout is less than global-timeout. The second select clause is carried
out each time a processor declares itself as a club leader; the third select
clause is the recruiting stage. Initially, all processors are coloured blue,
when a leader is elected it is coloured red. When the simulation is finished,
each processor has a colour ”equal” to the number of clubs it belongs to.
Any number not falling within the colour vector is associated with the colour
white. The result of a simulation with 2000 processors and a communication
CHAPTER 3. AMORPHOUS COMPUTING MEDIA 37
Simulating Waves
The figures in section 2.3.1 are all results of simulations carried out with
hlsim. The colour of a processor in these figures represents the amplitude
of the wave at that point. The implementation of a simulated wave process
is actually quite straightforward. The central procedure is the following 5
(show-self (my-q) q)
(show-neighbour other (neighbour-q other) qn))
(define (activity)
(define (start lst)
(if (null? lst)
’()
(begin
(make&start-thread
(lambda () (pause (random period))
(wait-and-do-exchange (car lst))))
(start (cdr lst)))))
(start neighbor-list))
Since the simulation of waves requires each processor to know who its
neighbours are, normally a message should be broadcast requesting an ex-
change. Each processor that receives this message should then reply co-
operatively. Another approach is to establish the neighbours beforehand,
keeping a list of neighbours as part of the internal state of each processor.
However, in this simulation they used a shortcut by “cheating”, i.e. step-
ping outside the abstraction of each Gunk processor running isolated from
its surroundings. This is because hlsim provides certain procedures which
can deliver information on the whole simulation, such as each processors’
neighbours. In this example one can argue that without cheating the pro-
gram would have been less clear, and that it is certainly possible to simulate
waves without preliminary knowledge on each processor’s neighbours. Nev-
ertheless, using global information is against the spirit of Gunk, and thus
not recommended.
equations, discussed in section 2.3.2. For this reason, as well as the fact
that this simulator is synchronous, we will not discuss it in great detail.
However, it is interesting to compare results obtained with an asynchronous
and a synchronous simulation.
The result of a simulation with about the same parameters as for fig-
ure 2.11 is shown in figure 3.7. Important to notice is that the qualitative
nature of the resulting patterns is comparable to those obtained with the
asynchronous hlsim simulations from section 2.3.2. In that section we al-
ready mentioned the similarity of the patterns obtained with a regular as
opposed to a random grid. So it seems that amorphous media are at least
as expressive as synchronous and/or regular simulations.
sis rates of the input and output protein respectively, ρA is the repression
activity, and ψZ is the mRNA synthesis rate.
C T L
φA cooperative ρA ψZ φZ
transcription translation
binding
input repression mRNA output
protein synthesis protein
input mRNA
protein
ρA ψZ φZ
φA ρA ψZ
Each module is responsible for a different aspect of the inverter signal: co-
operative binding C takes care of the nonlinearity, transcription T does the
actual inverting of the signal, and translation L is mostly a linear process,
which means that it results in a scaling of the output. Putting all this
together, we obtain the following expression for the inversion relation I
φZ = I(φA ) = L ◦ T ◦ C(φA )
shown graphically in figure 3.10. The resulting curve is similar to that of an
NMOS inverter.
the dynamic behaviour of the inverter as modeled with this system; shown
from top to bottom are the concentrations of the input protein A, the active
(i.e. unrepressed) gene GZ and the output protein Z. As one can see, this
system behaves like a ”normal” electrical inverter.
1
protein concentration (1uM = 598 molecules/cell)
0.5
0
0 5 10 15 20 25 30 35 40 45 50
Gz
0.02
0.01
0
0 5 10 15 20 25 30 35 40 45 50
2
Z
1.5
0.5
0
0 5 10 15 20 25 30 35 40 45 50
time (x100 sec)
3.4 Summary
An amorphous computing medium is an environment which behaves as if it
were a collection of randomly spread, locally interacting computing parti-
cles that update asynchronously. The way to write an amorphous program
depends on the medium at hand. The most logical amorphous computing
medium is, of course, a “real” amorphous computer. At this stage there
exists a hardware prototype, nicknamed Gunk, based on existing micropro-
cessors. However, this is not completely within the spirit of amorphous
computing, using a limited amount of processors and wired communication.
Therefore, there are ongoing experiments towards the construction of an
amorphous computer particle which would fit better in the context, with
wireless local communication and of a size rendering feasible the sprinkling
of many such particles on a surface or in a volume. Since hardware im-
plementations are not yet at the point of behaving truly amorphously, a
simulating environment is asked for. Hence, we arrive at the next group of
amorphous computing media: simulators. At the moment there is a Java
synchronous simulator available, as well as an asynchronous one, hlsim,
which has been used in many experiments, including some of the algorithms
discussed in the previous chapter. Lastly, a more futuristic medium can be
found in biological cells. While as yet it is not possible to have cells coop-
erate amorphously, progress has been made on the subject of using cells to
construct arbitrary elctrical gates.
Chapter 4
46
CHAPTER 4. THE GROWING POINT LANGUAGE 47
a growing point resides at a single location in the gpl domain, called its
active site. A growing point propagates by transferring its activity from a
particle to one of its neighbours according to its tropism (recall the pre-
liminary discussion on gpl in section 2.2.3). At its active site, a growing
point may deposit material and it may secrete pheromones – in fact, both
processes are realised by setting certain state variables available at each
location. A growing point’s tropism is specified in terms of the neighbour-
ing pheromone concentrations. Actually, these concentrations determine a
scalar field whose gradient directs the motion of the growing point. A path
of a growing point is detectable only if there was material deposited. In
the context of pattern formation, presence of a material at a location im-
plies that part of the pattern has been established there. Typically, each
material is represented by a certain colour in the gpl domain, comparable
to simulation representations of hlsim. Of course, each material also corre-
sponds to a pattern fragment type. Invoking a growing point at a location
may yield one or more successor locations in the domain, unless the growing
point terminates at that location. The step-size is the fundamental unit
distance, defining a growing point’s neighbourhood, giving an upper limit
to the distance over which a growing point moves, and applied as the unit
by which all distances in gpl are expressed. We will make clear how gpl
works, as well as what means are provided to construct a certain pattern
by discussing some introductory examples. We start with a simple program
that draws a line segment between two points.
(define-growing-point (A-to-B-segment)
(material A-material)
(size 0)
(tropism (ortho+ B-pheromone))
(actions
(when ((sensing? B-material)
(terminate))
(default
(propagate)))))
Next to its (globally scoped) name a growing point may have parameters; in
this case however, there are none. The definition of a growing point has two
parts: attributes and instructions. The attributes given for A-to-B-segment
are material, size and tropism. A material is one of the two possible primitive
CHAPTER 4. THE GROWING POINT LANGUAGE 48
(define-growing-point (B-point)
(material B-material)
(size 0)
(for-each-step
(secrete 10 B-pheromone)))
This growing point does not have a tropism declaration, which implies that
it is stationary (use of propagate is prohibited in this case). Also, B-point’s
only action is to secrete B-pheromone, the substance to which the former
growing point is attracted. The distribution of B-pheromone is radially
symmetric about the source B, such that its concentration is monotonically
CHAPTER 4. THE GROWING POINT LANGUAGE 49
B
...
.
A
(with-locations
(A B)
(at A (start-growing-point A-to-B-segment))
(at B (start-growing-point B-point)))
s s s
s s
plagio+ plagio-
Let us suppose that the rails (parallel blue lines) as well as an initial start-
ing point at the left are given as initial conditions. Parallel lines can be
constructed by having one line segment, constructed as in the previous ex-
ample, secrete a long-range pheromone to which the growing point for the
second line grows diatropically. Once the rails are established, all other com-
ponents of the pattern can be specified as either parallel or orthogonal to
them. Let us start with the horizontal polysilicon (red) segments, of which
there are three2 . By having both rails secrete a long range pheromone,
these segments can grow diatropically to both of these pheromones. How-
ever, since in this way there are still two possible directions, we require an
additional pheromone to distinguish between the left and right direction.
We can secrete this pheromone at the starting point, which is given as an
initial condition, in the following way
This growing point looks almost exactly the same as orient-poly, but does
not rely anymore on dir-pheromone. However, we do have to add the clause
(secrete poly-pheromone) to the action attributes of orient-poly. Also
worth mentioning is the use of the secrete+ command in poly-with-inertia.
Where secrete always remembers the highest pheromone concentration
upon receipt of several secretions, secrete+ accumulates those values. By
using secrete+ in the definition of the above growing point, we ensure that
it propagates in the same direction on each step. Finally to put the two
pieces together, we define horiz-poly in the following way
Here we use -->, an alias for the connect command, which links two grow-
ing points, and is the first of several gpl commands that can be used to
build larger constructions from existing growing points. Through this com-
mand, one can sequence growing points without having to invoke the second
growing point explicitly in the actions of the first. As such one can define
growing points independently and use them as building blocks for any con-
nected structure.
CHAPTER 4. THE GROWING POINT LANGUAGE 53
(+ INV-HEIGHT N-WIDTH))
(--> (start-growing-point horiz-poly
(+ POLY-LEN (* 2 N-WIDTH)))
(->output p-fet)))
(--> (start-growing-point down-poly
(+ INV-HEIGHT N-WIDTH))
(--> (start-growing-point horiz-poly
(+ POLY-LEN (* 2 N-WIDTH)))
(->output n-fet))))))
(==> (p-fet n-fet) inverter-fets (poly-out))))
Again, we encounter several new commands. First, let-locs has the general
form (let-locs (( <loc-names> ) <loc-defn> ) <body> ). The seman-
tics are that the locations given in loc-names are bound to the results of
evaluating loc-defn, after which body is evaluated within the scope of this
new binding. Apart from the last line the whole program constructs all
polysilicon segments present in the pattern. The last line arranges for the
fet components to grow; also, it uses the new command ==>, which is an alias
for cascade. This command takes a set of inputs, networks and outputs,
such that each network’s outputs serve as inputs for the next. In this case
there is only one network given, inverter-fets, which basically arranges
a p-fet and an n-fet to grow from the outputs of the polysilicon patterns.
Hence, we constructed an inverter abstraction in gpl, which in itself can
serve as a building block for more complicated circuits such as, for example,
an AND-gate. The simulation result of the inverter construction with gpl
is shown in figure 4.4.
<idi, conci>
filter sorter
pairings from filtered filtered and
neighbours values sorted values
A tropism is actually translated into a procedure that first takes two con-
tinuations, empty-case and non-empty-case, applied when the filtering
process results in an empty and non-empty list respectively. This procedure
returns a filter-generator, which takes the pheromone values at the prede-
cessor and the current location – last-result and my-result in the above
– and does the actual filtering and sorting of the given list of pheromone val-
ues. Filtering and sorting translators first decide whether they are dealing
with a primitive or compound tropism expression, then to dispatch on the
particular type. For example, in case of the ortho- tropism, filtering is done
according through the predicate (lambda (last-result) (< last-result
my-result)); sorting, coincidentally, also occurs through the < predicate,
such that the neighbour with the lowest pheromone concentration is pre-
ferred. Compound tropisms are handled by cascading the filters for each
constituting primitive tropism and combining their sorters in the following
way
In other words, sorting predicates is applied left to right, such that later
sorters are taken into account for a set of elements only if these elements
have no ordering with respect to the previous sorters.
CHAPTER 4. THE GROWING POINT LANGUAGE 58
• the current agenda, which keeps track of actions that have been
started but not yet terminated;
ecoli may affect the first three of these components directly. At any time, a
processor’s message queue represents the interaction of that processor with
its neighbours. Execution occurs through the following ecoli code extract
After the handler is applied, the current agenda is executed, after which a
new message is retrieved from the message queue. In order to run a gpl pro-
gram on an amorphous computer, each particle must be capable of dealing
with all available gpl commands. These commands can be divided concep-
tually in those that can be executed independently on each processor, and
those that require communication between particles. Since the ecoli proto-
col was invented for the purposes of the latter class, consisting of secrete
and propagate, we head off with discussing their implementation.
t-secrete wait
(1) (2)
nt
te
in
ex
m
<
>=
in
nt
1
ou
t+
=m
-c
nt>
w
ou
ou
ne
-c
c in
w
t =m
ne
ten 1>
ex t+
t<
count+1<min
new-count+1<min
un
un co
co
count>extent
count=extent count+1<min
default t-restore t-update
(0) (3) (4)
new-count=extent new-count+1<min
new-count>extent
CHAPTER 4. THE GROWING POINT LANGUAGE
src-t-
src-default
(5) restore
(6)
60
count<min
CHAPTER 4. THE GROWING POINT LANGUAGE 61
Top-level commands
eval-top-level
policy only approximates what happens in hlsim for the propagate and
secrete command. Interpreting these commands with the illustrator ba-
sically neglects acknowledgement mechanisms such as those present in the
ecoli implementation. This implies that each particle participating in a
communication-dependent command trusts that the other cooperating par-
ticles will carry out the rest of the command correctly, as opposed to ecoli
where this is checked explicitly through acknowledgement. For this reason,
as well as to cover another subject than in the previous section, we will not
discuss communication-dependent commands for the gpl illustrator. We
shall limit our discussion to gpl commands concerned with combination
of growing points, namely the growing point command connect and the
network command cascade.
Here point represents the active site, cont captures the pending compu-
tation following the connect command, while the stop continuation is the
one that is invoked by illustrate-terminate.
out the commands within the body of the network definition that are not
relevant to that terminal. This is done through the following code extract
Again, the first command is projected while the rest are wrapped up in a con-
tinuation; note that network continuations take a terminal name as parame-
ter, which makes sense since a network is not necessarily a connected pattern.
The project procedure dispatches on the type of network command. As
a result a network command is parsed to find any instructions that are as-
sociated with terminal; these instructions are executed when the location
corresponding to this terminal is instantiated, typically in an at or cascade
command. The implementation of cascade is analogous to that of connect,
with the command ->output now playing the role of terminate. Hence,
the network continuation to be invoked after the first argument to cascade
is evaluated, is now called by illustrate->output. Specifically, the ex-
pression (==> (i1 ...in ) network-a network-b ... (o1 ...om )) is interpreted in
two steps: first, network-a is constructed at the locations (i1 ...in ) to pro-
duce the outputs (a1 ...ak ). Next, the expression (==> (a1 ...ak ) network-b ...
(o1 ...om ) ) is evaluated, as this is the continuation invoked by the ->output
command of network-a.
Along with the proof for this proposition comes a general method for gener-
ating such a program. Two ingredients of the statement above are important
in relation to the domain. First, it holds on a square lattice, immediately
leading to the question of what the effect of a randomly distributed domain
is. Secondly, there is the possibility that a growing point “fails to do so”
because it gets stuck, again a domain-related issue. In general, there are
three important concerns that are directly affected by the geometry of the
gpl domain, namely
• can they propagate in the right direction, i.e. is every direction repre-
sented by a neighbour from each particle’s viewpoint;
The density of particles in the domain affects all three of these issues; more
particularly, a low mean and a high variance of the neighbourhood density
are aspects that can have a negative effect. Experimental and theoretical
results show that the mean neighbourhood density should be relatively large
(at least 6) in order for the two first issues above to be taken care of. While
this condition is necessary in the general case, it is not a sufficient one; in
other words, while chances are considerably lower that a growing point gets
stuck or that it cannot propagate in the desired direction, it is still a pos-
sibility. For example, even with every direction represented, all neighbours
might be poisonous for a growing point, or they might not have a pheromone
gradient according to the growing point’s tropism. However, high average
neighbourhood sizes do have a penalty, since the secretion process is delayed
proportionally. As for the third issue in the list above, in order to have good
correlation between the hop count and the Euclidian distance a necessary
condition for the domain distribution is that the variance of the density of
neighbours should be low. Without such a correlation, growing point tra-
jectories can be disturbed indirectly, because in this case the pheromone
secretion patterns provide a growing point with a non-Euclidian sense of
distance. Low variance in neighbourhood sizes means that the particles are
more evenly distributed throughout the domain. Therefore, a particle is just
as likely to have a neighbour in one direction as in another, resulting in an
Euclidian secretion pattern and, hence, a non-biased propagation of growing
points.
CHAPTER 4. THE GROWING POINT LANGUAGE 65
There are several aspects of amorphous computing that have not been
taken into account in gpl. gpl operates in an extremely friendly envi-
ronment, where communications always succeed and particles never mal-
function. As these reliability issues are ingredients of the amorphous com-
puting model, at one stage they should be incorporated into gpl. Since the
only communication-dependent commands are propagate and secrete, the
implementations of these commands should be adapted when faulty com-
munications are taken into account. Secretion already relies on redundant
message sending between several particles cooperating together, so there
probably need be no fundamental changes to its implementation. However,
for propagation lost messages can have more serious effect since growing
points move to only one location. Considering malfunctioning particles, the
fact that a growing point’s propagation is basically the responsability of
one particle also poses problems. However, since a location is notified be-
fore it becomes the successor, one could use neighbouring particles, which
inevitably hear this message as well, as potential stand-ins for a malfunc-
tioning successor particle. In this context there have also been some in-
vestigations into how a certain pattern can be maintained once it has been
established. For these so-called self-healing structures [Zuc99] it is suggested
that monitoring, diagnosing and repair mechanisms be installed to cooperate
in restoring already constructed patterns.
CHAPTER 4. THE GROWING POINT LANGUAGE 66
4.4 Summary
The growing point language is the first serious attempt to develop a pro-
gramming language for an amorphous computer. The main goal of such a
language is to provide a means to attain predetermined global behaviour
from local interactions only. While gpl uses pattern reproduction as model
for global behaviour, one should look at it from the aforementioned broader
point of view. gpl is capable of producing a whole range of complicated
patterns, such as, for example, CMOS electrical circuits, through the ab-
stractions of, amongst others, growing points, tropisms, pheromones and
networks. The implementation of gpl exists on two levels: one is the gpl
illustrator, an interpreter working on top of Scheme, another is ecoli, a
precursor of a gpl-compiler which cooperates with hlsim. An important
theoretical result is that gpl either reproduces a general pattern or decides
that it is stuck. The latter case is closely related with the domain lay-
out, where a high mean neighbourhood size with low variance is required
in order to avoid stuck growing points as best as possible. Several exten-
sions were presented, of which the most important is the incorporation into
gpl of typical aspects of the amorphous computing model, such as faulty
communications and malfunctioning particles.
Chapter 5
Thoughts on Amorphous
Geometry
Previous examples have shown that amorphous computing can deal with a
variety of problems. As a contribution, we decided to study yet another
family of applications: that of computational geometry. Geometric algo-
rithms play a fundamental role in a whole series of application domains,
such as computer graphics, geographic information systems and robotics.
Since the physical layout of an amorphous computer serves as a basis for a
one-to-one correspondence with geometrical configurations, it seems natural
to look at what we will refer to as amorphous geometry. Moreover, within
the context of amorphous computing one can easily visualise applications:
for example, think of smart floors in large buildings such as hospitals and
companies, where coloured floor lines direct the way. Amorphous comput-
ing particles composing these lines would have to behave dynamically with
respect to their colour and the shape of the lines, finding shortest paths
between points, going around obstacles and the like. The idea is to show
that an amorphous computer could solve problems of this kind equally well
as a conventional one. We will present most of our suggested solutions as
well as the associated simulation results within the context of gpl, which
is specialised in pattern generation and hence a useful tool for a direct rep-
resentation of geometrical problems and their solutions. The goal of this
chapter is to report our results, as well as comment on the flexibility of the
environment – gpl – in which our experiments were tested.
Section 5.1 adresses the problem of robot motion planning on hlsim as well
as with gpl. The next sections prepare the way towards the triangulation
problem, within the context of gpl. First, we discuss the construction of ar-
bitrary polygons in section 5.2, showing simulation results for polygons with
up to six vertices. Next we search for a quadrangle’s diagonals in section
5.3. Based on the ideas from these sections, we present general guidelines
for solving the triangulation problem in section 5.4; triangulations for a pen-
67
CHAPTER 5. THOUGHTS ON AMORPHOUS GEOMETRY 68
tangle and hexagon are shown. Last, we give a summary of the chapter in
section 5.5.
(select
(primitive-message-event
=>(lambda (message)
(if (not obstacle?)
(begin
(event.clear! primitive-message-event)
(cond ((eq? message ’collision)
(if up
(set-retry-up-timer!
(+ 1000 (random 5000))))
(loop ttl up down))
((and down up
(= (third message) up))
(set-retry-down-timer! #F)
(colour-me "yellow")
(event.signal! break #T))
The loop procedure consists of a colouring clause along with the above
select form; it is more extensive but comparable to the hlsim code ex-
tracts presented in section 3.2.1. Initially, the source is coloured yellow,
obstacles cyan and the rest of the processors blue. In the above, ttl, up
and down refer to time to live, up-neighbour and down-neighbour respec-
tively, while global-timeout, continue, break, never, retry-up-timer
and retry-down-timer are all events. The basic idea is as follows: a source
processor – the origin of the robot – sends out an UP message with a time
to live of maximally 50 hops, through the retry-up-timer event. When
a processor, which is not an obstacle, receives an UP message, it rebroad-
casts it with a decremented time to live, following the same protocol as
in the potential example from section 3.2.1. However, when a rebroadcast
occurs, each processor remembers the identity of the processor from which
the message was received – i.e. the up-neighbour. Hence the UP message
travels away from the source, such that each processor knows the identity of
its up-neighbour. This is translated in the first select clause, which deals
CHAPTER 5. THOUGHTS ON AMORPHOUS GEOMETRY 70
Figure 5.1: Simulation results for the robot motion planning problem.
Figure 5.1 presents the path found with the above code for a simulation
with 2000 processors with a communication radius of 0.05. Source and
destination processors were given as initial conditions, as well as obstacles,
which were chosen in the following way
(define obstacle?
CHAPTER 5. THOUGHTS ON AMORPHOUS GEOMETRY 71
While the above program obviously works, it is not really easy to read.
One inevitably wonders how the robot motion planning problem could be
solved within the more user-friendly gpl environment. First of all, setting
static obstacles through initial conditions is done by generating the floor plan
pattern, analogously to the generation of electrical circuit layouts. Through
the abstraction of a network, one would construct the floor plan, after which
a growing point is initiated at the robot’s initial location. Basically, the
construction of the robot’s path is done through the following growing points
(define-growing-point (robot-path)
(material path-material)
(size 0)
(tropism (ortho+ goal-pheromone))
(avoids obstacle-pheromone)
(actions
(when ((sensing? goal-material)
(terminate))
(default
(propagate)))))
(define-growing-point (goal)
(material goal-material)
(size 0)
(for-each-step
(secrete 10 goal-pheromone)))
a-point
b-point
a-to-b-segment
ment
a-seg
d-to-
t
b-to-c-segmen
d-point
c-to-d-segment
c-point
fragment 2
(with-locations
(a b c d)
(at a (start-gp a-point)
(--> (start-gp a-to-b-segment)
(--> (start-gp b-to-c-segment)
(--> (start-gp c-to-d-segment)
(start-gp d-to-a-segment)))))
(at b (start-gp b-point))
(at c (start-gp c-point))
(at d (start-gp d-point)))
2
start-gp is an alias for start-growing-point.
CHAPTER 5. THOUGHTS ON AMORPHOUS GEOMETRY 74
With the help of these growing points, the following code constructs the
desired quadrangle3
(with-locations
(a b c d)
(at a (start-gp (vertex a-pheromone a-material))
(--> (start-gp (edge b-pheromone b-material))
(--> (start-gp (edge c-pheromone c-material))
(--> (start-gp (edge d-pheromone d-material))
(start-gp (edge a-pheromone
a-material))))))
(at b (start-gp (vertex b-pheromone b-material)))
(at c (start-gp (vertex c-pheromone c-material)))
(at d (start-gp (vertex d-pheromone d-material))))
This example clarifies the need for equipping gpl with parametrisation pos-
sibilities for growing point ingredients such as pheromones, materials and
poisons.
Here we presented each vertex as an abstract data type of the form (<location>
<pheromone> <material>). However, the problem is that as yet it is not
possible to mix Scheme and gpl as above. Since a gpl program is not ac-
tually run on any one processor, there is a translation process converting
it to a set of instructions for each processor. In order to combine Scheme
and gpl, we would have to clarify the semantics of Scheme in this new con-
text. For example, exactly which particles are involved in iterating the loop
– since we are trying to get the whole ensemble to cooperate in producing
the polygon. This problem is more fundamental, and to solve it requires
thorough investigation.
the two adjacent vertices. We can specify these conditions as negative or-
thotropisms with respect to the three pheromones secreted by these vertices
during the construction of the quadrangle. Following the discussion of the
previous section, a diagonal growing from a has to be negatively orthotropic
to a-pheromone, b-pheromone and d-pheromone. Next, a diagonal must
end at the opposite vertex, meaning it has to be positively orthotropic to
the pheromone secreted by that vertex – c-pheromone, in this case. A
clarifying schematical representation of this process is given in figure 5.4.
b
c
al
gon
dia
However, we found that defining the diagonal growing point in the above
way resulted in stuck growing points. This is because we overspecified its
tropism – combinations of several primitive tropism expressions proved to be
unflexible, at least for not too large simulations. Besides being unflexible we
also found most present tropisms expressions superfluous. Specifying only
that a diagonal grows away from itself and towards the opposite vertex leaves
the growing point more freedom to propagate, while adding tropisms towards
the other vertices results in the growing point not being able to move at all.
Hence, we define a diagonal growing from for example a to be negatively
orthotropic towards a pheromone excreted by itself (diagonal-pheromone)
and positively orthotropic to c-pheromone.
One extra complication is that in order for gpl to know what part of the
domain is the quadrangle’s inside, we need an additional initial location –
referred to as center below4 . At center, we establish the following growing
4
The choice of an internal point is inspired by [Coo99]; alternatives could have been:
considering polygons filled with a specific material, or two-material edges.
CHAPTER 5. THOUGHTS ON AMORPHOUS GEOMETRY 77
point
(define-growing-point (inside)
(actions
(secrete 10 center-pheromone)))
This stationary growing point has default size and no associated material,
for it does not have to be detectable for other growing points. Its only task
is to secrete center-pheromone, which directs the diagonals towards the
inside of the quadrangle. However, in order for the diagonal to reach the
opposite vertex, at one point the positive orthotropism towards center has
to be eliminated. Therefore, we have to split up the construction of the
diagonal as shown if figure 5.5.
a center c
(define-growing-point (diagonal-rest)
(material diagonal-material)
(size 0)
CHAPTER 5. THOUGHTS ON AMORPHOUS GEOMETRY 78
(define-growing-point (diagonal)
(material diagonal-material)
(size 0)
(actions
(--> (start-gp diagonal-init 2)
(start-gp diagonal-rest))))
As one can see, diagonal-init determines the initial direction, while diagonal-
rest behaves like a growing point with inertia, maintaining the same direc-
tion by growing away from its own pheromone5 . Once diagonal-rest senses
the presence of c-material – i.e. when it has reached the opposite vertex
– it terminates. Finally, to initiate the process of creating a diagonal, we
execute the following
(with-locations
(center a)
(at center (start-gp inside))
(at a (start-gp diagonal)))
Figure 5.6 shows the simulation result for the construction of a quadrangle
diagonal in the above way. Again, it is shown that amorphous diagonal
construction is very satisfactory.
5.4 Triangulation
The triangulation problem is closely connected to the art gallery problem,
which can be formulated as follows [dBvKOS00]: given an art gallery, how
many cameras are required to guard it and how do we decide where to
5
Note the use of secrete+, which ensures that the diagonal grows in the same direction.
CHAPTER 5. THOUGHTS ON AMORPHOUS GEOMETRY 79
Figure 5.8 shows a possible triangulation in the middle for the polygon
shown left. Before we engage ourselves into discussing the triangulation
problem for an amorphous computer, we trace its further connection to the
art gallery problem. The key result is for each triangulated polygon there
exists a 3-colouring [dBvKOS00]; an example is shown at the right of figure
5.8. Since a 3-colouring is such that any two vertices connected by an edge
or a diagonal have different colours, it follows that we can guard the polygon
by placing cameras at all equally-coloured vertices, giving an answer as to
where we should place all cameras. To return to the question of how many
cameras are required, choosing the smallest colour class leads to following
result
n/3 cameras are occasionally necessary and always sufficient
to have every point in the polygon visible from at least one of
the cameras.
where simple polygon means that we do not allow regions with holes.
While the above theorem is only optimal in the worst case, it is clear
that polygon triangulation lies at the heart of the problem. Therefore, we
require an algorithm that constructs a triangulation for a given polygon.
Basically, we want to establish a growing point at each vertex that constructs
a diagonal, such that once a set of non-intersecting diagonals that determines
a triangulation is found, the remaining growing points that did not aid in
this construction are cancelled. In order to do this, we should be able to
CHAPTER 5. THOUGHTS ON AMORPHOUS GEOMETRY 81
use the results from the previous section. However, there are three main
differences with the construction of a quadrangle’s diagonals, namely
1. there are an arbitrary number of vertices;
2. a diagonal’s endpoint cannot be predetermined;
3. diagonals cannot intersect.
Let us first look at the generalisation towards polygons with more than four
vertices. First, when constructing a diagonal starting at a given vertex,
we have to know which pheromones are secreted by that vertex as well as
both adjacent ones in order to define negative orthotropisms towards them.
Next, we have to take into account that a diagonal’s endpoint cannot be
uniquely predetermined. For a quadrangle, a diagonal starting at a given
vertex can only end at one vertex; however, for a general polygon there
might be several possibilities. Therefore, we have to change the (ortho+
d-material) tropism from the diagonal growing point in section 5.3 into
positive orthotropisms towards all possible endpoints. A clarifying schemat-
ical representation of this process is given in figure 5.9.
OR
OR
al
gon
dia
As in the previous section, we found that listing all these tropisms for each
diagonal results in stuck growing points; however, if one omits the (super-
fluous) negative orthotropism expressions correct results are obtained. A
CHAPTER 5. THOUGHTS ON AMORPHOUS GEOMETRY 82
• return a list containing all pheromones apart from the above deter-
mined pheromone as well as those at the previous and following loca-
tion in the pheromone list.
(with-locations
(... x ...)
...
(at x (start-gp (diagonal (extract-pheromones x))
...)
where the dots indicate identical clauses for all vertices; note that the above
code presumes that the lists of vertices and pheromones are defined globally.
The diagonal growing point then includes in its tropism an ortho+ clause
for each of the pheromones in the list returned by extract-pheromones;
these tropism expressions are combined with the tropism or form.
Finally, the last difference with section 5.3 is that diagonals cannot in-
tersect. This actually simplifies the solution a bit, since this can be solved
by having all diagonals secrete the same pheromone, such that each diago-
nal avoids it. Putting all these results together, we arrive at the following
diagonal growing point definitions
a b c ...
locate pheromone
extract pheromones
(actions
(secrete+ 1 diagonal-pheromone)
(when ((< length 1)
(terminate))
(default
(propagate (- length 1))))))
(define-growing-point (diagonal)
(material diagonal-material)
(size 0)
(actions
(--> (start-gp diagonal-init 2)
(start-gp diagonal-rest))))
CHAPTER 5. THOUGHTS ON AMORPHOUS GEOMETRY 84
One issue which is not entirely clear to us at this stage is how to cancel
those growing points still trying to establish a diagonal after the triangula-
tion has finished. A possible solution is to first search the opposite vertex,
then reconstructing the found diagonal, analogously to the construction of a
robot path with hlsim in section 5.1. In this case, we could only display the
diagonal material when backtracking, thus avoiding a cluttered result due
to unfinished growing points desperately trying to find a vertex while none
are left. However, further investigations are required in order to clarify this
issue. Nevertheless, it should be clear from the above reasoning that solv-
ing the triangulation problem is entirely within reach of gpl. The problem
of shutting down eager growing points after a solution is found is practi-
cal rather than theoretical, since the main goal of constructing a polygon
triangulation is reached anyhow.
(define-growing-point (A-diagonal-rest)
(material diagonal-material)
(size 0)
(tropism (and (ortho- diagonal-pheromone)
(or (ortho+ D-pheromone)
(ortho+ C-pheromone))))
(actions
(secrete+ 1 diagonal-pheromone)
(when ((or (sensing? C-material)
(sensing? D-material))
(terminate))
(default
7
Without the avoids clause, the definition of diagonal-init is identical to that of
section 5.3.
CHAPTER 5. THOUGHTS ON AMORPHOUS GEOMETRY 85
(propagate)))))
(define-growing-point (A-diagonal)
(material diagonal-material)
(size 0)
(actions
(--> (start-gp diagonal-init 2)
(start-gp A-diagonal-rest))))
(define-growing-point (B-diagonal-rest)
(material diagonal-material)
(size 0)
(tropism (and (ortho- diagonal-pheromone)
(or (ortho+ D-pheromone)
(ortho+ E-pheromone))))
(actions
(secrete+ 1 diagonal-pheromone)
(when ((or (sensing? D-material)
(sensing? E-material))
(terminate))
(default
(propagate)))))
(define-growing-point (B-diagonal)
(material diagonal-material)
(size 0)
(actions
(--> (start-gp diagonal-init 2)
(start-gp B-diagonal-rest))))
be replaced by a parallel or, which chooses one of its clauses arbitrarily with
each execution, thus giving each tropism an equal chance of determining a
suitable successor location.
5.5 Summary
Computational geometry is an important field within computer science that
knows a whole series of applications, which are easily interpretable within
the context of amorphous computing. Each processor governs a geometrical
patch, such that the whole medium cooperates in finding a global solution to
the problem at hand. To show that amorphous computing has the potential
to deal with this kind of problems as well, we newly introduced the domain of
amorphous geometry. We covered how a series of typical problems borrowed
from computational geometry are viewed, solved and simulated within the
context of amorphous geometry. First, we discussed the problem of robot
motion planning, both with hlsim and gpl. This highlighted the differences
between both tools, especially the higher accessibility of the gpl solution,
as well as some of gpl’s weaknesses. The latter are concentrated mainly
around the inability to parameterise pheromones and, more fundamentally,
the unclear semantics of ordinary Scheme within the context of gpl. Next,
we discussed the construction of general polygon as well as the generation
of a quadrangle’s diagonals, notable problems in themselves which were also
useful in preparation of the lastly discussed problem of polygon triangula-
tion. While the aforementioned gpl weaknesses reemerged, simulation re-
sults confirmed that amorphous geometry is well within reach of amorphous
computing, encouraging further explorations in these directions and provid-
ing a solid basis for its development into a full-blown branch of amorphous
computing.
Chapter 6
Conclusion
88
CHAPTER 6. CONCLUSION 89
The above classifications of metaphors and media are very useful in trying
to bridge the gap between isolated applications towards a general paradigm.
As yet there exists one concrete proposition towards achieving exactly this:
the Growing Point Language (gpl). While we do not claim that gpl is
the solution to the problem of constructing a paradigm, we felt that, be-
cause of its uniqueness, it was important enough to cover in detail. gpl
starts out as another metaphor-based application, but it goes a lot further
in establishing general rules for achieving global goals from local interactions
only. Using pattern generation as model for global behaviour, it is shown
that a whole range of representations can be generated through the rela-
tively simple abstraction of growing points. Next to this, an overview of the
internal implementation enriches us with an insight as to what issues one
has to consider when laying the first stones for the development of a fully
operational amorphous computing language. While gpl clearly provides a
first flavour of an amorphous computing paradigm, there nevertheless re-
main several important topics that are not included. First, gpl assumes
faultless communication and processors, which is clearly in violation with
the amorphous computing model. Next, a series of extensions to the lan-
guage in itself are required in order to have more powerful growing point
CHAPTER 6. CONCLUSION 90
91
secrete(extent,count) new-count+1<min
count<min
update(extent,old-count,new-count)
restore(count)
count+1>=min
timeout(send)
t-secrete wait
(1) (2)
nt
te
in
ex
m
<
>=
in
nt
1
ou
t+
=m
-c
nt>
w
ou
ou
ne
-c
c in
w
t =m
ne
ten 1>
ex t+
t<
count+1<min
new-count+1<min
un
un co
co
count>extent
count=extent count+1<min
default t-restore t-update
(0) (3) (4)
new-count=extent new-count+1<min
new-count>extent
count‡min
count<min
add count
secrete(extent,count) replace count
update(extent,old-count,new-count) MIN=new-min
secrete(MIN)
restore(count)
timeout() t-secrete wait
(1) (2)
t
un
t
co
w
un
ne
co
d
e
c
ad
la
t
p
un
re
nt
replace count
u co
co dd
MIN=new-min
d a
ad
update(MIN,new-min)
restore(new-min)
set min
replace count
add count
replace count
simple
secrete
simple
update
#f
restore
secrete
timeout
t-secrete wait
(1) correction?
(2)
correction?
relevant?
wait
init simple
default t-restore t-update
init (0) (3) (4) simple
#f #f
#f update
correction?
correction?
relevant?
restore
95
[CNW97] D. Coore, R. Nagpal, and R. Weiss. Paradigms for struc-
ture in an amorphous computer. http://www.swiss.ai.mit.edu/
projects/amorphous/, 1997.