Provable selforganizing pattern formation by a swarm of robots with limited knowledge
Abstract
In this paper we present a procedure to automatically design and verify the local behavior of robots with highly limited cognition. All robots are: anonymous, homogeneous, noncommunicating, memoryless, reactive, do not know their global position, do not have global state information, and operate by a local clock. They only know: (1) the relative location of their neighbors within a short range and (2) a common direction (North). We have developed a procedure to generate a local behavior that allows the robots to selforganize into a desired global pattern despite their individual limitations. This is done while also avoiding collisions and keeping the coherence of the swarm at all times. The generated local behavior is a probabilistic local stateaction map. The robots follow this stochastic policy to select an action based on their current perception of their neighborhood (i.e., their local state). It is this stochasticity, in fact, that allows the global pattern to eventually emerge. For a generated local behavior, we present a formal proof procedure to verify whether the desired pattern will always eventually emerge from the local actions of the agents. The novelty of the proof procedure is that it is primarily local in nature and focuses on the local states of the robots and the global implications of their local actions. A local approach is of interest to reduce the computational effort as much as possible when verifying the emergence of larger patterns. Finally, we show how the behavior could be implemented on real robots and investigate this with extensive simulations on a realistic robot model. To the best of our knowledge, no other solutions exist for robots with such limited cognition to achieve this level of coordination with proof that the desired global property will emerge.
Keywords
Pattern formation Emergence Selforganization Formal verification Liveness Safety Robot Swarm1 Introduction
The objective of swarm robotics is to enable several robots to collaborate toward a common goal. The goal of pattern formation, which is when the swarm must form a desired spatial configuration, has been a topic of significant attention with many applications for aerial robots (Achtelik et al. 2012; Saska et al. 2016), underwater robots (Joordens and Jamshidi 2010), satellites (Engelen et al. 2011; Verhoeven et al. 2011), and more. For safety reasons, the behavior should also ensure that collision paths are avoided and that the swarm remains coherent (i.e., the swarm does not break apart into multiple groups). Our principal interest lies in developing a simple behavior to achieve pattern formation with a swarm of robots with extremely low levels of cognition.
One relevant example of an extremely limited robot is miniature quadrotors, henceforth referred to as micro air vehicles (MAVs). They are characterized by low memory and processing capabilities due to their increasingly small size and mass (McGuire et al. 2016). When operating in closed environments, where Global Navigation Satellite Systems (GNSSs) may be unavailable, they should coordinate only using the relative position of their neighbors, of which they may also be unable to discern the identity, as for instance in the system studied by Faigl et al. (2013) or by Stegagno et al. (2016). Furthermore, intraswarm communication may prove itself challenging to achieve in practice and is best kept at a minimum (Hamann 2018). For example, our recent experiments showed how a small group of three MAVs can already begin to suffer from relatively limited rate of communication and growing interference (Coppola et al. 2018; van der Helm et al. 2018). Finally, in our pursuit of a minimalist swarm, we also expect all MAVs to be functionally homogeneous without preallocated tasks. Mesbahi and Egerstedt (2010) refer to this as “assignmentfree.” Accepting all these limitations leads us to robots that have no knowledge of their surroundings except (in what we assume to be a minimal requirement for collaboration) the current relative location of their closest neighbors. The motivation behind this work was thus to determine a local behavior with which a swarm of robots with such minimal knowledge could nevertheless be able to both handle safety critical goals (i.e., collision avoidance and swarm coherence) as well as systematically selforganize into a pattern. Moreover, we aimed for a simple reactive behavior that could be concisely stored and processed even by the least capable of robots.
 1.
the topdown automatic development of local rules from a global goal,
 2.
the bottomup verification of whether the local rules will lead to the desired global goal.
The generated local behavior of the robots is defined by a probabilistic local stateaction map. The local state of a robot is simply a discretized view of its current neighborhood, and the actions are directions that it can move toward. This local stateaction map can easily be developed to simultaneously handle collision avoidance, avoidance of swarm separation, and formation of a desired pattern. The swarm acts entirely stochastically only based on this. All robots have the same stateaction map. As the robots operate using local clocks, any robot can move at any time. When it does, it uses the probabilistic stateaction map to stochastically select its next action out of the available options (with equal probability). The global pattern emerges from this stochastic process once all robots find themselves in local states in which they cannot select any action to move anymore. This stochastic behavior means that the same pattern will be formed in several different ways even when starting from the same initial conditions, and how the pattern is formed is left to the robots. However, although it may not necessarily be important how the goal is reached, it is important that it is reached. This is the reason why we present an automatic verification procedure to verify whether the local behaviors will always eventually lead to the intended higherlevel behavior.
This paper is organized as follows. We first define the problem in Sect. 2. In Sect. 3, we review other solutions to pattern formation and we explain the context and novelty of our contributions. The methodology is then detailed in Sect. 4. Here, we explain how to generate the probabilistic stateaction map and we present the proof procedure to check whether the desired pattern will always eventually emerge. We then perform extensive simulations of an increasing level of fidelity. In this way, we explore different aspects of the behavior, from the more fundamental to the more practical. Specifically, we start with an idealized system operating on a discrete grid in discrete time steps (Sect. 5), moving on to accelerated particles in continuous space, and finally to simulated MAVs with a realistic quadrotor model and sensor noise (Sect. 6). The insights gathered are further discussed in Sect. 7. Finally, Sect. 8 provides concluding remarks and summarizes future research directions.
2 Problem definition, constraints, and assumptions
The problem tackled in this paper is for a swarm of robots to reshuffle into a pattern while avoiding collisions and group separation. In this work, a pattern P is an anonymous spatial configuration of robots on a 2D plane with specific relative positions to one another.^{1} Let \(P_{des}\) be the desired final pattern that the swarm settles in. Considering our interest in robotics, \(P_{des}\) must be achieved while also avoiding collision paths and swarm separation. More formally, we are interested in achieving a behavior that can ensure that the swarm is safe (Definition 1) and live (Definition 2).
Definition 1
The swarm is safe if neither of the following events occurs: 1) a collision between two or more robots, 2) the swarm disconnects into two or more groups.
Definition 2
The swarm is live if, starting from any initial pattern \(P_0\ne P_{des}\), it will always eventually form the desired pattern \(P_{des}\), where the only restriction on \(P_0\) and \(P_{des}\) is that they have a connected sensing topology.
 C1
The robots are homogeneous (all entirely identical).
 C2
The robots are anonymous (they cannot sense each other’s identity).
 C3
The robots are reactive (they only select an action based on their current state).
 C4
The robots are memoryless (they do not remember past states).
 C5
No robot can be a leader or seed.
 C6
The robots cannot communicate with each other.
 C7
The robots only have access to their local state.
 C8
The robots do not know their global position.
 C9
The robots exist in an unbounded space.
 C10
Each robot can only sense the relative location of its neighbors up to a short range.
 A1
The robots all have knowledge of a common direction (i.e., North).
 A2
The robots operate on a 2D plane.
 A3
When a robot senses the relative location of a neighbor, it can sense it with enough accuracy and update frequency to establish if a neighbor is moving or standing still (e.g., hovering).
 A4
\(P_0\), the initial pattern formed by the robots, has a connected sensing topology.

Assumption A1 is a typical assumption in several swarm designs (Ji and Egerstedt 2007; Shiell and Vardy 2016). On real robots, a common direction can be known using onboard sensors such as, but not limited to, a magnetic sensor and/or a gyroscope (Conroy et al. 2005; Oh et al. 2015).

Assumption A2 is representative of ground robots or MAVs flying at approximately the same height.

Assumption A3 deserves a more indepth analysis. For general robotic platforms, relative localization is deemed a fundamental tool for collision avoidance and coordination. Concerning MAVs, for instance, a sufficiently accurate relative localization technology is required if collision avoidance (a basic behavior needed for them to swarm safely) is required. There exist several technologies to achieve relative localization. Pugh et al. (2009) and Roberts et al. (2012) used technology based on infrared (IR) signals. Basiri et al. (2014) introduced an audiobased solution with a microphone array. Faigl et al. (2013) and Roelofsen et al. (2015) proposed visionbased methods relying solely on (one or more) onboard cameras. Coppola et al. (2018) and Guo et al. (2017) explored relative localization sensors based on signal ranging. In this work, we will show that fulfilling Assumption A3 up to a certain extent is paramount to provide safe behavior in spite of all other constraints. In our final simulations, to be found in Sect. 6.3, we will show that in practice the swarm can also function even when the robots are only able to detect movements beyond a certain threshold velocity, rather than if adhering perfectly to the assumption.

Assumption A4 is needed for the entire swarm to begin acting as a collective. If Assumption A4 were violated (and, for instance, the swarm was to begin as two separate groups that cannot sense each other), then it could not ever be expected for the separate groups to find each other in an unbounded space.
3 Related works and research context
Pattern formation is a wellstudied problem in robotics. A review of existing solutions is presented in Sect. 3.1. The swarm treated in this work sets itself apart by its minimalist nature, constraining the knowledge of the robots to only the relative location of nearby neighbors and the North direction. We then discuss the contributions and their context in Sect. 3.2.
3.1 Review of approaches to pattern formation by a swarm of robots
The solutions to pattern formation found in the literature rightfully vary depending on the sensing capabilities of the robots. In this section we review solutions present in the literature, starting from cases where the robots are more knowledgeable of their surroundings to increasingly more minimalist cases more similar to our own (as introduced in Sect. 2).
Several solutions are based on the assumption that each robot in the swarm can directly sense every other robot. In this case, the topology of the swarm is said to be fully connected or complete. This endows each robot with a global view of the swarm. This type of swarm is found to selfstabilize to an equilibrium only by means of attraction and repulsion forces (Gazi and Passino 2004). Izzo and Pettazzi (2005, 2007) showed how the attraction and repulsion forces alone could be tuned such that the swarm stabilizes into a desired pattern. However, the results had two limitations: (1) the swarm can unpredictably form spurious patterns depending on the initial conditions due to the presence of spurious equilibria, (2) they were limited to symmetric patterns. Asymmetry is difficult for a homogeneous noncommunicating swarm to resolve, and it was tackled with the use of neural networks in later work (Izzo et al. 2014; Scheper and de Croon 2016). Formation control algorithms have also been proposed, whereby the robots are allocated positions/distances to achieve and maintain with respect to the other robots (Pereira and Hsu 2008; de Marina Peinado 2016). With this strategy, the swarm will quickly form the desired pattern. However, it is required to specify the necessary interrobot distances/locations without anonymity.
To address that the swarm may not always begin in a fully connected topology, Ji and Egerstedt (2007) and Mesbahi and Egerstedt (2010) proposed the use of a gathering algorithm so that all robots come together prior to initiating the pattern formation task. In several scenarios, however, being in a fully connected topology is simply not viable, and we must accept that the topology of the system is just connected, and not fully connected. For instance, if robots sense each other using onboard cameras or IR sensors, as could likely be the case for MAVs or ground robots, they will be unable to see behind other robots or beyond a certain distance.^{2} Tanner (2004) and Rahmani et al. (2009) showed how to control swarms with a static connected topology, yet when the robots can only sense their closest neighbors, the topology of the swarm will not be static, but it will change depending on the current relative positions. Falconi et al. (2010) showed how to combine local positioning information together with a communication protocol in a consensus algorithm. Similarly to formation control, however, this algorithm requires specifying the formation parameters without anonymity. Another popular solution found in the literature is to use seed robots: these are robots in the swarm that do not move and act as a reference to the other robots. Rubenstein et al. (2014) used this to enable an impressively large swarm of simple robots to form shapes. Four seed robots were manually placed in a crossformation, and the other robots then circled around them and “filled up” the shape. Instead, Wessnitzer et al. (2001) used seed robots to build up patterns in a chainlike fashion, starting from a seed robot that recruits other robots. A seed was also used for a system of selfarranging blocks by Grushin and Reggia (2008, 2010). Here, a static seed block acted as a reference for others to determine their correct relative position (through communication with neighbors), virtually providing them with a global reference albeit while still only making use of local communication. Bonabeau et al. (2000) also studied the rules for the construction of a structure by robots. The robots would begin by placing blocks next to a seed block according to specific rule sets, whereby the blocks could no longer be moved once a robot had placed them. This created a slowly evolving construction. More recently, Werfel and Nagpal (2008) and Werfel et al. (2014) developed and implemented an algorithm in order to coordinate the construction task for a team of robots. This algorithm also relied on the use of a seed block, which the robots could use as a unique shared reference to determine where to place the other blocks. However, in general, the use of a reference (which for pattern formation would be a seed robot) requires that other robots can identify it, which is not the case here given that the robots are all anonymous. Moreover, when they are all functionally homogeneous, no robot can be assigned as the seed. Without communication, they cannot elect one themselves either, as otherwise explored by Yamauchi and Yamashita (2014), Derakhshandeh et al. (2016), and Di Luna et al. (2017), where a swarm could selfelect a leader/seed robot.
We now move to even simpler systems. For homogeneous and anonymous robots with no seeds, Klavins (2002) proposed to encode a pattern as a graph and a collection of its subgraphs. This technique set the way for the use of graph grammars, later developed in Klavins (2007) for selfassembly by a team of robots. The robots randomly drifted in a confined environment and could latch together upon encounter. Once latched, they could communicate their state and determine whether the connection formed a part of the total graph, in which case they would remain attached. Otherwise, they would detach and continue drifting. Using this approach, the pattern would slowly assemble. Similar strategies were studied by Smith et al. (2009), Arbuckle and Requicha (2010), Arbuckle and Requicha (2012), Fox and Shamma (2015). In more recent work, Haghighat and Martinoli (2017) proposed an algorithm for the automatic encoding of such rules for rotationally symmetric modules. However, the local rules used in these studies do not incorporate the additional fundamental constraints of the robots that are studied in this work, namely that the robots cannot: collide, latch together, randomly drift apart, or (most importantly for these algorithms to work) communicate. Without communication it is not possible for the assembly to grow, because the robots are not capable of knowing more than their local state at any point and thus require a different decisionmaking process on the level of the individual agent.
Intraswarm communication is a very powerful tool. It allows robots to share their intentions and their perspectives. It was used in several works that we already discussed and more, including consensus algorithms (Falconi et al. 2010, 2011, 2015), leaderelection algorithms (Di Luna et al. 2017), or bidding algorithms for task allocation (Gerkey and Matarić 2004). More recently, Slavkov et al. (2018) studied how to use a communication architecture to diffuse activation values across the swarm. The swarm could then rearrange itself so as to protrude in regions of high activation values, creating emergent morphologies. Communication can also double as a sensor. Nembrini et al. (2002) and Winfield et al. (2008) used communication to enable a swarm to remain connected even in the presence of obstacles by repeatedly checking for connectivity with the neighbors through a broadcast and listening protocol. In Winfield and Nembrini (2012), the robots communicate their adjacency matrix to one another in order to extend their knowledge beyond what their sensors allow, which is found to increase the coherence performance.
Despite its advantages, considering the practical difficulties in ensuring a highthroughput and reliable intraswarm wireless communication (Hamann 2018; Coppola et al. 2018), we have taken an interest in establishing a behavior that also does not natively require communication, such that it can work even when such hardware is not available. Once even communication is removed, few works, to the best of our knowledge, explore the coordination of a swarm of robots that is as limited as the one presented in this work. Krishnanand and Ghose (2005) developed alignment behaviors by which they could form nonfinite grids and lines. Flocchini et al. (2005) explored the gathering problem, whereby all robots must aggregate together as much as possible. Yamauchi and Yamashita (2013) examined the formation power of very limited agents, but a behavior to achieve the patterns was not developed. This leaves a knowledge gap in the field of minimalist swarming.
3.2 Contributions and research context
 1.
An automatic procedure to extract the local behavior so that a swarm of robots with extremely limited cognition and no communication can form a desired pattern, while also avoiding collisions and maintaining a connected sensing topology.
 2.
An automatic proof procedure to verify whether the set of local rules will always eventually cause the swarm to generate the pattern. We present a primarily local analysis of the behavior which allows to verify that the global pattern can be achieved from any initial pattern \(P_0\). The large advantage of such a local analysis is that it limits the computational explosion of global proof methods.
The final pattern is automatically encoded from the larger pattern within the stateaction map under this rule: if a robot finds itself in a local state that may constitute the global desired pattern, it will not take any action. This eventually gives rise to the pattern once all robots end up in such states. Conceptually, the breakdown of a large pattern into smaller parts resembles graph grammar approaches, as for instance used by Klavins (2007) or Haghighat and Martinoli (2017). In our case, however, the robots cannot communicate and must only use the knowledge that a neighbor is (or is not) there in order to decide their next action. Furthermore, the robots cannot detach and drift freely, which restricts how the swarm can evolve. Overall, this means that the pattern does not slowly assemble, but rather forms by the stochastic (inter)actions of the robots. The phenomenon can only be detected at the macroscale and not by the robots themselves. This behavior is characteristic to emergent processes (Bonabeau and Dessalles 1997), and its complexity is the reason that we also need to verify that our desired pattern is the sole emergent result.
Our verification of the emergent property (i.e., the final pattern) is based on a formal analysis of the swarm, inspired by Winfield et al. (2005). Dixon et al. (2012) and Gjondrekaj et al. (2012) applied this with the use of model checking and demonstrated its potential. However, an issue with model checking is that it performs an exhaustive search of all global states (Clarke et al. 1999) and it is subject to a computational explosion as the size of the swarm grows. Konur et al. (2012) tackled this using macroscopic swarm models. These models efficiently describe the evolution of the swarm by means of one finite state machine (Winfield et al. 2008). However, macroscopic models typically assume that robots are uniformly distributed, or, in general, make probabilistic assumptions about the presence of robots in a given area (Lerman et al. 2001; Prorok et al. 2011). These assumptions may be suitable for more abstract spatial goals, such as aggregation, exploration, or coherence, but they do not apply to pattern formation, which by definition has a strict requirement on the spatial arrangement. To be able to verify the emergent property yet keep the computations low, we focus on a local analysis of the behavior. With this novel analysis, we provide a set of local conditions that, if met, guarantee that the swarm will always eventually selforganize into the desired pattern. Unlike the macroscopic models discussed above, this analysis means that we do not merely assume that there is enough free movement/motion in the swarm, but use the conditions to check that this is in fact the case. With this, we limit the global analysis only to the discovery of spurious patterns. However, this search only needs to be executed on a very restricted subspace, for which we provide a methodology to identify the candidates.
4 Designing and verifying the behavior of the robots
This section describes the design and verification of the probabilistic local stateaction map that dictates the behavior of the robots. We detail how the stateaction map can be crafted such that the swarm will remain safe (Definition 1) and (possibly) also live (Definition 2). As we are dealing with robots with extremely limited knowledge, it can be expected that it is not always the case that both properties can be achieved at the same time. Safety is a hard requirement, but it will naturally restrict the ways in which the swarm can evolve. This could lead the swarm to a livelock.
Definition 3
A livelock is a situation in which the swarm will endlessly transition through a set of patterns (e.g., \(P_0 \rightarrow P_1 \rightarrow P_2 \rightarrow P_0 \rightarrow P_1 \rightarrow P_2 \rightarrow P_0 \dots \)) and cannot transition to any other patterns.
Furthermore, the limited view that the robots have of their surroundings limits the knowledge that they have of the structure, which may cause other (perhaps undesired) patterns to form. We will refer to this situation as deadlock.
Definition 4
A deadlock is a situation in which the swarm forms an undesired pattern \(P\ne P_{des}\), where no robot in the swarm can take action.
We have developed proof procedures to verify that livelocks or deadlocks will not happen. We will provide a set of conditions and checks that, if fulfilled, guarantee that the stateaction map constructed for a given pattern is such that livelocks and deadlocks do not occur, and thus imply that the swarm is safe and live. The stateaction map is developed and verified in a formal domain, assuming robots to be idealized agents existing on a 2D grid and operating in discrete time. Although this may seem restrictive, we will show in Sect. 6 how it can be used on robots operating in a realistic setting. The idealized framework is described in Sect. 4.1, and the method to design the probabilistic stateaction map is detailed in Sect. 4.2. The conditions to prove whether a stateaction map is safe, free of livelocks, and free of deadlocks are provided in Sects. 4.3, 4.4, and 4.5, respectively.
4.1 The formalized framework
Consider N agents (idealized robots) that exist in an unbounded discrete 2D grid. Each robot is endowed with shortrange omnidirectional relative sensors and knowledge of North. In this paper we will focus our attention to robots with omnidirectional sensing and motion capabilities, albeit the concepts presented hold for other state spaces and action spaces as well.
In the idealized case, each agent \({\mathcal {R}}_i\) can sense the location of its neighbors in the 8 grid points that surround it (Fig. 1a). Let \(s_i\) be the current state of agent \({\mathcal {R}}_i\), and let \({\mathcal {S}}\) be the local state space of the agents. It follows that \({S} = 2^8\), as it represents all local combinations of neighbors that could be sensed. To represent omnidirectional motion, the agents are also able to move to any of the 8 grid points surrounding it, as depicted in Fig. 1b. This forms the action space of the agents, denoted \({\mathcal {A}}\). Note that other discretizations of \({\mathcal {S}}\) or \({\mathcal {A}}\) could also apply depending on the sensors and motors available on the robot of interest.
4.2 Developing the probabilistic stateaction map
 1.
be careful (do not take actions that are in collision course with others);
 2.
be social (do not take actions whereby the swarm might locally break apart);
 3.
be happy (when in a desired local state, do not move).
 (a)
are in the direction of a neighbor
These stateaction pairs will lead to collisions (two agents occupying the same grid point). They form the set \({\varPi }_{collision}\).
 (b)
may cause the swarm to become disconnected
These actions will break the local connectivity of the agents (the local neighborhood splits into two or more groups). They form the set \({\varPi }_{separation}\).
 Desired

When in these states, the agent should not move. \({\varPi }_{f}\) does not map these states to any action. Desired states are grouped in the set \({\mathcal {S}}_{des}\).
 Blocked

These are all states in \({\mathcal {S}}{\mathcal {S}}_{des}\) where the agent cannot move because all actions are unsafe. \({\varPi }_{f}\) does not map these states to any action. We group these states in the set \({\mathcal {S}}_{blocked}\).
 Active

These are states that \({\varPi }_{f}\) maps to one or more actions in \({\mathcal {A}}\). We group these states in the set \({\mathcal {S}}_{active}\).
Additionally to the taxonomy above, we also define a set of states as simplicial.^{4}
Definition 5
A simplicial state is a state \(s\in {\mathcal {S}}{\mathcal {S}}_{blocked}\) for which its neighbors form only one clique.
Definition 6
A clique is a connected set of an agent’s neighbors.
Simplicial states are grouped under the set \({\mathcal {S}}_{simplicial}\). All states in \({\mathcal {S}}\) that are not simplicial are denoted \({\mathcal {S}}_{\lnot simplicial}\). From this, it follows that \({\mathcal {S}}_{blocked} \subseteq {\mathcal {S}}_{\lnot simplicial}\). An example of a state that is both simplicial and active is shown in Fig. 4c. By contrast, a nonsimplicial active state is shown in Fig. 4d. An agent in a simplicial state could potentially move without risking that the swarm ceases to be in a connected topology, unlike the nonsimplicial case. Intuitively, agents who happen to be in a simplicial state thus have the potential to travel freely across the swarm and break livelocks. For this reason, simplicial states are going to be an important element to the local proof procedure to determine whether the swarm is free of livelocks, which can be found in Sect. 4.4.
4.3 Verifying safety
Our swarm consists of several agents that can choose to take actions at any point in time. Safety can be guaranteed when agents do not simultaneously perform conflicting actions. To formalize this, we bring forward Proposition 1.
Proposition 1
If the swarm never features more than one agent moving at the same time, then the swarm can remain safe.
Proof
Consider a connected swarm organized into an arbitrary pattern P. At a given time \(t=t_1\), agent \({\mathcal {R}}_i\) decides to take an action based on action space \({\mathcal {A}}\). This action should last until \(t=t_{2}\). However, at time \(t_1<t<t_2\), an unsafe event takes place. It follows that the event must have been the fault of agent \({\mathcal {R}}_i\), because it was the only agent that moved. Therefore, if agent \({\mathcal {R}}_i\) could select only from safe actions, this would be sufficient to guarantee that the swarm is safe at time \(t=t_2\). \(\square \)
Proposition 1 only applies to the idealized system and cannot be implemented on the real system where robots use local clocks. This explains the importance for Assumption A3 from Sect. 2: an agent must know whether its neighbors are executing an action. If then a robot does not move whenever one of its neighbors is moving (on a firstcomefirstserved basis), then the swarm can locally approach the formal requirement of Proposition 1 even if several robots may be moving in different neighborhoods. We will return to this in Sect. 6.
Under the assumption that the conditions of Proposition 1, if \({\varPi }_{safe}\) meets the conditions in Propositions 2 and 3, then the swarm is safe.
Proposition 2
If an agent is the only agent moving in the entire swarm, and \({\varPi }_{safe}\) is such that the agent can only select actions in directions that can be sensed by its onboard sensors, then no collisions will occur in the swarm.
Proof
Consider an agent \({\mathcal {R}}_i\) in a swarm. Following Proposition 1, we know that the agent will be the only agent to move. The agent moves in the environment according to the action space \({\mathcal {A}}\). If all actions in \({\mathcal {A}}\) lead to a location that is already sensed, then agent \({\mathcal {R}}_i\) can establish whether the action will cause a collision, and it can choose against performing these actions. \(\square \)
Proposition 3
If an agent is the only agent moving in the entire swarm, and \({\varPi }_{safe}\) is such that the agent can only select actions where, at its next location, all its prior neighbors and itself remain connected, then the whole swarm will remain connected.
Proof
Consider a connected swarm of N agents. The graph of the swarm is connected if any node (agent) \({\mathcal {R}}_i\) features a path to any other node (agent) \({\mathcal {R}}_j\). Consider the case where agent \({\mathcal {R}}_i\) takes an action. If, following the action, agent \({\mathcal {R}}_i\) is still connected to all its original neighbors, then the connectivity of the graph was not affected. If agent \({\mathcal {R}}_i\) only selects actions where, at its final position, this principle is respected, then it will be able to move while guaranteeing that the swarm remains connected. \(\square \)
4.4 Verifying against the presence of livelocks
We now provide the proof procedure to check that the system can form the patterns and will do so without ending up in livelocks. Let us begin at the global level and define a directed graph \(G_P = (V_P,E_P)\). The vertices \(V_P\) represent all possible patterns that the swarm could generate. The edges \(E_P\) represent all global pattern transitions that could take place whenever one agent in the swarm executes an action from \({\varPi }_f\). Our final objective is to establish whether \({\varPi }_{f}\) is such that \(G_P\) always features a path from any vertex (i.e., an arbitrary initial pattern \(P_0\)) to the global desired pattern \(P_{des}\). If this is the case, then it is proven that livelocks will not occur.
This problem could be tackled by directly inspecting \(G_P\), but an exhaustive computation of \(G_P\) quickly becomes intractable (Dixon et al. 2012). Otherwise, livelocks (if existent) could be found using heuristic search algorithms, as done by Sapin (2010) to find loops (gliders) for Game of Life Cellular Automata. However, should we not find any, then it is not guaranteed that livelocks do not exist. It only means that the heuristic search did not find them. We thus take a different route and extract local conditions that, if respected, also guarantee the global property. Although this comes at the cost of imposing certain local restrictions that may not necessarily be required at the global level, it bears the advantage that they can be verified at the local level and thus independently of the number of robots in the swarm.
In the following analysis, it is assumed that \(P_0\) always has a connected sensing topology (Assumption A4) and that it has \(N_{des}\) agents, where \(N_{des}\) is the number of agents required to form \(P_{des}\). We also assume that deadlocks are not present. This is not required and is merely done for simplicity. The absence of deadlocks can be verified independently by the methodology in Sect. 4.5.
4.4.1 Ensuring motion
We begin by showing that, if no deadlocks are present, then any pattern \(P\ne P_{des}\) will always have at least one agent in an active state, as per Lemma 1.
Lemma 1
For a swarm of \(N_{des}\) agents, if \({\mathcal {S}}_{static}\) is such that the desired pattern \(P_{des}\) is unique (i.e., no deadlocks can occur), any arbitrary pattern \(P\ne P_{des}\) will feature at least 1 agent with a state \(s\in {\mathcal {S}}_{active}\).
Proof
By definition: \({\mathcal {S}}_{static}\cap {\mathcal {S}}_{active}=\emptyset \) and \({\mathcal {S}}_{static}\cup {\mathcal {S}}_{active}={\mathcal {S}}\). For a swarm of \(N_{des}\) agents that can be in states \(s\in {\mathcal {S}}\), \(N_{des}\) instances of states \(s\in {\mathcal {S}}_{static}\) can only coexist into \(P_{des}\), which is known to be the unique outcome. Therefore, it follows that any other pattern must feature at least one agent that is in a state \(s\not \in {\mathcal {S}}_{static}\), meaning that it is in a state \(s\in {\mathcal {S}}_{active}\). \(\square \)
Lemma 1 says that if the swarm cannot be in a deadlock, then it must always have at least one agent that is active, unless \(P_{des}\) forms. Therefore, if we can establish that no livelocks can occur, then we know that the swarm will always eventually selforganize into \(P_{des}\). To do this, we need to analyze the local state transitions that an agent can experience over time.
4.4.2 The local state transition graphs
 Event 1

The agent was in a state \(s\in {\mathcal {S}}_{active}\) and computed an action in \({\varPi }_{f}\). When this happens, some neighbors may disappear from view, while new neighbors may come into view.
 Event 2

The agent did not move, but one of its neighbors did. In this case, the neighbor may also have moved out of view.
 Event 3

The agent did not move, but some other agent which was previously not in view has moved into view and has become a new neighbor.
4.4.3 Local achievability of desired states
As a prerequisite for a pattern to form, we require that \({\varPi }_{f}\) ensures that any local state can experience a local transition to a desired local state. If this is the case, we will say that the pattern is achievable, as defined by Definition 7.
Definition 7
A pattern \(P_{des}\) is achievable if all local states \({\mathcal {S}}_{des}\) can be reached starting from any local state in \({\mathcal {S}}\).
If a pattern is achievable, then there are no restrictions on the local states that can be present in \(P_0\), else there might be certain starting patterns with agents in local states that are unable to transition to certain desired states. This is proven by Lemma 2.
Lemma 2
If the digraph \(G_{\mathcal {S}}^1 \cup G_{\mathcal {S}}^2\) shows that each state in \({\mathcal {S}}\) features a path to each state in \({\mathcal {S}}_{des}\), then \(P_{des}\) is achievable independently of the local states that compose \(P_0\).
Proof
 1.
Any state s that has too few links for a desired state will have to be active and move to a position where it is surrounded by enough agents. It cannot wait for a local desired state to arise by other agents moving in from outside of its neighborhood.
 2.
Any state \(s\in {\mathcal {S}}_{blocked}\) can only become active by the actions of a neighbor.
 3.
The transitions that occur must occur because of changes in the local neighborhood.
By fulfilling the condition of Lemma 2, we ensure that any initial state could potentially turn into a desired state and avoid placing locallevel restrictions on \(P_0\). However, this is still only a local property, and it does not yet fully confirm that, at the global level, \(P_{des}\) will always eventually form from any initial pattern \(P_0\), which is the property that we wish to verify. We continue our analysis in Sect. 4.4.4.
4.4.4 Ensuring the presence of agents with simplicial states
Let \(P_{AS}\) be the set of all patterns where one or more agents are in a state \(s\in {\mathcal {S}}_{simplicial}\cap {\mathcal {S}}_{active}\) (the subscript “AS” stands for “Active and Simplicial”). We wish to ensure a pattern \(P\in P_{AS} \cup P_{des}\) will be reached from any other pattern. This is verified via Lemma 3. In this lemma we also make use of a graph \(G_{\mathcal {S}}^{2r}\subseteq G_{\mathcal {S}}^{2}\), which only considers the transitions in \(G_{\mathcal {S}}^2\) that do not feature a neighbor leaving the neighborhood when moving, but only holds transitions about the agent. We also single out a special state in \({\mathcal {S}}_{blocked}\), which is the one that is fully surrounded by neighbors as in Fig. 4a. We refer to this state as \(s_{surrounded}\).
Lemma 3
 1.
for all states \(s\in {\mathcal {S}}_{static}\cap {\mathcal {S}}_{\lnot simplicial}  s_{surrounded}\), none of the cliques of each state can be formed only by agents that are in a state \(s\in {\mathcal {S}}_{des}\cap {\mathcal {S}}_{simplicial}\),
 2.
\(G_{\mathcal {S}}^{2r}\) shows that all static states with two neighbors will directly transition to an active state,
Proof
 1.The branch eventually features an agent \({\mathcal {R}}_j\) with state \(s_j\in {\mathcal {S}}_{simplicial}\). In the extreme, this is a leaf on the edge of the pattern. Here, we can have two situations:If, by design, states \(s\in {\mathcal {S}}_{des}\cap {\mathcal {S}}_{simplicial}\) cannot be combined to form the clique of a state in \({\mathcal {S}}_{static}\cap {\mathcal {S}}_{\lnot simplicial}s_{surrounded}\), then it is guaranteed that \(s_j\not \in {\mathcal {S}}_{des}\cap {\mathcal {S}}_{simplicial}\). Therefore, we can locally impose that situation (b) always occurs, that situation (a) never occurs, and we thus guarantee that \(s_j\in {\mathcal {S}}_{active} \cap {\mathcal {S}}_{simplicial}\). This is the first condition of this Lemma.
 (a)
\(s_j\in {\mathcal {S}}_{des}\cap {\mathcal {S}}_{simplicial} \). If this exists, then the simplicial agent is also static. Therefore, it is possible that the entire pattern does not feature any active and simplicial agent.
 (b)
If \(s_j\not \in {\mathcal {S}}_{des}\cap {\mathcal {S}}_{simplicial}\), then \(s_j\in {\mathcal {S}}_{active} \cap {\mathcal {S}}_{simplicial}\) and so we are done.
 (a)
 2.
If all branches from agent \({\mathcal {R}}_i\) only feature nonsimplicial states, then this is only the case if the branches form loops, otherwise at least one leaf would be present as in situation 1. However, it can be ensured that a loop will always collapse and feature one simplicial active agent. In a loop, all agents have two cliques, each formed by one neighbor. \(G_{\mathcal {S}}^{2r}\) tells whether any static agent with two neighbors, by the action of its neighbors, will become active. This is the second condition of this Lemma. If this is the case for all states, then we know that the action of any neighbor will cause a chain reaction about the loop. This will eventually cause the loop to collapse about one corner point and create a simplicial leaf, unless \(P_{des}\) forms. In either case, we reach a pattern \(P\in P_{AS}\cup P_{des}\). The collapse of two exemplary loops is depicted in Fig. 7.
4.4.5 Local proof conditions to guarantee that livelocks do not occur
With the conditions from Lemma 3 we ensure that a simplicial active agent will always be present regardless of \(P_0\). We can now introduce Theorem 1, which we use to determine that \(P_{des}\) will eventually form from \(P_0\) without livelocks.
Theorem 1
 1.
\(P_{des}\) is achievable,
 2.
a pattern in \(P\in P_{AS} \cup P_{des}\) will always be reached from any other pattern \(P\not \in P_{AS} \cup P_{des}\),
 3.
\(G_{\mathcal {S}}^1\) shows that any agent in any state \(s\in {\mathcal {S}}_{active}\cap {\mathcal {S}}_{simplicial}\) can move to explore all open positions surrounding its neighbors (with the exception of when a loop is formed or when it enters a state \(s\in {\mathcal {S}}_{static}\)),
 4.
in \(G_{\mathcal {S}}^3\), any agent in any state \(s\in {\mathcal {S}}_{static}\) only has outward edges toward states \(s\in {\mathcal {S}}_{active}\) (with the exception of a state that is fully surrounded along two or more perpendicular directions),
Proof
 1.
Agent \({\mathcal {R}}_i\) enters a state \(s_i'\not \in {\mathcal {S}}_{simplicial}\). Via Lemma 3, at least one other agent is (or will be) in state \(s\in {\mathcal {S}}_{active}\cap {\mathcal {S}}_{simplicial}\), taking us to point 3 in this list.
 2.
Agent \({\mathcal {R}}_i\) enters a state \(s_i'\in {\mathcal {S}}_{static}\). If \(P_{des}\) is not yet achieved, then at least one other agent in the swarm is in an active state (Lemma 1). If the active agent(s) are in state \(s\in {\mathcal {S}}_{active} \cap {\mathcal {S}}_{\lnot simplicial}\), then this takes us back to point 1 in this list. If the active agent(s) are in state \(s\in {\mathcal {S}}_{active} \cap {\mathcal {S}}_{simplicial}\), this takes us to point 3 in this list.
 3.
Agent \({\mathcal {R}}_i\), and/or the agent(s) taking over, keeps moving and each time enters a state \(s_i'\in {\mathcal {S}}_{active} \cap {\mathcal {S}}_{simplicial}\). Via \(G_{\mathcal {S}}^1\) we know that it can potentially explore all open positions surrounding all its neighbors (this is the third condition of this theorem). As it moves, its neighbors also change, such that it always can potentially explore all open positions around all agents, and thus all open positions in the pattern (see Fig. 8a for a depiction). This means that the swarm can evolve toward a pattern that is closer to the desired one.
 1.
It may happen that a simplicial and active agent cannot actually visit all open positions in the swarm because, at the global level, it is enclosed in a loop by the other agents. Alternatively, it may happen that it itself creates a loop while moving (this is the first exception to condition 3 of this theorem). By Lemma 3, the loop will always collapse, meaning that a new agent will enter a state \(s\in {\mathcal {S}}_{active}\cap {\mathcal {S}}_{simplicial}\). The new agent will be able to travel to all positions external to the loop, avoiding a livelock. This resolution is depicted in Fig. 8b.
 2.Agent \({\mathcal {R}}_i\) can travel about all open positions in the swarm. Let us assume the extreme case in which \({\mathcal {R}}_i\) is the only agent that can potentially do this in the entire swarm. Via \(G_{\mathcal {S}}^3\), we can verify that, unless \(P_{des}\) forms, this must eventually cause at least one static agent to become active (following the fourth condition of this theorem). Consider a static agent \({\mathcal {R}}_j\) which becomes active when \({\mathcal {R}}_i\) becomes its neighbor. This may lead to one of the following developments, all of which avoid livelocks.There is an exception to the fourth condition of this theorem, which is the static state that is fully surrounded by other agents along two perpendicular axes. In this case, \(G_{\mathcal {S}}^3\) may show that the agent will not directly become active. However, it is trivially impossible (since there is a finite number of agents) for the swarm to only feature agents that are surrounded. A situation where all agents are all surrounded cannot occur; at least one agent will not be surrounded. This justifies the exception to the fourth condition in this theorem.
 (a)
Agent \({\mathcal {R}}_i\) remains in state \(s_i'\in {\mathcal {S}}_{active}\cap {\mathcal {S}}_{simplicial}\). The pattern can keep evolving further. A livelock is avoided.
 (b)
Agent \({\mathcal {R}}_i\) enters a state \(s_i'\in {\mathcal {S}}_{active}\cap {\mathcal {S}}_{\lnot simplicial}\). By Lemma 3, another simplicial and active agent will be present elsewhere in the swarm. A livelock is avoided.
 (c)
As per the second exception to condition 3 of this theorem, agent \({\mathcal {R}}_i\) enters a state \(s\in {\mathcal {S}}_{static}\) upon becoming a neighbor of agent \({\mathcal {R}}_j\), before agent \({\mathcal {R}}_j\) moves. In this case, the departure of agent \({\mathcal {R}}_j\) will bring it back to a state \(s_i\in {\mathcal {S}}_{active}\) taking us back to points 2(a) or 2(b) in this list.
 (d)
Agent \({\mathcal {R}}_i\) enters a state \(s\in {\mathcal {S}}_{static}\) upon becoming a neighbor of agent \({\mathcal {R}}_j\), after agent \({\mathcal {R}}_j\) moves. At this point, either \({\mathcal {R}}_j\) will move back to its original position and agent \({\mathcal {R}}_i\) will return to a state \(s_i\in {\mathcal {S}}_{active}\cap {\mathcal {S}}_{simplicial}\) and keep moving, or \({\mathcal {R}}_j\) will continue to move elsewhere. In either case, when agent \({\mathcal {R}}_j\) moves, it will also cause other neighbors to become active. In turn, these will move, and \({\mathcal {R}}_{i}\), who also neighbors them, will then return to being in an active state, bringing us back to points 2(a) or 2(b) in this list.
 (e)
Agent \({\mathcal {R}}_i\), after agent \({\mathcal {R}}_j\) has moved, enters the position (and state) that was originally taken by agent \({\mathcal {R}}_j\). As in point 2(d) in this list, it is not possible that agent \({\mathcal {R}}_j\) will always only free \({\mathcal {R}}_i\) in exactly the same way that agent \({\mathcal {R}}_i\) freed agent \({\mathcal {R}}_j\), because \(G_{\mathcal {S}}^3\) shows that motions of agent \({\mathcal {R}}_j\) will free any static agent in the neighborhood, and not just agent \({\mathcal {R}}_i\).
 (a)

Any desired state with only one neighbor violates the first condition of Lemma 3. This is because this desired state can form the clique of a blocked state on its own. If this occurs, the local conditions are too restrictive to formally guarantee that the swarm will not run into livelocks.

Removing a dependency on North (Assumption A1) may lead to a violation of the first condition of Lemma 3. This is because desired states become rotation invariant.
4.5 Verifying against the presence of deadlocks
We now have means to verify that no livelocks will occur, but to know that the swarm will always selforganize into the desired pattern, we must also show that no deadlocks can form. That is, there can be no pattern other than the desired pattern \(P_{des}\) where none of the agents can take an action. Let us begin, once again, with \(G_P\) as introduced in Sect. 4.4. Similarly as to the livelock, we could search exhaustively though \(G_P\) for possible nodes with no outgoing edges. Alternatively, we could repeatedly simulate the swarm and experimentally check whether any other pattern forms, but this would not strictly ensure that other patterns cannot manifest.^{5} In this work, we still choose to search through \(G_P\). However, to counter the computation explosion, we show that if no livelock exists then it is only necessary to search through a small subset of \(G_P\), and we also provide a method to quickly scan through the remaining subspace (alternatively, if livelocks may exist, then there is technically also no reason to search for deadlocks since we already know that the swarm may evolve undesirably).
4.5.1 Restricting the search space
By definition, deadlocks are patterns \(P\ne P_{des}\) where all agents are in a state \(s\in {\mathcal {S}}_{static}={\mathcal {S}}_{des}\cup {\mathcal {S}}_{blocked}\). By Proposition 4 the search space is restricted to patterns that contain at least one agent with state \(s\in {\mathcal {S}}_{des}\).
Proposition 4
A deadlock cannot consist only of agents with state \(s\in {\mathcal {S}}_{blocked}\).
Proof
 1.
an agent with state \({\mathcal {S}}_{simplicial}\). By definition, however, \({\mathcal {S}}_{blocked}\cap {\mathcal {S}}_{simplicial} = \emptyset \),
 2.
agents with a state \({\mathcal {S}}_{\lnot simplicial}\) forming a loop boundary. Then, at least one agent must be in a state \({\mathcal {S}}_{des}\), else it would be in a state \(s\in {\mathcal {S}}_{active}\), which we are not concerned with.
Then, for a certain class of patterns, it can be shown that all agents must be in a state \(s\in {\mathcal {S}}_{des}\), as per Proposition 5.
Proposition 5
If the conditions of Lemma 3 hold and \({\mathcal {S}}_{des} \subseteq {\mathcal {S}}_{simplicial}\cup s_{surrounded}\), then all agents in a deadlock must be in a state \(s\in S_{des}\).
Proof
If \({\mathcal {S}}_{des} \subseteq {\mathcal {S}}_{simplicial}\cup s_{surrounded}\), then all states in \({\mathcal {S}}_{des}\) are either simplicial or \(s_{surrounded}\). By the first condition of Lemma 3, none of the states in \({\mathcal {S}}_{des}\) can satisfy the cliques of any state \({\mathcal {S}}_{static}\cap {\mathcal {S}}_{\lnot simplicial}  s_{surrounded}\). This means that they cannot ever coexist in the same pattern. By Proposition 4, however, at least one agent must exist with state \(s\in {\mathcal {S}}_{des}\). Therefore, all agents in the spurious pattern must be in a state \(s\in {\mathcal {S}}_{des}\). Alternatively, this proposition can also be verified by a local inspection. \(\square \)
Therefore, if a pattern is such that \({\mathcal {S}}_{des} \subseteq {\mathcal {S}}_{simplicial}\cup s_{surrounded}\), we can further restrict our search to patterns that only have agents in \({\mathcal {S}}_{des}\). The patterns shown in Fig. 2, with the exception of the hexagon and the line, meet this condition (the line, however, also does not meet Lemma 3).
4.5.2 Finding spurious patterns
In this section we detail our implementation to find spurious patterns for an arbitrary set \({\mathcal {S}}_{des}\). To sort through the possibilities more efficiently, we analyze state combinations to determine whether they could potentially make a pattern. By first analyzing combinations we need not concern ourselves with the spatial arrangement but only determine whether the states could potentially be combined together independently of order. It is only if such a combination is found that we explore its spatial arrangement, which is done using spanning tree graphs.

MatchDirection matrix, denoted D, is a square matrix (\(d\times d\)) that holds the directions along which any two states in \({\mathcal {S}}_{des}\) are reciprocal to each other.

MatchCount matrix, denoted M, is a square matrix (\(d\times d\)) that holds the number of directions along which any two states in \({\mathcal {S}}_{des}\) match. M is symmetric. Intuitively, this is because if agent \({\mathcal {R}}_i\) is a neighbor of agent \({\mathcal {R}}_j\), then agent \({\mathcal {R}}_j\) is a neighbor of agent \({\mathcal {R}}_i\).
 1.
The topology graph is finite and undirected For any finite undirected graph \(G=(V,E)\), the sum of the vertex degrees must be equal to twice the amount of edges (Van Steen 2010; Ismail et al. 2009). As a consequence, the graph will always feature an even amount of vertices with an odd degree. This is known as the handshaking theorem (Ismail et al. 2009). In our context, this translates to the fact that any valid combination should feature an even amount of states that expect an odd number of neighbors.
 2.
The neighbor expectations are reciprocal In a combination, each state that expects a neighbor in one direction should have at least another state expecting a neighbor in the opposite direction.
 3.
The pattern is finite For each direction, there should be at least one state in a combination that does not expect a neighbor along that direction. Else, the pattern cannot be finite.
 4.
The pattern has edges For each direction, there must be at least one state in the combination that expects a neighbor in that direction, but not in the opposite direction. Otherwise, no state in the combination should expect any neighbor along either direction.
 5.
The states can match with each other along all expected directions Each state in a combination should be capable of being potentially matched (i.e., be a neighbor of) to the other states in a combination sufficient to cover its expected neighborhood. This information is provided by \(M({\mathcal {S}}_{des})\) and \(D({\mathcal {S}}_{des})\). The reasoning is best explained via an example. Consider a swarm of 4 agents with \({\mathcal {S}}_{des}\) as in Fig. 9 and a potential combination \(C_i = \{ s_1, s_1, s_2, s_3\}\). Using \(M({\mathcal {S}}_{des})\), we observe pairwise matches that are possible between the states in \(C_i\). \(M({\mathcal {S}}_{des})\) tells us that \(s_1\) only matches with \(s_2\) in one direction. In \(D({\mathcal {S}}_{des})\) we can see that this is direction \(l_2\) from the perspective of \(s_1\), and \(l_6\) from the perspective of \(s_2\). However, \(C_i\) features two instances of \(s_1\) and only one instance of \(s_2\). This means that one instance of \(s_1\) can never be satisfied—the combination cannot exist. This can be checked for all states.

It is acyclic.

It is simple (no duplicate edges).

The edges must at least meet the match conditions in \(M({\mathcal {S}}_{des})\), or else we know that the edges are impossible because the two states can never be neighboring states.

It is connected. If operating by \({\varPi }_{f}\), then the swarm is connected. This means that it can be represented by a connected spanning tree. If \(T_i(C_k)\) is not connected, as in the example in Fig. 10a, then it is invalid.

The degree of each state should be less than or equal to the number of neighbors that an agent in that state expects. If the degree of a node in \(T_i(C_k)\) is larger than the degree of the state, then \(T_i(C_k)\) is invalid and the spanning tree is discarded, as for the example in Fig. 10b.

The spatial arrangement must be feasible. All other conditions above depend on the properties of the spanning tree graph and are not (directly) dependent on the spatial arrangement of the states. In this last condition, we analyze the spatial arrangement of the graph to see if all neighboring states match without lose ends (i.e., “unfulfilled neighbors”), or loops where two states are eventually expected to occupy the same positions. For instance, Fig. 10c shows a spanning tree that fails this test. \(D({\mathcal {S}}_{des})\) can be used to quickly generate the full pattern.
If a possible spanning tree is found, as in Fig. 10d, then a possible pattern has been identified and it can be checked to determine whether it is equivalent to \(P_{des}\) or whether it is spurious. A variety of methods can be used to do so automatically (Loncaric 1998).
5 Evaluation of the idealized system
We begin by evaluating the performance of the idealized swarm as described in Sect. 4.1. This allows us to investigate more fundamental properties and gain initial highlevel insights. We also explore how further tuning of \({\varPi }_{f}\) could affect the statistical performance of the swarm in forming a desired pattern more quickly. The latter leads to insights on possible optimization strategies, which we discuss further in Sect. 7.3.
The simulation environment used in this section replicates the idealized framework from Sect. 4.1. We simulated idealized agents on a discrete 2D grid world operating in discrete time. At each time step, one random agent with state \(s\in {\mathcal {S}}_{active}\) executes an action based on \({\varPi }_{f}\). All tests begin by initializing the agents in a random pattern \(P_0\) and end when all agents are in a state \(s\in {\mathcal {S}}_{static}\).

Alteration 1 (ALT1): same as baseline; however, when an agent moves at time step k, the same agent will not move at time step \(k+1\) (unless it is the only active agent).

Alteration 2 (ALT2): same as ALT1; additionally, all states with more than 5 neighbors are now not mapped to any actions.

Alteration 3 (ALT3): same as ALT2; additionally, all actions must ensure that all agents in the neighborhood, following the action, have at least one neighbor at North, South, East or West, else the stateaction pair is discarded from \({\varPi }_{f}\). For the triangle with 9 agents, we made one exception to this, and it is the state \(s = \begin{bmatrix} 1&0&1&0&0&0&1&0 \end{bmatrix}\) (following the layout in Fig. 9) for which otherwise a spurious pattern could also form.

Alteration 4 (ALT4): same as ALT3; additionally, all states with more than 4 neighbors are now not mapped to any actions.
6 Implementing the behavior on robots
Until now, we have dealt with idealized agents on a 2D grid. In this section, we describe how the behavior can be brought to real robots operating in continuous time and space and using local clocks. We test the behavior in two stages of fidelity: (1) accelerated particles, and (2) simulated MAV flights, showing that the behavior is also robust to noise.
6.1 Robot behavior
The robots can sense omnidirectionally all their neighbors within a range \(\rho _{sensor}\) and can determine whether their neighbors are computing an action (Assumption A3). A robot \({\mathcal {R}}_i\) determines its discrete local state \(s_i\in {\mathcal {S}}\) following the bearing based discretization in Fig. 13a.
All robots act following the FSM in Fig. 13b. This FSM locally enforces that only one robot in the neighborhood can move at any time. Following this FSM, a robot will initiate and pursue an action from \({\varPi }_{f}\) if and only if no other robot in a neighborhood is sensed to be already doing so, which locally recreates the conditions of the idealized system. Therefore, even though multiple robots around the swarm can take actions at the same time, this does not occur at the local level. If two robots who are not neighbors become neighbors while both are executing an action, the actions will interrupt, ensuring safety. Using \(t_{adj}>0\) and \(t_{wait}>0\) the robots have allocated time to execute attraction, repulsion, and alignment behaviors. As these alignments maneuvers are minimal, they are not sensed by neighbors as actions and therefore create natural time windows whereby robots take turns in taking actions.
6.2 Simulation tests with accelerated particles
We begin by testing the behavior from Sect. 6.1 on accelerated particles in an unbounded 2D space. This allows us to quickly test the performance of large swarms while remaining independent of the dynamics of any particular robot.
Results The results for the triangles with 4 and 9 agents from Sect. 5, using the controller from ALT4, were validated in this continuous setting. Figure 14a, b shows sample trajectories over time.^{8} We can see that the agents reshuffle until the desired pattern is achieved. All simulations were repeated 50 times. The triangle with 4 agents was achieved successfully in 50 out of 50 trials, with generally fast convergence times (within 100 seconds of simulated time). The triangle with 9 agents was achieved successfully in 49 out of 50 trials. Only one trial experienced a separation. This happened as two nonneighboring agents chose to perform an action at approximately the same time, came into each other’s view, but the alignment maneuvers that followed were such that two agents (who were the link between two parts of the swarm) momentarily moved further than 1.6m apart, which was the limit of the sensor. Although we could be more lenient and accept the fact that the swarm quickly reconnects, as done by Winfield and Nembrini (2012), the issue is noted and should be tackled in future work to further guarantee safety even in a continuous setting. Nevertheless, this was the only “unsafe” event that took place out of thousands of maneuvers executed over all 50 trials. We also successfully simulated the behavior of the swarm with large groups tasked with making a line with 50 robots, for which a sample trajectory is shown in Fig. 14c. Here, it is interesting to see how the line slowly forms as robots all over the swarm begin to align themselves as required.
6.3 Micro air vehicle simulations
Having developed and tested a behavior that can be used in a continuous domain, we now explore whether it can be used when robots have more realistic dynamics and reaction times. This section provides a proof of concept and shows how the selected algorithm can work on a team of real MAVs with the relevant dynamic constraints and perturbations.
The simulations were executed using Robot Operating System (ROS) (Quigley et al. 2009) and the Gazebo physics engine (Koenig and Howard 2004). The hectorquadrotor model provided by Meyer et al. (2012) simulates the dynamics of a quadrotor MAV. Each MAV is simulated on a separate module and runs independently, with the higherlevel controller running at 10 Hz. The same simulation environment was used in both Coppola et al. (2018) and McGuire et al. (2017) with successful replication of the controllers on realworld MAVs, and it was chosen for this reason. We assumed that the MAVs could measure the position of their nearest neighbors up to 1.6 m, and that they could then sense whenever a neighbor was moving at more than 0.1 m/s, which they would interpret as the neighbor taking an action. All other control parameters were kept the same as in the Swarmulator trials, with some minimal tuning to suit the new dynamics (namely: \(v_b=2\), \(t_{adj}=1.5\), \(t_{wait}=3\)).
Simulation results with sensor noise Additionally, we explored the performance of the behavior under the influence of noise in the relative position readings of neighbors by applying Gaussian noise with standard deviation of 0.1 m and 0.1 rad for relative range and bearing, respectively. The only change was that the MAVs could see up to 2 m instead of 1.6 m in order to restrict false negatives. The results were robust to the noise. Consider, for instance, the 300 s flight with 9 MAVs shown in Fig. 15c. It can be seen that the swarm distances are kept, while the swarm still reshuffles, and no collisions occur. The discretization imposed by the stateaction map is such that the behavior is robust to sensor noise. The behavior is robust even when the same setup from the noiseless case is used, without any filtering of the Gaussian noise (e.g., using a Kalman filter or a low pass filter), which would otherwise drastically improve the results further.
7 Discussion
7.1 Intuitive and verifiable design of complex behaviors
The approach presented in this paper allows a swarm designer to intuitively define local behavior of cognitively limited robots faced with a global task. It is merely necessary to divide the global task into its locally observable constituents and incorporate this into the stateaction map of the robots. Doing so provides the robots with a behavior that forms the pattern, even though the robots are incapable of locally knowing when/if this ever occurs.
Having such an intuitive method allows us to form patterns that (for systems with similarly limited capabilities) had previously not been achieved using an explicit design. In this paper we showed six patterns as examples, but the limits of the algorithm do not stop there. Izzo et al. (2014) and Scheper and de Croon (2016), for instance, both proposed neural networks to tackle the formation of an asymmetric triangle, whereby the difficulty was that three noncommunicating homogeneous robots could not resolve the asymmetry. However, using the approach presented in this paper, it becomes easy to form any asymmetric triangle. The desired states to develop \({\varPi }_{f}\) are readily extracted, as in Fig. 16a, and the dimensions of the triangle can be tuned by adjusting the attraction and repulsion forces along North and East. The asymmetric triangle is then obtained as exemplified in Fig. 16b, c.
7.2 Generating arbitrary patterns without livelocks and deadlocks
Section 4.2 showed how \({\varPi }_{f}\) can be readily computed for any pattern. However, because of how limited the robots are, it is not necessary that the swarm is able to reach this pattern from any initial condition while being free of livelocks or deadlocks. Deadlocks and livelocks, however, stem from the limited knowledge that is available to the robots. If the robots could see further, or remember past states, or communicate, they would be able to form more complex patterns and would be able to move more freely. Theoretically then, any pattern can be formed provided that the state space is sufficiently detailed to uniquely represent the desired goal and allow enough freedom to the robots. In line with the goals of generalizing the scheme that was presented here, we also wish to determine how providing the agents with some extra capabilities can allow more complex goals to emerge. This is while resting on the knowledge that the swarm can also operate when these extra capabilities malfunction. Furthermore, the proof conditions presented in this paper have been shown to be more restrictive than it can turn out to be in a real swarm. The advantage of using local properties are that we do not need to analyze the global states of the swarm, yet this comes at the cost of possibly being more strict than required from the global perspective. At this moment, however, we have seen that patterns that do not respect some of the conditions still form in our simulations, such as the line pattern. Indeed, it may be that the subset of global states that represent a deadlock or livelock is very small compared to the total state space, making such failures possible, yet extremely unlikely. More focused investigations should be conducted in order to understand when it is possible to be more lenient on some conditions while still ensuring that livelocks and deadlocks do not arise.
7.3 Time for selforganization
 1.
In real robot swarms, several actions will be taking place at the same time, so the time to completion will be faster than expected. For instance, in Fig. 14c the line is seen to slowly form across the entire swarm, whereas this is not the case for the idealized system.
 2.
Our investigations in Sect. 5 showed that it is possible to improve performance by several orders of magnitude by further altering the local stateaction map.
7.4 Toward realworld implementations and applications
The simulations using ROS in Sect. 6.3 provide a large degree of confidence in the possibility to implement the system on real MAVs (or other robots). Provided that the necessary sensory information is available, then they are able to follow the behavior even when behaving by their own internal clock and in the presence of sensor noise, and this is without the aid of any additional filtering. We then find that the local behavior can also be used simply to guarantee collision avoidance and swarm coherence in spite of all limitations of the robots. This has several applications of its own. For instance, it can be used to preemptively guarantee that a robotic sensor network never separates in multiple groups.
7.5 Scalability of proof procedure
Our proof procedure focused as much as possible on the local level, making it largely independent of the number of agents in the swarm, and thus able to mitigate state explosion issues. Most notably, we are able to prove, only by a locallevel analysis, that livelocks will not exist when starting from any initial pattern. A key element of this proof was an analysis of the simplicial states and the intuition that they could help the swarm to resolve livelocks. Nevertheless, the complete proof still requires us to verify that deadlock patterns will not occur, and this part is still done using an ultimately global analysis. We have shown how to mitigate the computational explosion by looking at a limited subset of state combinations and using a procedure to quickly sort through the possibilities, yet the issue is not yet fully eliminated. In future research, there should be efforts to further mitigate its effects for finite patterns. Here, we expect that the match matrices introduced will be a fundamental tool to analyze local connections between the robots.
For now, three solution directions have been identified in order to mitigate the computational explosion. The first is to focus on the agents at the border of the structure, assuming that all other agents will be enclosed by these agents. The second avenue is to use repeating subpatterns. The local states could be made such that the agents can arrange into infinitely repeating patterns (e.g., infinitely connecting hexagons) and create a large complex structure without defining or checking the larger structure in full. This we actually already did, in part, for the line pattern. The third solution, perhaps most trivial, is to allow robots that have been blocked for a long time to temporarily perform partially unsafe maneuvers, which might set the system free from deadlocks (but may come at other costs).
8 Conclusion and future work
In this paper we introduced a method to design the local behavior of robots in a swarm so as to form desired global patterns in spite of extremely limited cognitive abilities. Because the robots only know the relative location of their closest neighbors and have no memory of the past, they cannot take “purposeful” actions. Therefore, a mechanism has been designed that makes the global pattern emerge from the local, stochastic behaviors of the agents. Approaching the problem from topdown, the method simply requires one to identify the local states that build the desired global pattern in order to design the behavior. Then, to close the loop, we presented a proof procedure to verify whether the desired pattern will always eventually emerge from the stochastic interactions of the agents. An important insight from these proofs is the crucial role that simplicial states play in helping the swarm to avoid livelocks and minimizing the possibility of deadlocks. It is important to note here, however, that should we find that livelocks and deadlocks are possible, then this tells us that the robots have an insufficient sensory knowledge for the desired global goal to always eventually happen, which is equally valuable information when designing a robotic swarm. Despite developing the behavior for idealized agents on a grid world, we have shown very promising results that show that the behavior can be successfully reproduced by robots operating in continuous time and space, with local clocks, even in the presence of noise.
The methodology presented here has been used for pattern formation. At its core, however, it is based on the more general idea of synthesizing a global goal into a probabilistic stateaction map executed by the robots, and the verification of the global property by ensuring that the swarm features agents with a state that empowers them to help the swarm evolve (i.e., simplicial states). With a modified mapping, we expect this strategy to also be applicable to systems with significantly different state and action spaces. Furthermore, following the positive results of the simulations presented in this paper, future work will focus on bringing this framework to realworld robots. A primary challenge that must be solved for this to happen is to use an optimization procedure to enable larger and more complex patterns to form faster. A second challenge is to explore the best ways of dealing with potential false positives or false negatives. These situations may cause the robot to take a misguided action. We expect that this can be solved by further limiting the stateaction map whenever a state cannot be clearly identified. Finally, it would be valuable to investigate the impact of removing the knowledge of a common North direction on the ability to create certain patterns, making the system even more independent from the environment.
Footnotes
 1.
This definition of pattern is adapted from the definition used in the context of cellular automata by Sapin (2010).
 2.
As already mentioned near the end of Sect. 2, there is a vast amount of solutions for relative localization in swarm robotics, and it is also a separate topic of exploration in our own current research (Coppola et al. 2018; van der Helm et al. 2018). Here, we declare the challenge outside of the scope of this work and we deem it sufficient to assume that the robots are endowed with the necessary sensors to sense neighboring robots within a short omnidirectional range.
 3.
At first sight, this seems rigid and difficult to implement on real robots. It can be in part justified under the intuition that the probability that two robots with different internal clocks begin to move at exactly the same time is small. A similar assumption was also suggested by Winfield et al. (2005) as a method to model random concurrency in the swarm. In Sect. 6 we will show that, if robots are able to sense whether their neighbors are taking an action (assumption A3 from Sect. 2), then it can be exported to real robots. Multiple robots within the swarm will move, yet locally only one neighbor will move on a firstcome firstserved basis. In the idealized system, this is simplified to only one robot moving at one time step.
 4.
These definitions are borrowed from, but not equivalent to, the typical definitions of simplicial node and clique (Van Steen 2010). In standard graph theory, a simplicial node is a node whose neighboring nodes are fully connected among each other, not just connected. Similarly, a clique is a fully connected set of neighbors, whereas in our case it is just a connected set.
 5.
Considering that the selforganization of the pattern resembles an emergent property, Darley (1994) argues that this would be more efficient.
 6.
If analyzed visually, \(s_1\) cannot connect to itself because it expects a neighbor to its right (\(l_3\)) and topright (\(l_2\)), yet if it were to connect to itself, then the robot next to it would have a neighbor to its left, which thus cannot be \(s_1\). Also, \(s_1\) cannot connect to \(s_3\) because \(s_1\) does not expect a neighbor to be right above itself (at \(l_1\)), whereas \(s_3\) would expect a neighbor to be there because it expects a neighbor on its topleft (at \(l_8\)), and vice versa.
 7.
The source code can be found at https://github.com/coppolam/swarmulator/tree/SI_PatternFormation.
 8.
Videos of other sample runs are available at https://www.youtube.com/playlist?list=PL_KSX9GOn2P8BYpwA_WfXmtb7CRnVhC3.
 9.
Videos are available at https://www.youtube.com/playlist?list=PL_KSX9GOn2P8BYpwA_WfXmtb7CRnVhC3.
 10.
In popular adage, one might say that there is no such thing as a free lunch.
Notes
References
 Achtelik, M., Achtelik, M., Brunet, Y., Chli, M., Chatzichristofis, S., Decotignie, J. D., et al. (2012). SFly: Swarm of micro flying robots. In 2012 IEEE/RSJ international conference on intelligent robots and systems (IROS) (pp. 2649–2650). Washington: IEEE Press.Google Scholar
 Arbuckle, D. J., & Requicha, A. A. G. (2010). Selfassembly and selfrepair of arbitrary shapes by a swarm of reactive robots: Algorithms and simulations. Autonomous Robots, 28(2), 197–211.Google Scholar
 Arbuckle, D. J., & Requicha, A. A. G. (2012). Issues in selfrepairing robotic selfassembly. In R. Doursat, H. Sayama, & O. Michel (Eds.), Morphogenetic engineering: Toward programmable complex systems (pp. 141–155). Berlin: Springer.Google Scholar
 Basiri, M., Schill, F., Floreano, D., & Lima, P. U. (2014). Audiobased localization for swarms of micro air vehicles. In 2014 IEEE international conference on robotics and automation (ICRA) (pp. 4729–4734). Washington: IEEE Press.Google Scholar
 Bonabeau, E., & Dessalles, J.L. (1997). Detection and emergence. Intellectica, 2(25), 85–94.Google Scholar
 Bonabeau, E., Guérin, S., Snyers, D., Kuntz, P., & Theraulaz, G. (2000). Threedimensional architectures grown by simple ‘stigmergic’ agents. Biosystems, 56(1), 13–32.Google Scholar
 Clarke, E. M, Jr., Grumberg, O., & Peled, D. A. (1999). Model checking. Cambridge, MA: MIT Press.Google Scholar
 Conroy, J., Samuel, P., & Pines, D. (2005). Development of an MAV control and navigation system. In Infotech@ Aerospace, AIAA 2005, Arlington, Virginia (p. 7065).Google Scholar
 Coppola, M., McGuire, K. N., Scheper, K. Y. W., & de Croon, G. C. H. E. (2018). Onboard communicationbased relative localization for collision avoidance in micro air vehicle teams. Autonomous Robots, 42(8), 1787–1805.Google Scholar
 Darley, V. (1994). Emergent phenomena and complexity. Artificial Life, 4, 411–416.Google Scholar
 de Marina Peinado, H. J. G. (2016). Distributed formation control for autonomous robots. Groningen: University of Groningen.Google Scholar
 Derakhshandeh, Z., Gmyr, R., Richa, A. W., Scheideler, C., & Strothmann, T. (2016). Universal shape formation for programmable matter. In Proceedings of the 28th ACM symposium on parallelism in algorithms and architectures (SPAA ‘16) (pp. 289–299). New York, NY: ACM.Google Scholar
 Di Luna, G. A., Flocchini, P., Santoro, N., Viglietta, G., & Yamauchi, Y. (2017). Shape formation by programmable particles. ArXiv Preprint. arXiv:1705.03538.
 Dixon, C., Winfield, A. F. T., Fisher, M., & Zeng, C. (2012). Towards temporal verification of swarm robotic systems. Robotics and Autonomous Systems, 60(11), 1429–1441.Google Scholar
 Engelen, S., Gill, E. K. A., & Verhoeven, C. J. M. (2011). Systems engineering challenges for satellite swarms. In 2011 aerospace conference, AERO ’11 (pp 1–8). Washington, DC: IEEE Computer Society.Google Scholar
 Faigl, J., Krajník, T., Chudoba, J., Přeučil, L., & Saska, M. (2013). Lowcost embedded system for relative localization in robotic swarms. In 2013 IEEE international conference on robotics and automation (ICRA) (pp. 993–998). Washington: IEEE Press.Google Scholar
 Falconi, R., Gowal, S., & Martinoli, A. (2010). Graph based distributed control of nonholonomic vehicles endowed with local positioning information engaged in escorting missions. In 2010 IEEE international conference on robotics and automation (ICRA) (pp. 3207–3214). Washington: IEEE Press.Google Scholar
 Falconi, R., Sabattini, L., Secchi, C., Fantuzzi, C., & Melchiorri, C. (2011). A graphbased collisionfree distributed formation control strategy. In IFAC proceedings volumes, 18th IFAC world congress (Vol. 44(1), pp. 6011–6016).Google Scholar
 Falconi, R., Sabattini, L., Secchi, C., Fantuzzi, C., & Melchiorri, C. (2015). Edgeweighted consensusbased formation control strategy with collision avoidance. Robotica, 33(2), 332–347.Google Scholar
 Flocchini, P., Prencipe, G., Santoro, N., & Widmayer, P. (2005). Gathering of asynchronous robots with limited visibility. Theoretical Computer Science, 337(1), 147–168.MathSciNetzbMATHGoogle Scholar
 Fox, M. J., & Shamma, J. S. (2015). Probabilistic performance guarantees for distributed selfassembly. IEEE Transactions on Automatic Control, 60(12), 3180–3194.MathSciNetzbMATHGoogle Scholar
 Gazi, V., & Passino, K. M. (2002). A class of attraction/repulsion functions for stable swarm aggregations. In Proceedings of the 41st IEEE conference on decision and control (CDC) (Vol. 3, pp. 2842–2847).Google Scholar
 Gazi, V., & Passino, K . M. (2004). Stability analysis of social foraging swarms. IEEE Transactions on Systems, Man, and Cybernetics, Part B (Cybernetics), 34(1), 539–557.Google Scholar
 Gerkey, B. P., & Matarić, M. J. (2004). A formal analysis and taxonomy of task allocation in multirobot systems. The International Journal of Robotics Research, 23(9), 939–954.Google Scholar
 Gjondrekaj, E., Loreti, M., Pugliese, R., Tiezzi, F., Pinciroli, C., Brambilla, M., et al. (2012). Towards a formal verification methodology for collective robotic systems. In T. Aoki & K. Taguchi (Eds.), Formal methods and software engineering: 14th international conference on formal engineering methods (ICFEM), Kyoto, Japan, November 12–16, 2012. Proceedings (pp. 54–70). Berlin: Springer.Google Scholar
 Grushin, A., & Reggia, J. A. (2008). Automated design of distributed control rules for the selfassembly of prespecified artificial structures. Robotics and Autonomous Systems, 56(4), 334–359.Google Scholar
 Grushin, A., & Reggia, J . A. (2010). Parsimonious rule generation for a natureinspired approach to selfassembly. ACM Transactions on Autonomous and Adaptive Systems (TAAS), 5(3), 12:1–12:24.Google Scholar
 Guo, K., Qiu, Z., Meng, W., Xie, L., & Teo, R. (2017). Ultrawideband based cooperative relative localization algorithm and experiments for multiple unmanned aerial vehicles in GPS denied environments. International Journal of Micro Air Vehicles, 9(3), 169–186.Google Scholar
 Haghighat, B., & Martinoli, A. (2017). Automatic synthesis of rulesets for programmable stochastic selfassembly of rotationally symmetric robotic modules. Swarm Intelligence, 11(3), 243–270.Google Scholar
 Hamann, H. (2018). Swarm robotics: A formal approach. Berlin: Springer.Google Scholar
 Ismail, A. S., Hasni, R., & Subramanian, K. (2009). Some applications of eulerian graphs. International Journal of Mathematical Science Education, 2(2), 1–10.Google Scholar
 Izzo, D., & Pettazzi, L. (2005). Equilibrium shaping: Distributed motion planning for satellite swarm. In Proceedings of the 8th international symposium on artificial intelligence, robotics and automation in space.Google Scholar
 Izzo, D., & Pettazzi, L. (2007). Autonomous and distributed motion planning for satellite swarm. Journal of Guidance, Control, and Dynamics, 30(2), 449–459.Google Scholar
 Izzo, D., Simões, L. F., & de Croon, G. C. H. E. (2014). An evolutionary robotics approach for the distributed control of satellite formations. Evolutionary Intelligence, 7(2), 107–118.Google Scholar
 Ji, M., & Egerstedt, M. (2007). Distributed coordination control of multiagent systems while preserving connectedness. IEEE Transactions on Robotics, 23(4), 693–703.Google Scholar
 Joordens, M. A., & Jamshidi, M. (2010). Consensus control for a system of underwater swarm robots. IEEE Systems Journal, 4(1), 65–73.Google Scholar
 Klavins, E. (2002). Automatic synthesis of controllers for distributed assembly and formation forming. In 2002 IEEE international conference on robotics and automation (ICRA) (Vol. 3, pp. 3296–3302). Washington: IEEE Press.Google Scholar
 Klavins, E. (2007). Programmable selfassembly. IEEE Control Systems, 27(4), 43–56.Google Scholar
 Koenig, N., & Howard, A. (2004). Design and use paradigms for Gazebo, an opensource multirobot simulator. In 2004 IEEE/RSJ international conference on intelligent robots and systems (IROS) (vol. 3, pp. 2149–2154). Washington: IEEE Press.Google Scholar
 Konur, S., Dixon, C., & Fisher, M. (2012). Analysing robot swarm behaviour via probabilistic model checking. Robotics and Autonomous Systems, 60(2), 199–213.Google Scholar
 Krishnanand, K. N., & Ghose, D. (2005). Formations of minimalist mobile robots using localtemplates and spatially distributed interactions. Robotics and Autonomous Systems, 53(3), 194–213.Google Scholar
 Lerman, K., Galstyan, A., Martinoli, A., & Ijspeert, A. (2001). A macroscopic analytical model of collaboration in distributed robotic systems. Artificial Life, 7(4), 375–393.Google Scholar
 Loncaric, S. (1998). A survey of shape analysis techniques. Pattern Recognition, 31(8), 983–1001.Google Scholar
 McGuire, K. N., Coppola, M., de Wagter, C., & de Croon, G. C. H. E. (2017). Towards autonomous navigation of multiple pocketdrones in realworld environments. In 2017 IEEE/RSJ international conference on intelligent robots and systems (IROS) (pp. 244–249). Washington: IEEE Press.Google Scholar
 McGuire, K. N., de Croon, G. C. H. E., de Wagter, C., Remes, B., Tuyls, K., & Kappen, H. (2016). Local histogram matching for efficient optical flow computation applied to velocity estimation on pocket drones. In 2016 IEEE international conference on robotics and automation (ICRA) (pp. 3255–3260). Washington: IEEE Press.Google Scholar
 Mesbahi, M., & Egerstedt, M. (2010). Graph theoretic methods in multiagent networks (Vol. 33). Princeton: Princeton University Press.zbMATHGoogle Scholar
 Meyer, J., Sendobry, A., Kohlbrecher, S., Klingauf, U., & von Stryk, O. (2012). Comprehensive simulation of quadrotor UAVs using ROS and Gazebo. In I. Noda, N. Ando, D. Brugali, & J. J. Kuffner (Eds.), J. Simulation, modeling, and programming for autonomous robots (pp. 400–411). Berlin: Springer.Google Scholar
 Nembrini, J., Winfield, A., & Melhuish, C. (2002). Minimalist coherent swarming of wireless networked autonomous mobile robots. In B. Hallam, D. Floreano, J. Hallam, G. Hayes, & J.A. Meyer (Eds.), From animals to animats 7: Proceedings of the seventh international conference on simulation of adaptive behavior, ICSAB (pp. 373–382). Cambridge, MA: MIT Press.Google Scholar
 Oh, K.K., Park, M.C., & Ahn, H.S. (2015). A survey of multiagent formation control. Automatica, 53(Supplement C), 424–440.MathSciNetzbMATHGoogle Scholar
 Pereira, A. R., & Hsu, L. (2008). Adaptive formation control using artificial potentials for eulerlagrange agents. IFAC Proceedings Volumes, 41(2), 10788–10793.Google Scholar
 Prorok, A., Correll, N., & Martinoli, A. (2011). Multilevel spatial modeling for stochastic distributed robotic systems. The International Journal of Robotics Research, 30(5), 574–589.Google Scholar
 Pugh, J., Raemy, X., Favre, C., Falconi, R., & Martinoli, A. (2009). A fast onboard relative positioning module for multirobot systems. IEEE/ASME Transactions on Mechatronics, 14(2), 151–162.Google Scholar
 Quigley, M., Conley, K., Gerkey, B., Faust, J., Foote, T., Leibs, J., et al. (2009) ROS: An opensource robot operating system. In ICRA workshop on open source software (Vol. 3, p. 5).Google Scholar
 Rahmani, A., Ji, M., Mesbahi, M., & Egerstedt, M. (2009). Controllability of multiagent systems from a graphtheoretic perspective. SIAM Journal on Control and Optimization, 48(1), 162–186.MathSciNetzbMATHGoogle Scholar
 Roberts, J. F., Stirling, T., Zufferey, J. C., & Floreano, D. (2012). 3D relative positioning sensor for indoor flying robots. Autonomous Robots, 33(1), 5–20.Google Scholar
 Roelofsen, S., Gillet, D., & Martinoli, A. (2015). Reciprocal collision avoidance for quadrotors using onboard visual detection. In 2015 IEEE/RSJ international conference on intelligent robots and systems (IROS) (pp. 4810–4817). Washington: IEEE Press.Google Scholar
 Rubenstein, M., Cornejo, A., & Nagpal, R. (2014). Programmable selfassembly in a thousandrobot swarm. Science, 345(6198), 795–799.Google Scholar
 Sapin, E. (2010). Gliders and glider guns discovery in cellular automata. In A. Adamatzky (Ed.), Game of life cellular automata (pp. 135–165). London: Springer.Google Scholar
 Saska, M., Vonásek, V., Chudoba, J., Thomas, J., Loianno, G., & Kumar, V. (2016). Swarm distribution and deployment for cooperative surveillance by microaerial vehicles. Journal of Intelligent & Robotic Systems, 84(1), 469–492.Google Scholar
 Scheper, K. Y. W., & de Croon, G. C. H. E. (2016). Abstraction as a mechanism to cross the reality gap in evolutionary robotics. In E. Tuci, A. Giagkos, M. Wilson, & J. Hallam (Eds.), From animals to animats 14: 14th international conference on simulation of adaptive behavior, SAB 2016, Aberystwyth, UK, August 23–26, 2016, Proceedings (pp. 280–292). Cham: Springer.Google Scholar
 Shiell, N., & Vardy, A. (2016). A bearingonly pattern formation algorithm for swarm robotics. In M. Dorigo, M. Birattari, X. Li, M. LópezIbáñez, K. Ohkura, C. Pinciroli, & T. Stützle (Eds.), Swarm intelligence (pp. 3–14). Cham: Springer.Google Scholar
 Slavkov, I., CarrilloZapata, D., Carranza, N., Diego, X., Jansson, F., Kaandorp, J., et al. (2018). Morphogenesis in robot swarms. Science Robotics, 3(25), eaau9178.Google Scholar
 Smith, B., Howard, A., McNew, J.M., Wang, J., & Egerstedt, M. (2009). Multirobot deployment and coordination with embedded graph grammars. Autonomous Robots, 26(1), 79–98.Google Scholar
 Stegagno, P., Cognetti, M., Oriolo, G., Bülthoff, H. H., & Franchi, A. (2016). Ground and aerial mutual localization using anonymous relativebearing measurements. IEEE Transactions on Robotics, 32(5), 1133–1151.Google Scholar
 Tanner, H. G. (2004). On the controllability of nearest neighbor interconnections. In 2004 43rd IEEE conference on decision and control (CDC) (Vol. 3, pp. 2467–2472).Google Scholar
 van der Helm, S., McGuire, K. N., Coppola, M., & de Croon, G. C. H. E. (2018). Onboard rangebased relative localization for micro aerial vehicles in indoor leaderfollower flight. ArXiv Preprint. arXiv:1805.07171.
 Van Steen, M. (2010). Graph theory and complex networks: An introduction. Amsterdam: Maarten van Steen.Google Scholar
 Verhoeven, C. J. M., Bentum, M. J., Monna, G. L. E., Rotteveel, J., & Guo, J. (2011). On the origin of satellite swarms. Acta Astronautica, 68(7–8), 1392–1395.Google Scholar
 Werfel, J., & Nagpal, R. (2008). Threedimensional construction with mobile robots and modular blocks. International Journal of Robotics Research, 27(3–4), 463–479.Google Scholar
 Werfel, J., Petersen, K., & Nagpal, R. (2014). Designing collective behavior in a termiteinspired robot construction team. Science, 343(6172), 754–758.Google Scholar
 Wessnitzer, J., Adamatzky, A., & Melhuish, C. (2001). Towards selforganising structure formations: A decentralized approach. In J. Kelemen & P. Sosík (Eds.), Advances in Artificial Life (pp. 573–581). Berlin: Springer.Google Scholar
 Winfield, A. F., Sa, J., FernándezGago, M., Dixon, C., & Fisher, M. (2005). On formal specification of emergent behaviours in swarm robotic systems. International Journal of Advanced Robotic Systems, 2(4), 39.Google Scholar
 Winfield, A. F. T., & Nembrini, J. (2012). Emergent swarm morphology control of wireless networked mobile robots. In R. Doursat, H. Sayama, & O. Michel (Eds.), Morphogenetic engineering: Toward programmable complex systems (pp. 239–271). Berlin: Springer.Google Scholar
 Winfield, A. F. T., Liu, W., Nembrini, J., & Martinoli, A. (2008). Modelling a wireless connected swarm of mobile robots. Swarm Intelligence, 2(2), 241–266.Google Scholar
 Yamauchi, Y., & Yamashita, M. (2013). Pattern formation by mobile robots with limited visibility. In T. Moscibroda & A. A. Rescigno (Eds.), Structural information and communication complexity: 20th international colloquium, SIROCCO 2013, Ischia, Italy, July 1–3, 2013, Revised Selected Papers (pp. 201–212). Cham: Springer.Google Scholar
 Yamauchi, Y., & Yamashita, M. (2014). Randomized pattern formation algorithm for asynchronous oblivious mobile robots. In F. Kuhn (Ed.), Distributed Computing (pp. 137–151). Berlin: Springer.Google Scholar
Copyright information
OpenAccessThis article is distributed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits unrestricted use, distribution, and reproduction in any medium, provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made.