Keywords

1 Introduction

One of the most well known and complex problems in the field robotics is to find the optimum path in a topology from one point to another. Many algorithms have been successfully proposed during the previous years to control the robots movement effectively and guide them to find the shortest path between two specific spots in a topology [13]. In many cases the nature itself provides for centuries, solutions in similar problems. In this paper, the proposed algorithm is inspired by the chemotaxis operation, meaning the guidance of an organism to a specific place using chemical stimulus. Moreover we envisage modeling of chemotaxis through Physarum, a life form which has an extremely interesting behavior during its life cycle. It has been found that during its reproductive stage called plasmodium, takes a form that has the ability to find the minimum path between two food spots in a labyrinth. Moreover, it can perform all these acts without using any central nervous control system, a common characteristic as well to all single-celled creatures. Many bio-inspired models are based on this behavior [4, 5].

The algorithm that is used in this paper is inspired by the model that was proposed in [6] and modified accordingly in order to fit in the needs of the under study problem, which is the robot’s guidance to an unknown environment in order to find the minimum path from one point to another. The mathematical model of chemotaxis and more specifically the diffusion equation of chemo-attractants is based on the parallel modeling tool, Cellular Automata (CA). CA can be assumed as an alternative form of microscopic reality, which supports the desired macroscopic behavior. The implementation of the proposed control algorithm has been applied on a E-Puck robot using programming environments that are created by the simulation program Webots. Different scenarios have been tested and presented, in order to preserve universality and effectiveness. Furthermore, a comparison is made with the results that are produced by MATLAB programming environment implementing the same algorithm in order to ensure their validity.

2 Cellular Automata Principles

A CA is characterized by the following ones:

  • a regular lattice of cells covering a portion of a d-dimensional space;

  • a set \(C(\mathbf {r},{t})=({C}_1(\mathbf {r},{t}), C_2(\mathbf {r},{t}),... ,C_{m}(\mathbf {r},{t}))\) of variables attached to each site \(\mathbf {r}\) of the lattice giving the local state of each cell at the time \({t}=0, 1, 2, ...\);

  • a rule \({R}=({R}_{1}, {R}_{2}, ..., {R}_{m})\) which specifies the time evolution of the states \({C}(\mathbf {r},{t})\) in the following way: \({C}_{j}(\mathbf {r},{t}+1)={R}_{j}({C}(\mathbf {r},{t}), {C}(\mathbf {r}+{\mathbf {\delta }}_1,{t}), {C}(\mathbf {r}+{\mathbf {\delta }}_2,{t}), ..., {C}(\mathbf {r}+{\mathbf {\delta }}_{q},{t}))\), where \(\mathbf {r}+{\mathbf {\delta }}_{k}\) designate the cells belonging to a given neighbourhood of cell \(\mathbf {r}\).

The new state of the transition function during the time step \({t+1}\) is depended only to the previous time step t. The update of a cell is calculated using the information of its neighbors at the previous time step. However, in some cases it is needed to consider bigger memory resulting to dependence of more previous time steps \({t-1},{t-2}, {t-3}, ..., {t-k}\). The rule R is the same for all the cells and is applied simultaneously in each one of them creating a synchronous system. As a possible relaxization of CA original definition, the asynchronous updating of cell states can been also considered. Moreover, in regards to the CA rules’ homogeneity, spatial or even temporal inhomogeneities can be introduced by the appliance of different rule in some specific cells in the lattice. The boundary cells are considered such an example of spatial inhomogeneity. CA are used in many fields and are capable of forming efficient models [79].

3 Chemotaxis Example

For readability reasons, some simple principles of chemotaxis are going to be presented through the paradigm of a living organism, namely Physarum. Physarum is a slime mould and Nakagaki et al. [10] were the first to observe that the plasmodium of this slime mould changes its shape as it crawls over a plain agar gel. If food is placed in two certain spots, it puts out pseudopodia that connect those food spots using the minimum path. Adamatzky in [11] placed the plasmodium in one place of the maze and, simultaneously, placed one food source (FS) in another place of the maze, before the plasmodium covers all the maze. The laboratory experiments show that the plasmodium spreads its pseudopodia trying to reach the food. Simultaneously, the food, releases the chemo-attractants to any direction in the maze. When the plasmodium finds those chemo-attractants, it follows them to the source food forming the minimum distance path between its initial site and the food site. So the plasmodium solves the maze in one pass because it is assisted by a gradient of chemo-attractants propagating from the target food. In conclusion, compared to Nakagaki et al. approach where thickness of the tube is proportional to flow, i.e. feedback, in Adamatzky approach Physarum acts simply as a concurrent navigator and “half” of the computation is done by diffusing chemo-attractants.

4 The Proposed CA Algorithm that the Robot Utilizes

In order to describe the chemotaxis behavior of P. polycephalum and enclose it to the robot’s “brain”, a bio-inspired CA algorithm has been designed when inspired by the original [6] model and modified according to the robot related short path. The study case is as follows: a robot is introduced into a specific place in the topology and a signal’s transmitter is placed in another position of the maze representing the food spot. The signal is released inside the topology following the diffusion equation. When the sensors of the robot catch these “attractants”, the algorithm chooses the direction with the greater attraction. After that the robot acts, turns to the specified direction and moves to the CA cell with the maximum attractants value. To simulate this experiment, the area where it takes place is divided into a matrix of squares with identical areas and each square of the surface is represented by a CA cell. The state of the (ij) cell at time t, defined as \(C^t_{i,j}\), is equal to Eq. 1:

$$\begin{aligned} C^t_{i,j}=\{ObstacleExistence_{i,j},F^t_{i,j}, Robot^t_{i,j}\} \end{aligned}$$
(1)

\(ObstacleExistence_{i,j}\) is a variable that indicates the type of the area represented by the corresponding (ij) cell. The possible values of \(ObstacleExistence_{i,j}\) are 1 for a free site of the lattice or 0 for an inaccessible site of the topology. Furthermore, \(F^t_{i,j}\) represents the value of attractants (0–100) at time t in the area corresponding to the (ij) cell. Finally, \(Robot^t_{i,j}\) is a one-bit variable, which illustrates if the (ij) cell is included in the final path and if it takes the value 1 then the robot takes the decision to move in this CA cell. The type of neighborhood that was used in this CA model is the Moore neighborhood consisting of all the eight side and diagonal neighbors of the central cell.

The diffusion equation (Eq. 2) allows us to talk about the route of randomly moving particles in n dimensions.

$$\begin{aligned} \frac{\partial }{\partial t}c(\bar{x},t)= D{{\bigtriangledown }^2}c(\bar{x},t) \end{aligned}$$
(2)

But CA is a modeling tool that is based on discrete space and time. For this purpose, the discrete diffusion equation is used to describe the spread of the signal’s values produced by the transmitter (Eq. 3).

$$\begin{aligned}&F^{t+1}_{i,j}=\left\{ F^t_{i,j}+f1\left[ \left( F^t_{i-1,j}-f3\times {F^t_{i,j}}\right) \right. \right. \nonumber \\&\qquad \qquad \left. \left. +\left( F^t_{i+1,j}-f3\times {F^t_{i,j}}\right) \right. \right. \nonumber \\&\qquad \qquad \left. \left. +\left( F^t_{i,j-1}-f3\times {F^t_{i,j}}\right) \right. \right. \nonumber \\&\qquad \qquad \left. \left. +\left( F^t_{i,j+1}-f3\times {F^t_{i,j}}\right) \right] \right. \nonumber \\ \end{aligned}$$
(3)

where f1, f2, f3 are the parameters that determine the attractants’ speed of expansion. After a few time steps the attractants are released inside the topology. When the robot meets them, it follows them towards the transmitter creating a route, which is the path that the robot will follow. In particular, it searches which of its neighbors has the greater value of \(F^t_{i,j}\). When this value is justified, the \(Robot^{t+1}_{i,j}\) value of this neighbor is changed from 0 to 1, while the robot moves to the specific cell. This procedure is repeated until the robot reaches the transmitter’s position, which releases the signal inside the topology.

5 Implementation and Results

For testing reasons the E-puck desktop mobile robot (Fig. 1) was selected according to its properties and characteristics as introduced by EPFL [12] and previous citing works [13].

Fig. 1.
figure 1

The E-puck robot.

In this aspect, a variable, namely translation used for the implementation of the bio-inspired algorithm, is responsible for the definition of the robot’s position in the CA space. It comprises three subvariables, xyz corresponding to the directions of the Cartesian system. The parameter rotation indicates the turning angle of the object to a specific direction, according to the environmental stimuli. Variable FloorTileSize defines the size of the CA cell, which for testing reasons is also provided in centimeters. More specifically, all simulations take into account a CA cell with side equal to 10 cm. The proposed size is chosen to fit to the exact E-Puck’s dimensions which are not greater than 7.4 cm in length. Furthermore, FloorSize defines the size of the CA lattice and it is measured in meters. In order to reduce the calculations’ complexity handled by E-puck, a 12 \(\times \) 12 CA lattice is used. Another variable is wallHeight, which defines the height of the obstacles and is also measured in centimeters. For sake of simplicity and without loss of generality, in every simulation, the aforementioned variable takes the value 0.1. Finally, parameter wallThickness indicates how wide an obstacle, while in every simulation of this paper, this variable takes the value 0.074.

Three different testing topologies were used as test beds for the aforementioned CA algorithm in this paper. The first one is a topology free of obstacles (Fig. 2). The second experiment is evolved in a space with an obstacle at a specific place, depictured with the white color, (Figs. 3 and 4) and the final one is a more complex one, i.e. a maze (Fig. 5).

The robot and the food source are placed in different sites. Then the bio-inspired algorithm leads the E-puck to the transmitter using the shortest path every time. The transmitter is indicated by a cube with a FOOD caption on it. In order to verify the results, the same model, with the same topologies are designed in MATLAB environment.

Fig. 2.
figure 2

Experiment in a lattice with no obstacles. (Color figure online)

In Fig. 2b the robot starts at coordinates (2,2) while the food source exists at (11,11). After 30 times steps the robot follows the minimum straight distance from the starting point to the final one. The robot uses the von Neumann neighborhood, consisting of solely side neighbors, and it can move only horizontally or vertically. Apparently, it will not be able to move to diagonal cells. So the 17 cells from the beginning to the ending position is the minimum distance. The same algorithm executed in MATLAB is presented in Fig. 2a. The red cells indicate the boundaries of the lattice. The black cell represents the starting position of the robot and the blue cell indicates the destination. The yellow line is the path that the robot follows. It is clear that the results are identical.

Fig. 3.
figure 3

Experiment in a lattice with obstacle. (Color figure online)

In Fig. 3b the robot starts at coordinates (2,2) and the food source exists at (11,11). However, this time, an obstacle exists inside the lattice creating a corner. The robot chooses to pass from the bottom of the obstacle towards its destination. This path consists of 17 cells. But the other minimum way from the left and upper side of the obstacle is also a distance of 17 cells and it is shown using the blue dots. As a result, these two routes are identical. The robot makes a random choice and follows the red path or the one in blue dots. After 48 times steps the robot moves on the minimum path from the starting point to the final one, avoiding the obstacle. The same algorithm executed in MATLAB is presented in Fig. 3a. Once again the results again identical.

Fig. 4.
figure 4

Experiment in a lattice with obstacle and different starting positions. (Color figure online)

In Fig. 4b the architecture of the topology is the same, using the same obstacle in the same position. But the initial conditions are now different. The robot starts at coordinates (2,11) and the food source exists at (11,5). After 28 times steps the robot moves on the minimum path from the starting point to the final one, avoiding the obstacle. This minimum path is the red one with 14 cells. The path passing through the other side of the obstacle is presented in blue dots. This path is longer because it results to 16 cells. The robot never chooses this path. The same algorithm executed in MATLAB is presented in Fig. 4a. The results are again identical.

Fig. 5.
figure 5

(a) Experiment in a maze. (b) Experiment in a maze using different initial conditions. (Color figure online)

In Fig. 5a the robot starts at coordinates (2,11) and the food source exists at (2,2). In this situation, a more complicated experiment is evolved with many obstacles to avoid. After 140 times steps and 22 cells the robot reaches the food spot using the minimum path (red line) inside this maze. The path in blue dots present the other path that also leads from the initial position to the destination. But this path has 22 cells and this is the reason why the robot never chooses it. In Fig. 5b the topology of the maze is the same and the initial position of the food changes. In 98 time steps the robot passes through 19 cells and reaches the food using the minimun distance (red line). The line formed by blue dots is also the minimum one because it also has 19 cells. After multiple experiments, it is proven that the robot chooses randomly the one or the other route.

6 Conclusions

There are many models trying to use chemotaxis and adapt it to their solutions. It is also proven to be a very powerful tool in order to find the minimun distance between two spots in a lattice. In this paper, a proposed chemotaxis bio-inspired CA model is used into a robot, and more specific in an E-Puck. This model tries to reproduce the chemotaxis behavior, which follows the gradient of chemo-attractants towards the food source using the minimum distance. The expansion of chemo-attractants is modeled using a discrete diffusion equation. The Webots programming environment is used to simulate the operations of an E-Puck inside the designed topologies. After applying this model, it is shown that the robot is always capable of finding the shortest path, between itself and an attractant source using its sensors and avoiding effectively the obstacles. A MATLAB implementation verifies the Webots results. The final product proposed is a robot, which has the ability to find solutions in a complex computational problem.