Вы находитесь на странице: 1из 9

M ULTI -A GENT L EARNING FINAL PAPER

Intelligent Slime
How can modelled slime mold solve the travelling salesman problem?
David Versluis
Abstract The travelling salesman problem is
a long-standing NP-hard problem in combinatorial optimization. Physarum polycephalum, the true slime mold, can be
guided to inefficiently solve the problem.
Models of the slime mold can be created to
solve the TSP without guidance. One of these
uses a shrinking blob of discrete particles representing Physarum protoplasm. It forms a
convex and then a concave hull around the
cities, and the solution can be easily read
from the final blob shape. An alternative uses

an altered Ant Colony system enhanced with


Physarum-like pipeline behavior. Both perform better than the natural Physarum, but
neither are (much) more efficient than traditional methods. Nonetheless, they represent
interesting developments in using natural
inspiration for solving computational problems. The particle model is particularly interesting for creating complex behavior and
solving ability from very simple autonomous
components.

Figure 1: On the left, the railway network of Tokyo, as formed by a slime mold [11]. On the
right, a travelling salesman tour through 20 cities formed by modelled slime mold [8].

A single-celled organism made world news in 2010 for


recreating the Tokyo rail system, without even having a
nervous system [2] [11]. Can a modelled specimen be used to
solve the travelling salesman problem?

David Versluis (3857476)

Submitted on July 1st , 2016

M ULTI -A GENT L EARNING FINAL PAPER

Introduction
The organism used to recreate the
railway network was Physarum polycephalum, the true slime mold [7][11]. It
has not only produced railway networks,
but also approximate solutions to classic
problems from computer science. Foremost among these is the well-known travelling salesman problem, where a sales-

man has to visit a number of locations


in whatever order he chooses, and then
return home, taking as short a route as
possible [9](more information in the sidebar). Physarum polycephalum, with extensive guidance, is capable of approximating solutions to this problem[12]. As
we shall see, this approach encounters
some problems. Because of these, slime
mold models might be more suited for it.

The Travelling salesman problem, or TSP, is probably the most well known and
most widely studied combinatorial optimization problem [9] [5]. It consists of a
map of cities, at certain distances to each other. The salesman wants to travel to all
cities and return to the starting city in the shortest possible path (an example will be
seen later in figure 10). One such path is called a "tour". The TSP has been proven to
be an NP-hard and NP-complete problem [9]. The specifics are too complicated to
go into here, but this basically means that there is no known way to solve it in
polynomial time, and that finding such a way would have massive implications for
computer science. Solutions can nonetheless be found, and dedicated TSP solvers
are available [5]. Besides the obvious usefulness for vehicle routing, solutions to the
TSP can be used in subjects as diverse as efficient wallpaper cutting and optimal
dartboard design. [9].

But first, what is a slime mold? In


this species, a mature slime mould consists of a single cell containing many nuclei distributed across its cell, known as
a plasmodium. This plasmodium can
grow quite large, around 30 cm in diameter. While it is not an animal, slime
molds can and do move, to reach food
sources. This movement is accompanied
by shuttle streaming, where the protoplasm moves back and forth within the
plasmodium.
Because it is a single cell, and a single organism, Physarum polycephalum
does not divide itself in two when two
food sources are available. Instead, it
can stretch itself between the two, consuming both simultaneously. This can
even be done with many more than two
food sources. In a lab situation, such as
the one that produced the Tokyo railway
network, this is usually done with oat
flakes [11]. This food source, combined

Submitted on July 1st , 2016

with some "guiding" of the slime mold,


by illuminating areas at higher elevation,
produced the network. Physarum dislikes bright illumination, and so preferably avoids the higher illumination, like
a engineer might avoid hilly terrain.
To approximate a solution to the travelling salesman problem with the slime
mold, an 8-city travelling salesman problem was used[12]. The slime mold was
presented with 64 different lanes, emanating from the circular area it was inhabiting (figure 2). Each city has 8 lanes,
one for each possible visitation order (e.g
city A has lanes A1, A2, up to A8, for
visiting the city first, second, up to last).
By guiding the slime mold with different amounts of light in each lane, based
on recurrent neural network dynamics,
the slime mold picks an order without
picking the same city twice. This order is, on average, better than around
80% of possible orders. However, this is

David Versluis (3857476)

M ULTI -A GENT L EARNING FINAL PAPER

not an entirely natural solution: without


the lane setup and the optical feedback
system Physarum polycephalum cannot
solve the travelling salesman problem
[8](Figure 3). There are also some other
problems with this setup, such as the
plasmodium growing quite slowly, taking around 80 minutes to create a single
solution. For these reasons, and to better understand its functioning, models
of Physarum polycephalum have been
developed. These allow for the slime
mold paradigm to be applied to problems much easier and faster.

Figure 2: Physarum-based computing for an


8-city travelling salesman problem. Each city
has eight lanes, and the chosen lanes determines when the city is visited. Plasmodium
is guided with light to create a functioning
path, only visiting each city once.
From Zhu et al. 2013 [12]

Modelling the TSP with Physarum


Multiple ways to model slime molds,
and Physarum polycephalum in particular, have been developed. We will focus on the two methods that have been
shown to solve the TSP. The first of
these is a specific particle-based model by
Jones [7]. Jones models Physarum polycephalum with a population of discrete
autonomous particles. Each particle represents a unit of protoplasm,consisting
of a central point and three chemoattractant sensors offset at a fixed distance (figure 4). One is always aimed "forwards", while the others are offset to the
left and right at a fixed sensor angle (SA).
Each cycle of simulation, each particle
uses these sensors to determine whether
to turn left, right, or not at all, towards
the highest concentration of chemoattractant. After deciding on turning, each particle attempts to move forwards a single
pixel along its new heading. If the chosen
location is unoccupied, it moves there,
and deposits chemoattractant. This is
the same chemoattractant that represents
the food nodes, the sensors do not distinguish between the two. The chemoattractant diffuses throughout the environment as time progresses, so that it can be
sensed weakly from some distance.

Figure 3: An attempt to let natural physarum


create a solution to the travelling salesman Figure 4: A single particle, with some notes,
problem by Jones & Adamatzky, 2013[8]. from Jones, 2011 [7].
With saline soaked thread the plasmodium
As the particles move, they leave
can form into a rough circle, but does not
even approximate a solution.
chemoattractant behind. They will cause

particles behind them on similar paths to

David Versluis (3857476)

Submitted on July 1st , 2016

M ULTI -A GENT L EARNING FINAL PAPER

converge to their path. Over time, trails


of chemoattractant are formed, along
which particles move in both directions
(figure 5). Because the particles are also
attracted to the chemoattractant from
food nodes, the trails ultimately form between the food nodes (an example in figure 6). One might expect that the particles would only form a dense sheet of
matter around the food nodes, but in
practice this does not occur, for two reasons. Firstly, the particles always attempt
to move forwards, and can only sense
forwards. This makes it hard to stay
around one point. Secondly, particles
only deposit chemoattractant if they actually move. If their move is blocked by
another particle, they do not deposit anything either. This means very-high density areas will have less chemo-attractant
than surrounding lower density areas,
thus dispersing them.

Of course, this is not the most biologically accurate modelling of the slime
mold. It does not actually consist of such
independently functioning entities. Yet,
modelling it in this way gives excellent
results, that are also very similar to those
found when using the real Physarum.
This is true for both the final solution of
many graph problems, as well as the intermediate stages to such a solution. The
prime example is the Toussaint hierarchy, a number of increasingly connected
types of graphs, where connections are
based upon distance and some definition
of "neighbourhood" [6]. Both the model
and the real physarum develop the relative neighbourhood graph (Figure 7), although the model continues down the hierarchy towards less connections, while
the real physarum travels up the hierarchy somewhat. These graphs are an interesting result, but they are also quite
easy to compute normally [6]. We will
now look at the solutions produced for
the NP-hard TSP [9].

Figure 5: A particle flow trail with


bi-directional movement with Joness
physarum model. From Jones, 2011 [7]
Figure 7: The real Relative neighboorhood
graph, one produced with the model of Jones,
and physarum grown on a similar distribution of points. First two from Jones, 2011 [7]
third from Adamatzky, 2008[1]

Figure 6: Using a virtual plasmodium to create a complex network, from Jones, 2011 [7].
It approximates the relative neighbourhood
graph that would be produced from these
points.

A material-based, minimum complexity approach


Jeff Jones Andrew Adamatzky [8]

Submitted on July 1st , 2016

David Versluis (3857476)

M ULTI -A GENT L EARNING FINAL PAPER

Solving the TSP


When using real Physarum, and in most
of the graph problems described previously, a population is inserted into an
area with food, and allowed to move into
a shape. However, this is not suitable
for solving the travelling salesman problem. We saw how the real Physarum
needed additional guidance. While the
model does not need to be guided, it does
need to be handled more specifically
than when creating a relative neighbourhood graph, especially when it comes to
shrinking and halting.

particles remain around the nodes and


in the area between them. By also allowing the particles to divide any holes or
tears in the sheet will be patched, and it
is ensured that the sheet maintains one
whole and the problem can be solved correctly. All this leads to the setup shown
in figure 8. From this situation the simulation can begin, and halting conditions
must be determined.

Creating the conditions


The environment consists of a number
of food nodes. Each represents a city.
The location in the environment of the
food node represents its actual location,
so that the distance of two food nodes is
the distance between them in the actual
problem. This is different from the approach with real physarum, where this
was abstracted [12]. These points were
randomly generated within a circular
area, with the condition that they must
be at least 25 pixels apart. This guarantees that the problem is challenging and
that visualizations are clear.
The 10.000 to 15.000 particles were
initialized as a plasmodial sheet [8].
This method involves depositing a single dense sheet of particles around the
nodes.The sheet now covers the area of a
convex hull, the smallest convex polygon
enclosing all nodes, where they are all
on the boundary or interior of the polygon [7]. This ensures no particles are in
completely useless positions. In a system
reminiscent of Conways "Game of Life",
each particle attempts to reproduce when
there are 1-10 particles in a 9x9 neighbourhood, and dies of if there are more
than 80 particles in this neighbourhood.
Initially, many particles will die off. Because the nodes remain attractive, the

David Versluis (3857476)

Figure 8: The initial setup of the shrinking


blob method for solving the travelling salesman problem from Jones & Adamatzky, 2013
[8].

When to halt
In previous research, such as that of Jones
6, the point to stop was hand-picked. For
this solution, a more robust method was
desired. This simulation stops when all
nodes are partially uncovered[8]. Uncovered is defined as the 5x5 windows
around the node containing less than 15
particles. The outer nodes start uncovered. Because the nodes will become uncovered quite some time before the network would have tightened itself into a
pure network of trails (as in figure 6), the
outcome is still a sheet, but a sheet with
a specific shape, whose edge touches all
nodes (figure 9).

Submitted on July 1st , 2016

M ULTI -A GENT L EARNING FINAL PAPER

Figure 9: The final solution after 7102 steps


of the shrinking blob method for solving the
travelling salesman problem from Jones &
Adamatzky, 2013 [8]. This is the same node
setup as figure 8.

Video recordings of the shrinkage process can be viewed at


http://uncomp.uwe.ac.uk/jeff/material_tsp.htm
Solutions
The solution the model gives can be read
from this sheet by taking any node, and
from there following the perimeter of the
sheet clockwise, as depicted in figure 10.
If a path travels through another node
that has already been visited, it is ignored
the second time.

managed to produce paths that were, on


average, 33.8% longer than the exact minimum [12]. This is especially remarkable
because the real slime mold only had 8
cities to chose from, 2520 different paths,
while the model had 20 cities, around 60
quadrillion paths! Despite this increase
in performance, it is still far inferior to
a typical TSP solver, which can compute
better tours faster and without the need
for manual calculation of the results [8].
How

Figure 10: A clarification of the correct reading of the shrinking blob method for solving
the travelling salesman problem from Jones
& Adamatzky, 2013 [8]. This is the same node
setup as figures 8 and 9.

The experiment has been run 10 times


in 20 different data sets. Over these 20
datasets, the mean tour lengths found
with the shrinking blob were only 6.41%
longer than the exact minimum tours.
For comparison: the real slime mold only

Submitted on July 1st , 2016

What makes this blob of particles so good


at solving the problem? The key here is
the models innate minimization and cohesion behavior [8]. This was also visible in the earlier figures, such as figure
6. In the starting situation a number of
cities are already uncovered, and the remaining cities are inserted between these
cities, as the blob retreats and they are uncovered. Concavities form between the
nodes, being influenced both by the covered nodes and the two uncovered nodes
in between which the concavity forms.
In doing so, the shape of the blob moves
from the initial convex hull to a concave
hull, the minimum region "occupied" by
a set of points. As the area decreased,

David Versluis (3857476)

M ULTI -A GENT L EARNING FINAL PAPER

the concavity increases. These concavities balance, slowing but not halting the
growth of each other. If the transformation would not be stopped when a TSP is
created after the concave hull, a network
would then be formed, as in 6
In effect, the method is actually quite
similar to some algorithmic solutions,
starting with a path between several
cities, and inserting cities between others in the tour based on their cost [8].
The distances do not need to be explicitly considered as in these algorithms, because their distances in the environment
already represent it (i.e. it is a Euclidean
TSP). An important distinction from such
an algorithm is the repeatability, due to
some stochastic factors the model does
not always have the same output for the
same input.
There are also some other factors
that make this model a competent solver.
By creating the tour, the shrinking blob
goes along part of the Toussaint hierarchy, from more to less connected graphs
[8]. The authors think this may represent a tradeoff mechanism between foraging efficiency, i.e. having many links,
and transport efficiency, i.e. having only
the most efficient links. The sheet performs this by gradually moving to a concave hull from the larger convex hull
shape, and then on to a network. The
sheet approach also does not allow for
paths to cross, which causes more efficient solutions: crossing paths produce
non-optimal tours [8][4].

Alternative
As mentioned, there are also several
other methods to model slime molds,
and Physarum polycephalum in particular. One of these methods is that of Qian
et al, which combines Ant Colony systems (ACS) with a Physarum network
model [10]. This model uses an ACS
that is capable of solving the travelling
salesman problem, and enhances it with

David Versluis (3857476)

Physarum network features to increase


the convergence rate and local optimums.
It does not use discrete particles, but
models Physarum as a network of pipes.
First, the ACS component, which is based
on the behavior of ants indirectly communicating with pheromone trails [3].
To solve the TSP the ACS uses a number of ants leaving from each city, travelling to other cities. An ant does not
visit cities it has already visited, and is
more likely to go to closer cities. This
way, each ant completes a tour of the
cities. The best (i.e. shortest) tour is then
chosen, and the paths of this tour filled
with pheromone. This means that future
ants are more likely to take those paths.
After repeating this multiple times with
new ants, preserving the pheromone, this
eventually converges to good tours (i.e.
it is population-based)It does have some
disadvantages. Primary among these is
that the first few paths have a very large
influence on the final tour, leading to local optimal solutions that are not globally
optimal. By adding a Physarum network
component, Qian et al. seek to diminish
this. They call it a Physarum Network
based Ant Colony System, or PNACS.
The Physarum component is based
on a different vision of the slime
mold. Here, it is modelled by a network of pipelines between nodes, which
can strengthen or weaken, to allow
more or less pheromone (i.e.
protoplasm/chemoattractant) to flow [10].
Normally only nearby nodes are connected to each other, but in Qian et al.s
implementation all nodes start off connected to all other nodes, and most of
these connections die off (figure 11 ). This
causes the most efficient pipelines to stay
strong, which means they contain more
pheromone and will guide the ants more.
This modelling approach simulates the
protoplasm distribution and the die-off
of dead ends that Physarum shows, but
does not simulate the exploratory behaviour, as the particle-based model

Submitted on July 1st , 2016

M ULTI -A GENT L EARNING FINAL PAPER

does.

Figure 11: The initial and final network in a


PN model. From Qian et al. [10]

While exact mathematics of updating


weights is too complex to fully explain
here, iteratively calculating the ant movements and liquid flow gives a clear optimized solution, faster than a plain ACS
model [10]. Testing was performed with
17, 29 and 30 cities. In each, the PNACS
was superior to the ACS, in both tour
length and number of iterations needed
to converge [10]. PNACS was also capable of choosing the best solution in various situations where ACS was unable to
do so. However, the computational cost
is larger, due to the additional weight of
calculating Physarum flow.

with tour lengths 6.41% longer on average in a 20-city TSP [8]. In speed, the
exact relation between the models is unclear. The authors of the PNACS do emphasize the relative speed, which is faster
than ACS with few cities, while Joness
model requires manual human observation to determine that tour, which drastically slows it down. However, PNACS is
never compared to non-ACS TSP solvers
such as the Concorde that Joness model
is compared to, so the absolute quality is
hard to determine.
Regardless, it should be emphasised
that outright performance was not considered the goal of the model by Jones,
and that it is mostly a proof of concept,
and a demonstration of complex solving behaviour from simple components.
Similarly the real Physarum was made
to solve the TSP to further examine its
usage as a computing substrate, not to
create a better TSP solver.

Conclusion
Discussion
How do the two modelling methods compare to each other, and to typical TSP
solvers? This question is surprisingly
difficult to answer. There is no single
generally accepted way to analyse a TSPsolver, so all three TSP solvers discussed
here (the real physarum and the two
models) are actually solving slightly different problems. However, some general
observations about their relations can
be made. Firstly, the natural physarum
clearly performs quite poorly, compared
to the models. In a 17-city TSP the
PNACS found the absolute best solution
in 100% of the attempt, and also finds the
shortest possible tour in a 29-city problem in 58% of the attempts [10]. The
real physarum found solutions that were
on average 33.8% longer in the eightcity TSP [12], which is clearly an inferior
performance.The performance of Joness
particle model seems to be intermediary,

Submitted on July 1st , 2016

The natural behaviour of Physarum Polycephalum and two models in producing solutions for the travelling salesman
problem have been described. All are
shown to be capable of creating solutions
to the travelling salesman problems that
are far better than random chance. However, while the natural organism shows
interesting behaviour, it is not capable of
solving the travelling salesman problem
without guidance. Even with guidance,
the solutions are quite suboptimal. The
models are capable of organically solving
it, and perform much better. The model
by Jones performs worse than traditional
solvers, but is an interesting example of
emergent solving behaviour from simple
autonomous agents. The model by Qian
performs better than a typical ACS under certain conditions, but is more computationally intensive, and does not feature the same emergent behavior as the
other model. In conclusion, modelled

David Versluis (3857476)

M ULTI -A GENT L EARNING FINAL PAPER

Physarum is an interesting way of solving the travelling salesman problem, but


not, or not yet, competitive with existing
solvers.

Bibliography
[1] Adamatzky, A. (2009). Developing
proximity graphs by Physarum
polycephalum: Does the
plasmodium follow the Toussaint
hierarchy?. Parallel Processing
Letters, 19(01), 105-127. [p4]

[7] Jones, J. (2011). Influences on the


formation and evolution of
Physarum polycephalum inspired
emergent transport networks.
Natural Computing, 10(4), 1345-1369.
[p2, 3, 4, 5]
[8] Jones, J., & Adamatzky, A. (2014).
Computation of the travelling
salesman problem by a shrinking
blob. Natural Computing, 13(1), 1-16.
[p1, 3, 4, 5, 6, 7, 8]
[9] Laporte, G. (1992). The traveling
salesman problem: An overview of
exact and approximate algorithms.
European Journal of Operational
Research, 59(2), 231-247. [p2, 4]

[10] Qian, T., Zhang, Z., Gao, C., Wu, Y.,


& Liu, Y. (2013). An ant colony
[2] BBC News, Engineers can learn
system based on the Physarum
from slime. (22 January 2010).
network.
In Advances in Swarm
Retrieved from
http://news.bbc.co.uk/2/hi/8473316.stm Intelligence (pp. 297-305). Springer
Berlin Heidelberg. [p7, 8]
[p1]

[3] Dorigo, M., & Gambardella, L. M.


(1997). Ant colony system: a
cooperative learning approach to the
traveling salesman problem. IEEE
Transactions on evolutionary
computation, 1(1), 53-66. [p7]
[4] Flood, M. M. (1956). The
traveling-salesman problem.
Operations Research, 4(1), 61-75.
[p7]
[5] Hornik, K., & Grn, B. (2007).
TSP-Infrastructure for the traveling
salesperson problem. Journal of
Statistical Software, 23(2), 1-21. [p2]
[6] Jaromczyk, J. W., & Toussaint, G. T.
(1992). Relative neighborhood
graphs and their relatives.
Proceedings of the IEEE, 80(9),
1502-1517. [p4]

David Versluis (3857476)

[11] Tero, A., Takagi, S., Saigusa, T., Ito,


K., Bebber, D. P., Fricker, M. D., ... &
Nakagaki, T. (2010). Rules for
biologically inspired adaptive
network design. Science, 327(5964),
439-442. [p1, 2]
[12] Zhu, L., Aono, M., Kim, S. J., &
Hara, M. (2013). Amoeba-based
computing for traveling salesman
problem: Long-term correlations
between spatially separated
individual cells of Physarum
polycephalum. BioSystems, 112(1),
1-10. [p2, 3, 5, 6, 8]
David Versluis
3857476
Utrecht University
The Netherlands
d.m.versluis@students.uu.nl

Submitted on July 1st , 2016

Вам также может понравиться