Abstract
Inspired by the morphogenesis of biological organisms, gene regulatory network-based methods have been used in complex pattern formation of swarm robotic systems. In this article, obstacle information was embedded into the gene regulatory network model to make the robots trap targets with an expected pattern while avoiding obstacles in a distributed manner. Based on the modified gene regulatory network model, an implicit function method was adopted to represent the expected pattern which is easily adjusted by adding extra feature points. Considering environmental constraints (e.g. tunnels or gaps in which robots must adjust their pattern to conduct trapping task), a pattern adaptation strategy was proposed for the pattern modeler to adaptively adjust the expected pattern. Also to trap multiple targets, a splitting pattern adaptation strategy was proposed for diffusively moving targets so that the robots can trap each target separately with split sub-patterns. The proposed model and strategies were verified through a set of simulation with complex environmental constraints and non-consensus movements of targets.
Introduction
In the field of robotics, natural species or life science phenomena inspire researchers who work with bionic robots 1 and robotic systems. 2 This is especially the case for insects: Some insects, while quite simple, exhibit amazing behaviors in terms of swarms. For example, sardines can synchronously move by sensing the pressure along their bodies to make themselves appear as big creatures to cheat their predators. Inspired by nature, swarm intelligence has been studied as a special technique for cooperatively controlling a large number of simple robots, named a robotic swarm. 3 A swarm of robots can achieve complicated tasks that are impossible for a single robot with local communication and cooperation. 4 –6 A swarm robotic system is featured by system-level synchronization and parallel behavior and therefore has many advantages, such as robustness, flexibility, and scalability. The application of robotic swarms can be seen in such areas as boundary coverage, perimeter measurement, risk monitoring, military defense, and rescue.
Target trapping is a typical problem of the self-organized control of robotic swarms and has been a hot topic in recent years. Yang et al., 7 inspired by bacterial chemotaxis, proposed a decentralized target search and trapping for robotic swarms. Huang et al. 8 proposed a loose-preference role-based method for swarm robotic systems cooperatively hunting without environment constraints. Pimenta et al. 9 proposed an algorithm based on a smoothed particle hydrodynamics technique to trap static targets with environmental constraints. Kubo et al. 10 introduced a swarm-based task assignment capability to robots’ enclosure model without any global predefined position assignments for each target. Ghanaatpishe et al. 11 proposed a stochastic control method for the problem of following, surrounding, and hunting an escaping target. Yamaguchi et al. 12 designed a control method to coordinate the motions of multiple holonomic mobile robots so as to capture or enclose a target by forming troop formations. Kim 13 incorporated some special features in the particle swarm optimization technique for unicycle robots with line of sight. With the presence of environmental constraints, most of the target trapping algorithms deal with trapping and constraints adaptation separately. Therefore, two different control strategies are needed to accomplish a target trapping task.
In fact, target trapping can also be achieved through pattern formation. The reaction–diffusion model proposed by Turing 14 is a typical pattern formation algorithm. This model has been extensively studied in the literature. 15 –18 In addition, Hsieh et al. 19,20 proposed decentralized controllers for pattern generation with a swarm of robots. These controllers use implicit functions to describe complicated patterns. In recent years, inspired by the development and morphological change process of nature’s creatures, Guo et al. 21 –23 proposed a gene regulatory network (GRN)-based control model for pattern formation. The expected patterns are described by a non-uniform rational B-spline function. Jin and Guo 24 proposed a hierarchical GRNs for adaptive morphogenetic pattern formation of a swarm of robots; this algorithm deals with the problem that combines pattern formation with target trapping. In our previous work, 25 a GRN-based algorithm with asymmetric information for pattern formation was proposed. Recently, Oh and Jin 26 proposed evolving hierarchical GRNs for morphogenetic pattern formation of robots. Obstacles are seen as an environmental input into hierarchical GRNs, which gives the robots the ability of avoiding obstacles while trapping targets in a predefined pattern. Although the robots can adapt to obstacles, they only adjust their positions on the border of the predefined pattern. In some constrained environments, the pattern should also be adjusted to go through a gap or a tunnel to accomplish target-trapping tasks. In turn, the questions arise as how to adaptively adjust patterns and how do robots format such patterns to trap targets?
This article presents an adaptive pattern formation method for a swarm of robots to trap multiple targets in environments with complex obstacles or constraints. Under the framework of hierarchical GRNs, we introduce three inputs to the upper level to generate expected patterns, and such patterns are formatted by a swarm of robots via GRN-based controller. In particular, in addition to the target locations and obstacle information, morphogenetic adaptation strategies are introduced as the third input to adjust the expected patterns. Besides, an implicit function-based GRN controller is proposed to conduct pattern formation.
The main contributions of this work are as follows: Local obstacle information has been introduced into the GRN-based model so that robots can achieve obstacle avoidance while matching the expected pattern. An implicit function approach has been used to represent expected patterns for the target trapping task. The position information of targets and environmental constraints are used as key points (interior, boundary, and exterior points) of implicit function to adjust the patterns when the trapping task is being carried out in complex environments. Two pattern adaptation strategies have been designed for constrained environments (e.g. tunnels or gaps) and multiple targets escaping in different directions where the original pattern has to be changed. With these strategies, the key points of implicit function can be adaptively generated and the expected patterns can be adaptively adjusted.
The remaining content of this article is organized as follows. Section “GRN-based controller for pattern formation with obstacle avoidance” presents the GRN-based controller for guiding robots to entrap targets with obstacle avoidance; section “Pattern adaptation” introduces the implicit function method to represent the target pattern. Then, pattern adaptation strategies are given to enhance the robots to adjust their pattern according to the tunnels or gaps (environmental constraints) while trapping multiple targets. Simulation and analysis are presented in section “Simulation results and analysis” and the conclusions and potential future work are drawn in the last section.
GRN-based controller for pattern formation with obstacle avoidance
Mathematical model of the GRN
The GRN is a model that describes interaction of gene and gene product. In the field of life science, it is an important method to understand how genes control natural tissues and organs. 27 A number of mathematical models of GRN have been proposed, including directed graph, Bayes network, Boolean network, neural network, cellular automata, ordinary differential equations (ODEs), and partial differential equations. 28 –31
ODEs have been well studied to model reaction–diffusion kinetics of regulatory systems. The expression of a gene can be described as a non-linear dynamic system using the following ODEs 32
where r denotes mRNA concentrations, p denotes protein concentrations, V and U denote degradation rates of mRNAs and proteins, f(p) denotes transcription functions of mRNA, and L is translational constants of proteins. f(p) is a sigmoid function as follows
GRN-based controller with individual adaptation
Multi-cellular morphogenesis is under the control of the GRN by regulating the interactions of genes between cells. Inspired by this phenomenon, a GRN-based distributed controller for pattern formation was proposed using ODEs as follows 21
where gi,x and gi,y denote the x-axis position and y-axis position of robot i, respectively. pi,x and pi,y denote the velocity-like property of robot i along the x-axis and y-axis, respectively. a, b, c, k, and m are control parameters. Di,x and Di,y are the sum of distance information of neighbors. zi denotes the morphogen gradient which can be calculated as follows
where s(g) is used to measure how a robot’s position g matches the expected pattern. After zi is calculated, f(zi) can be calculated with sigmoid function in ODEs
The above GRN-based controller has been successfully used to achieve pattern formation in the literature. Recently, in the study by Oh and Jin, 26 the obstacle information was used to centrally generate a target pattern. The pattern segment that falls in the affected area of the obstacle is removed from the target pattern.
In order to achieve obstacle avoidance in a distributed manner, an individual (robot) adaptation is proposed by introducing obstacle information into equation (3) as follows
where Oi,x and Oi,y are the sum of distance deviation of neighbor obstacles and d is a control parameter. Thus, the information of both neighbors and obstacles is collected to avoid collision in this article. Di,x, Di,y, Oi,x, and Oi,y can be calculated as follows
where Nrob and Nobs are the quantity of robots and obstacles, respectively. {uk,x,uk,y} is the position of obstacle k, ξi,j, and γi,j equal to 0 or 1, which is determined by the distance between a robot i and j − th robot and k − th obstacle
where δ is the perceived radius of robot i. γ is the influence range of k − th obstacle.
It can be seen from the above that if function s(g) was provided to measure the deviation between the robots’ position and the target pattern, pattern formation could be achieved using equation (6). The following context will give the details about how to calculate s(g) adaptively.
Pattern adaptation
Section “GRN-based controller for pattern formation with obstacle avoidance” presents the way to achieve distributed pattern formation of a swarm of robots with obstacle avoidance, and the basic target pattern is fixed. In case of environmental constraints (e.g. tunnels or gaps), the expected pattern has to be adjusted to make the robots adapt to environmental constraints while trapping the targets.
To make the pattern adapt to environmental constraints, we use implicit function to represent target pattern s (Section “Implicit function for pattern adaptation”) and design several adaptation strategies for typical environmental constraints (Section “Strategies for pattern adaptation”). As seen in Figure 1, considering a target trapping task, target information

Framework of pattern adaptation.
One can see that there are two kinds of adaptation. The first one is pattern adaptation that the basic pattern is needed to be adjusted to make the robots pass some environmental constraints (e.g. tunnels or gaps). The second one is individual adaptation where the robots only adjust their positions according to the neighboring robots and obstacles for collision avoidance without changing the basic target pattern. Note that the first one is used when needed, while the second one is used through the run.
Implicit function for pattern adaptation
To model the expected pattern s(g), which can adapt to the environmental constraints, an interpolating implicit function (IIF) is used in this article. Implicit functions have been used to create complex shapes in the field of computer graphics for over 30 years. Turk et al. proposed IIF methods 33 to control a 2-D curve and 3-D surface by specifying feature points that are in, on, and outside the curve or surface.
In this article, following IIF methods, three types of feature points in a 2-D case for target-trapping tasks are defined as follows: Interior points: targets that should be entrapped; Boundary points: controlling points on the boundary of the target pattern; Exterior points: environmental constraints that should be kept outside of the expected pattern.
Considering m feature points (i.e. the sum of the number of interior, boundary, and exterior points), the following IIF is used to measure how a 2-D point (Pk)matches the expected pattern
The value of s(g) is positive, zero, and negative when the robot is in, on, and outside the target pattern, respectively. h(x) = x2log(x) is the radial basis function that is used to create smooth implicit functions as suggested in the study by Turk and O’Brien. 34 From equation (13), one can see that the expected pattern is represented when feature points Pk and their corresponding weight parameters wk are specified.
Actually, with the specified feature points Pk, wk can also be calculated using IIF. Here, we set Rs equal to 0, 1, or −1 when the k-th feature point Pk is a boundary, interior, or exterior point. Therefore, we have the following linear equations
where
To better understand the difference between pattern adaptation and individual adaptation (obstacle avoidance with fixed target pattern), see Figure 2(a). It can be seen from Figure 2(b) that pattern adaptation is conducted to keep the constraints outside while trapping the target in a closed curve. In this case, the positions of obstacles are used as feature points in equation (13) to adjust the expected pattern. As for individual adaptation, seen from Figure 2(b), obstacles’ positions are used to calculate Oi in GRN-based pattern formation function (equation (6)) and the pattern formation could be achieved with obstacle avoidance. In this case, the expected pattern is fixed.

Illustration of the difference between pattern adaptation and individual adaptation.
Strategies for pattern adaptation
Seen from equation (13), one needs to provide feature points to create an IIF for pattern adaptation. In general, the interior points are the locations of the targets that are needed to trap. The boundary points are on a circle with specified radius. The exterior points are some sampling points of environmental constraints. In the following context, two typical environmental constraints are considered and the corresponding strategies are given to trigger pattern adaptation and select feature points from environmental constraints.
Pattern adaptation strategy for trapping in narrow space
Narrow space (e.g. gap or tunnel) is a typical case in a real-world environment. If the targets intend to go through a door or a tunnel which is too narrow for the robots to keep the basic pattern, the pattern modeler will adjust the expected pattern using IIF.
dshortest is nearly zero and the constraint cannot be enclosed within the sensing range of the robot which is the closest to the constraint.
As seen in Figure 3(c) and (d), gap- and tunnel-like constraints cannot be covered by the sensing range of the closest robot, pattern adaptation will be triggered when the dshortest equals to zero. In contrast, as seen in Figure 3(a) and (b), when the closest robot’s sensing range can cover the constraints, the pattern modeler will treat the constraints as obstacles, and only individual adaptation (obstacle avoidance) will be conducted even though the target will pass through a gap in Figure 3(b).

Illustration of the triggering criteria of pattern adaptation. R is the radius of basic pattern and r is the sensing range of a robot.
When the pattern adaptation is triggered, the pattern modeler will act to confirm feature points of the new pattern. As seen in Figure 4, the forward and backward points on the basic pattern are used as boundary points, the inner wall points of gaps or tunnels are used as exterior points. With these feature points, the expected pattern could be adaptively adjusted according to equation (13).

Illustration of feature points selection when trapping in a tunnel environment.
Splitting adaptation strategy for multi-target trapping
Another typical pattern adaptation is caused by the diffusive moving of targets and the original pattern has to be split so that the robots can trap each target separately.
The splitting adaptation strategy for trapping multiple targets is illustrated in Figure 5. As seen in the left figure, Nt = 3 targets (denoted by I1,I2,I3) move along different directions and the original pattern is a circle whose radius is R. The origin C of the original pattern is the barycenter of a polygon whose vertexes are the locations of the targets. The splitting adaptation will not be triggered until the distance between a target and C is larger than d0. If a target falls out of the circle specified by C and d0, denoted by OC, exterior points (solid five-pointed stars) will be added between this target and its adjacent neighbors. Besides, a new boundary point will set along the direction along which this target is moving.

Demonstration of setting feature points for splitting pattern adaptation.
Take the right figure, for example. Since all targets have moved outside of OC, three exterior points should be set between every two adjacent targets. As for I1 and I2, the exterior point E1 is geometrically set on the cross-point of the mid-normal of
Simulation results and analysis
In this section, the effectiveness of the proposed methods is verified by simulation results. Firstly, the splitting pattern adaptation for trapping multiple targets is tested. Then, two compositive cases with obstacles, tunnels, gaps, and split sub-patterns are simulated and analyzed.
Before presenting the simulation results, we wish to state some general assumptions in the simulations the robots are homogeneous; only the center of mass motion is considered for the robots, and that means each robot is seen as a moving point; pattern formation is processed within a single robotic swarm. There is no intercommunication between split robotic swarms; sensing range of a robot is limited. Only the neighbors within the sensing range are considered when conducting individual adaptation; information of pattern, targets, obstacles, and constraints can be shared through networked communication within a robotic swarm; environmental constraints are known a priori to all robots so that a robot can determine whether a constraint is enclosed in its sensing radius.
In addition, the following parameter settings are used in the simulations: Sensing radius of a robot is 5 m, radius of basic circle pattern R is 4 m, and d0 = 0.5R. All simulation results are obtained using Matlab2012b on a PC with 2.6-GHz Intel Core CPU and 8-GB RAM.
Simulation of pattern adaptation
To demonstrate how GRN-based pattern formation works, a team of 20 robots are simulated to trap one target (moving at 0.1 m/s) with a door-like environmental constraint. Figure 6 shows three key screenshots and the curve of s2(g). According to equation (4), s2(g) equals to zero if a robot locates on the expected pattern, while greater than zero if a robot locates in or out of the expected pattern. Note that g is the robot’s position.

Simulation results of pattern adaptation when trapping a target with a door-like environmental constraint.
As seen in Figure 6(d), s2(g) decreases to a steady value at about t = 10 s; this means that the robots have successfully trapped the target with a circle pattern. As the target moving toward the door-like constraint, the pattern adaptation criterion is continuously checked. At t = 40 s (Figure 6(a)), when the pattern border has been close enough to the constraint (dshortest → 0 according to Figure 4(c)), the pattern adaptation is triggered. s2(g) starts varying again since the expected pattern is continuously changed. At t = 80 s (Figure 6(b)), s2(g) reaches its peak value because at this moment, the pattern changed the most when the target is just at the center of the “door.” After that, as the target moving away from the constraint, the pattern gradually changes back to a circle (Figure 6(c)) and s2(g) decreases to a low level again.
Simulation of compositive adaptation
This section provides a more comprehensive simulation of the proposed methods. Two scenes including obstacle avoidance, pattern adaptation in narrow space, and splitting pattern adaptation are simulated to test the effectiveness of our pattern adaptation strategies and GRN-based controller.
The number of robots is 20 and these robots initially locate at the lower left corner denoted by green “*.” “Δ”denotes an isolated obstacle with a blue circle being its influence radius. Blue rectangles are other environmental constraints, for example, wall gaps and tunnels. A blue line is the moving path of targets (moving at 1 m/s).
Scene 1: Two targets and one isolated obstacle
In simulation scene 1, the robots are expected to: trap two targets in a sinusoidal path, avoid isolated obstacle, and trap diffusively moving targets with split sub-patterns.
The screenshots are shown in Figure 7. At the beginning, two targets move along a sinusoidal path. When the targets are perceived, the robots start trapping the targets in a circle pattern using the GRN-based controller. At t = 5 s, the targets are successfully trapped within the circle. Then, an isolated obstacle (solid triangle with a small circle being its threatening area) appears in the path ahead. At t = 15 s, the robots achieve obstacle avoidance using individual adaptation without changing the basic circle pattern. Afterward, at t = 24 s, the targets find a horizontal wall and start moving diffusively to escape from both sides. To keep trapping the diffusively moving targets, at t = 26 s, pattern adaptation is triggered and the original pattern is split into two sub-patterns. From then on, the targets are trapped separately by two robotic swarms with smaller pattern sizes. During the whole process, the targets have been always successfully trapped.

Simulation screenshots of scene 1.
Scene 2: Three targets with more complex environmental constraints
In simulation scene 2, the robots are expected to do the following: trap three targets in a sinusoidal path while avoiding multiple compact obstacles, adjust their pattern to go through narrow space (tunnel and door-like constraints), trap diffusively moving targets with split sub-patterns, and trap a target with the aid of a wall-like constraint.
The simulation screenshots of scene 2 is shown in Figure 8.

Simulation screenshots of scene 2.
At the beginning, similar to the scene 1, the robots are required to trap three targets which are moving in a sinusoidal path. However, as shown in screenshots at t = 5 s and t = 8 s, when formatting a circle pattern, the robots have to avoid two compact obstacles. According to the criteria for triggering pattern adaptation, the robots do not need to adjust their original pattern. Therefore, individual adaptation is conducted to avoid multiple compact constraints. Then, the targets intend to escape through a narrow tunnel and a door-like gap. At t = 12 s, the pattern adaptation is triggered to continuously adjust the expected pattern so that the robots can go through the narrow tunnel and gap while keep trapping the targets. Afterward, from t = 34 s, the targets start diffusively moving along different directions to escape. To trap these targets, the robots conduct splitting pattern adaptation from about t = 36 s to split the original pattern into three small sub-patterns with which the original robotic swarm is divided into three sub-swarms to trap each targets separately. Note that one target moves toward a wall-like constraint and one sub-swarm of robots successfully trap this target with the aid of the wall using individual adaptation strategy.
Conclusion and future work
The pattern formation by means of a swarm of robots has a wide range of potential applications. In this article, we focus on the problem of multi-target trapping with the existence of complex environmental constraints. Firstly, the GRN-based controller has been modified to achieve individual adaptation so that the robots can be distributively guided to trap targets and avoid obstacles in an expected pattern. Secondly, a pattern adaptation strategy has been presented to adjust the pattern considering the existence of environmental constraints. With such a strategy, robots can keep trapping the targets in the predefined pattern and pass through narrow space constraints, for example, tunnels and gaps. In addition to the strategy for environmental constraints, another adaptation strategy for trapping diffusively moving targets has also been proposed. With such a strategy, the original pattern is gradually split into several sub-patterns with which the targets are trapped separately by a set of robotic sub-swarms. In the simulation section, a team of robots have been simulated to trap one target with a door-like environmental constraint to demonstrate how GRN-based pattern formation works. Then, two more comprehensive simulation scenes including obstacle avoidance, pattern adaptation in narrow space, and splitting pattern adaptation have also been simulated to verify the effectiveness of our pattern adaptation strategies and GRN-based controller.
Although the effectiveness of the proposed algorithm has been shown, the multi-target trapping problem by means of robotic swarms still needs further study. For example, only typical and fixed constraints (tunnels or gaps) are considered in this article, which is not sufficient for real-world applications. In addition, we have realized that obtaining the shape of an environmental constraint is quite challenging in real applications. Therefore, in simulations, we simply let all robots know information about environmental constraints a priori to verify our trapping algorithms. We hope to incorporate some sensing technique using a laser scanner, radar, or camera in future work and test in physical environments.
Footnotes
Declaration of conflicting interests
The author(s) declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.
Funding
The author(s) disclosed receipt of the following financial support for the research, authorship, and/or publication of this article: This work has been supported by National Nature Science Foundation of China (nos 61105068 and 61473233) and Fundamental Research Funds for the Central Universities of China under grant no. 3102016ZY007.
