A Hexagonal Cell Automaton Model to Imitate Physarum Polycephalum Competitive Behaviour

Slime mould (Physarum) may not have brains, but they are capable of solving many significant and challenging problems. Existing models for studying the intelligent behaviour of Physarum have overlooked its foraging behaviour under competitive settings. In this research, we propose a new model based on Cellular Automata (CA) and Reaction Diffusion (RD) system, where multiple Physarum interact with each other and with their environment. The novelty of our model is that the Physarum has six neighbours at equidistant (hexagonal CA), furthermore, we have extended the model to 3D and multi-dimensional CA grid. The growth of Physarum is determined by the balance between attraction force towards food resources (determined by mass and quality) and repulsion forces between competing Physarum according to their power (mass) and hunger motivation. To validate this model, numerical experiments were conducted. Physarum with more mass succeeded in engulfing a larger number of food resources with high quality in shorter time (number of iteration). It also occupied larger area of the grid (territory) and excluded its competitors. We also conducted empirical analysis to compare the time complexity between the hexagonal and Moore neighbourhood, and it showed that hexagonal neighbourhood is more efficient than Moore in terms of computational cost. To the best of our knowledge, we are the first to present Physarum in competition mathematical model and the algorithms inspired from such a model has demonstrated its promising performance in solving several real world problems such as mobile wireless sensor networks, and discrete multi objective optimization problems.


Introduction
Swarm intelligence is one of the most interesting topics dealing with the collective behaviour of decentralized and self-organized systems. It consists of a population of simple agents which can communicate locally with each other and to their local environment. These interactions can lead to the emergence of very complex global behaviour (Tan and Shi, 2017). A variety of swarm intelligence algorithms for optimization problems such as particle swarm optimization (Eberhart and Kennedy, 1995), ant colony optimization (Dorigo et al., 1996), Artificial Bee Colony (ABC) (Karaboga and Basturk, 2007) have been developed with increasingly wide applications in real-world.
In recent years, cellular computational models based on single cellular organisms function, become an important branch of biology-inspired computing; Bacterial colonies (Kim et al., 2007) and Physarum Polycephalum (Slime mould) (Adamatzky, 2010) are examples. Just like social insects and animals, Physarum too exhibits swarm intelligence; it shares many features of collective behaviour such as synchronization, communication, positive feedback, leadership, and response thresholds (Reid and Latty, 2016). The primitive intelligence of Physarum polycephalum is mostly demonstrated during its plasmodium stage (a giant amoeba-like multi-nucleated single cell). Physarum senses gradients of chemo attractants and repellents and forms a mycelial yellowish vascular network in search of nutrition (Cavender, 1995). The Physarum foraging behaviour consists of two simultaneous self-organized processes of expansion (exploration) and shrinkage (exploitation) (Nakagaki et al., 2001). Physarum protoplasmic flux is changing in a continuous way with the change of external environmental conditions(chemotaxis, phototaxis and thermotaxis) (Cavender, 1995;Jones et al., 2017). This characteristic allows Physarum to have great potentials in dealing with network graph-optimization problems in dynamic environment.
It has been demonstrated that Physarum is capable of finding the shortest path between two points using a simple heuristic while foraging for food (Nakagaki et al., 2000). This has inspired computer scientists to develop novel, bioinspired algorithms capable of solving many hard problems (Adamatzky, 2010). Much research has confirmed and broadened the range of its computation abilities to spatial representations of various graph problems. Please refer Sun (2017); Zhang et al. (2016b) for more detailed discussions.
In this paper, we present a novel mathematical model to simulate multiple Physarum foraging behaviour in competition settings, based on the trade-offs between their motivation for food, the value of resources (food patch quality), and in the presence of competitors. We assume that the individual skills of competition is more efficient to achieve an optimal balance between exploration and exploration, and fundamental for the process social collaboration and popu-lation diversity. We assume that the individual skills of competition is more efficient to achieve an optimal balance between exploration and exploration, and fundamental for the process social collaboration and population diversity.
The rest of this paper is structured as follows: In Section 2, some related work is reviewed. The novelty of our model is discussed in Section 3, then we proceed to explain our proposed model in Section 4. Numerical examples are given to demonstrate how the proposed model simulate multiple Physarum decision making in competition settings in Section 5. Finally, the paper ends with conclusions and suggestions for further researches.

Mathematical Models
Many mathematical models have been proposed to study the Physarum foraging behaviour, for example the flowconductivity model (Tero et al., 2007), the cellular model (Gunji et al., 2008), the multi-agent model (Jones, 2011), and the shuttle streaming model (Siriwardana and Halgamuge, 2012) are examples. These models were able to solve problems such as finding the shortest path in directed or undirected networks (Zhang et al., 2014), designing supply chain networks (Zhang et al., 2016a), and simulating transport networks (Tsompanas et al., 2015). Up to now these models consider the foraging behaviour when only one Physarum is presented. They did not address the responses of individual Physarum in competition settings, which can lead to the emergence of very complex global behaviour, far beyond the capability of individual Physarum.

Physarum Competitive Behaviour
Competition is generally referred to the negative effects caused by the presence of neighbours, usually by reducing the availability of resources (exploitation-competition). Competition is very important in driving natural selection as a superior competitor can eliminate an inferior one from the area, resulting in competitive exclusion (Hardin, 1960). Imperialist Competitive Algorithm (ICA) (Bernal et al., 2017) and Competition Over food Resources (COR) (Mohseni et al., 2014) are examples of competition algorithms.
There is increasing evidence that simple organisms like Physarum have complex social behaviours including cooperation and competition. Physarum is capable of making complex foraging decisions based on trade-offs between risks, hunger level and food patch quality (Latty and Beekman, 2011). Physarum always initiated foraging behaviour quicker if it was hungry and in the presence of a competitor (Stirrup and Lusseau, 2019). We still do not fully understand how competitive behaviour is integrated in the Physarum decision-making processes in realistic competition settings, so we started by postulating possible heuristics that Physarum might employ in competitive environments.

Model Selection
After reviewing the literature on several models, we have decided to extend Tsompanas et al. (2016) model, which is based on Cellular Automata (CA) and Reaction-Diffusion (RD) system, to simulate the foraging behaviour of Physarum in the presence of competition. However this model needs modification to address new requirements of competition settings.
Why Cellular Automata and Reaction-Diffusion Systems? After Wolfram (1984), CA have received extensive academic interest for their fundamental characteristics and capabilities to effectively simulate physical systems, biological systems, and solving scientific problems (Feynman, 1982). CA can capture the essential features of systems where global behaviour arises from the collective effect of simple components, which interact locally. Gunji et al. (2008) have developed a model based on CA to simulate the motion of Physarum as a local protoplasmic flow system. RD systems are mathematical models which correspond to several physical phenomena. The most common is the change in space and time of the concentration of one or more chemical substances, which causes the substances to spread out over a surface in space. RD systems are naturally applied in chemistry, however, they can also describe dynamical processes of non-chemical nature like in biology (Kondo and Miura, 2010).

Basic Principals for Physarum Mathematical Model in Competition Settings
In the following subsections, we will show how our model differs from the previous model of Tsompanas et al. (2016), which considered only single Physarum foraging behaviour.
Hexagonal Cell Automaton Neighbourhood There are different types of neighbours that can be considered during the experiment design to capture Physarum diffusion direction. Some researchers decided to use four neighbourhood of Von-Neumann ( Fig. 1-A) as in Shirakawa et al. (2015), however diagonal diffusion of Physarum (North East, North West, South East and South West) is longer; but it still can occur with lower probability. Other researchers used eight neighbourhoods of Moore ( Fig. 1-B) as in Tsompanas et al. (2016). For these reasons, we have considered a new model, where Physarum will have six neighbours (hexagonal pattern) (Fig. 2-A) at equidistant. This will allow circular diffusion of Physarum in contrast to the two of the most famous neighbourhood (Von-Neumann neighbourhood and Moore neighbourhood). Furthermore, this hexagonal grid has the densest packing, the 3D voxels are more sphere-like, and has the highest volumetric quotient (Nagy and Strand, 2009).

Modelling Multiple Physarum and Multiple Food
Resources Unlike previous models based on single Physarum, we considered a Physarum competitive behaviour, where a group of Physarum with different power (masses) and motivation (Hunger / Satiety) each having autonomous behaviours react to each other and their own local environment. We also modelled the presence of multiple food resources with different quality.
Attraction / Repulsion Forces affecting Physarum Exploration Unlike previous models which addressed only the attraction force of Physarum towards a food resource, we considered other forces acting on Physarum based on metaheuristics inspired from Physarum behaviour in a competition setting. We assume that competing Physarum will exert repulsion forces on each other which will affect the evolution of the whole system. We created a new formula to compute two forces acting on Physarum: (A) the chemo attraction force based on the combination of chemical mass and chemical quality, and (B) the repulsion negative forces that competing Physarum exert on each other.
Modelling Physarum Shrinkage (Exploitation) We introduced a new rule on the Physarum diffusion process to imitate the natural process of Physarum shrinkage, where if a Physarum cell is not contributing to the path towards food resource for a certain time (number of iterations), the whole Physarum mass is migrated to the nearest neighbour cell contributing to the path of food resource attraction.

The Proposed Physarum Competition Mathematical Model
As stated before, our proposed model is based on CA and RD systems. We will discuss in details in the following two sections the model state and model rules.

Cellular Automaton (CA) Model State
In order to model the Physarum foraging behaviour in competition settings, where a set of Physarum (P = p 1 , p 2 . . . p m ) are competing on a set of Chemicals (food resources) (CHM = chm 1 , chm 2 . . . chm n ). We consider a CA grid in the two-dimensional space, where it is divided into a matrix (X × Y ) of identical hexagon cells, each cell c (i,j) at location (i, j) in the grid has six neighbours as shown in Figure 2-B. Moreover, this CA space can be extended to multi-dimensional hexagonal grids as Hexagonal/Body-Centered-Cubic (bcc) grid using the following definition: Definition 1. Let p = (p(1), p(2), . . . , p(n)) and q = (q(1), q(2), ..., q(n)) be two points in Z n .
These grids are the three-dimensional "equivalent" to the two-dimensional hexagonal grid (Nagy and Strand, 2009).
The state of a cell c t (i,j) at iteration t is described by its type. Initially all cells are empty until it is occupied by food resource and/or Physarum, an obstacle cell (Ex:-Wall), or remain empty (Equation 1). Chemical is defined by its mass and quality while Physarum is defined by its mass and hunger motivation.
where CT (i,j) represents the cell type.

Cellular Automaton (CA) Model Rules
The CA model rules are mainly based on the diffusion equation (Chopard and Droz, 1991) combined with Physarum heuristics in competition settings. These rules are applied on both Physarum's mass to define the exploration of Physarum on the search space and on food resources' mass to define their diffusion over the grid.

Physarum Competition Heuristics
(i) A cell can be occupied by one or more chemical class (Ex:-Food resource) and by at most one Physarum in each cell.
(ii) Chemo attraction forces exerted on Physarum will be a function of food resource (with different mass and quality) and Physarum hunger motivation. If Physarum is satisfied, it would appreciate the quality of chemical rather than the mass, and if it is hungry, vise versa.
(iii) Competing Physarum will exert repulsion forces on each other which will be calculated as negative force.
(iv) When two Physarum are competing for the same cell, the one with higher power (mass) will occupy it.
(v) Food resource engulfed by a Physarum will be excluded, and this Physarum mass will grow at this point according to this food resource quality.
(vi) In the Physarum exploration phase, if the mass of the Physarum is less than a critical value the Physarum will stop diffusing to prevent the Physarum from spreading all over the board (as exhibited by Physarum in real experiments).
(vii) In the Physarum exploitation phase, the Physarum tend to shrink and collect its body mass to move towards resource of attraction.
(viii) Physarum hungry motivation is a parameter that increases with the number of iteration it was unable to find food resource.
(ix) When a Physarum engulfs food resource, it will be satiated (reset hungry motivation), and stop searching for food for a certain time (number of iterations).
CA Diffusion Equations Every cell occupied by chemical at iteration (t) uses the values of its six neighbours cell to calculate the value of the mass at iteration (t + 1). The total chemical mass for a cell c (i,j) at iteration (t+1) is described in Equation 2.
(i,j) defines the diffusion of chemical mass for the next generation (t + 1) at cell c (i,j) . CM t (i,j) is the current mass of the chemical at iteration (t) for cell c (i,j) . CM t (k,l) is the current mass of the chemical at iteration (t) for neighbouring chemical cell c (k,l) . CD is the chemical diffusion coefficient.
C AA (i,j),(k,l) defines whether chemical at cell c (i,j) is available to diffuse towards a neighbouring cell c (k,l) as defined in Equation 3.
C AA (i,j),(k,l) = 0, if CT (k,l) = "OBST ACLE" 1, otherwise (3) Every cell occupied by Physarum at iteration (t) uses the values of its six neighbours cell to calculate the value of the mass at iteration (t + 1). The total Physarum mass for a cell c (i,j) at iteration (t + 1) is described in Equation 4.
where, P M t+1 (i,j) defines the diffusion of Physarum mass for the next generation (t + 1) at cell c (i,j) . P M t (i,j) is the current mass of Physarum at cell c (i,j) . P M t (k,l) is the current mass of neighbouring Physarum at cell c (k,l) . P AA t (i,j),(k,l) defines whether Physarum at cell c (i,j) is available to diffuse towards a neighbouring cell c (k,l) as defined in Equation 5. P D is the Physarum diffusion coefficient. Dif f Limit is the limit which in which the Physarum mass must exceed in order to diffuse. P F is the sum of forces affecting Physarum. P AttF orce (i,j),(k,l) defines the value of attraction forces applied on Physarum at cell c (i,j) coming from its neighbouring cell c (k,l) as defined in Equation 6. P RepF orce (i,j),(k,l) defines the value of repulsion forces applied on Physarum at cell c (i,j) exerted by its neighbouring cell c (k,l) as defined in Equation 7.
P ID (i,j) = P ID (k,l) 0, otherwise (5) where, P ID (i,j) is the ID of the Physarum at cell c (i,j) .
As seen in the equation calculating the Physarum diffusion, there are attraction and repulsion forces affecting the diffusion of Physarum. The attraction forces as described in Equation 6 determines the movement of Physarum towards the chemical (food resource). It is a function which combines chemical (mass and quality) and Physarum motivation (hungry/satiated).
is the weight assigned to the chemical mass that will attract Physarum to it. CM t (k,l) is the current mass of the chemical at iteration (t) for cell c (k,l) . T otal N CM (i,j) is the total summation of chemical mass for the first neighbour of cell c (i,j) . W Q (i,j) is the weight assigned to the chemical quality that will attract Physarum to it. CQ t (k,l) is the current quality of chemical at iteration (t) for cell c (k,l) , where CQ ∈ [0 − 10]; 0: Low quality, 10: High quality. T otal N CQ (i,j) is the total summation of chemical quality for the first neighbour of cell c (i,j) . M AX (CM t (i,j) ) is a function which returns the maximum value of chemical mass among the neighbourhood of cell c (i,j) . P H (i,j) is the hunger motivation of the Physarum, where P H ∈ [0 − 100]; 0:Satiated, 100:Hungry.
The repulsion forces as described in Equation 7 represent the competition between Physarum, in which every Physarum tries to repel other competitors. This function is based on the neighbour Physarum mass of the opposite direction.
if P ID (i,j) = P ID opp(k,l) , where, P M t opp(i,j) is the neighbour Physarum mass of the opposite direction of cell c (i,j) . T otal N P M (i,j) is is the total summation of Physarum

Experimental Results
The core model was implemented in Java with Processing package https://processing.org/ being used for graphical simulation. To validate our model, we have conducted two experiments using the same parameters of diffusion equation as mentioned in Tsompanas et al. (2016) (Table 1). Each experiment was conducted for 100 times to get unbiased results and were statistically analysed using SPSS package.

Experiment (I): Competition and Decision Making
In this experiment design, two Physarum of different masses (high power and low power Physarum) will be competing for multiple (six) food resources placed in a (50×50) hexagonal grid. The aim of the experiment is to show how many food resources are engulfed by the high and low power Physarum and the time (iteration) needed to engulf food resources according to their quality. This experiment has two different competition settings. In the first setting (A), the two competing Physarum will be randomly placed, and the 6 food resources will be randomly placed each having the same quality. In the second setting (B), the two competing Physarum will be placed in the middle of the grid, three food resources with high quality will be placed randomly in the upper part (North field) of the grid, and three food resources with low quality will be placed randomly in the lower part (South field) of the grid. This experiment was also conducted in duplicate, where the two Physarum exchange location to nullify the chance of better location.
The results were statistically assessed using independent samples t-test to compare means, in the first setting (A) of the experiment, it is shown that Physarum of higher mass (power) succeeded in engulfing larger number of food resources (3.71 ± 1.23) versus (2.29 ± 1.23) by Physarum with lower mass (power) with p-value < 0.001. Nearly the same results were obtained in the duplicate experiment after changing the two Physarum location which proved that the distance between Physarum and food resource influence

Experiment (II): Physarum imitation of natural Competition scenario
The aim of the experiment is to show the competition and the interaction between multiple Physarum over limited supply of food resources, and territory. In this experiment, ten Physarum of different masses ranging from 1000 to 10000 were randomly placed over CA grid to compete over six food resources, three of them are of high quality (HQF), Figure 5: Graphical simulation of 10 Physarum foraging behaviour in competition settings after engulfing all food resources, where yellow cells indicate engulfed food resource and the number inside indicates Physarum (ID) engulfed this food resource, white cells indicate empty cells and other coloured cells indicate Physarum and the number inside indicates the ID of the Physarum (ranging from 1 to 10) and their mass range from 1, 000 to 10, 000 respectively. and the other three of low quality (LQF). A graphical simulation of 10 Physarum in competition setting, illustrating food engulfment and territory area, is shown in Figure 5 with video demonstration in this hyperlink https: //youtu.be/oKTGVtanEjE.
In this experiment we have used bivariate correlation (Pearson correlation coefficient) to assess the effect of Physarum power (mass) on the number of food resources engulfed, territory area (number of cells occupied by each Physarum) , and its survival (number of iteration for Physarum to vanish). The results of our experiment showed that Physarum mass significantly correlate with the number of food resources engulfed whether of HQF or LQF with r-value 0.105, 0.102 and p-value < 0.001, 0.001 respectively. Physarum with bigger mass (best competitor) was able to occupy larger territory with r-value 0.249 and p-value < 0.001, and would always exclude its competitors and has longer survival with r-value 0.128 and p-value < 0.001.
Finally, we conducted empirical analysis to compare the computational complexity between hexagonal and Moore neighbourhood. In this analysis, we measured the time complexity using our own defined function that counts the number of execution of the diffusion equation. It showed that hexagonal neighbourhood on average is efficient than Moore neighbourhood by 11%.

Conclusions & Future Work
In this study, we presented complex patterns observed in Physarum polycephalum generated in competition settings. This model is based on Cellular Automata and Reaction-Diffusion system, where the growth of Physarum is the resultant of chemo attraction towards food resources and repulsion forces between competing Physarum. The existing models are based on imitating single Physarum foraging behaviour and it did not address the skills of individual Physarum in competition settings. To the best of our knowledge, this is the first time Physarum will have been simulated in a hexagonal grid, which is more applicable to Physarum natural diffusion in a circular pattern to equidistant cell neighbours.
Experimental results clearly showed that our model was able to simulate Physarum complex competition behaviours, where multiple Physarum compare information on reward (food resources' mass and quality), and negative effects of competing neighbours according to their hunger motivation in order to make correct and adaptive decisions. Physarum with higher mass (best competitor) succeeded in engulfing a larger number of food resources, and was able to occupy larger area of the grid (territory). Also According to the competitive exclusion principle, Physarum less suited (lower mass) to compete for resources will die earlier than strong competitors as measured by number of iterations, which is an important hypothesis in natural selection.
Our model has been proved to be useful in solving multiple origin-destination network optimization problems as in mobile wireless sensor networks (Awad et al., 2019a(Awad et al., , 2018, and discrete multi objective optimization problems (Awad et al., 2019b). This new model will be feasible for biologists to carry out wet-lab experiments for model validation and increasing our understanding of the possible heuristics that Physarum use in complex foraging decisions in competition settings.