Terminating grid exploration with myopic luminous robots

02/11/2021 ∙ by Shota Nagahama, et al. ∙ 0

We investigate the terminating grid exploration for autonomous myopic luminous robots. Myopic robots mean that they can observe nodes only within a certain fixed distance, and luminous robots mean that they have light devices that can emit colors. First, we prove that, in the semi-synchronous and asynchronous models, three myopic robots are necessary to achieve the terminating grid exploration if the visible distance is one. Next, we give fourteen algorithms for the terminating grid exploration in various assumptions of synchrony (fully-synchronous, semi-synchronous, and asynchronous models), visible distance, the number of colors, and a chirality. Six of them are optimal in terms of the number of robots.

READ FULL TEXT VIEW PDF
POST COMMENT

Comments

There are no comments yet.

Authors

page 10

page 12

page 19

page 21

page 23

page 26

page 29

This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.

1 Introduction

1.1 Background and motivation

Many studies about cooperation of autonomous mobile robots have been conducted in the field of distributed computing. These studies focus on the minimum capabilities of robots that permit to achieve a given task. To model operations of robots, the Look-Compute-Move (LCM) model [21] is commonly used. In the LCM model, each robot repeats cycles of Look, Compute, and Move phases. In the Look phase, the robot observes positions of other robots. In the Compute phase, the robot executes its algorithm using the observation as its input, and decides whether it moves somewhere or stays idle. In the Move phase, it moves to a new position if the robot decided to move in the Compute phase. To consider minimum capabilities, most studies assume that robots are identical (i.e., robots execute the same algorithm and have no identifier), oblivious (i.e., robots have no memory to record their past history), and silent (i.e., robots do not have communication capabilities). Furthermore, they have no global compass, i.e., they do not agree on the directions. Based on the LCM model, previous works clarified solvability of many tasks such as exploration, gathering, and pattern formation in continuous environments (aka two- or three-dimensional Euclidean space) and discrete environments (aka graph networks) (see a survey [17]).

In this paper, we focus on exploration in graph networks, which is one of the most central tasks for mobile robots. Two variants of exploration tasks have been well studied: the perpetual exploration requires every robot to visit every node infinitely many times, and the terminating exploration requires robots to terminate after every node is visited by a robot at least once. During the last decade, many works have considered the perpetual and terminating exploration on the assumption that each robot has unlimited visibility, i.e., it observes all other robots in the network. The perpetual exploration has been studied for rings [1] and grids [2]. The terminating exploration has been studied for lines [15], rings [13, 16, 18], trees [14], finite grids [10, 11], tori [12], and arbitrary networks [6]. However, the capability of the unlimited visibility seems powerful and somewhat contradicts the principle of weak mobile robots. For this reason, some studies consider the more realistic case of myopic robots [8, 9]. A myopic robot has limited visibility, i.e., it can see nodes (and robots on them) only within a certain fixed distance . Datta et al. studied the terminating exploration of rings for  [8] and  [9]. Not surprisingly, since myopic robots are weaker than non-myopic robots, many impossibility results are given for myopic robots.

To improve the task solvability, myopic robots with persistent visible light [7], called myopic luminous robots, have attracted a lot of attention. Each myopic luminous robot is equipped with a light device that can emit a constant number of colors to other robots, a single color at a time. The light color is persistent, i.e., it is not automatically reset at the end of each cycle, and hence it can be used as a constant-space memory.

Ooshita and Tixeuil [20] studied the perpetual and terminating exploration of rings for in the synchronous (FSYNC), semi-synchronous (SSYNC), and asynchronous (ASYNC) models. They showed that the number of robots required to achieve the tasks can be reduced compared to non-luminous robots. Nagahama et al. [19] studied the same problem in case of and showed that, in the SSYNC and ASYNC models, the number of robots required to achieve the tasks can be reduced compared to the case of .

Bramas et al. studied the exploration of an infinite grid with myopic luminous and non-luminous robots in the FSYNC model [3, 4]. Here they propose algorithms so that every node of an infinite grid is visited by a robot at least once. In [3] robots agree on a common chirality, i.e., robots agree on common clockwise and counterclockwise directions. Bramas et al. [5] also studied the perpetual exploration of a (finite) grid with myopic luminous and non-luminous robots in the FSYNC model on the assumption that robots agree on a common chirality. Algorithms proposed in [5] have additional nice properties: they work even if robots are opaque (i.e., a robot is able to see another robot only if no other robot lies in the line segment joining them), and they are exclusive (i.e., no two robots occupy a single node during the execution). This work also describes the way to extend their algorithms to acheive the terminating exploration and/or to work in the SSYNC and ASYNC models. More concretely, this gives three algorithms to achieve the terminating exploration of a grid in case of a common chirality: algorithms for two robots with and six colors in the FSYNC model, two robots with and five colors in the FSYNC model, and two robots with and six colors in the SSYNC and ASYNC models. However algorithms with a fewer number of colors or no common chirality are not known yet.

1.2 Our contributions

We focus on the terminating exploration of a (finite) grid with myopic luminous and non-luminous robots, and clarify lower and upper bounds of the required number of robots in various assumptions of synchrony, visible distance , the number of colors, and a chirality. Table 1 summarizes our contributions.

First, we prove that, in the SSYNC and ASYNC models, three myopic robots are necessary to achieve the terminating exploration of a grid if holds. Note that this lower bound also holds for the perpetual exploration because we prove that robots cannot visit some nodes of a grid in this case. Other lower bounds in Table 1 are given by Bramas et al. [5]. They are originally given as impossibility results for the perpetual exploration, however they still hold for the terminating exploration. This is because Bramas et al. prove that, if the number of robots is smaller in each assumption, robots cannot visit some nodes.

Second, we propose algorithms to achieve the terminating exploration of a grid in various assumptions in Table 1. To the best of our knowledge, they are the first algorithms that achieve the terminating exploration of a grid by myopic robots with at most three colors and/or with no common chirality. In addition, six proposed algorithms are optimal in terms of the number of robots.

Synchrony Common #required robots
chirality Lower bound Upper bound
FSYNC 2 2 yes 2 [5] § 4.2.1
no 2 [5] § 4.2.2
1 yes 3 [5] § 4.2.3
no 3 [5] § 4.2.4
1 3 yes 2 [5] § 4.2.5
no 2 [5] § 4.2.6
2 yes 3 [5] § 4.2.7
no 3 [5] § 4.2.8
2 3 yes 2 [5] § 4.3.1
no 2 [5] § 4.3.2
SSYNC 2 yes 2 [5] § 4.3.3
ASYNC no 2 [5] § 4.3.4
1 3 yes § 3 § 4.3.5
no § 3 § 4.3.6
Table 1: Terminating grid exploration with myopic robots. Notation represents the visible distance of a robot, represents the number of colors, and means the number of robots is minimum.

2 Preliminaries

2.1 System model

The system consists of mobile robots and a simple connected graph , where is a set of nodes and is a set of edges. In this paper, we assume that is a finite grid (or a grid, for short) where and are two positive integers, i.e., satisfies the following conditions:

The indices of nodes are used for notation purposes only and robots do not know them. Neither nodes nor edges have identifiers or labels, and consequently robots cannot distinguish nodes and cannot distinguish edges. Robots do not know or . Figure 1 shows global directions labeled by North, East, South, and West on a grid. Note that these directions are used only for explanations, and robots cannot access the global directions. Each robot is on a node of at each instant. When a robot is on a node , we say occupies and hosts . The distance between two nodes is the number of edges in a shortest path between the nodes. The distance between two robots and is the distance between two nodes occupied by and . Two robots and are neighbors if the distance between and is one.

Figure 1: Global directions on a grid

Robots we consider have the following characteristics and capabilities. Robots are identical, that is, robots execute the same deterministic algorithm and do not have unique identifiers. Robots are luminous, that is, each robot has a light (or state) that is visible to itself and other robots. A robot can choose the color of its light from a discrete set . When the set is finite, denotes the number of available colors (i.e., ). Robots have no other persistent memory and cannot remember the history of past actions. Each robot can communicate by observing positions and colors of other robots (for collecting information), and by changing its color and moving (for sending information). Robots are myopic, that is, each robot can observe positions and colors of robots within a fixed distance ( but ) from its current position. Since robots are identical, they share the same . Each robot distinguishes clockwise and counterclockwise directions according to its own chirality. The robots agree on a common clockwise direction if and only if they agree on a common chirality.

Each robot executes an algorithm by repeating three-phase cycles: Look, Compute, and Move phases. During the Look phase, the robot takes a snapshot of positions and colors of robots within distance . During the Compute phase, the robot computes its next color and movement according to the observation in the Look phase. The robot may change its color at the end of the Compute phase. If the robot decides to move, it moves instantaneously to a neighboring node during the Move phase. To model asynchrony of executions, we introduce the notion of scheduler that decides when each robot executes phases. When the scheduler makes robot execute some phase, we say the scheduler activates the phase of or simply activates . We consider three types of synchronicity: the FSYNC (fully synchronous) model, the SSYNC (semi-synchronous) model, and the ASYNC (asynchronous) model. In all models, time is represented by an infinite sequence of instants . No robot has access to this global time. In the FSYNC and SSYNC models, all the robots that are activated at an instant execute a full cycle synchronously and concurrently between and . In the FSYNC model, at every instant, the scheduler activates all robots. In the SSYNC model, at every instant, the scheduler selects a non-empty subset of robots and activates the selected robots. In the ASYNC model, the scheduler activates cycles of robots asynchronously: the time between Look, Compute, and Move phases is finite but unpredictable. Note that in the ASYNC model, a robot can move based on the outdated view obtained during the previous Look phase. Throughout the paper we assume that the scheduler is fair, that is, each robot is activated infinitely often.

2.2 Configuration, view, and algorithm

Configuration.

A configuration represents positions and colors of all robots. At instant , let be the set of occupied nodes, and let be the multiset of colors of robots on node . A configuration of the system at instant is defined as . If is clear from the context, we simply write , and instead of , , and , respectively.

View.

When a robot takes a snapshot of its environment, it gets a view up to distance . Consider a robot on node . Let be a color of . We describe if node does not exist, that is, or holds. Since does not know the global direction, it obtains one of the following four views in case of and a common chirality:

  • North view:

  • East view:

  • South view:

  • West view:

In case of and no common chirality, obtains one of eight views, which include the above four views and the mirror images of them:

  • Mirror image of :

  • Mirror image of :

  • Mirror image of :

  • Mirror image of :

When obtains one of the views, it cannot recognize which view it obtains, however it can compute other views by rotating and/or flipping the view. Hence, we assume that, in case of a common chirality, obtains four views when it takes a snapshot. Note that does not recognize which view corresponds to each of North, East, South, and West views. Similarly, we assume that, in case of no common chirality, obtains eight views when it takes a snapshot.

Similarly, in case of and a common chirality, obtains the following four views.

  • North view:

  • East view:

  • South view:

  • West view:

In case of and no common chirality, obtains eight views, which include the above four views and the mirror images of them:

  • Mirror image of :

  • Mirror image of :

  • Mirror image of :

  • Mirror image of :

Algorithm.

An algorithm is described as a set of rules. Each rule is represented as a combination of a label, a guard, and an action. The guard represents possible views obtained by a robot. Recall that robot obtains several views during the Look phase. If some view of robot matches a guard in some rule, we say is enabled. We also say the rule with the corresponding label is enabled. If is enabled, can execute the corresponding action (i.e., change its color and/or move to its neighboring node) based on the directions of the matched view during Compute and Move phases. If several views of match some guard or some view of matches several guards, one combination of a view and a rule is selected by the scheduler.

2.3 Execution and problem

Execution.

An execution from initial configuration is a maximal sequence of configurations such that, for any , we have (i) , (ii) is obtained from after some robots move or change their colors, and (iii) for every robot that moves or changes its color between and , there exists such that takes its decision to move or change its color according to its algorithm and its view in . The term “maximal” means that the execution is either infinite or ends in a terminal configuration, i.e., a configuration in which no robot is enabled.

Problem.

A problem is defined as a set of executions: An execution solves if holds. An algorithm solves problem from initial configuration if any execution from solves . We simply say an algorithm solves problem if there exists an initial configuration such that solves from . In this paper, we consider the terminating exploration problem.

Definition 1 (Terminating exploration problem).

The terminating exploration is defined as a set of executions such that 1) every node is visited by at least one robot in and 2) there exists a suffix of such that no robots are enabled.

2.4 Descriptions

For simplicity, we describe a rule in an algorithm with a figure in Fig. 2. Figure 2(a) represents a rule of an algorithm in case of . Figure 2(b) represents a rule in case of . Each graph in Fig. 2 represents a guard. The guard in Fig. 2(a) represents a view , and similarly the guard in Fig. 2(b) represents a view . If holds, we paint the corresponding node white instead of writing . If holds, we paint the corresponding node black instead of writing . If both and are acceptable, we paint the corresponding node gray. If some view of robot with visible distance matches , is enabled. In this case, if the scheduler activates , it executes an action represented by . Notation represents a new color of the robot. Notation can be , , , , and represents the movement: implies a robot does not move, and (resp., , , ) implies a robot moves toward the node corresponding to (resp., , , ) of the guard.

Figure 2: Description of a rule in an algorithm

3 An Impossibility result

In this section, we prove that, in the SSYNC model, two robots cannot achieve the terminating exploration if holds. Since executions in the SSYNC model can happen in the ASYNC model, this impossibility also holds in the ASYNC model. This implies that, in case of , at least three robots are necessary to achieve the terminating exploration of grids in the SSYNC and ASYNC models. In the following, we use terms of end nodes and inner nodes. We say node is an end node if the degree of is smaller than four. We say node is an inner node if the distance from to every end node is at least three.

Theorem 1.

In case of and , no algorithm solves the terminating exploration of grids in the SSYNC model. This holds regardless of the number of colors and a common chirality.

Proof.

For contradiction, we assume that such an algorithm exists. Consider an execution of in a grid that satisfies and . Let be the minimum index such that some robot occupies an inner node at . Let be a robot that occupies an inner node at and be another robot. Let be the distance between and at . We consider two cases: (1) and (2) .

Consider Case 1, that is, holds. Let and be nodes that host and , respectively, at . We further consider two sub-cases: (1-1) is not an end node, and (1-2) is an end node. First assume that is not an end node (Case 1-1). In this case, we can define nodes and such that is a neighbor of , is a neighbor of , is not an end node, the distance between nodes and is at least two for any and any . Then we can prove that the scheduler makes and stay on nodes in and , respectively, forever after . Consider configuration such that and stay on nodes in and , respectively. Since and cannot observe each other and they are not on end nodes, () cannot distinguish directions, that is, obtains four identical views when it takes a snapshot. This implies that, when moves, the scheduler can decide which direction moves toward. Hence, if moves, the scheduler can move to another node in . Similarly, if moves, the scheduler can move to another node in . This implies that, at the configuration after , and stay on nodes in and , respectively. Hence, inductively, after , robots and continue to stay on nodes in and , respectively. This means that robots can visit at most two inner nodes until and visit at most two other inner nodes after . Since the number of inner nodes in is at least nine, robots cannot achieve the terminating exploration. Next assume that is an end node (Case 1-2). Let be an inner node that is a neighbor of . Similarly to Case 1-1, we can prove that, if never observes , continues to stay on nodes in . This implies that, to achieve the terminating exploration, moves toward or visits the remaining nodes by itself. In any case, leaves from end nodes, which reduces to Case 1-1.

Consider Case 2, that is, holds. Let be a node that hosts . Let be a node that hosts if , and a neighbor of if . We can prove that, as long as each robot moves toward another robot or stays on its current node, robots continue to stay on nodes in : if two robots stay on different nodes, they can only move toward another node, and if two robots stay on a single node or , the scheduler can move them to another node in . Hence, eventually a robot moves to another node, say

, when the distance between two robots is one. In this moment, the scheduler activates only this robot. After the movement, the distance between

and is two. Similarly to Case 1, after the configuration, robots can visit only two other inner nodes. This implies that robots can visit at most two inner nodes ( and ) until and visit at most three other inner nodes ( and two other inner nodes) after . Since the number of inner nodes in is at least nine, they cannot achieve the terminating exploration.

This is a contradiction. ∎

Note that this impossibility result also holds for the perpetual exploration because the proof of Theorem 1 shows that robots cannot visit some nodes in this case.

4 Terminating Grid Exploration Algorithms

4.1 Overview

In this subsection, we give the overview of our algorithms. All of our algorithms make robots explore the grid according to the arrow in Fig. 3. In other words, robots start exploration from the northwest corner and repeat the following behaviors:

  1. Proceed east: Robots go straight to the east end of the grid.

  2. Turn west: They go one step south and turn west.

  3. Proceed west: Robots go straight to the west end of the grid.

  4. Turn east: They go one step south and turn east.

In each algorithm, we implement the behaviors of proceeding and turning. While proceeding, robots recognize their forward direction by their form. In the FSYNC model, since all robots are activated at every instant, they move forward at every instant and keep their initial form. The robots repeat this behavior until they reach the end of the grid. On the other hand, in the SSYNC and ASYNC models, not all robots are activated at the same time. For this reason, we propose the way to make robots move forward by moving a single robot at every instant.

The difficult part is to implement the behaviors of turning. Since robots do not know global directions, they must understand the south direction from the local information. We realize this in two different approaches. The first approach is to keep robots in two rows when proceeding east or west. By making different forms in north and south rows, robots distinguish the two directions. Mainly we use this approach in the case of no common chirality. The second approach is used only in the case of a common chirality. In this approach, robots change their form of proceeding depending on the directions. That is, robots distinguish the east and west directions by their form. In the case of a common chirality, robots can go south by turning right (resp. left) when they proceed east (resp. west). In the second approach, robots do not have to keep themselves in two rows when proceeding. This is the main reason why we can reduce the number of robots in the case of a common chirality.

Figure 3: Route of grid exploration with our algorithm

In the following subsections, we give terminating grid exploration algorithms in various assumptions. We explain a set of rules and an execution from an initial configuration with figures. In the explanations, we mention rules that can be applied in each configuration. We omit explanations why other rules cannot be applied, but readers can easily check it by comparing the configuration and the set of rules.

4.2 Algorithms for the FSYNC model

In this subsection, we give terminating grid exploration algorithms for the FSYNC model.

4.2.1 , , a common chirality, and

We give a terminating exploration algorithm for grids in case of , , a common chirality, and . A set of colors is . The algorithm is given in Algorithm 1.

0:  
  
  
  
Algorithm 1 Fully Synchronous Terminating Exploration for with a Common Chirality
Proceeding east.

From the initial configuration, robots with color G and W can execute rules and , respectively. Hence, they proceed east while keeping the form.

Turning west.

The process of turning west is shown in Fig. 4.

Figure 4: Turning west in an execution of Algorithm 1

After robots proceed east, they reach the east end of the grid (Fig. 4(a)). From this configuration, the robot with color G moves south by rule , and hence the configuration becomes one in Fig. 4(b). From this configuration, the robot with color W moves south by rule . At the same time, the robot with color G moves west by rule . Hence, the configuration becomes one in Fig. 4(c).

Proceeding west.

From the configuration in Fig. 4(c), the robot with color G and the robot with color W can execute rules and , respectively. Hence, they proceed west while keeping the form.

Turning east.

The process of turning east is shown in Fig. 5.

Figure 5: Turning east in an execution of Algorithm 1

After robots proceed west, they reach the west end of the grid (Fig. 5(a)). From this configuration, the robot with color G moves south by rule . At the same time, the robot with color W moves by rule . Hence, the configuration becomes one in Fig. 5(b). From this configuration, the robot with color W moves south by rule , and hence the configuration becomes one in Fig. 5(c). From this configuration, two robots can proceed east again.

End of exploration.

After robots visit all nodes and reach a south corner of the grid, the configuration becomes terminal. In case that

is odd, two robots visit the south end nodes while proceeding east, and hence they reach the southeast corner. Immediately after node

is visited, the configuration is . At this configuration, no robots are enabled. In case that is even, two robots visit the south end nodes while proceeding west, and hence they reach the southwest corner. Immediately after node is visited, the configuration is . From this configuration, robots with colors G and W move by rules and , respectively. Hence, the configuration becomes . At this configuration, no robots are enabled.

4.2.2 , , no common chirality, and

We give a terminating exploration algorithm for grids in case of , , no common chirality, and . A set of colors is . The algorithm is given in Algorithm 2.

0:  
  
  
  
Algorithm 2 Fully Synchronous Terminating Exploration for Without Common Chirality
Proceeding east.

At the initial configuration, the robot on can execute rule , the robot on can execute rule , and the robot on can execute rule . By repeatedly executing those rules, robots proceed east while keeping the form.

Turning west.

The process of turning west is shown in Fig. 6.

Figure 6: Turning west in an execution of Algorithm 2

After robots proceed east, they reach the east end of the grid (Fig. 6(a)). From this configuration, two robots on west nodes move south by rules and . Hence, the configuration becomes one in Fig. 6(b). From this configuration, the robot with color G at the east end of the grid moves south by rule and the robot with color W moves east by rule . Consequently, the configuration becomes one in Fig. 6(c).

Proceeding west and turning east.

The form of robots in Fig. 6(c) is a mirror image of the one that robots make to proceed east. Hence, robots proceed west and turn east with the same rules as proceeding east and turning west, respectively.

End of exploration.

In case that is odd, robots visit the south end nodes while proceeding west. Eventually, the configuration becomes . Node has not been visited yet. From this configuration, the robot on moves to by rule , and hence the configuration becomes . At this configuration, no robots are enabled. In case that is even, robots terminate the algorithm similarly to the odd case.

4.2.3 , , a common chirality, and

In executions of Algorithm 1, robots do not change their colors and robots with different colors do not occupy a single node. Therefore, by representing the robot of color W in Algorithm 1 with two robots of color G, we can construct a terminating exploration algorithm in case of , , a common chirality, and .

4.2.4 , , no common chirality, and

In executions of Algorithm 2, robots do not change their colors and robots with different colors do not occupy a single node. Therefore, by representing the robot of color W in Algorithm 2 with two robots of color G, we can construct a terminating exploration algorithm in case of , , no common chirality, and .

4.2.5 , , a common chirality, and

We give a terminating exploration algorithm for grids in case of , , a common chirality, and . A set of colors is . The algorithm is given in Algorithm 3.

0:  
  
  
  
Algorithm 3 Fully Synchronous Terminating Exploration for with Common Chirality
Proceeding east.

From the initial configuration, robots with colors W and G can execute rules and , respectively. Hence, they proceed east while keeping the form.

Turning west.

The process of turning west is shown in Fig. 7.

Figure 7: Turning west in an execution of Algorithm 3

After robots proceed east, they reach the east end of the grid (Fig. 7(a)). From this configuration, the robot with color W moves south by rule . At the same time, the robot with color G moves east by rule . Hence, the configuration becomes one in Fig. 7(b). From this configuration, the robot on a south node changes its color to B and moves west by rule . At the same time, the robot on a north node moves south by rule . Consequently, the configuration becomes one in Fig. 7(c).

Proceeding west.

From the configuration in Fig. 7(c), the robot with color B and the robot with color G can execute rules and , respectively. Hence, they proceed west while keeping the form.

Turning east.

The process of turning east is shown in Fig. 8.

Figure 8: Turning east in an execution of Algorithm 3

After robots proceed west, they reach the west end of the grid (Fig. 8(a)). From this configuration, the robot with color B moves south by rule . At the same time, the robot with color G moves west by rule . Hence, the configuration becomes one in Fig. 8(b). From this configuration, the robot with color B changes its color to W and moves east by rule . At the same time, the robot with color G moves south by rule , and hence the configuration becomes one in Fig. 8(c). From this configuration, two robots can proceed east again.

End of exploration.

In case that is odd, two robots visit the south end nodes while proceeding east, and hence they reach the southeast corner. Immediately after node is visited, the configuration is . From this configuration, the robot with color G moves, and hence the configuration becomes . At this configuration, no robots are enabled. In case that is even, two robots visit the south end nodes while proceeding west, and hence they reach the southwest corner. Immediately after node is visited, the configuration is . From this configuration, the robot with color G moves by rule , and hence the configuration becomes . At this configuration, no robots are enabled.

4.2.6 , , no common chirality, and

We give a terminating exploration algorithm for grids in case of , , no common chirality, and . A set of colors is . The algorithm is given in Algorithm 4.

0:  
  
  
  
Algorithm 4 Fully Synchronous Terminating Exploration for Without Common Chirality
Proceeding east.

At the initial configuration, the robot on can execute rule , the robot on can execute rule , the robot on can execute rule , and the robot on can execute rule . By repeatedly executing those rules, robots proceed east while keeping the form.

Turning west.

The process of turning west is shown in Fig. 9.

Figure 9: Turning west in an execution of Algorithm 4

After robots proceed east, they reach the east end of the grid (Fig. 9(a)). From this configuration, two robots on east nodes move south by rules and . At the same time, the other robots move east by rules and . Hence, the configuration becomes one in Fig. 9(b). From this configuration, two robots with color W move west by rules and . At the same time, robots with color B and G move south by rules and , respectively. Consequently, the configuration becomes one in Fig. 9(c).

Proceeding west and turning east.

The form of robots in Fig. 9(c) is a mirror image of the one that robots make to proceed east. Hence, robots proceed west and turn east with the same rules as proceeding east and turning west, respectively.

End of exploration.

In case that is odd, robots visit the south end nodes while proceeding west, and hence they reach the southwest corner. Immediately after node is visited, the configuration is . From this configuration, the robot on moves to by rule . At the same time, robots with colors G and B move west by rules and , respectively. Hence, the configuration becomes . At this configuration, no robots are enabled. In case that is even, robots terminate the algorithm similarly to the odd case.

4.2.7 , , a common chirality, and

We give a terminating exploration algorithm for grids in case of , , a common chirality, and . A set of colors is . The algorithm is given in Algorithm 5.

0:  
  
  
  
Algorithm 5 Fully Synchronous Terminating Exploration for with Common Chirality
Proceeding east.

At the initial configuration, the robot on can execute rule , the robot on can execute rule , and the robot on can execute rule . By repeatedly executing those rules, robots proceed east while keeping the form.

Turning west.

The process of turning west is shown in Fig. 10.

Figure 10: Turning west in an execution of Algorithm 5

After robots proceed east, they reach the east end of the grid (Fig. 10(a)). From this configuration, the robot at the east end moves south by rule . At the same time, the other robots move east by rules and . Hence, the configuration becomes one in Fig. 10(b). From this configuration, the robot with color G on a south node moves south by rule . At the same time, the robot with color W moves west by rule , and the robot on a north node changes its color to W and moves south. Consequently, the configuration becomes one in Fig. 10(c).

Proceeding west.

At the configuration in Fig. 10(c), the robot on a west node can execute rule , the robot with color W on a east node can execute rule , and the robot with color G can execute rule . Hence, they proceed west while keeping the form.

Turning east.

The process of turning east is shown in Fig. 11.

Figure 11: Turning east in an execution of Algorithm 5

After robots proceed west, they reach the west end of the grid (Fig. 11(a)). From this configuration, the robot on a west node moves south by rule . At the same time, the other robots move west by rule and . Hence, the configuration becomes one in Fig. 11(b). From this configuration, the robot with color W on a south node moves south by rule . At the same time, the robot with color G moves east rule , and the robot on a north node changes its color to G and moves south by rule . Hence, the configuration becomes one in Fig. 11(c). From this configuration, three robots can proceed east again.

End of exploration.

In case that is odd, robots visit the south end nodes while proceeding west. Eventually, the configuration becomes . Node has not been visited yet. From this configuration, the robot on moves to by rule . At the same time, the other robots move west by rules and , and hence the configuration becomes . From this configuration, the robot on moves to by rule , and hence the configuration becomes . At this configuration, no robots are enabled. In case that is even, robots visit the south end nodes while proceeding east. Eventually, the configuration becomes . Node has not been visited yet. From this configuration, the robot on moves to by rule . At the same time, the other robots move east by rules and , and hence the configuration becomes . From this configuration, the robot on moves to by rule , and hence the configuration becomes . At this configuration, no robots are enabled.

4.2.8 , , no common chirality, and

In executions of Algorithm 4, robots do not change their colors and robots with colors G and B do not occupy a single node. Therefore, by representing the robot of color B in Algorithm 4 with two robots of color G, we can construct a terminating exploration algorithm in case of , , no common chirality, and .

4.3 Algorithms for the ASYNC model

In this subsection, we give terminating exploration algorithms for the ASYNC model. Clearly robots can achieve terminating exploration with those algorithms also in the SSYNC and FSYNC models.

4.3.1 , , a common chirality, and

We give a terminating exploration algorithm for grids in case of , , a common chirality, and . A set of colors is . The algorithm is given in Algorithm 6.

0:  
  
  
  
Algorithm 6 Asynchronous Terminating Exploration for with Common Chirality
Proceeding east.

From the initial configuration, the robot with color W moves east by rule , and hence the configuration becomes . From this configuration, the robot with color G moves east by rule , and hence the configuration becomes . After that, robots proceed east while keeping the form by repeatedly executing those rules.

Turning west.

The process of turning west is shown in Fig. 12.

Figure 12: Turning west in an execution of Algorithm 6

After robots proceed east, they reach the east end of the grid (Fig. 12(a)). From this configuration, the robot with color W moves south by rule , and hence the configuration becomes one in Fig. 12(b). From this configuration, the robot with color G changes its color to B and moves south by rule . In the ASYNC model, after the robot with color G changes its color, the other robot may observe the intermediate configuration (Fig. 12(c)). However, there are no rules that the other robot can execute in the intermediate configuration. Consequently, the configuration becomes one in Fig. 12(d).

Proceeding west.

From the configuration in Fig. 12(d), the robot with color B moves west by rule . Next, the robot with color W moves west by rule . After that, robots proceed west while keeping the form by repeatedly executing those rules.

Turning east.

The process of turning east is shown in Fig. 13.

Figure 13: Turning east in an execution of Algorithm 6

After robots proceed west, they reach the west end of the grid (Fig. 13(a)). From this configuration, the robot with color B moves south by rule , and hence the configuration becomes one in Fig. 13(b). From this configuration, the robot with color B changes its color to G by rule , and hence the configuration becomes one in Fig. 13(c). From this configuration, the robot with color W moves south by rule , and hence the configuration becomes one in Fig. 13(d). From this configuration, two robots can proceed east again.

End of exploration.

In case that is odd, two robots visit the south end nodes while proceeding east, and hence they reach the southeast corner. Immediately after node is visited, the configuration is . At this configuration, no robots are enabled. In case that is even, two robots visit the south end nodes while proceeding west, and hence they reach the southwest corner. Immediately after node is visited, the configuration is . At this configuration, no robots are enabled.

4.3.2 , , no common chirality, and

We give a terminating exploration algorithm for grids in case of , , a common chirality, and . A set of colors is . The algorithm is given in Algorithm 7.

0:  
  
  
  
Algorithm 7 Asynchronous Terminating Exploration for Without Common Chirality
Proceeding east.

From the initial configuration, the robot with color B moves by rule , and hence the configuration becomes . From this configuration, the robot with color W by rule , and hence the configuration becomes . From this configuration, the robot with color G by rule , and hence the configuration becomes . After that, robots proceed east while keeping the form by repeatedly executing those rules.

Turning west.

The process of turning west is shown in Fig. 14.

Figure 14: Turning west in an execution of Algorithm 7

After robots proceed east, they reach the east end of the grid (Fig. 14(a)). From this configuration, the robot with color B moves south by rule , and hence the configuration becomes one in Fig. 14(b). From this configuration, the robot with color G changes its color to W and moves south by rule . In the ASYNC model, after the robot with color G changes its color, other robots may observe the intermediate configuration (Fig. 14(c)). However, there are no rules that the other robot can execute in the intermediate configuration. Hence, the configuration becomes one in Fig. 14(d). From this configuration, the robot with color B moves east by rule , and hence the configuration becomes one in Fig. 14(e). From this configuration, the robot with color W changes its color to G and moves south by rule . In the ASYNC model, after the robot with color W changes its color, other robots may observe the intermediate configuration (Fig. 14(f)). However, there are no rules that the other robot can execute in the intermediate configuration. Consequently, the configuration becomes one in Fig. 14(g).

Proceeding west and turning east.

The form of robots in Fig. 14(g) is a mirror image of the one that robots make to proceed east. Hence, robots proceed west and turn east with the same rules as proceeding east and turning west, respectively.

End of exploration.

In case that is odd, robots visit the south end nodes while proceeding west. Eventually, the configuration becomes . Node has not been visited yet. From this configuration, the robot with color W moves to by rule , and hence the configuration becomes . At this configuration, no robots are enabled. In case that is even, robots terminate the algorithm similarly to the odd case.

4.3.3 , , a common chirality, and

We give a terminating exploration algorithm for grids in case of , , a common chirality, and . A set of colors is . The algorithm is given in Algorithm 8.

0: