Active Brownian particles and run-and-tumble particles separate inside a maze

A diverse range of natural and artificial self-propelled particles are known and are used nowadays. Among them, active Brownian particles (ABPs) and run-and-tumble particles (RTPs) are two important classes. We numerically study non-interacting ABPs and RTPs strongly confined to different maze geometries in two dimensions. We demonstrate that by means of geometrical confinement alone, ABPs are separable from RTPs. By investigating Matryoshka-like mazes with nested shells, we show that a circular maze has the best filtration efficiency. Results on the mean first-passage time reveal that ABPs escape faster from the center of the maze, while RTPs reach the center from the rim more easily. According to our simulations and a rate theory, which we developed, ABPs in steady state accumulate in the outermost region of the Matryoshka-like mazes, while RTPs occupy all locations within the maze with nearly equal probability. These results suggest a novel technique for separating different types of self-propelled particles by designing appropriate confining geometries without using chemical or biological agents.

aflagellated mutants of Salmonella or other microbes infect host cells with different efficiencies 53 . So, it is of crucial importance to separate different types of active particles or microswimmers from each other. It has already been demonstrated that active particles can be separated from passive colloids by using funnel-shaped barriers 29 or the tendency of active particles to accumulate in corners 19,54,55 . Different types of active particles are also separable from each other according to their chiralities and linear or angular speeds 56 . However, a powerful tool or strategy to separate ABPs and RTPs from each other is missing.
In this article, we present such a strategy by investigating active particles in suitable geometries analogous to mazes, which are illustrated in Fig. 1. Mazes or labyrinths are interesting complex geometries and solving them, i.e., proceeding from the entrance to the exit, has been a challenging problem for many centuries. For example, using chemotaxis, active particles are able to solve mazes and find the shortest path towards the exit [57][58][59] . Here, we consider non-interacting ABPs and RTPs inside the different two-dimensional mazes of Fig. 1, but without any chemical field. Using computer simulations to determine mean first-passage times and stationary probability distributions, we demonstrate that ABPs are faster than RTPs in moving from the center to the rim of circular and square mazes, while RTPs reach the center more easily. This suggests the nested regular mazes of Fig. 1(a) and (b) as excellent tools for separating active particles from each other, with an advantage for the circular shape as we will demonstrate.

Materials and Methods
We consider a single self-propelled particle that is either an ABP or RTP. We place it at a specific starting point inside the maze and monitor its dynamics until it reaches the target point using two-dimensional Brownian dynamics simulations. To obtain the full statistics for an ensemble of non-interacting active particles, we perform many simulation runs to generate different realizations for the same initial condition.
Particle Dynamics. The position vectors of both model particles evolve according to the same over-damped Here, the overdot indicates time derivative, v 0 is the particle's self-propulsion speed, which is kept constant during the simulations, and its intrinsic direction of motion is given by the unit vector θ θ = +ˆê x y cos( ) sin( ) , where θ is the orientation angle with respect to an arbitrarily chosen x axis. The particle interacts with walls by a simple repulsive force (see e.g. refs 49 and 60) implemented such that the total particle velocity along the normal of the wall is zero at contact: The unit vector n indicates the local normal, R is the particle radius, which sets the length scale of our problem, and ∆  r w denotes the closest distance between particle center and nearest point on the wall. Since F w removes the normal component of the self-propulsion velocity, active particles slide along the walls, which reproduces experimental observations 18,[29][30][31] . In the following, we neglect translational diffusion for both types of particles (D t = 0). More details about the numerical method are provided in the supplementary material.
Most importantly, ABP and RTP differ in the dynamics governing their orientation angle. An ABP changes its self-propulsion direction continuously due to rotational diffusion. Thus, where D r is the particle's rotational diffusion constant and η is unbiased (< η(t)> = 0) and uncorrelated (< η(t)η(t′ ) > = δ(t− t′ )) white noise. In contrast, an RTP changes its direction abruptly with rate α at each time step, The sum runs over all tumble events that stochastically happen at times T i . The tumble angle Δ θ i is selected with equal probability from the range between 0 and 2π. At long times the motion of ABPs and RTPs becomes diffusive in unconfined space. The respective diffusion constants agree if the equivalence condition (d− 1)D r = α (with d the spatial dimension) is fulfilled 21 . We will use this relation to compare the results for ABPs and RTPs to each other. In two dimensions, τ r = 1/D r is the persistence time of an ABP, on which the particle orientation decorrelates. For an RTP the equivalent time τ r = 1/α is the mean run time between two tumble events. To characterize the motion of both particle types, we will use the persistence number r r 0 which compares the length of straight runs to the particle diameter, and vary it in the range P r ∈ [1.5, 75.0].
To investigate the single-particle behavior of ABPs and RTPs, we propose three geometries analogous to mazes; a circular, square, and non-regular (random) maze. Each maze is characterized as follows.
Types of Mazes. Circular maze. Figure 1(a) shows a picture of the circular maze. It consists of five concentric circular shells (walls) nested inside each other, similar to a Russian Matryoshka doll. The inner-shell radius is r 1 = 1.8R and the other ones obey r i − r i−1 = 2.05R (for i = 2, 3, 4, 5). So the width of each circular annulus (zone) is a little larger than the diameter of the particle. Using these values, the particle effectively moves on one-dimensional circular paths with varying speed depending on particle orientation ê. Except of the outer shell, all other shells have an opening to let the particle transfer between adjacent zones. All these openings have the same width equal to 3R and are opposite to each other for neighboring shells.
We study the ability of both active-particle types to solve the maze in two cases. In the first case, we initially place the particle in the central zone of the maze and wait until it reaches the outer zones (this case is briefly called outwards). In the second case, we initially place the particle in the outermost annulus and wait until it reaches the central zone of the maze (inwards). In both cases, the initial particle orientation is along +x. We measure the mean first-passage time (MFPT) for the particle to pass through each opening [as numbered in Fig. 1(a)]. The numerical simulations run over 200 realizations for the outwards and between 30-200 for the inwards case.
Square maze. We investigate the effect of wall curvature by considering a square maze analogous to the circular one. As shown in Fig. 1(b), the square maze consists of five concentric square shells nested inside each other. Their edge lengths equal the diameter of the corresponding circle in the circular maze. Initial conditions are similar to the circular maze. The results for the MFPTs are obtained by averaging over 200 initializations for both the outwards and inwards case.
Non-regular maze. We consider a random (non-regular) maze to find out how the absence of regularity of the previous geometries affects the particle behavior. The non-regular maze studied here [ Fig. 1(c)] is a branched maze with several dead ends, one entrance, one exit, and a single solution. It is constructed in such a way that its lane width equals the zone width of the Matryoshka-like mazes described before. The self-propelled particle is initially placed at the point of the maze marked Start in Fig. 1(c) with random velocity direction and the MFPT is measured for the particle to reach the End point. Results are obtained by averaging over 200 initializations.

Circular maze (outwards).
We find that the MFPT not only changes systematically with persistence number P r but it also depends on the type of the self-propelled particle. Figure 2(a) shows the MFPT of both particle types for the outwards initialization. For both types of particles, the MFPT decreases with P r . However, the ABP (solid symbols) always reaches the openings in the confining walls faster than the RTP (open symbols). Both observations can be understood by carefully analyzing how the self-propelled particles move along the walls. At large persistence number P r (strong confinement regime), the ABP performs a random walk along convex boundaries. While its mean orientation is aligned with the local boundary normal, the momentary orientation fluctuates about the normal and thereby leads to short drift motions 49 . By sliding along the walls, the ABP readily finds the wall openings and escapes through them successively (see Supplementary movie 1). In contrast, the RTP detaches from the wall during a tumble event where it reorients abruptly (see supplementary movie 2). This strategy seems to be less efficient for finding the openings, since the RTP does not use the guiding walls as much as the ABP does. Thus, the MFPTs are larger in this case. By decreasing P r , both particles more often detach from the walls and the exit times increase accordingly.
In case of an ABP, a simple random-walk model describes the asymptotic behavior of the MFPT in the limit of large persistence number P r . In this case the particle orientation is mostly aligned with the local boundary normal and the orientation angle θ also describes the location of the ABP in the annulus [see Fig. 3(a)]. We can now calculate the MFPT to go from one wall opening to the next one and thereby to pass to the next zone in the maze. The total MFPT is then the sum over all openings reached. The orientation angle just changes by rotational diffusion. So, in order to escape through an opening, the orientation angle has to diffuse from θ 0 (the position of the previous opening) either to θ 1 or θ 2 [see Fig. 3(a)]. This is equivalent to the first-passage problem of a particle diffusing in one dimension with two absorbing boundaries at θ 1 and θ 2 . Using the standard formalism 61,62 , which we summarize in the supplementary material, the MFPT for a particle initially at θ 0 for reaching one of the absorbing boundaries can be calculated: To calculate the MFPT for reaching opening i, we choose θ 0 = π. Furthermore, the angles θ 1 and θ 2 depend on the shell index, which we summarize in the supplementary material. As the black horizontal lines in Fig. 2(a) demonstrate, we obtain good agreement with the simulation results at large P r (see supplementary material for a quantitative comparison). At small P r , the intrinsic direction ê is no longer aligned with the local boundary normal and the described theory is not applicable any more. In this regime, the self-propelled particle frequently detaches from the wall due to the more pronounced rotational diffusion. As a result, the mean exit time becomes larger than the asymptotic expression of Eq. (6). This behavior is confirmed in Fig. 2(a).  We also investigated how the MFPT increases from one shell to the other by plotting the MFPT versus the opening or shell index i. As shown in Fig. 2(c) and (d), for increasing persistence number the slope of the lines in the double-logarithmic plot declines from γ = 3 to γ = 1 for ABP and from γ = 3 to γ = 2 for RTP. As explained in the previous paragraph, at large P r the MFPT of an ABP to proceed from one opening to the next one is purely governed by rotational diffusion and thus the same for all openings. Therefore, the total MFPT increases linearly in i, which gives the slope γ = 1. At small P r the intrinsic direction ê is no longer perpendicular to the wall. Its rotational diffusion is so fast that the ABP performs an effective translational diffusion along the annulus with radius r i ∝ i. So, the MFPT to reach and escape from opening i scales with ∝ r i i 2 2 and the total MFPT grows proportional to i 3 , which gives γ = 3. The same explanation also holds for RTPs at small P r . At large P r the distances between successive reorientation events are also large (see supplementary movie 2). So a few ballistic steps are sufficient to reach opening i and we can roughly estimate the mean exit time as proportional to r i ∝ i. Thus, the total MFPT grows like i 2 , which gives γ = 2.
We also determined the probability density function for the first-passage times (FPT) needed to reach opening i. Examples are presented in Fig. S3 of the supplementary material. They all reveal an exponential decay with an existing MFPT.

Circular maze (inwards). The most interesting result arises by initializing the self-propelled particles from
the outermost zone of the maze [inwards case in Fig. 1(a)]. We find that the ABP enters the inner zones of the maze much less readily than the RTP. As demonstrated in Fig. 2(b), the MFPT for the ABP is several orders of magnitude larger than for the RTP and diverges with increasing P r . This is because at large P r , the velocity vector of the ABP always points radially outward and rotational diffusion typically only allows for small changes in its direction. Thus, when arriving at an opening, it is very unlikely that the ABP fully reverses its orientation ê to enter the opening. The probability to enter the opening decreases drastically with increasing P r since the ABP is faster and therefore spends less time close to the opening. Thus, the MFPT ultimately diverges. In contrast, an RTP always has a finite probability to reverse its direction and thereby to enter the openings towards the inner parts of the maze. We also find a non-monotonic behavior in the MFPT for an ABP entering the 4 th opening. At small P n or small v 0 the ABP hardly moves towards the opening. Thus, the time to reach it and thereby the MFPT increases again with decreasing P n ∝ v 0 . A similar non-monotonic behavior is also reported in recent results on optimal search strategies for an ABP looking for a target at the center of a confining circular domain 63 .
When we let our simulations run for a sufficiently long time, both in the outwards and the inwards case, the particle distribution reaches the same steady state and the particles occupy zone n in the circular maze with probability p n . In Fig. 4(a), we plot p n /n for different P r , where the zone index n is proportional to the zone radius. Clearly, this probability is constant for PBPs that do not have any internal driving. They spread over the whole maze with uniform density just by thermal diffusion. However, at large P r , ABPs only accumulate in the outermost zone (index 5), while the inner zones remain unoccupied. This is in agreement with the diverging MFPTs plotted in Fig. 2(b) for the inwards case. Only for P r ≈ 1 do ABPs also reach the center of the maze. In contrast, RTPs with their ability to perform large reorientations also settle in the inner zones even at large P r . All these findings are nicely illustrated in Fig. 4(b), where we directly plot the color-coded probability density in the circular maze. So by using this maze, RTPs can be separated from ABPs very well under confinement.
When generating the steady state distributions, one has to be sure that the system has relaxed to the steady state starting from an initial condition. To estimate the relevant relaxation times, we developed a linear rate theory. The probabilities p n (t) for occupying zone n are elements of the state vector |ψ(t)> = |p 1 , p 2 , p 3 , p 4 , p 5 > , which evolves in time according to The transition matrix Q contains the transition or hoping rates k mn between neighboring zones as introduced in Fig. 3(b). The detailed form of Q is given in the supplementary material. For different P r , we determined the rates k mn from simulations of the outwards case, which corresponds to the initial condition |ψ(t)> = |(1, 0, 0, 0, 0)>. The eigenvalues of Q are the relaxation rates of characteristic relaxation modes. One zero eigenvalue belongs to the steady state, which we discussed in Fig. 4. The inverse of the next smallest eigenvalue gives the largest relaxation time τ relax , one generally has to wait before steady state is reached. We plot τ relax versus P r in Fig. S5 in the supplementary material.
Square maze. To find out how wall curvature affects particle separation, we examine the square maze of Fig. 1(b) with square walls nested inside each other. The simulation results for the MFPTs are similar to the circular maze [compare Fig. 5 to Fig. 2(a),(b)]. In the outwards case the ABP escapes from the inner zones faster than the RTP [see Fig. 5(a)], while in the inwards case the RTP enters the inner zones more easily with MFPTs close to the values of the circular maze [see Fig. 5(b) and supplementary movie 5]. However, a careful inspection of the inwards case reveals an important difference between the two mazes; the strong increase of the MFPT with increasing P r for an ABP is more pronounced in the circular maze [see Fig. 2(b)]. Thus, the MFPTs for ABPs differ significantly in both mazes by several orders of magnitude for increasing P r . In addition, while in the circular maze the MFPTs of ABP and RTP at small P r differ from each other, especially for the innermost opening [see Fig. 2 (b)], they are nearly identical in the square maze. We consider these differences to be due to wall curvature. As argued before, ABPs tend to stay at walls with positive curvature for large P r , while they easily leave walls with negative curvature 49,60 . Therefore, an ABP in the circular maze needs to make a full 180° turn close to an opening in order to enter this opening, which is a rare event. In contrast, in the square maze an ABP can slide on both sides of the straight walls. Therefore, by rotational diffusion it can face the wall with the opening and then just slide to the opening to enter it (see supplementary movie 6). This scenario obviously takes less time compared to the circular maze and the MFPTs of the square maze are smaller. The steady-state distributions of the square maze plotted in Fig. 6 show similar behavior compared to the circular maze (see Fig. 4). However, we realize that the differences between the ABP, RTP, and PBP are not as strong. In particular, at P r = 1.5 all particle types now show a uniform distribution throughout the square maze. In addition, the active particles strongly accumulate in the corners of the square maze, especially at large P r , which is  Symbols refer to simulation data. They are connected by lines to guide the eyes. Error bars are smaller than symbols. In (a) the black horizontal lines show theoretical predictions obtained from Eq. (6) using θ 0 = π, θ 1 = 0, and θ 2 = 2π. The adjacent numbers refer to the opening index.
in line with previous experimental observations on both ABPs 19,49,54,55 and RTPs 42-44 and other theoretical works with different geometries 39,40,64 . Finally, we have also formulated the rate theory based on Eq. (7). The largest relaxation time, necessary for identifying the steady state, is plotted in Fig. S5 of the supplementary material.
Non-regular maze. Finally, we investigated the non-regular maze of Fig. 1(c). In contrast to the nested mazes, no significant difference between the MFPTs of an ABP and an RTP are observable in Fig. 7(a). This is due to two features: first of all, the pattern is irregular and second, nested structures as in the regular mazes are absent. In particular, the second feature generated the difference between both types of active particle. For example, whenever an ABP, starting from the outermost zone of the circular maze, enters the 4 th opening at large P r , it is more probable for it to return to the outermost zone rather than to enter the 3 rd opening, since for most of the time its orientation points radially outwards. Therefore, the nested structure of Matryoshka-like mazes drastically decreases the probability for the ABP to enter the inner regions of the maze and amplifies the difference between the two active-particle types. This feature is missing in the non-regular maze.
We also determined the spatial probability distribution of both active-particle types in steady state [see Fig. 7(b)]. It does not show any significant difference between ABPs and RTPs neither at low nor at high persistence number P r . However, corner accumulation is still observable in this maze and it is more pronounced at large P r . Interestingly, at P r = 1.5 the particle density increases from the top (starting point) to the bottom (end point), while for large P r the distribution is more uniform throughout the maze. Finally, we tested whether the size of the maze affected these results by performing simulations with a maze twice as large but with the same structure. Again, no difference was observed between both active-particle types (results not shown).

Discussion
In this article we have explored the behavior of two important and widespread types of active particles inside different mazes. Namely, non-interacting active Brownian particles and run-and-tumble particles strongly confined in Matryoshka-like mazes show large differences both in their mean first-passage times and their stationary probability distributions. In particular, run-and-tumble particles enter the maze and easily move towards the center, while active Brownian particles escape faster towards the rim. In steady state, persistent ABPs accumulate in the outermost region of the maze, while RTPs spread more uniformly in all regions. This peculiar phenomenon is more pronounced in mazes with curved boundaries. Our work suggests Matryoshka-like mazes as excellent devices to separate different types of active particles from each other with potential technological and biomedical applications. In contrast, a random maze is not able to distinguish between both active-particle types.
In experiments, regular mazes can be fabricated using microfabrication techniques 19,29,45 and used to efficiently separate different types of self-propelled particles without any biological or chemical agent. Our work also has biomedical relevance for separating bacteria from other microorganisms or passive objects such as blood cells. In future work it will be interesting to study the collective behavior of active particles in these strongly confining complex structures 65,66 and to explore their potential for optimal search strategies 38,63,67 .