{'fraction_non_alphanumeric': 0.0304275846320717, 'fraction_numerical': 0.006565051093223725, 'mean_word_length': 4.629177377892031, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Ameba-inspired Self-organizing Particle Systems

Particle systems are physical systems of simple computational particles that can bond to neighboring particles and use these bonds to move from one spot to another (non-occupied) spot. These particle systems are supposed to be able to self-organize in order to adapt to a desired shape without any central control. Self-organizing particle systems have many interesting applications like coating objects for monitoring and repair purposes and the formation of nano-scale devices for surgery and molecular-scale electronic structures. While there has been quite a lot of systems work in this area, especially in the context of modular self-reconfigurable robotic systems, only very little theoretical work has been done in this area so far. We attempt to bridge this gap by proposing a model inspired by the behavior of ameba that allows rigorous algorithmic research on self-organizing particle systems.


Introduction
Over the next few decades, two emerging technologies-microfabrication and cellular engineering-will make it possible to assemble systems incorporating myriads of simple information processing units at almost no cost. Microelectronic mechanical components have become so inexpensive to manufacture that one can anticipate integrating logic circuits, microsensors, actuators, and communication devices on the same chip to produce particles that could be mixed with bulk materials, such as paints, gels, and concrete [1]. Imagine coating bridges and buildings with smart paint that senses and reports on traffic and wind loads and monitors structural integrity. A smart-paint coating on a wall could sense vibrations, monitor the premises for intruders, and cancel noise. There has also been amazing progress in understanding the biochemical mechanisms in individual cells such as the mechanisms behind cell signaling [33] and cell movement [3]. Recent results have also demonstrated that, in principle, biological cells can be turned into finite automata [7] or even pushdown automata [23], so one can imagine that some day one can tailor-make biological cells to function as sensors and actuators, as programmable delivery devices, and as chemical factories for the assembly of nano-scale structures. Particularly interesting applications for this technology would be the construction of molecular-scale electronic structures and of nano-scale devices for surgery as well as cancer treatment [30].
Yet fabrication is only part of the story. One can envision producing vast quantities of individual computing elementswhether microfabricated particles or engineered cells-but research on how to use them effectively is still in its infancy. The opportunity to exploit these new technologies poses a broad conceptual challenge that was coined by Abelson, Knight, Sussman, et al. as amorphous computing [1]. In amorphous computing one usually assumes that there is a very large number of locally interacting computing elements, called computational particles, that may form an arbitrary initial structure. The particles are possibly faulty, sensitive to the environment, and may produce various types of actions that range from changing their internal state to communicating with other particles, moving to a different location, or even replicating (to mimic biological cell replication). Each particle has modest computational power and a modest amount of memory. The particles are not synchronized, although it is usually assumed that they compute at similar speeds (as long as they are non-faulty), since they are all fabricated by the same process. The particles are all programmed identically, but they usually have means for storing local state and for generating random numbers, which allows them to differentiate over time. In general, the particles do not have any a priori knowledge of their positions or orientations.
We propose a new ameba-inspired model for computational particles representing finite automata that form a connected structure with the help of local bonds. The particles cannot move through other particles or in open space, and while they move they cannot drag other particles with them due to limitations on their energy and strength. So if they wish to form a particular pattern, then the only way to achieve that is through individual movements of particles along the surface of a particle structure (which could be done by releasing and engaging bonds to static particles in a similar way biological cells are moving [3]) until they have reached the desired location. This is continued until the desired pattern has been reached. Although it is clear that this can have many interesting applications like the repair of structural damages, theoretical research on our type of particle systems is basically non-existent, so there is a dire need to provide a solid theoretical base.

Related Work
Self-organizing systems have been studied in many contexts. One can distinguish here between active and passive systems. In active systems, there are computational particles that can control the way they act and move, while in passive systems the particles either do not have any intelligence at all, or they may have limited computational capabilities but they cannot control their movements. Examples of algorithmic research on passive systems are DNA computing [2,9,12,15,26,37], population protocols [4], and slime molds [10,24,31]. We will not describe these models in detail as they are only of little relevance for our approach. Examples of active systems are self-organizing networks as well as swarm robotics and modular robotic systems.
Self-organizing networks have been studied in many different contexts. Networks that evolve out of local, selforganizing behavior have been heavily studied in the context of complex networks [35] such as small-world networks [6,22,32]. However, whereas a common approach for the complex networks field is to study the global effect of given local interaction rules, we are interested in developing local interaction rules in order to obtain a desired global effect. Also so-called self-stabilizing overlay networks have been studied, see, for example, [16] for an in-depth treatment. While the proof techniques used in this area promise to be useful also for self-organizing particle systems, the constraints on particle systems are much more severe than on nodes in overlay networks, which can freely change their interconnections and which have no limitations on their computational power.
In swarm robotics it is usually assumed that there is a collection of autonomous robots that have a limited sensing and communication range and that can freely move in a given area. Surveys of recent results in this area can be found, e.g., in [21,25]. While the analytical techniques developed in this area are of some relevance for this work, the underlying model differs significantly as we do not allow free movement of particles. While swarm robotics focuses on inter-robotic aspects in order to perform certain tasks, the field of modular self-reconfigurable robotic systems focuses on intra-robotic aspects such as the design, fabrication, motion planning, and control of autonomous kinematic machines with variable morphology. Since the field started with the development of CEBOT by Toshio Fukuda [19], a growing number of research groups have become actively involved in modular robotics research [18,38]. Metamorphic robots form a subclass of selfreconfigurable robots that shares the characteristics of our model that all particles are identical and that they fill space without gaps [13]. The hardware development in the field of self-reconfigurable robotics has been complemented by a number of algorithmic advances (e.g., [11,14,27,29]), but so far mechanisms that scale to hundreds or thousands of individual units are still under investigation, and no rigorous theoretical foundation is available yet. So although the advances in this area are relevant for the feasibility of our model, the area does not provide algorithmic and analytical techniques that are directly applicable to our self-organizing particle systems.

The Artificial Ameba
In the following, we present our ameba-inspired model for particle systems in two dimensions. In our model, particles are of hexagonal shape such that they can fill space without gaps. The number of particles in the system is not known by any individual particle and particles are anonymous. Furthermore, particles do not know their position or orientation (nocompass model, e.g., [17]). However, the particles are assumed to be able to distinguish clock-wise from counter-clockwise. Particles form bonds with their immediate neighbors and the particles in a particle system have to form a connected structure at all times. Computationally, particles act like probabilistic finite automata. Note, that this decision does not restrict the number of particles in the system as particles have no global knowledge. The particles act in synchronous rounds. A particle uses the configurations of neighboring particles together with its own configuration to compute its next action. Locomotion of particles is realized by sequences of expansion and contraction. Both, the ability to form bonds and the locomotion of particles, are inspired by a behavior called cell crawling that can be found in ameba [20] and cells like macrophages [3]. Our decision for hexagonal particles is a consequence of the way particles connect and move since other regular polygons that tile two-dimensional space, namely the triangle and the square, introduce certain technical problems in this context. As an example, square particles might require diagonal connections for one particle to move around another particle; however, diagonal connections might be hard to implement since diagonal particles meet only in one point. Finally, particles are allowed to replicate and dissolve which is inspired by cell division and cell death.
Formally, a particle p is a tuple (Q, δ, q 0 ) where Q is a set of states, δ is a probabilistic transition function, and q 0 ∈ Q is the start state. A particle system P is an ordered set of particles. The particles are positioned on an infinite hexagonal grid. We assign coordinates from Z 2 to this grid as depicted in Figure 1. This coordinate system is adopted from [28] and is a modification of the coordinate system presented in [13]. An element of the grid is called a cell c ∈ Z 2 . A direction is an element d ∈ Z 6 where Z 6 are the integers modulo 6. We define the neighbor n d (c) of a cell c in direction d as follows.
Accordingly, the neighborhood of a cell c is defined as N (c) = {n d (c) | d ∈ Z 6 }. Every particle assumes a shape s ∈ S = {s 1 , s 2 }, see Figure 2. We denote the set of cells occupied by a particle p as C(p); accordingly we have |C(p)| ∈ {1, 2}. We call a cell occupied if there is a particle occupying it, otherwise we call it free. Every cell can be occupied by at most one particle at all times. We define the neighborhood of a particle p as N (p) = ( c∈C(p) N (c)) − C(p). In Figure 2, the cells in the neighborhood of the particles are shown in gray. Depending on the shape of a particle p we have |N (p)| ∈ {6, 8}. The position of a particle is uniquely defined by its head cell h ∈ Z 2 . The rotation of a particle is defined by a direction r ∈ Z 6 that we call its orientation. In Figure 2, the orientation is depicted as an arrow inside the particle and the head cell is the cell that contains this arrow. The cells in the neighborhood of a particle are numbered according  to the orientation of the particle as shown in Figure 2. The numbering starts with 0 at the cell n r (h) and is increased in clock-wise direction around the particle. We denote the neighboring cell of a particle with number i as n i (p). Finally, a configuration of a particle is a tuple (q, s, h, r) and consists of its state q ∈ Q, its shape s ∈ S, its head cell h ∈ Z 2 , and its orientation r ∈ Z 6 . Visually, any valid configuration of a particle can be achieved by taking one of the configurations shown in Figure 2, rotating it by a multiple of 60 • , and translating it to the desired position. The configuration of a particle system is the ordered set of configurations of all its particles. We define two particles u and v to be connected according to their configurations if N (u) ∩ C(v) = ∅ or, equivalently, N (v) ∩ C(u) = ∅. The configuration of a particle system P then induces an undirected graph G P = (P, E) where {u, v} ∈ E if and only if particles u and v are connected. We call G P the connectivity graph of the particle system P according to its configuration. A configuration is called connected if the according connectivity graph is connected. Initially, the particle system is assumed to be in some connected configuration in which all particles are of shape s 1 and in the start state q 0 . The configuration of the particle system has to stay connected at all times. The particles act in synchronous rounds according to their respective probabilistic transition function δ that has the following signature.
The transition function maps the state and shape of a particle p combined with some neighborhood information to tuples of a new state and an action. The neighborhood information represents the local view of p on its neighboring cells N (p) and particles occupying these cells. For a single cell it is of the following form.
Considering a specific cell c = n i (p), the (i + 1)-th element of the tuple N 8 is ǫ if i ≥ |N (p)| or the cell c is free. Otherwise, i.e., if the cell is occupied by a particle p ′ , it consists of the state and shape of p ′ as well as the set {j | n j (p ′ ) ∈ C(p)}. An example of an element of the domain of the transition function is given in Figure 3. The set of actions is defined as A = {N, T, E, C, D, K} and the definitions of these actions are given in Table 1. An example of particles executing these actions is depicted in Figure 4. Which actions a particle can execute depends on the shape of the particle; Set s ← s 1 and then add a copy of the particle to the system with h ′ ← n r+3 (h) and q ′ being the state after δ was applied. K Kill {s 1 } Remove the particle from the particle system. Table 1: Definitions of the actions a particle of admissible shape can execute. the admissible shapes for each action are given in Table 1. If a transition function assigns an action to a particle in a shape that is inadmissible for the action, the action fails and the transition function is not applied. If a particle p attempts to expand into a cell that is already occupied by a particle p ′ in round t and remains occupied by p ′ in round t + 1, the expansion of p fails and, again, the transition function is not applied. If a particle p attempts to expand into a cell that is occupied by a particle p ′ in round t but is freed in round t + 1 due to a contraction of particle p ′ , p can expand into the cell. In general, if multiple particles attempt to expand into the same cell, one arbitrary particle succeeds in expanding while the others fail and their transition function is not applied.

Research Challenges
The proposed model allows to investigate various problems. For example, the class of smart paint problems might be considered. Here, the surface of an object is to be covered as uniformly as possible by a set of particles. A second example is the class of shape formation problems in which particles have to arrange to form specific shapes. In bridging and covering problems particles have to cover or bridge gaps in given structures. For the above problem classes, particles are not allowed to execute the divide or kill action. Another example is what we call the macrophage problem. This problem is inspired by biological cells called macrophages [36] that can be found, for example, in the human body. Their task is to engulf and digest pathogens. To locate their target, macrophages use chemotaxis [34], i.e., they move along a gradient of chemicals in their environment. Our model can be extended to include chemotaxis, e.g., as in [5]. The macrophage problem models the behavior of macrophages in the following way. The macrophage and the pathogen are represented by two distinct particle systems; accordingly the macrophage and the pathogen can move independently of each other. The challenge now is to find an algorithm such that the macrophage hunts and surrounds the pathogen to immobilize it. Several variants of this problem emerge when deciding whether particles should be allowed to execute the divide and kill action and whether macrophage and pathogen move at the same or different speeds. For an additional variant, a new action could be added that allows the macrophage to kill particles that belong to the pathogen. Also, variants of our model might be of interest. Firstly, in a physical realization particles may become faulty and a particle system may not start in a well-initialized configuration. For a particle system to handle such occurrences it may be necessary to allow for particles to detect other faulty particles and to cope with them, for example, by allowing particles to carry other particles. Such a model would require self-stabilizing algorithms. Secondly, the model may be extended from two to three dimensions using, for example, the rhombic dodecahedron as the shape for the particles [8,39]. Lastly, the model could be modified so that particles act asynchronously.