{'fraction_non_alphanumeric': 0.03170833915351306, 'fraction_numerical': 0.007962005866741164, 'mean_word_length': 4.842105263157895, 'pattern_counts': {'":': 0, '<': 1, '<?xml version=': 0, '>': 2, '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}}
Slime mould solves maze in one pass ... assisted by gradient of chemo-attractants

Plasmodium of Physarum polycephalum is a large cell, visible by unaided eye, which exhibits sophisticated patterns of foraging behaviour. The plasmodium's behaviour is well interpreted in terms of computation, where data are spatially extended configurations of nutrients and obstacles, and results of computation are networks of protoplasmic tubes formed by the plasmodium. In laboratory experiments and numerical simulation we show that if plasmodium of Physarum is inoculated in a maze's peripheral channel and an oat flake (source of attractants) in a the maze's central chamber then the plasmodium grows toward target oat flake and connects the flake with the site of original inoculation with a pronounced protoplasmic tube. The protoplasmic tube represents a path in the maze. The plasmodium solves maze in one pass because it is assisted by a gradient of chemo-attractants propagating from the target oat flake.


Introduction
A typical strategy for a maze-solving is to explore all possible passages, while marking visited parts, till the exit or a central chamber is found. This is what Shannon's electromagnetic mouse Theseus was doing in first ever laboratory experiment on solving maze by physical means [11]. The task of maze search is time consuming for a single mobile computing device. Therefore with advent of unconventional computing paradigm scientists focused on uncovering physical, chemical and biological substrates which can solve maze in parallel. Thus in [10] it is experimentally demonstrated that detecting superposition of excitation wave fronts propagating from source to destination, and from destination to source, in a maze filled with Belousov-Zhabotinsky (BZ) reaction mixture allows us to approximate a shortest path in the maze. Travelling excitation waves propagate to all channels of the maze thus examining the maze's structure in full. The BZ maze solver does not represent path by the medium's physical characteristics -an external observer is required to reconstruct a shortest path from chemical waves' dynamics.
In a gas-discharge maze-solver [9] an electric field, generated between source and destination electrodes, explores a maze in parallel. The field is stronger along the shortest path between source-and destination-electrodes therefore channels of the shortest path glow with high intensity. Such maze-solver has a volatile memory because the shortest path is visible as long as voltage to the electrodes is applied. A slime mould maze-solver reported in [8] is a fusion of BZ and gas-discharge approaches. Plasmodium of P. polycephalum is placed in several sites of maze at once. Initially the plasmodium develops a network of protoplasmic tubes spanning all channels of the maze, thus representing all possible solutions. Then oat flakes are placed in source and destination sites and the plasmodium enhances the tube connecting source and destination along the shortest path. A selection of shortest protoplasmic tube is implemented via interaction of propagating bio-chemical, electric potential and contractile waves in plasmodium's body. Not shortest or cul-de-sac branches are abandoned. Thus we can call prototype [8] as 'pruning plasmodium'. The largest protoplasmic tube (exactly its walls), which represents the shortest path, remains visible even when plasmodium ceases functioning. Therefore we can consider the slime mould maze-solver as having non-volatile memory (analogous to precipitating reaction-diffusion chemical processors).
In laboratory prototypes of a mobile droplet [6] and hot ice computer [1] a computation of shortest path in a maze is separated on two stages: computation of many-sources-one-destination set of paths and extraction of a shortest path from the set of paths. Many-sources-one-destination paths are computed by spreading acidity in [6] and propagating crystallisation pattern in [1]. A shortest path is selected and traced by a droplet travelling along pH gradient [6] or a virtual robot traversing crystallisation pattern [1]. In present paper we apply the two-stage computation in design of slime mould maze-solver which navigates a maze in one go, without exploring all possible options because the options are 'explored' by chemo-attractants emitted by destination oat flake.

Experimental maze-solving
In laboratory experiments we used plastic mazes (Tesco's Toy Mazes, Tesco Plc), 70 mm diameter with 4 mm wide and 3 mm deep channels (Fig. 1a). We filled channels with 2% agar gel (Select agar, Sigma Aldrich) as a nonnutrient substrate. We smeared top of channel walls with strawberry flavoured Chasptick (Pfizer Consumer Healthcare Ltd) to deter plasmodium from making 'illegal' shortcuts over the walls separating channels. A rolled oat was placed in the central chamber of the maze and an oat flake colonised by plasmodium of P. polycephalum was placed in the most peripheral channel of the maze. Mazes with plasmodium were kept in the dark in 20-23 C o temperature. Images of A typical experiment is illustrated in Fig. 1. We placed an oat flake in the central chamber and inoculated plasmodium of P. polycephalum in a peripheral channels. The plasmodium started exploring its vicinity and at first generated two active zones propagating clock-and contra-clockwise. By the time diffusing chemo-attractants reached distant channels one of the active zone already became dominant and suppressed another active zone. In example shown in Fig. 1ab active zone travelling contra-clockwise dominated and 'extinguished' active zone propagating clockwise. The dominating active zone then followed gradient of chemo-attractants inside the maze, navigated along intersections of the maze's channels and solved the maze by entering its central chamber.

Mechanics of maze-solving: Numerical modelling
A plasmodium of P. polycephalum can be seen as a network of coupled biochemical oscillators [12,14]. Interactions between the oscillators determine space-time dynamics of contractile activity and protoplasmic streaming in protoplasmic tubes [3,5] and ultimately shape of plasmodium's cell [7]. Laboratory experiments show that oscillators in plasmodium network interact similarly to neurons in a simple neural networks [13]. We can speculate that plasmodium's active zones (analogs of growth cones of maturing neuroblast) establish mutually inhibiting relationships. An active zone proximal to a source of chemoattractants sends biochemical and electrical signals which suppress activity of active zones distal to the source. A profile of plasmodium's active zone on a non-nutrient substrate is isomorphic to shapes of and behaves analogously to wave-fragments in sub-excitable media [2]. When active zone propagates two processes occur simultaneouslymovement of the wave-shaped tip of the pseudopodium and formation of a trail of protoplasmic tubes. We simulate the tactic traveling of plasmodium growth front using two-variable Oregonator equation [4]: The variable u x is abstracted as a local density of plasmodium's protoplasm at site x and v x reflects local concentration of metabolites and nutrients. Parameters q and f are inherited from model of Belousov-Zhabotinsky medium.
Parameter φ x characterises excitability of medium in the Oregonator model and can be seen as analog of a degree of plasmodium's isometric tension response to chemo-attractants' concentration [16]. We integrate the system using Euler method with five-node Laplacian, time step ∆t = 5·10 −3 and grid point spacing ∆x = 0.25, = 0.03, f = 1.4, q = 0.022. Walls of the maze are impassable obstacles, grid nodes occupied by the walls are non-excitable. Let c x be a concentration of chemo-attractant at site x. At moment t = 0 only site occupied by oat flake has concentration c x = 1, all other sites have zero concentration. At every moment t of simulation a site x updates its state c x by the following rule. If c t x = 0 and there is at least one immediate neighbour y such that c y > 0 then c t+1 x = t −1 . Such rude approximation of diffusion is enough to build satisfactory gradient of chemo-attractants for guiding propagating wavefronts. The gradient developed in simulation is shown in Fig. 2a.
Initially all sites have the same excitability parameter φ 0 x = 0.04515. The less is value of φ x the higher is excitability of x. The excitability is revised as follows. At every σth step of simulation we detect excited, i.e. u z ≥ 0.1, site z with maximum, amongst all sites excited at this moment, concentration of chemo-attractants c z . Then for every site x we revise its excitability as follows: if c x < c z then φ x = 0.09. In simulation illustrated in Fig. 2b σ = 500. The medium is perturbed by an initial excitation, where a 5 × 5 sites are assigned u = 1.0 each (Fig. 2b). The perturbation generates a propagating wave-fragment travelling along gradient of chemo-attractants. Some travelling waves branch but branches are extinguished due to increase of sensitivity threshold.
To imitate formation of protoplasmic tubes we store values of u in matrix L, which is processed at the end of simulation. For any site x and time step t if u x > 0.1 and L x = 0 then L x = 1. The matrix L represents time lapse superposition of propagating wave-fronts. The simulation is considered completed when propagating pattern reaches destination site (central chamber in scenario illustrated in Fig. 2) and halts any further motion. At the end of simulation we repeatedly apply the erosion operation [2] to L. This operation symbolises a stretch-activation effect [5] necessary for formation of plasmodium tubes. The resultant protoplasmic network provides a good phenomenological match for networks recorded in laboratory experiments (Fig. 2c).

Discussion
We experimentally demonstrated that plasmodium of P. polycephalum solves maze in one-pass, i.e. without exploring all possible solutions, if a source of chemo-attractants is placed at destination site. In our experiments we inoculated slime mould in a peripheral channel and a target oat flake in central chamber. Positions do not matter, if there is an obstacle-free pass from a source to a destination the slime mould will trace it. For example, slime mould inoculated in a central chamber finds exit out of a maze. In Fig. 3 we placed an oat flake colonised by plasmodium in the central chamber and put an attracting oat flake in the west part of an outer channel. The plasmodium navigated thought first junction. It branched at the second junction. Active zone travelling clock-wise detected higher concentration of chemo-attractants than concentration detected by contra-clockwise propagating active zone. Thus active zone moving clockwise became dominating. Eventually it reached its destination site (oat flake) along the shortest path (Fig. 3).
Is our prototype better -in terms of complexity or real-life speed and costs -then other laboratory prototypes of maze-solvers (Tab. 1)? All existing prototypes have the same computational time complexity O(L), where L is a  Table 1: Brief comparison of laboratory prototypes of maze-solvers implemented in spatially extended physical, chemical or biological media. Two stages of maze-solving are outlined: maze exploration, or computation of many-sourcesone-destination paths, and path tracing, or following from source site to specified destination site. Prototype Maze is explored by Path is traced by BZ medium [10] Excitation waves Computer Pruning plasmodium [7] Plasmodium Plasmodium Gas-discharge [9] Electrical field Electrical field Hot ice [1] Crystallisation pattern Computer Mobile droplet [6] Diffusing chemicals Droplet Single-pass plasmodium Diffusing chemo-attractants Plasmodium length of a worst-case scenario shortest path in a maze (a worst case is when shortest path spans all channels of a maze, as e.g. Chartres and Remis mazes shown in Fig. 4).
The time complexity is determined by time taken by waves, electricity, plasmodium or diffusing chemicals to explore the maze. Al these substances explore maze in parallel by propagating from their original locations to all other sites of maze, thus it takes them O(L) steps to span the maze. Tracing of a path from source to destination is rather a menial tasks -to follow gradients or other physical or chemical characteristics of the medium. It takes O(L) steps In terms of a real time gas-discharge [9] is the fastest maze-solver, it takes just hundred of milliseconds to solve the maze. Hot ice computer [1] is the second fastest one, a maze of 0.1 m in diameter can be solved in few seconds. Gas-discharge and hot-ice solvers are followed by BZ-medium [10] and mobiledroplet [6] solvers: solution time is measured in minutes and hours. Slime mould based solvers are the slowest ones: it usually takes them a couple of days to solve a maze like one we used in present experiments. The prototypes can be arranged in the following real-costs (which includes consumables and laboratory equipment) descending order: gas-discharge, mobile droplets, BZmedium, hot ice, and slime mould. Gas-discharge maze solver is most expensive while P. polycephalum solver can run literally for free.
Accuracy of slime mould computing is far from ideal. Situation illustrated in Fig. 1 is a typical one: slime computes almost shortest path, compare with the shortest path from source to destination computed in Oregonator model in Fig. 2. In some situations, e.g. the one shown in Fig. 5, plasmodium chooses the longest path from source to destination. Said that in neither of 35 experiments we undertook plasmodium failed to solve the maze, it solves builds a path from source to destination. Our final 'disclaimer' is that neither of slime mould maze-solvers can successfully compete with existing conventional computer architectures. However, P. polycephalum is an ideal biological substrate which represents all essential features of reaction-diffusion chemical computers yet encapsulated in an elastic growing membrane [2]. It can be treated as a meso-scale prototype of future growing nano-scale circuits. We envisage slime mould maze-solvers can also contribute toward designs of parallel amorphous drug delivery systems, or smart needles, which grow towards the target tissue.