# Exploration of Swarm Dynamics Emerging from Asymmetry

^{*}

## Abstract

**:**

## 1. Introduction

#### 1.1. Swarm Robotics

#### 1.2. Heterogeneity of Swarm

#### 1.3. Issues to be Addressed

#### 1.4. Past Approaches

- an agent has either active or inactive (passive) state, meaning it is moving and has a recipe in it, or it is staying still and has no recipe, respectively.
- a recipe is transmitted from an active agent to another passive agent when these two agents collide, making the latter active.
- the active agent differentiates at random into either type defined in the recipe.
- the direction of recipe transmission is determined by some competition mechanisms.

#### 1.5. Structure of This Paper

## 2. Basic Algorithm of Swarm Chemistry

- Straying If there are no other agents within its local perception range, steer randomly.
- Cohesion (${c}_{1}$) Steer to move toward the average position of nearby agents.
- Alignment (${c}_{2}$) Steer toward the average velocity of nearby agents.
- Separation (${c}_{3}$) Steer to avoid collision with nearby agents.
- Randomness (${c}_{4}$) Steer randomly with a given probability.
- Self-propulsion (${c}_{5}$) Approximate its speed to its own normal speed.

- R: the perception range to define the size of the neighborhood
- ${V}_{n}$: the ideal speed
- ${V}_{m}$: the maximum speed

Algorithm 1 Kinetic Rules in Swarm Chemistry [9]. Line 2: The set of neighboring agents (i.e., other agents within the local perception range), $\mathcal{N}$ of agent i is found. Lines 3–4: The number of neighboring agents, $\left|\mathcal{N}\right|$, is then calculated. If the set $\mathcal{N}$ is empty, i.e., if there is no agent within its perception range, a random acceleration is set, which means a random straying by the agent. Lines 6–7: Otherwise, the average positions and velocities of nearby particles are calculated, respectively. Line 8: A tentative acceleration is calculated according to the three Boids rules (cohesion, alignment and separation). Lines 9–11: At a given probability ${c}_{4}$, a random perturbation is applied to the tentative acceleration. Line 13: A tentative velocity is calculated by time-integrating the acceleration. Line 14: The tentative velocity is limited to prevent overspeed. Line 15: The speed is approximated to its own normal speed (self-propulsion). Lines 17–20: After the above calculation is complete for all the agents, the velocities and then the locations are updated by time-integration. |

1: for all $i\in $ agents do |

2: $\mathcal{N}\leftarrow \left(\right)open="\{"\; close="\}">j\ne i$ that satisfies $\left(\right)open="|"\; close="|">{\overrightarrow{x}}_{j}-{\overrightarrow{x}}_{i}$ |

3: if $\left|\mathcal{N}\right|=0$ then |

4: $\overrightarrow{a}\leftarrow ({r}_{\pm 0.5},\phantom{\rule{4pt}{0ex}}{r}_{\pm 0.5})$ // Random steering |

5: else |

6: $\left(\right)open="\langle "\; close="\rangle ">\overrightarrow{x}$ |

7: $\left(\right)open="\langle "\; close="\rangle ">\overrightarrow{v}$ |

8: $\overrightarrow{a}\leftarrow {c}_{1}^{i}\left(\right)open="("\; close=")">\left(\right)open="\langle "\; close="\rangle ">\overrightarrow{x}+{c}_{2}^{i}\left(\right)open="("\; close=")">\left(\right)open="\langle "\; close="\rangle ">\overrightarrow{v}$ // Cohesion, alignment and separation |

9: if $r<{c}_{4}^{i}$ then |

10: $\overrightarrow{a}\leftarrow \overrightarrow{a}+({r}_{\pm 5},\phantom{\rule{4pt}{0ex}}{r}_{\pm 5})$ // Random perturbation |

11: end if |

12: end if |

13: ${\overrightarrow{v}}_{i}^{\prime}\leftarrow {\overrightarrow{v}}_{i}+\overrightarrow{a}$ |

14: ${\overrightarrow{v}}_{i}^{\prime}\leftarrow min({V}_{m}^{i}/|{\overrightarrow{v}}_{i}|,\phantom{\rule{4pt}{0ex}}1)\xb7{\overrightarrow{v}}_{i}^{\prime}$ // Limiting overspeed |

15: ${\overrightarrow{v}}_{i}^{\prime}\leftarrow {c}_{5}^{i}({V}_{n}^{i}/|{\overrightarrow{v}}_{i}|\xb7{\overrightarrow{v}}_{i})+(1-{c}_{5}^{i}){\overrightarrow{v}}_{i}^{\prime}$ // Self-propulsion |

16: end for |

17: for all $i\in $ agents do |

18: ${\overrightarrow{v}}_{i}\leftarrow {\overrightarrow{v}}_{i}^{\prime}$ // Update velocity |

19: ${\overrightarrow{x}}_{i}\leftarrow {\overrightarrow{x}}_{i}+{\overrightarrow{v}}_{i}$ // Update position |

20: end for |

## 3. Methods

#### 3.1. Parameter Optimization

#### 3.2. Optimization Flow

## 4. Measures to Quantify the Swarm Dynamics

#### 4.1. What is an Interesting Pattern?

- A certain regular shape or motion pattern is self-organized
- An organism-like pattern is self-organized
- The swarm pattern is deformed as time evolves
- The role of a type alters as time evolves
- Fission and fusion continuously occur

#### 4.2. Importance of Asymmetry

#### 4.3. Fitness Function Candidates

#### 4.3.1. Fitness Function A

#### 4.3.2. Fitness Function B

#### 4.3.3. Fitness Function C

- In-degree (${K}^{-}$): The number of agents that agent i perceives. In other words, how many agents affect the motion of agent i.
- Out-degree (${K}^{+}$): The number of agents that perceive agent i. In other words, how many agents are affected by agent i.

#### 4.3.4. Fitness Function D

#### 4.3.5. Fitness Function E

#### 4.3.6. Fitness Function F

#### 4.3.7. Fitness Function G

#### 4.4. Numerical Examples

## 5. Results

#### 5.1. Summary of Optimization Results and Obtained Recipes

#### 5.2. Evolved Swarm Behaviors

#### 5.2.1. Fitness Function A

#### 5.2.2. Fitness Function B

#### 5.2.3. Fitness Function C

#### 5.2.4. Fitness Function D

#### 5.2.5. Fitness Function E

#### 5.2.6. Fitness Function F

#### 5.2.7. Fitness Function G

## 6. Discussion

#### 6.1. Overview of Results

- Some types have a small perception range R and a large normal speed ${V}_{n}$ (e.g., Type 1 in FF-A, Type 1 in FF-B, Type 2 in FF-C, Types 2 and 3 in FF-F and Type 3 in FF-G). On the contrary, some other types have a large R and a small ${V}_{n}$ (e.g., Type 1 in FF-C, Types 1 and 3 in FF-D, Type 1 in FF-F, Types 1 and 2 in FF-G).
- Similarly, some types have a small cohesion coefficient ${c}_{1}$ and a large separation coefficient ${c}_{3}$ (e.g., Types 1 and 2 in FF-C), and vice versa.
- In FF-E, Types 1 and 3 share the almost identical KPs.

- As the standard deviations are small and the mean values are relatively high (approximately 0.8) in ${c}_{2}$ (aligning coefficient), ${c}_{4}$ (randomness) and ${c}_{5}$ (tendency of self-propulsion), implying that these parameters are almost common and less sensitive to the definition of fitness functions than the other ones.
- On the other hand, diversity is large for R (perception range), ${V}_{n}$ (normal speed), ${V}_{m}$ (maximum speed), ${c}_{1}$ (cohesive coefficient) and ${c}_{3}$ (separating coefficient), implying that these parameters are sensitive to the definition of fitness functions.
- In addition, the mean values of ${c}_{1}$ tends to be large and that of ${c}_{3}$ is small.

#### 6.2. Analysis of Especially Interesting Patterns

## 7. Conclusions

- We have constructed a framework to search higher-scoring swarms using a genetic algorithm. Experimental results showed the possibility of detecting several characteristic and attractive patterns using the proposed quantitative measures and optimization framework.
- Discussing the relationship between the fitness functions and the corresponding swarm behaviors or structures gained by them, we have derived some key points of designing a good function to detect interesting patterns.

- A swarm tends to result in a segregating pattern, which is frequently observed but uninteresting, when one or more type has a too small perception range and a too high speed. Therefore, it is better to choose values for a recipe with a large perception range, a speed which does not overwhelm the perception range. Introducing some terms of limiting into the fitness functions may be effective to prevent an easy breaking of structure.
- Another possibility of avoiding a segregating patterns is making the cohesion force large and the separation force small.
- The asymmetry of information transfer, which is represented by the topological connectivity (used in FFs-D, E and F), is an effective way to characterize the interestingness of heterogeneous swarm patterns.
- The usage of derivative function can help detect a pulsating motion (finding from FFs-D and E). The differential operation is believed to be facilitating quick transitions between high-degree and low-degree states over two successive time steps to be sustained, while preventing from tendency of breaking off. The fitness value would have been low if the degree monotonically increased or decreased. The same discussion might be applied only to the case of using the degrees, but also to some other measuring indices representing the state of system.
- A gradual deformation, which looks lively or like an organism, can be captured by a function form like FF-F, in combination with a long evaluation period which starts at a sufficiently time-elapsed point, because a swarm with quick segregation occurring in the early time steps will not have so large min-max difference at the period of evaluation and eventually its fitness score will be low.

## Supplementary Materials

## Author Contributions

## Acknowledgments

## Conflicts of Interest

## Abbreviations

SC | Swarm Chemistry |

ESC | Evolutionary Swarm Chemistry |

KP | kinetic parameter |

GA | genetic algorithm |

FF | fitness function |

## Appendix A Whole Dynamics for Each Fitness Function

**Figure A2.**Trajectory of agents (FF-A). The semi-transparent dots behind the agents indicate their past positions at the recent 60 time steps. The “×” mark traces the trajectory of swarm centroid.

**Figure A3.**Trajectory of agents (FF-B). The semi-transparent dots behind the agents indicate their past positions at the recent 60 time steps. The “×” mark traces the trajectory of swarm centroid.

**Figure A4.**Trajectory of agents (FF-C). The semi-transparent dots behind the agents indicate their past positions at the recent 60 time steps. The “×” mark traces the trajectory of swarm centroid.

**Figure A5.**Trajectory of agents (FF-D). The semi-transparent dots behind the agents indicate their past positions at the recent 60 time steps. The “×” mark traces the trajectory of swarm centroid.

**Figure A6.**Trajectory of agents (FF-E). The semi-transparent dots behind the agents indicate their past positions at the recent 60 time steps. The “×” mark traces the trajectory of swarm centroid.

**Figure A7.**Trajectory of agents (FF-F). The semi-transparent dots behind the agents indicate their past positions at the recent 60 time steps. The “×” mark traces the trajectory of swarm centroid.

**Figure A8.**Trajectory of agents (FF-G). The semi-transparent dots behind the agents indicate their past positions at the recent 60 time steps. The “×” mark traces the trajectory of swarm centroid.

## References

- Vicsek, T.; Czirok, A.; Ben-Jacob, E.; Cohen, I.; Shochet, O. Novel Type of Phase Transition in a System of Self-Driven agents. Phys. Rev. Lett.
**1995**, 75, 1226–1229. [Google Scholar] [CrossRef] [PubMed] - Vicsek, T. A question of scale. Nature
**2001**, 411, 421. [Google Scholar] [CrossRef] [PubMed] - Schmickl, T.; Stefanec, M.; Crailsheim, K. How a life-like system emerges from a simple particle motion law. Sci. Rep.
**2016**, 6, 37969. [Google Scholar] [CrossRef] [PubMed] - Reynolds, C. Flocks, Herds, and Schools: A Distributed Behavioral Model. Comput. Graph.
**1987**, 25, 25–34. [Google Scholar] [CrossRef] - Murphy, R.R. Disaster Robotics; MIT Press: Cambridge, MA, USA, 2014. [Google Scholar]
- Doursat, R.; Sayama, H.; Michel, O. Morphogenetic Engineering; Springer: Berlin/Heidelberg, Germany, 2013; pp. 191–208. [Google Scholar]
- Sayama, H. Analysis and design of self-organizing heterogeneous swarm systems. In Proceedings of the 2016 Conference on Complex Systems, Amsterdam, The Netherlands, 19–22 September 2016. [Google Scholar]
- Doursat, R.; Sayama, H.; Michel, O. A review of morphogenetic engineering. Nat. Comput.
**1987**, 12, 517–535. [Google Scholar] [CrossRef] - Sayama, H. Robust Morphogenesis of Robotic Swarms. IEEE Comput. Intell. Mag.
**2010**, 5, 43–49. [Google Scholar] [CrossRef] - Sayama, H. Swarm chemistry. Artif. Life
**2009**, 15, 105–114. [Google Scholar] [CrossRef] [PubMed] - Sayama, H.; Wong, C. Quantifying evolutionary dynamics of Swarm Chemistry. In Proceedings of the Eleventh European Conference on Artificial Life (ECAL 2011), Paris, France, 8–12 August 2011; pp. 729–730. [Google Scholar]
- Sayama, H. Morphologies of self-organizing swarms in 3D swarm chemistry. In Proceedings of the Fourteenth InternationAl Conference on Genetic and Evolutionary Computation Conference, Philadelphia, PA, USA, 7–11 July 2012; pp. 577–584. [Google Scholar]
- Sayama, H. Swarm Chemistry Evolving. In Proceedings of the Alife XII Conference, Odense, Denmark, 19–23 August 2010; pp. 32–33. [Google Scholar]
- Sayama, H. Swarm Chemistry Homepage. Available online: http://bingweb.binghamton.edu/sayama/SwarmChemistry/ (accessed on 29 April 2018).
- Sayama, H. Seeking Open-Ended Evolution in Swarm Chemistry. In Proceedings of the IEEE ALIFE 2011, Paris, France, 11–15 April 2011; pp. 186–193. [Google Scholar]
- Sayama, H. Guiding Designs of Self-Organizing Swarms: Interactive and Automated Approaches. In Guided Self-Organization: Inception; Springer: Berlin/Heidelberg, Germany, 2014; pp. 365–387. [Google Scholar]
- Nishikawa, N.; Suzuki, R.; Arita, A. Coordination Control Design of Heterogeneous Swarm Robots by means of Task-Oriented Optimization. Artif. Life Robot.
**2016**, 21, 57–68. [Google Scholar] [CrossRef] - Sayama, H. Four Classes of Morphogenetic Collective Systems. In Proceedings of the Fourteenth International Conference on the Synthesis and Simulation of Living Systems (ALIFE 14), New York, NY, USA, 31 July–2August 2014. [Google Scholar]
- Sayama, H. Behavioral Diversities of Morphogenetic Collective Systems. In Proceedings of the European Conference on Artificial Life 2015, New York, NY, USA, 20–24 July 2015. [Google Scholar]
- Eshelman, L.J.; Schaffer, J.D. Real-coded Genetic Algorithms and Interval-Schemata. Found. Genet. Algorithms
**1993**, 2, 187–202. [Google Scholar] - Palmer, A.R. Animal Asymmetry. Curr. Biol.
**2009**, 19, 473–477. [Google Scholar] [CrossRef] [PubMed] - Palmer, A.R. Symmetry breaking and the evolution of development. Science,
**2004**, 306, 828–833. [Google Scholar] [CrossRef] [PubMed] - Castellani, E.; Ismael, J. Which Curie’s Principle? Philos. Sci.
**2016**, 83, 1002–1013. [Google Scholar] [CrossRef] - Chalmers, A.F. Curie’s Principle. Br. J. Philos. Sci.
**1970**, 21, 133–148. [Google Scholar] [CrossRef] - Kano, T.; Osuka, K.; Kawakatsu, T.; Matsui, N.; Ishiguro, A. A Minimal Model of Collective Behaviour Based on Non-reciprocal Interactions. In Proceedings of the fourteenth European Conference on Artificial Life (ECAL 2017), Lyon, France, 4–8 September 2017; pp. 237–244. [Google Scholar]

**Figure 2.**Already found interesting patterns (recipe names and values were taken from [14] and snapshots were reproduced by the authors). Classification of motions, which will appear again in Table 3, has been added originally in this paper. For animations of these swarms, see Supplementary Material, Video S1.

**Figure 3.**Kinetic interaction between agents (drawn based on [9]). (

**a**) Agent i perceives the positions and the velocities of neighboring agents within its perception range, ${R}_{i}$; (

**b**) Cohesion; (

**c**) Alignment and (

**d**) Separation.

**Figure 4.**(

**a**) The optimization flow with genetic algorithm (GA); (

**b**) The conceptual drawing of blend crossover (BLX-$\alpha $) method.

**Figure 5.**Two extreme swarm patterns we consider as example swarms which seem uninteresting. (

**a**) The first pattern “S0a” is a simple aggregating pattern, where the agents only gather into a sphere-like structure without changing its shape. (

**b**) Another pattern “S0b” is a simply segregating pattern, where the agents just wander randomly and go far from each other without interacting with any others.

**Figure 6.**Definition of in- and out-degrees. (

**a**) An example swarm consisting of 4 agents; (

**b**) Its perception relationship; (

**c**) The in- and out- degrees.

**Figure 7.**The fitness values computed for already found patterns shown in Table 2, according to the proposed fitness functions.

**Figure 8.**Optimization results: the recipes gained using the proposed fitness functions. Each KP is normalized with its upper limit value.

**Figure 9.**Different motions observed in the FF-A. (

**a**) While the aggregation size of yellow agents is small, they are captured within the “gel-structure” of the grey agents; (

**b**) As soon as the yellow aggregation of agents gathers in number, the aggregation gets out of the gel and goes away.

**Figure 10.**Representative dynamics of the swarm obtained from FF-D. (

**a**) The snapshot at a timestep t; (

**b**) at t + 1; (

**c**) at t + 2; and (

**d**) at t + 3. We can observe a blinking motion: the radii of outer and inner shells increase and decrease in odd and even steps alternately. This is due to the attraction and repulsion forces (i.e., cohesion and separation, respectively) are acting.

**Figure 11.**Representative dynamics of the swarm obtained from FF-E. (

**a**) The snapshot at a timestep t; (

**b**) at t + 1; (

**c**) at t + 2; and (

**d**) at t + 3. Similar to the result from FF-D, the same arrangements appear every 2 time steps alternately. The agents of yellow type go back and forth.

**Figure 12.**Representative dynamics of the swarm obtained from FF-F. (

**a**) The snapshot at a timestep t; (

**b**) at t + 10; (

**c**) at t + 15; (

**d**) at t + 35; (

**e**) at t + 40; (

**f**) at t + 60; (

**g**) at t + 75; and (h) at t + 105. The shape continues to deform from an egg-like structure to eventually fission into several aggregations.

**Table 1.**Kinetic parameters (KP) in a recipe to control agent behaviors [9]. Each agent is assigned unique values in its recipe.

KP | Name | Min | Max | Definition | Unit |
---|---|---|---|---|---|

KP1 $\left({\beta}_{1}\right)$ | ${R}^{i}$ | 0 | 300 | Radius of local perception range | Pixel |

KP2 $\left({\beta}_{2}\right)$ | ${V}_{n}^{i}$ | 0 | 20 | Normal speed | Pixel Step${}^{-1}$ |

KP3 $\left({\beta}_{3}\right)$ | ${V}_{m}^{i}$ | 0 | 40 | Maximum speed | Pixel Step${}^{-1}$ |

KP4 $\left({\beta}_{4}\right)$ | ${c}_{1}^{i}$ | 0 | 1 | Coefficient for cohesive effect | Step${}^{-2}$ |

KP5 $\left({\beta}_{5}\right)$ | ${c}_{2}^{i}$ | 0 | 1 | Coefficient for aligning effect | Step${}^{-1}$ |

KP6 $\left({\beta}_{6}\right)$ | ${c}_{3}^{i}$ | 0 | 100 | Coefficient for separating effect | Pixel${}^{2}$ Step${}^{-2}$ |

KP7 $\left({\beta}_{7}\right)$ | ${c}_{4}^{i}$ | 0 | 0.5 | Probability of random steering | − |

KP8 $\left({\beta}_{8}\right)$ | ${c}_{5}^{i}$ | 0 | 1 | Tendency of self-propulsion | − |

FF | Meaning | Explicity of Aymmetry | Asymmetry Type | Dynamicity |
---|---|---|---|---|

A | Typewise centroid deviation | Explicit | Positional | Static |

B | Variation of pairwise distance | |||

C | In-/out-degree difference | Topological | ||

D | Derivative of in-/out-degree difference | Dynamic | ||

E | Sum of derivatives of in-/out-degrees | |||

F | Fluctuation of in-/out-degree difference | |||

G | Max. Lyapunov exponent ${\lambda}_{\mathrm{max}}$ | Implicit |

Category | Kind of Motion | Swarm No. |
---|---|---|

G1 | Aggregating | S0a |

G2 | Segregating | S0b, FF-A, FF-B, FF-C, FF-G |

G3 | Reciprocating | S1, S8, S13 |

G4 | Rotating | S5, S11, S17 |

G5 | Tracting | S3, S4, S6, S7, S14 |

G6 | Pulsating | S10, FF-D, FF-E |

G7 | Clustered | S2, S9, S12 |

G8 | Cell-like | S15, S16 |

G9 | Viscous interfacing | FF-F |

© 2018 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Nishikawa, N.; Suzuki, R.; Arita, T.
Exploration of Swarm Dynamics Emerging from Asymmetry. *Appl. Sci.* **2018**, *8*, 729.
https://doi.org/10.3390/app8050729

**AMA Style**

Nishikawa N, Suzuki R, Arita T.
Exploration of Swarm Dynamics Emerging from Asymmetry. *Applied Sciences*. 2018; 8(5):729.
https://doi.org/10.3390/app8050729

**Chicago/Turabian Style**

Nishikawa, Naoki, Reiji Suzuki, and Takaya Arita.
2018. "Exploration of Swarm Dynamics Emerging from Asymmetry" *Applied Sciences* 8, no. 5: 729.
https://doi.org/10.3390/app8050729