Research Article
Swarm Robot Exploration Strategy for Path Formation Tasks Inspired by Physarum polycephalum
Algorithm 1
Gradient mechanism. GRADIENT_MAX is infinity.
| loop | | gradient_value (self) ← GRADIENT_MAX | | SOURCE_TYPE(self) ← Robot_Food | | //Store the minimum gradient value from Robot_Nest in the neighbor neighbor_min_gradient_1 ← GRADIENT_MAX | | //Store the minimum gradient value from Robot_Nest in the neighbor neighbor_min_gradient_2 ← GRADIENT_MAX | | for all neighbors n do | | if SOURCE_TYPE (n) ← Robot_Nest then | | if (then neighbor_min_gradient_1 > gradient_value (n)) | | neighbor_min_gradient_1 ← neighbor_min_gradient_1 | | else | | if (then neighbor_min_gradient_2 > gradient_value (n)) | | neighbor_min_gradient_1 ← neighbor_min_gradient_2 | | //Update the gradient and SOURCE_TYPE | | if neighbor_min_gradient_1 ≠ GRADIENT_MAX then//exist the gradient from Robot_Nest | | SOURCE_TYPE (self) ← Robot_Nest | | gradient_value (self) ← neighbor_min_gradient_1 + 1 | | transmit gradient_value (self) | | else if neighbor_min_gradient_2 ≠ GRADIENT_MAX then | | SOURCE_TYPE (self) ← Robot_Food | | gradient_value (self) ← neighbor_min_gradient_2 + 1 | | transmit gradient_value (self) |
|