You are on page 1of 9



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

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

and a single organism. second. taking as short a route as possible [9](more information in the sidebar). is probably the most well known and most widely studied combinatorial optimization problem [9] [5]. but this basically means that there is no known way to solve it in polynomial time. In a lab situation. the slime mold picks an order without picking the same city twice. [9]. this is usually done with oat flakes [11]. but also approximate solutions to classic problems from computer science. like a engineer might avoid hilly terrain. The Travelling salesman problem.g city A has lanes A1. As we shall see. This order is. what is a slime mold? In this species. up to last). this is David Versluis (3857476) . with extensive guidance. Physarum polycephalum does not divide itself in two when two food sources are available. emanating from the circular area it was inhabiting (figure 2). This movement is accompanied by shuttle streaming. to reach food sources. a mature slime mould consists of a single cell containing many nuclei distributed across its cell. where a sales- man has to visit a number of locations in whatever order he chooses. slime molds can and do move. or TSP. an 8-city travelling salesman problem was used[12]. where the protoplasm moves back and forth within the plasmodium. such as the one that produced the Tokyo railway network. at certain distances to each other. this approach encounters some problems. This can even be done with many more than two food sources. Each city has 8 lanes. and then return home. and that finding such a way would have massive implications for computer science. 2016 with some "guiding" of the slime mold. Foremost among these is the well-known travelling salesman problem. consuming both simultaneously. However. better than around 80% of possible orders. Besides the obvious usefulness for vehicle routing. While it is not an animal. around 30 cm in diameter. Physarum polycephalum. and so preferably avoids the higher illumination. by illuminating areas at higher elevation. on average. It consists of a map of cities. But first. The slime mold was presented with 64 different lanes. By guiding the slime mold with different amounts of light in each lane. combined Submitted on July 1st . and dedicated TSP solvers are available [5]. the true slime mold [7][11]. The TSP has been proven to be an NP-hard and NP-complete problem [9]. To approximate a solution to the travelling salesman problem with the slime mold. up to A8. for visiting the city first. A2. This food source. based on recurrent neural network dynamics. one for each possible visitation order (e.2 M ULTI -A GENT L EARNING FINAL PAPER Introduction The organism used to recreate the railway network was Physarum polycephalum. is capable of approximating solutions to this problem[12]. The specifics are too complicated to go into here. produced the network. slime mold models might be more suited for it. Physarum dislikes bright illumination. One such path is called a "tour". it can stretch itself between the two. known as a plasmodium. Because of these. It has not only produced railway networks. solutions to the TSP can be used in subjects as diverse as efficient wallpaper cutting and optimal dartboard design. This plasmodium can grow quite large. Solutions can nonetheless be found. Instead. Because it is a single cell. 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).

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). This is the same chemoattractant that represents the food nodes. so that it can be sensed weakly from some distance. the sensors do not distinguish between the two. and to better understand its functioning. We will focus on the two methods that have been shown to solve the TSP. After deciding on turning. The chemoattractant diffuses throughout the environment as time progresses. 2011 [7]. For these reasons. but does not even approximate a solution. The first of these is a specific particle-based model by Jones [7]. Jones models Physarum polycephalum with a population of discrete autonomous particles. towards the highest concentration of chemoattractant. taking around 80 minutes to create a single solution. models of Physarum polycephalum have been developed. and Physarum polycephalum in particular. right. There are also some other problems with this setup. each particle attempts to move forwards a single pixel along its new heading. with some notes. it moves there. 2013 [12] 3 Modelling the TSP with Physarum Multiple ways to model slime molds. If the chosen location is unoccupied. Each city has eight lanes. From Zhu et al. With saline soaked thread the plasmodium As the particles move. they leave can form into a rough circle. Each particle represents a unit of protoplasm. while the others are offset to the left and right at a fixed sensor angle (SA).consisting of a central point and three chemoattractant sensors offset at a fixed distance (figure 4). chemoattractant behind. and deposits chemoattractant. and the chosen lanes determines when the city is visited. only visiting each city once. They will cause particles behind them on similar paths to David Versluis (3857476) Submitted on July 1st . have been developed. Figure 3: An attempt to let natural physarum create a solution to the travelling salesman Figure 4: A single particle. Plasmodium is guided with light to create a functioning path. These allow for the slime mold paradigm to be applied to problems much easier and faster. such as the plasmodium growing quite slowly. each particle uses these sensors to determine whether to turn left. from Jones. problem by Jones & Adamatzky. 2016 . Each cycle of simulation. Figure 2: Physarum-based computing for an 8-city travelling salesman problem. One is always aimed "forwards". 2013[8]. or not at all.

modelling it in this way gives excellent results. as well as the intermediate stages to such a solution. Of course. 2011 [7] third from Adamatzky. This is true for both the final solution of many graph problems. First two from Jones. a number of increasingly connected types of graphs. thus dispersing them. Yet. minimum complexity approach” — Jeff Jones • Andrew Adamatzky [8] Submitted on July 1st . they do not deposit anything either. and can only sense forwards. We will now look at the solutions produced for the NP-hard TSP [9]. Both the model and the real physarum develop the relative neighbourhood graph (Figure 7). 2008[1] Figure 6: Using a virtual plasmodium to create a complex network. 2011 [7] Figure 7: The real Relative neighboorhood graph. this is not the most biologically accurate modelling of the slime mold. It approximates the relative neighbourhood graph that would be produced from these points. from Jones. These graphs are an interesting result. Secondly. It does not actually consist of such independently functioning entities. From Jones. Over time. One might expect that the particles would only form a dense sheet of matter around the food nodes.4 M ULTI -A GENT L EARNING FINAL PAPER converge to their path. This means very-high density areas will have less chemo-attractant than surrounding lower density areas. the particles always attempt to move forwards. for two reasons. particles only deposit chemoattractant if they actually move. The prime example is the Toussaint hierarchy. but they are also quite easy to compute normally [6]. but in practice this does not occur. along which particles move in both directions (figure 5). that are also very similar to those found when using the real Physarum. 2016 David Versluis (3857476) . one produced with the model of Jones. the trails ultimately form between the food nodes (an example in figure 6). 2011 [7]. Firstly. trails of chemoattractant are formed. This makes it hard to stay around one point. “A material-based. although the model continues down the hierarchy towards less connections. Figure 5: A particle flow trail with bi-directional movement with Jones’s physarum model. where connections are based upon distance and some definition of "neighbourhood" [6]. If their move is blocked by another particle. and physarum grown on a similar distribution of points. while the real physarum travels up the hierarchy somewhat. Because the particles are also attracted to the chemoattractant from food nodes.

The 10. However. 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). and halting conditions must be determined. All this leads to the setup shown in figure 8. but a sheet with a specific shape. This simulation stops when all nodes are partially uncovered[8]. the outcome is still a sheet. especially when it comes to shrinking and halting. whose edge touches all nodes (figure 9). Submitted on July 1st . many particles will die off. this is not suitable for solving the travelling salesman problem. and in most of the graph problems described previously. a population is inserted into an area with food. For this solution. and it is ensured that the sheet maintains one whole and the problem can be solved correctly. While the model does not need to be guided. This ensures no particles are in completely useless positions. and allowed to move into a shape. The outer nodes start uncovered.000 to 15. and dies of if there are more than 80 particles in this neighbourhood. These points were randomly generated within a circular area. Creating the conditions The environment consists of a number of food nodes. it does need to be handled more specifically than when creating a relative neighbourhood graph. a more robust method was desired. This is different from the approach with real physarum.000 particles were initialized as a ’plasmodial sheet’ [8]. The location in the environment of the food node represents its actual location. From this situation the simulation can begin. the point to stop was hand-picked. the smallest convex polygon enclosing all nodes. where this was abstracted [12]. with the condition that they must be at least 25 pixels apart.The sheet now covers the area of a convex hull. This method involves depositing a single dense sheet of particles around the nodes. We saw how the real Physarum needed additional guidance.M ULTI -A GENT L EARNING FINAL PAPER Solving the TSP When using real Physarum. the David Versluis (3857476) Figure 8: The initial setup of the shrinking blob method for solving the travelling salesman problem from Jones & Adamatzky. 2016 . 5 particles remain around the nodes and in the area between them. Each represents a city. Because the nodes remain attractive. each particle attempts to reproduce when there are 1-10 particles in a 9x9 neighbourhood. Initially. Uncovered is defined as the 5x5 windows around the node containing less than 15 particles. 2013 [8]. By also allowing the particles to divide any holes or tears in the sheet will be patched. where they are all on the boundary or interior of the polygon [7]. so that the distance of two food nodes is the distance between them in the actual problem. This guarantees that the problem is challenging and that visualizations are clear. In a system reminiscent of Conway’s "Game of Life". When to halt In previous research. such as that of Jones 6.

The experiment has been run 10 times in 20 different data This is especially remarkable because the real slime mold only had 8 cities to chose from. on average. it is ignored the second time. it is still far inferior to a typical TSP solver. This is the same node setup as figures 8 and 9. as the blob retreats and they are uncovered. being influenced both by the covered nodes and the two uncovered nodes in between which the concavity forms. which can compute better tours faster and without the need for manual calculation of the results [8]. As the area decreased. managed to produce paths that were. and from there following the perimeter of the sheet clockwise. the mean tour lengths found with the shrinking blob were only 6. If a path travels through another node that has already been visited.htm Solutions The solution the model gives can be read from this sheet by taking any node. Over these 20 datasets. How Figure 10: A clarification of the correct reading of the shrinking blob method for solving the travelling salesman problem from Jones & Adamatzky. such as figure 6. the minimum region "occupied" by a set of points. while the model had 20 cities. and the remaining cities are inserted between these cities. In the starting situation a number of cities are already uncovered. around 60 quadrillion paths! Despite this increase in performance. Concavities form between the nodes. This was also visible in the earlier figures. 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]. In doing so. Video recordings of the shrinkage process can be viewed at http://uncomp. This is the same node setup as figure 33. 2520 different paths. as depicted in figure 10. the shape of the blob moves from the initial convex hull to a concave hull.8% longer than the exact minimum [12]. David Versluis (3857476) .41% longer than the exact minimum tours.6 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]. 2013 [8]. For comparison: the real slime mold only Submitted on July 1st .

2016 . and transport efficiency.e. having many links. The sheet performs this by gradually moving to a concave hull from the larger convex hull shape. An important distinction from such an algorithm is the repeatability.e. having only the most efficient links. there are also several other methods to model slime molds. and the paths of this tour filled with pheromone.e. i. and most of these connections die off (figure 11 ). as the particle-based model Submitted on July 1st . preserving the pheromone. protoplasm/chemoattractant) to flow [10]. The sheet approach also does not allow for paths to cross. By adding a Physarum network component. This means that future ants are more likely to take those paths. which combines Ant Colony systems (ACS) with a Physarum network model [10]. seek to diminish this. It does not use discrete particles. the shrinking blob goes along part of the Toussaint hierarchy.e. and inserting cities between others in the tour based on their cost [8]. to allow more or less pheromone (i. but does not simulate the exploratory behaviour. because their distances in the environment already represent it (i. Alternative As mentioned. but in Qian et al. it is a Euclidean TSP).’s implementation all nodes start off connected to all other nodes. and is more likely to go to closer cities.e. They call it a Physarum Network based Ant Colony System. i. the ACS component. which is based on the behavior of ants indirectly communicating with pheromone trails [3]. Primary among these is that the first few paths have a very large influence on the final tour. One of these methods is that of Qian et al. If the transformation would not be stopped when a TSP is created after the concave hull. This model uses an ACS that is capable of solving the travelling salesman problem. This modelling approach simulates the protoplasm distribution and the die-off of dead ends that Physarum shows. and enhances it with David Versluis (3857476) 7 Physarum network features to increase the convergence rate and local optimums. leading to local optimal solutions that are not globally optimal. or PNACS. Here. The distances do not need to be explicitly considered as in these algorithms.e. the method is actually quite similar to some algorithmic solutions. First. To solve the TSP the ACS uses a number of ants leaving from each city. a network would then be formed. The best (i. which causes more efficient solutions: crossing paths produce non-optimal tours [8][4]. An ant does not visit cities it has already visited. The Physarum component is based on a different vision of the slime mold. due to some stochastic factors the model does not always have the same output for the same input. travelling to other cities. There are also some other factors that make this model a competent solver. it is population-based)It does have some disadvantages. this eventually converges to good tours (i. These concavities balance. but models Physarum as a network of pipes. each ant completes a tour of the cities. After repeating this multiple times with new ants. which means they contain more pheromone and will guide the ants more. starting with a path between several cities. Qian et al. it is modelled by a network of pipelines between nodes. Normally only nearby nodes are connected to each other. shortest) tour is then chosen. This causes the most efficient pipelines to stay strong.M ULTI -A GENT L EARNING FINAL PAPER the concavity increases. This way. and Physarum polycephalum in particular. slowing but not halting the growth of each other. The authors think this may represent a tradeoff mechanism between foraging efficiency. By creating the tour. which can strengthen or weaken. as in 6 In effect. and then on to a network. from more to less connected graphs [8].

the PNACS was superior to the ACS. but is more computationally intensive. which is faster than ACS with few cities. but is an interesting example of emergent solving behaviour from simple autonomous agents. the exact relation between the models is unclear. which drastically slows it down. faster than a plain ACS model [10].8 M ULTI -A GENT L EARNING FINAL PAPER does. Figure 11: The initial and final network in a PN model. and that it is mostly a proof of concept. Even with guidance. PNACS is never compared to non-ACS TSP solvers such as the Concorde that Jones’s model is compared to. and to typical TSP solvers? This question is surprisingly difficult to answer. the natural physarum clearly performs quite poorly. and perform much better. In a 17-city TSP the PNACS found the absolute best solution in 100% of the attempt. and does not feature the same emergent behavior as the other model. [10] While exact mathematics of updating weights is too complex to fully explain here.41% longer on average in a 20-city TSP [8]. and a demonstration of complex solving behaviour from simple components.The performance of Jones’s particle model seems to be intermediary. The model by Qian performs better than a typical ACS under certain conditions. The real physarum found solutions that were on average 33. However. The authors of the PNACS do emphasize the relative speed. so all three TSP solvers discussed here (the real physarum and the two models) are actually solving slightly different problems. Firstly. In speed. However. with tour lengths 6. In conclusion.8% longer in the eightcity TSP [12]. Conclusion Discussion How do the two modelling methods compare to each other. PNACS was also capable of choosing the best solution in various situations where ACS was unable to do so. modelled David Versluis (3857476) . not to create a better TSP solver. Testing was performed with 17. From Qian et al. in both tour length and number of iterations needed to converge [10]. while the natural organism shows interesting behaviour. Regardless. the solutions are quite suboptimal. it is not capable of solving the travelling salesman problem without guidance. and also finds the shortest possible tour in a 29-city problem in 58% of the attempts [10]. compared to the models. There is no single generally accepted way to analyse a TSPsolver. some general observations about their relations can be made. the computational cost is larger. The model by Jones performs worse than traditional solvers. 2016 The natural behaviour of Physarum Polycephalum and two models in producing solutions for the travelling salesman problem have been described. iteratively calculating the ant movements and liquid flow gives a clear optimized solution. due to the additional weight of calculating Physarum flow. Submitted on July 1st . All are shown to be capable of creating solutions to the travelling salesman problems that are far better than random chance. so the absolute quality is hard to determine. Similarly the real Physarum was made to solve the TSP to further examine its usage as a computing substrate. The models are capable of organically solving it. which is clearly an inferior performance. In each. 29 and 30 cities. However. it should be emphasised that outright performance was not considered the goal of the model by Jones. while Jones’s model requires manual human observation to determine that tour. However.

& Adamatzky. 53-66. A. 112(1). (2013). 1-21. 6. 80(9). & Grün... (1997).m. 5. Computation of the travelling salesman problem by a shrinking blob. Proceedings of the IEEE.. 4. In Advances in Swarm Retrieved from http://news. Bebber. 8] David Versluis 3857476 Utrecht University The Netherlands d. S. G. M. Gao. D. network. W.uu. BioSystems. A.. Relative neighborhood graphs and their relatives. or not yet.. C. Engineers ’can learn system based on the Physarum from slime’.. 5] [8] Jones. 327(5964). T. Springer Berlin Heidelberg. Ito. K. Zhang. M. Operations Research. Amoeba-based computing for traveling salesman problem: Long-term correlations between spatially separated individual cells of Physarum polycephalum. (1992). (2014). 1345-1369.. TSP-Infrastructure for the traveling salesperson problem. Kim. (22 January 2010). (2011). & Toussaint. 8] [9] Laporte. K. [p2] [6] Jaromczyk. Takagi. T. [p7] [4] Flood. IEEE Transactions on evolutionary computation. J.. Ant colony system: a cooperative learning approach to the traveling salesman problem. M. (1992). L. (2007). (2013). & Liu. S. 2] [12] Zhu. Saigusa. 105-127. 4] [10] Qian. Natural Computing. T. but not. [p2. Influences on the formation and evolution of Physarum polycephalum inspired emergent transport networks. (1956).versluis@students.. Fricker. [p4] David Versluis (3857476) [11] Tero. 1-10. Bibliography [1] Adamatzky.... 13(1). (2010). Parallel Processing Submitted on July 1st .. 3. 5. Z. B. M. Y. An ant colony [2] BBC News. M. 231-247. Natural Computing. Journal of Statistical Software. 297-305). 1-16. [p1.stm Intelligence (pp. & Hara.M ULTI -A GENT L EARNING FINAL PAPER Physarum is an interesting way of solving the travelling salesman problem. Developing proximity graphs by Physarum polycephalum: Does the plasmodium follow the Toussaint hierarchy?. [p1. Aono. Y. J. competitive with existing solvers. [p7. & Nakagaki. T.. Science. Rules for biologically inspired adaptive network design. 4. [p7] [5] Hornik.. 59(2). . P. The traveling salesman problem: An overview of exact and approximate algorithms.. 2016 . The traveling-salesman problem. 61-75. M. 10(4). 19(01). [p4] 9 [7] Jones. 3. J. A. 7. & Gambardella. (2009). Wu. M. D. 4(1). L. 23(2). European Journal of Operational Research. 6. 439-442. 8] [p1] [3] Dorigo. [p2. [p2.. 3. 1(1).