## Abstract

A swarm of simple active particles confined in a flexible scaffold is a promising system to make mobile and deformable superstructures. These soft structures can perform tasks that are difficult to carry out for monolithic robots because they can infiltrate narrow spaces, smaller than their size, and move around obstacles. To achieve such tasks, the origin of the forces the superstructures develop, how they can be guided, and the effects of external environment, especially geometry and the presence of obstacles, need to be understood. Here, we report measurements of the forces developed by such superstructures, enclosing a number of mindless active rod-like robots, as well as the forces exerted by these structures to achieve a simple function, crossing a constriction. We relate these forces to the self-organization of the individual entities. Furthermore, and based on a physical understanding of what controls the mobility of these superstructures and the role of geometry in such a process, we devise a simple strategy where the environment can be designed to bias the mobility of the superstructure, giving rise to directional motion. Simple tasks—such as pulling a load, moving through an obstacle course, or cleaning up an arena—are demonstrated. Rudimentary control of the superstructures using light is also proposed. The results are of relevance to the making of robust flexible superstructures with nontrivial space exploration properties out of a swarm of simpler and cheaper robots.

## INTRODUCTION

Swarm robotics (*1*–*4*) uses a multitude of simple robots, with minimal ingredients (such as self-locomotion or simple configurational change) leading, through mutual interactions (*5*–*7*), to global organization with abilities that may go beyond those of the individual particles (*6*–*11*). Different types of robots have been proposed to achieve this goal, from motile vibrating bots and active particles with embedded locomotion to shape-changing and/or light-sensitive particles (*6*–*10*, *12*). The use of scaffolds made of rigid or flexible boundaries enclosing several robots is emerging as a promising strategy to create superstructures with nontrivial properties (*8*, *10*, *13*–*15*). These superstructures can acquire mobility even when the robots have none (*10*). Because of the flexibility of the scaffold, these superstructures can deform and go through constrictions and around obstacles, giving them space exploration properties (*8*, *13*, *14*). Nevertheless, the origin as well as the measurement and prediction of the forces developed by such superstructures remain ill understood, and strategies to direct their motion remain scarce. These forces are essential to predict the size of constrictions that the superstructures can infiltrate and the loads they may transport.

Despite a number of studies on active particles, the simplest type of robot and their self-organization in bulk and under confinement using diverse objects spanning a wide range of spatial scales (*16*–*23*), it remains a fundamental challenge to predict macroscopic properties such as the pressure exerted by assemblies of active particles or the effect of the presence of boundaries on the spatial distribution of these particles (*24*–*26*). When the walls containing the assemblies are deformable and flexible, the physics becomes even more complex (*8*, *13*, *27*–*29*), giving rise to nontrivial instabilities and shapes. How such forces and pressures adapt to changing environmental and geometrical features is, again, not well understood. All of these elements are essential to designing autonomous, scalable, robust, and multipurpose superstructures out of a swarm of robots.

Here, we confined a swarm of motile and mindless robots in a deformable scaffold, creating a superstructure whose dynamics emerges from the self-organization of the robots. The mobility of these superstructures is shown to be directly related to the ability of the rod-like robots to align parallel to each other and perpendicularly to the scaffold walls. This alignment, referred to as the polar order, gives rise to a force pointing perpendicular to the scaffold walls and to the mobility of the superstructure in the direction of this alignment. The emergent mobility of the superstructure is thus directly linked to the self-organization of the individual components, with the polar order being the main driving force for the locomotion. The superstructure was then subjected to perform a simple function, crossing a constriction. We uncover how the geometry of the constriction, its width and length, controls the forces developed by the superstructure to overcome geometrical obstacles and thus the passage time through the constriction. Numerical simulations as well as a simple model complement and rationalize our findings. On the basis of this fundamental understanding of the locomotion of the superstructure in these model confined environments, we devised a simple strategy to direct their motion and test different possibilities for these superstructures, such as pulling loads, moving through an obstacle course, cleaning up an arena, and interacting with each other. Using rudimentary light control of the individual robots, the mobility of the superstructures could be turned on and off, and the organization of the individual robots could be induced leading to mobility. Figure 1 gives a summary of our findings in graphical form going from the individual robot to a controllable superstructure (see also Movie 1).

## RESULTS

To provide a minimal system for studying the robotic potential of superstructures driven by collections of independent robots, we studied the dynamics of a confined collection of such robots in flexible and deformable scaffolds moving in geometries with increasing complexity: a simple straight channel, a channel with a geometrical constriction, and a channel geometry with several such constrictions. Each situation gives direct insight into the mobility of these superstructures, their ability to carry out a simple function, and finally their capacity to have directional motion.

### Superstructure mobility in a straight channel

To gain insight into the emergent dynamics of the superstructure and how it is related to the underlying driving by the robot collective, we began by confining the superstructures in straight channels. The first set of experiments examines the mobility of flexible superstructures of different diameters *D* filled with a number *N* of mobile centimeter-sized rod-like robots (see Materials and Methods) propelled by self-vibration in straight channels of width *H*, comparable to or smaller than the diameter *D* of the scaffold itself and the lengths of several diameters. The scaffolds are made of thin steel strips of various thicknesses *e*, corresponding to varying flexibility of the scaffold (*8*, *30*, *31*). Figure 2A shows snapshots of robot-filled scaffolds in such channels; two channel widths are shown. The state of organization of the robots can be disordered (gas-like in the center) or ordered near the boundary of the scaffold and the walls of the channel (*8*, *26*). This ordering is of two sorts with robots either parallel or perpendicular to the walls. At low *N*, the robots align parallel to the scaffold walls and move along this boundary. Rapidly, after a few collisions between the robots, most of the robots align in the same direction, giving rise to swirling motion. In this state of organization, the superstructure only performs nonpersistent stochastic motion (Fig. 2B and movie S1). At higher *N*, the robots can form clusters where the individual particles point perpendicular to the surface of the scaffold as demonstrated earlier (*8*, *26*). Although these clusters are rather stable, they may lose or gain particles, and they generally drift along the boundary in the counterclockwise direction because of a small bias in the trajectory of the single robots with a tendency to have circular trajectories (*8*). This state of organization gives rise to persistent superstructure locomotion (Fig. 2B and movie S2) with mean velocities that are a fraction of the single rod velocities (*8*).

To quantify these observations, we measure the mean value of the modulus of the velocity of the center of mass of the superstructure <*V*(*t*)> and the angular momentum of the robot assembly, <**L**(*t*)> = <**r**(*t*) × **v**(*t*)>_{t,N}, where **r**(*t*) is the vector position of the robot with respect to the center of the scaffold and **v**(*t*) is the velocity of the robot as a function of the number of robots (Fig. 2C). The brackets indicate a temporal average and an average over all the robots. At low *N*, **L** is high (close to *RV*_{B}, where *R* is the radius of the superstructure and *V*_{B} is the mean velocity of the individual robots), whereas <*V*(*t*)> is low, signaling the swirling motion of the robots along the scaffold surface. For intermediate values of *N*, between 20 and 25 for the example shown in Fig. 2C, the state of organization can be disordered with the appearance of small clusters in an intermittent manner; the superstructure in this state has a low velocity (less than 0.1 *V*_{B}), and no persistent motion is clearly visible (see movie S3). For higher *N*, the superstructure velocity is high (0.1 to 0.2 *V*_{B}), whereas **L** has low values close to zero, signaling the presence of a cluster with robots perpendicular to the walls. A transition from swirling to clustering and thus superstructure mobility in the direction of the channel length occurs for high enough values of *N* (above 25 for the example shown). The transition number depends on scaffold diameter and flexibility and is plotted in Fig. 2D. This number increases linearly for small diameters, corresponds roughly to full coverage of the scaffold surface with parallel rods (highlighted by the dashed line), and starts to deviate from this trend for larger diameters for which full coverage with robots parallel to the walls is never reached before cluster formation. The band in Fig. 2D around the data points signals the fact that for an intermediate range of *N* values, the state of organization is ill defined. These observations and measurements set the tone for our next study, which concerns superstructure mobility and link to the self-organization of the robots.

For each scaffold diameter and flexibility (see fig. S1), a sufficient number of robots has to be used to trigger the persistent mobility of the superstructure according to the phase diagram of Fig. 2D. Under these conditions, we have examined the mobility of different superstructures in channels of different widths both experimentally and numerically (see movies S2 and S4). For the simulations (see Materials and Methods), the self-propelled robots were modeled as rigid spherocylinders built from spherical particles fused together. Each rod-like robot is described as an inertial particle and obeys a Langevin equation for translation and rotation (*8*). A constant force is used in the equation for the dynamics of the position of the robot to give each particle a constant velocity. An additional constant torque *T*_{0} is added to the equation for the dynamics of orientation of the robots to simulate the effect of a rotating trajectory. This torque was used to obtain a close match to the experiments (found for *T*_{0} = 1) for which the robots have a small bias with slightly curved trajectories. This bias and the additional torque introduce a small drift of the clusters along the scaffold walls in the counterclockwise or clockwise direction. This torque turns out to be important for the spatial exploration of the scaffold by the clusters and, as we will see below, has consequences on its mobility. In the simulations (see Materials and Methods), the flexible scaffolds were made of a collection of beads similar to the spherical particles used for the robots. These beads are connected together in a similar fashion as for a polymer chain, which allows to modulate the flexibility of the scaffold surface.

To analyze quantitatively the mobility of the superstructure in different channels, we measured both its velocity in the direction of the channel length, *V*_{X} = **V** · **e**_{x}, and the ability of the robots to align in the same direction. This was measured using the polar order of the robots, *P*_{X} = ∑_{N}**n** · **e**_{x}, where **n** is the unit vector of the robot orientation and **e**_{x} is the unit vector along the channel direction *x*; the sum is over all particles. Figure 3 (A and B) shows examples of such measurements for experiments and numerical simulations. For each of these measurements, a strong correlation between *V*_{X} and *P*_{X} is found as the straight line shows (see fig. S2A for additional measurements). These measurements imply that *V*_{X} = μ*P*_{X}. The value of μ does not depend on *N* but depends on *H* (see fig. S2B): For example, μ = 2/3 cm/s for *H* = *D*, whereas μ = 1/3 cm/s for *H* = 1/2 *D* for this particular example. In the numerical simulations, Fig. 3B and fig. S2B, no dependence on channel width is observed, most probably because of the fact that no solid friction is included in the simulations. The polar order of the robot assembly, and in particular its component along the channel length **e**_{x} with the robots pushing against the walls of the scaffold, is the driving force for the mobility of the superstructure, and the value of 1/μ is the equivalent of a damping (friction) coefficient, which increases as the confinement increases, at least in the experiments. The cross-correlation function of *P*_{X} and *V*_{X}, displayed in the inset of Fig. 3 (A and B), is peaked around 0, showing that the two quantities have no lag time between them. The dynamics of the superstructure is thus overdamped, and the inertial effects are negligible, allowing to write a force balance between dissipation *V*_{X}/μ and the driving force given by *P*_{X} (we here omit a constant factor *f*_{0}, which is the force exerted by a single rod). The total orientation of the rods in the channel direction and therefore the driving force *P*_{X} is, however, a stochastic quantity. The fluctuations of *P*_{X} have different origins. If a cluster is present, the cluster as a whole may rotate and therefore induce a change of the polar order in the direction of the channel length. Furthermore, the cluster may dissolve or may lose or gain particles, giving rise to a decrease or increase of the total polar order *P* and of its component *P*_{X}. On average, however, the rate of change of this polar order is proportional to the polarization itself with a well-defined characteristic time τ_{c}. Figure 3C shows that <*dP*_{X}/*dt*> versus *P*_{X} is linear, a relation from which τ_{c} can be estimated. This time scale is of order a few seconds and turns out to be related not only to variations in the number of particles pointing in the direction of the channel length or in the cluster but also to the bias in particle trajectories in experiments, which induces a rotation of the robots or the clusters and to the additional torque in simulations. For example, for the torque used here, *T*_{0} = 1, τ_{c} is roughly 6.5 s; for a larger torque, *T*_{0} = 1.5, this time scale is shorter and is roughly 2 s, whereas for a smaller torque, *T*_{0} = 0.6, it is nearly 14 s. To gain more insight into this time scale, we also calculated the autocorrelation functions of *P*_{X} with the additional condition that only small clusters are considered. This correlation function turns out to be roughly exponential with a finite correlation time as shown in Fig. 3D. We thus hypothesize, in a minimal description of the dynamics of the self-organization of the robots, that *P*_{X} is a Gaussian random process with a finite correlation time. These observations can be rationalized by writing a linear relation between *V*_{x} and *P*_{X} (Eq. 1) coupled to the hypothesis supported by experiments (Eq. 2) that *P*_{X} is a Gaussian exponentially correlated process (see fig. S3). In Eq. 2, δ(*t*) is a Gaussian delta correlated noise (see fig. S4) and τ_{c} is the correlation time of the process.

Our numerical simulations of superstructures confined in linear channels show similar behavior as shown in Fig. 3. The difference between simulations and experiments comes, most probably, from the friction of the channel walls that is present in the experiments but not in the simulations, giving differences in the value of μ and its dependence on the channel width *H*. Nevertheless, the main features of the phenomenology of superstructure mobility are captured by our numerical simulations.

To summarize, the velocity of the superstructures is directly linked to the polar order of the robots in the direction of motion, which is the driving force of this locomotion. This polar order is a stochastic quantity that is reasonably well described by a Gaussian exponentially correlated noise with correlation time τ_{c}. The mobility of the superstructures therefore sets in only when the polar order is large and is thus linked directly to the self-organization of the robots as shown in our phase diagram.

### Superstructure mobility through a constriction

The first step toward robotic function is the ability to solve simple tasks. Thus, we studied how the superstructures respond when challenged with the task of overcoming an obstacle in the form of a thin constriction. Despite the simplicity of this function, overcoming obstacles is essential for the development of spatial exploration properties. We first focused on the statistics of the passage times of the superstructure between two compartments separated by a geometrical constriction to examine how much time is needed for the superstructure to overcome the obstacle. We followed this by a study of the forces at play to examine how the driving force of the assembly of robots adapts to the presence of such an obstacle.

### Statistics of transitions through a constriction

We used the same superstructures with a sufficient number of particles for mobility to set in but in a channel with an embedded constriction placed in its central part of length *L* and width *H*. Note that we have kept the same symbol for the constriction width as that of the channel width above. As we will show below, the addition of a constriction in such a channel transforms the problem into a transition from one chamber to the other (see movies S5 and S6). This two-state system is interesting on its own and has been used previously to measure the dynamics of deformable motile entities in a recent study of migrating cells (*32*, *33*). Images of such channels and a montage of the superstructure going through the constriction are shown in Fig. 4 (A and B) for experiments and numerical simulations. The dynamics of the center of mass of the superstructure versus time shows a two-state system, with the superstructure residing in the same chamber for some time before transiting to the other chamber after a certain waiting time. This transition may occur several times for a given period of time. In Fig. 4 (C and D), several successful passages but also several unsuccessful ones can be observed.

To measure the statistics of this stochastic process (*32*), we plot in Fig. 4 (E and G) the probability distribution of dwell times PDF(τ) (τ being the time that the superstructure remains in a chamber before crossing the constriction) and the so-called survival probability **d***t*. Although PDF(τ) shows a peak at small times and decreases slowly for larger times, the survival probability shows a roughly exponential behavior giving a simple way to find a characteristic time for transiting from one chamber to the next: *S*(τ) = exp(−τ/<τ>). This characteristic time can also be obtained by counting the number of successful transits for a long enough period of time. The characteristic time <τ> is plotted (Fig. 4F) versus the length of the constriction *L* for a fixed number *N* of robots. The characteristic time depends also on the flexibility of the superstructure (i.e., the thickness of the walls *e*) and the width of the constriction *H* as we point out in fig. S5. Note that for a fixed width *H*, the characteristic time <τ> increases roughly linearly with *L*. All these elements are reproduced nicely with our numerical simulations, the results of which are superimposed on the experimental data in Fig. 4 (E to G). The linear increase with constriction length is a feature noted previously, albeit for a completely different system, and rules out different scenarios for the transition, such as a double well potential or other scenarios (*32*).

### Forces and polarization maps

Although the superstructures are capable of accomplishing the function of transiting between different chambers, the forces at play need extra scrutiny. To this end, we plot in Fig. 5 (A and E) the trajectories of the center of mass of the superstructure in (*V*_{X}, *x*) space and their properties (*32*). While in the chambers, the superstructure velocity hovers around zero. As a passage through the constriction starts, the velocity increases with a clear acceleration phase. Near the middle of the constriction, the acceleration starts to decrease before the whole superstructure starts to decelerate as it makes its way toward the second chamber. A similar scenario occurs as the structure goes from right to left. We track the center of mass of the superstructure, so acceleration starts before reaching the position of the constriction because the front of the superstructure situated one radius ahead is already near the constriction entrance. These positions are indicated by dashed lines in Fig. 5 (A and E), whereas the shaded region indicates the constriction limits. Different flexibilities show qualitatively similar behavior (fig. S6). Although the velocity variations indicate acceleration and deceleration phases, it should be kept in mind that such changes are due to changes of the polar order to which we now turn.

We plot in Fig. 5 (B and F), for experiments and simulations, respectively, the mean polar order in the *x* direction, <>. This polar order is large and has the same sign as the velocity all through the phase where this velocity is nonzero regardless of whether the superstructure is accelerating or decelerating (upper and lower parts of the map of <*P*_{X}>). To examine whether *V*_{X} and *P*_{X} remain correlated as in the straight channel, we plot the mean value of their difference, <*V*_{X}/μ − *P*_{X}>, in Fig. 5 (C and G). All along the trajectory of the structure, while the scaffold is fully within the constriction, the two quantities remain proportional (the value of the difference is small) as in the linear channel discussed above with a similar value of μ as for a channel with a similar width *H* as the constriction. However, the two quantities are not equal near the entrance of the constriction (when the center of mass is at *L*/2 + *R*). Near this entrance, an additional resistive force (its sign is opposite to that of <*P*_{X}>) is apparent from these maps, indicating that the geometry (the sudden contraction of the channel due to the presence of the constriction) resists the passage of the superstructure. Geometry is exerting an additional resistive force whose origin can be the elastic response of the scaffold following its large deformation but also the reaction of the walls of the channel near the contraction.

In the presence of the constriction, the equation of motion needs to be modified with respect to that in the straight channel to take into account this additional resistance. This is achieved by invoking an additional force *F*(*x*, *V*_{X}), which is unknown but can be extracted from the maps of Fig. 5 (C and G). We then write the following force balance, with α being an additional constant “friction” parameter

Because the orientation or polar order of the assembly, in the direction of the channel length *x*, and its temporal dynamics are crucial for the locomotion of the superstructures, we proceed in a similar manner as for the velocity and plot the map of the mean difference between *dP*_{X}/*dt* and −*P*_{X}/τ_{c} to examine whether the proportionality between *P*_{X} and its rate of change remains true in the presence of the constriction. Again, as for the *V*_{X} versus *P*_{X} relation, additional variation is observed in Fig. 5 (D and H), where a map of <τ_{c}*dP*_{X}/*dt* + P_{X}> is shown in (*P*_{X}, *x*) space. Near the entrance, an additional contribution is again observed as the superstructure enters the constriction. The dynamic equation for the polar order needs to be modified to take into account the role of geometry

The contribution *G*(*x*, *V*_{X}) is positive and helps increase the polar order near the constriction. It is this increase in polar order induced by the presence of the constriction that balances the additional resistive force *F*(*x*, *V*_{X}) and allows the passage of the superstructure through the constriction. This increase in polar order near the entrance is most probably due to the interplay between polarization and the curvature of the scaffold (see Fig. 4, A and B) as the superstructure enters the constriction (*8*, *27*).

With these ingredients summarized in Eqs. 3 and 4, the system dynamics can be captured in detail. To this end, we carried out a numerical resolution of these model equations, the results of which are shown in Fig. 4 (E to G) and fig. S7. The values of μ and τ_{c} were obtained from the simulations, and the experiments in channels and similar assumptions for the noise δ(*t*) and the Gaussian nature of *P*_{X} (which are tested in figs. S3 and S4) were used. The additional terms *F*/α and *G* have been approximated by appropriate functional shapes in the maps of Fig. 5 and taken into account in the resolution of the set of equations. The center of mass dynamics versus time (fig. S7) bears much resemblance to the experimental and numerical time traces obtained above. Furthermore, the probability distribution of dwell times and the survival probability are also reproduced faithfully with a roughly exponential decay for the latter (Fig. 4, E and G). The variation of the mean dwell time versus length of constriction is also in agreement with experimental and numerical data shown along with the model results in Fig. 4F. Our minimal model is thus in very good agreement with observations from both the experiments and the simulations.

### Multiple constrictions

Having demonstrated the function of transiting through a constriction and revealed the nature of the forces at play, we then turned to an examination of how such superstructures handle the presence of multiple constrictions of varying lengths in a linear channel. We anticipated that the superstructure will have a tendency to move preferentially in the direction of decreasing constriction lengths and can thus be guided. Guiding through geometrical features has, for example, been proposed before (*34*, *35*). Our superstructures are capable of going through a narrow constriction by deforming and by harnessing the self-organization of the robots induced by the confinement and the presence of a geometrical contraction. The mean dwell time of the superstructure in a compartment is fixed not only by the properties of the scaffold but also by the geometry of the constriction. This dwell time increases roughly linearly with the constriction length for a fixed constriction width. This observation points to a simple strategy to direct the stochastic motion of such superstructures. Figure 6A shows a channel with a sequence of constrictions with increasing lengths *L*. The rationale behind this architecture is based on our experimental observations: A superstructure in a chamber delimited by a long and a short constriction on either side has a higher probability of crossing the shorter constriction. In a sequence of constrictions, the superstructure may thus have a higher probability to go in the direction of decreasing constriction lengths. This is a stochastic process as shown in fig. S8 and Fig. 6B, which display results from a series of 11 different experiments, indicated by different colors, where the superstructure was placed in a compartment and the position of its center of mass was monitored for different periods of time (see movie S7, for example). There are five compartments separated by four different constrictions of different lengths that decrease as the compartment number goes from one to five. The time series of center of mass positions (fig. S8) shows that the superstructure can transit from one compartment to the other and so on in a stochastic manner. Figure 6B shows a sample of transits from compartment to compartment versus the transit number. The consolidated data from several runs (11 runs and over 7 hours of monitoring) from which Fig. 6B is an example, with almost 400 transit events, show the stochastic nature of such transitions. This plot shows already that transits toward compartment 5 are more probable. That the transition probabilities are asymmetric in this architecture is borne out by measurements of this probability from compartment *k* to *k* + 1 and from *k* to *k* – 1, as shown in Fig. 6C. For example, for compartment *k* = 4, transition to *k* = 5 has a probability close to 0.8 as opposed to transition to *k* = 3, which has a probability near 0.2.

To examine whether, statistically, transiting in the direction of decreasing constriction lengths is more likely, we examine the probability of moving from one end of the channel to the other. That this mobility is directional is summarized and quantified in Fig. 6D, where we plot the conditional transition probability to go from compartment 1 to compartment *k* in *k* – 1 successive steps and from compartment 5 to compartment *k* in 5 – *k* successive steps. This probability measures the likelihood of direct paths in increasing or decreasing order in *k* depending on whether the path starts from compartment 1 or 5, respectively. Although this probability decreases as *k* changes, the chances of the superstructure ending up in compartment 5 starting from compartment 1 are much higher than the reverse: 40 versus 10%. The superstructure has a higher probability of following a direct path in the direction of decreasing constriction lengths. Furthermore, the obtained transition probabilities are not simply related to the independent probabilities from compartment *k* to *k* + 1 or *k* – 1, as shown by the red and green dashed lines in Fig. 6D, which underestimate our results. Transitions across the different constrictions are, in fact, correlated beyond a single constriction, especially in the direction of decreasing constriction lengths. In fig. S9, we show the conditional probabilities of transition over two compartments successively. By using these correlated probabilities (fig. S9), we obtain a much better agreement with the data of Fig.6D than the uncorrelated transition probabilities of Fig. 6C.

These measurements demonstrate a bias in the stochastic transition from compartment to compartment in the presence of different length obstacles, giving rise to directional motion in a gradient of geometrical constriction lengths. The local self-organization of the individual rods as they get aligned in the direction of motion allows them to cross at least two constrictions in a row instead of reversing direction, giving rise to correlations in transition rates. That the orientation of the robots in the direction of motion remains correlated over a certain time is crucial for this to occur and gives rise to correlations between transition events in successive transitions signaling the presence of memory effects (*34*). This is especially true for the transition in the direction of decreasing constriction lengths.

## DISCUSSION

These superstructures, consisting of self-motile rods in a flexible scaffold, exert forces on their surroundings, allowing them to pass through a flexible door (fig. S10 and movie S8) and pull loads up to half of their weight (Fig. 7; see also movie S8) in straight channels or in channels with obstacles. Furthermore, the superstructures exert sufficient force to push obstacles around and clean up an arena in a more efficient manner than individual robots (Fig. 8A and movie S9), whereas two superstructures in the same arena can interact in what seems like a game of rudimentary billiards (movie S9). All these functionalities rely on the self-assembly of a cluster of the self-propelled rods inside the scaffold leading to the motility of the superstructure. Without the spontaneous polarization, the working efficiency is reduced (see, e.g., movies S8 and S9, where the spontaneous reformation of the clusters after their destruction occurs several times).

All of these tasks are carried out by autonomous entities with no external control. Rudimentary light control can be introduced at low cost (see Materials and Methods and fig. S11). For this purpose, we have equipped a number of individual robots with a second motor on their back. This motor, which is connected to a second battery, a photo transistor, and elementary electronics, can be actuated by shining sufficiently strong light on the photo transistor. Using the second motor alone, the robots start moving when light is shone on them and end up self-organizing, leading to mobility of the superstructure (see movie S10). When light is turned off, the robots stop and the superstructure becomes immobile. The robots can also be driven by using both the internal motor and the second external motor. The robots move as usual because of the action of the internal motor; when the second one is turned on by shining light on the photo transistors, the robots start moving in circles in the same direction as the external motor, i.e., in the clockwise direction (see movie S10). This was achieved by carefully adjusting the chip carrying the circuitry, the additional motor, and the battery on the back of the robots and by choosing the rotation direction of the external motor. The light-controlled chirality can be used to control the dynamics of the robot assembly. When the second motor is turned on, the swirling state that prevails at low surface fractions of robots ceases to exist and gives rise to clustering of the individual robots: As the robots swirl around the scaffold in the anticlockwise direction, if the second motor is turned on giving the robots a torque in the clockwise direction and thus rotation opposite to the swirling, collisions between robots occur, leading to the formation of a cluster strong enough to induce mobility of the superstructure. This clustering, which occurs now at lower densities, and the induced mobility of the superstructure can be seen in movie S10. This control can also be used in the presence of a constriction: When the second motor is turned on, clustering is induced, and the superstructure endowed with mobility manages to cross the constriction as seen in Fig. 8B and movie S10. In short, the superstructures examined here can carry out several tasks in an autonomous fashion, but they can also be at least partially controlled externally using light, for example, to start or stop the superstructure or to spark their mobility by inducing clustering of the individual robots.

To summarize, swarms of simple mindless rod-like robots endowed with their own mobility harness boundary effects to self-organize and propel larger and more complex entities. These superstructures have the ability to go through narrow constrictions, smaller than their size, by exerting forces produced by the local alignment of the individual robots, alignment that itself can be favorably influenced by the presence of geometrical features. Our experimental and numerical study has yielded a minimal but simple model for the mobility of superstructures made out of a swarm of simple robots and documented the different forces engendered by these superstructures. A simple way to direct the motion of these superstructures in linear channels with a gradient in constriction properties is proposed. Although the idea of crossing constrictions with variable lengths appears simple, the inherent structure of the organization of the individual robots and its temporal correlation gives rise to nontrivial effects that are manifested by memory effects. Further experiments also show that these superstructures can carry out different tasks, such as pulling a load, going through a simple obstacle course, and cleaning up an arena. Using two such superstructures, the premise of a battle game also emerges. Simple rudimentary control of the individual robots brings forth ways to control the superstructure and the onset of self-organization leading to its mobility.

## MATERIALS AND METHODS

### The robots, the superstructures, and their tracking

The motility of the plastic robots used here is induced by the vibration of the robot itself with an embedded battery operating a vibration module working at frequencies between 150 and 60 Hz. The plastic robots have asymmetric soft legs, which after a few vibration cycles give rise to a directed movement with velocities that depend on the frequency of vibration and can be varied from roughly *V*_{B} = 30 to 20 cm/s. The workings of these bots have been described in (*8*, *30*, *31*). The bottom plate on which the robot vibrates and its defects as well as the dynamics of the asymmetric legs of the robots give rise to noise in this directed movement. The experiments are carried out using a fixed number *N* of these robots confined in circular scaffolds of different diameters *D*, and their dynamics is followed by video imaging for different values of *N*.

These robots have dimensions of 4.5 cm by 1.5 cm. They are somewhat elliptical and were used at speeds near 25 cm/s. They are driven by a battery and a small vibration device, which vibrates at frequencies fixed by the voltage of the battery. An eccentric rotating mass vibration motor is used to drive the vibration. Both the driving speed and the frequency can be changed, but the two quantities are correlated. Moreover, these robots have a small bias (due most probably to the rotation of the eccentric mass of the motor), giving rise to circular trajectories (with large radii of curvature). The axis of the eccentric motor giving rise to the vibration of the robots is mounted along the longitudinal axis of the rod, and the eccentric mass spins counterclockwise, inducing the bias in the trajectory. This bias, which is difficult to observe for a single robot, gives rise to a drift of a cluster along the boundary. This drift is systematically counterclockwise (as all the vibration motors rotate in the same direction) and allows the cluster to move around in the superstructure and eventually find the entrance of the constriction.

To track these robots, they were painted black, and two colored spots were stuck on their backs. Tracking both spots simultaneously and on all visible robots in color video recordings done at different rates (going from 1 kHz down to a few frames per second) allows us to extract both the orientation of the robots and their center of mass and therefore obtain their instantaneous translation velocity as well as their angular velocity and orientation. As such, one obtains velocity distributions, densities, and other quantities, such as the spatial configuration of clusters, clustering probabilities, and total polarization from video recordings.

Flexible scaffolds of different sizes (typically a few tens of centimeters in diameter *D* and 2 cm in height) are made of thin metal strips of thickness 100 or 50 μm. The robot-filled scaffolds are then confined in linear channels made of aluminum bars with length of 2 m, height of 2 cm, and widths that vary from *D* down to *D*/4. The constrictions are made of similar material and are embedded in the straight channels. The ends of the compartments are made of the same steel strips as the scaffold. Both the center of mass of the superstructure, its full contour, and the position and orientation of the robots are measured from movies taken with a color camera over a duration that can reach up to 60 min depending on the experiment. Several such movies are then made, and data from these movies were combined to increase the statistics. For example, for the data in Fig. 1C and for each *N*, a 10-min movie was recorded to determine the corresponding value of *L* and <*V*(*t*)>. For Fig. 1D, and in addition to an analysis similar to Fig. 1C, for each diameter, a movie of a few minutes was recorded for different values of *N* to determine visually the time spent by the robots in the swirling state or in a stable cluster. If no stable swirling or cluster is observed, the time spent in this intermediate state is measured. The swirling state or the cluster state is only taken when the time spent in this state is larger than 0.8 times the duration of the movie. The extent of the intermediate state is noted as the band around the measurement points. For Fig. 2, for each value of *N*, at least 60 min of recording time were used to extract the velocity and polarization along with their correlation functions. Similarly, for the simulations, at least the equivalent of 3 hours of recording was used. For Fig. 3, several movies (10 in total) of 30-min duration (a total of 5 hours of recording) were used for each constriction length. For the simulations, the equivalent of 30 hours of recording was used. The maps used in Fig. 4 used at least 5 hours of recording and are obtained by binning data in (*V*_{X}, *x*) or (*P*_{X}, *x*) space and averaging over these bins. The data for these maps come from analyzing at least 10 movies of 30-min duration. For the simulations, the equivalent of 30 hours of recording was used. The data of Fig. 5 used 11 movies for a total duration of over 7 hours for the analysis of probabilities; this represents a total of over 380 transitions.

The robots have been modified by attaching a small chip on their back: This chip consists of a battery (similar to the one already present), a phototransistor, a variable resistance, a transistor, and a switch to control the direction of rotation of the motor. The schematic of the circuit and its different components is shown in fig. S11. The variable resistance allows the fixing of the threshold light intensity for the onset of the additional motor. The chip has the same width as the robots and has a length of 3.5 cm (smaller than the length of the robots). The chip was then fixed on the back of the robots using a plastic holder glued to the back of the robot. The chip has to be carefully centered on the back of the robot. If the rotation of the second motor is clockwise, and when both motors are on, we noted that the trajectory of the robot becomes circular with a radius of roughly two robot lengths or smaller (see movie S10). This behavior depends on how and where the chip is fixed on the back of the robot. We have obtained roughly similar trajectories by trial and error on each individual robot equipped with the chip.

### Langevin dynamics simulations

The self-propelled rods were modeled as rigid spherocylinders of total length *l* + *d* and diameter *d*, built from six spherical particles of mass *m* and a diameter *d* fused together. The cylinder length to width ratio was fixed *l*/*d* = 2. The ratio of total length to width is therefore close to the experimental ratio, which is 3. The individual spherical particles interact with each other and with the boundary via a repulsive Weeks-Chandler-Andersen potential*r _{ij}* ≤ 2

^{1/6}

*d*and

*U*(

*r*) = 0 for

_{ij}*r*> 2

_{ij}^{1/6}

*d*. ϵ fixes the energy scale of the system. Each rod-like particle indexed by

*i*obeys a Langevin equation for translation and rotation

Note that in these equations we have kept the inertial terms proportional to the mass *m _{i}* of the rods and to their moment of inertia

*I*. This is in line with experiments where inertial effects at the single rod level are important (

_{i}*8*). The vectorial noise

**η**and the scalar noise Γ are both of zero mean and delta correlated in time, with amplitudes η

_{0}and Γ

_{0}. Here,

*F*

_{r}and γ

_{θ}are the translational and the rotational friction coefficients, and

*T*is the torque exerted by the other particles and related to the repulsive potential

_{i}*U*. An additional constant torque

_{i}*T*

_{0}can be added to the second equation to simulate the effect of a rotating trajectory. This torque was used to obtain a close match to the experiments and allows for a small drift of the clusters along the superstructure walls in the counterclockwise or clockwise direction. This torque turns out to be important for the spatial exploration of the superstructure by the clusters. We fixed the mass

*m*= 1, the energy ϵ = 1, and the length

*d*= 1. The simulations were carried out using the parameters unless otherwise specified,

*m*= 6, γ

_{i}_{r}= 3,

*F*= 10, γ

_{θ}= 1.4, and

*I*= 2.8 in reduced units. The amplitudes of the noise terms are

*8*).

The scaffold was modeled as a semiflexible polymer using a bead-spring model. Adjacent beads were bonded together using harmonic bonds and angles*r*_{ij} is the distance and θ_{ijk} is the angle between the neighboring beads, *r*_{0} and θ_{0} are the equilibrium bond length and angle, respectively, and *k*_{b} and *k*_{θ} are stretching and bending constants.

The angle constant was fixed to *k*_{θ} = 600, whereas the bond constant was fixed to *k*_{b} = 10^{5} to avoid stretching of the confining polymer.

The equations of motion were solved using a modified version LAMMPS (large-scale atomic/molecular massive parallel simulator) (*36*), where the active force was included, using a time-step Δ*t* = 0.001. The rendering of the images from the simulations is carried out using OVITO (*37*).

## SUPPLEMENTARY MATERIALS

This is an article distributed under the terms of the Science Journals Default License.

## REFERENCES AND NOTES

**Acknowledgments:**We thank R. Houques for help with the experimental setup.

**Funding:**H.K. and J.C.B. thank the IUF for partial funding. J.L. acknowledges IdEx (Initiative d’Excellence) Bordeaux and the French National Research Agency (ANR) through contract no. ANR-19-CE06-0012 for funding.

**Author contributions:**H.K., with help from D.B.B., designed the experiments. C.L., J.F.B., A.D., and H.K. performed the experiments; C.L., J.F.B., T.B., J.C.B., D.B.B., and H.K. analyzed the data. J.F.B. developed the theoretical model. J.L. performed the numerical simulations and analyzed the data with J.F.B. S.C. constructed the light-sensitive chip with help from B.T. K.X. analyzed data using elasticity theory. H.K. wrote the paper with input from all authors.

**Competing interests:**The authors declare that they have no competing interest.

**Data and materials availability:**All data needed to support the conclusions of this manuscript are included in the main text or the Supplementary Materials. These data are also available upon request.

- Copyright © 2021 The Authors, some rights reserved; exclusive licensee American Association for the Advancement of Science. No claim to original U.S. Government Works