PARTITIONING KNOWN ENVIRONMENTS FOR MULTI-ROBOT TASK ALLOCATION USING GENETIC ALGORITHMS

A common challenge facing emergency services, particularly in response to fires and/or earthquakes, is the location and subsequent extraction of people from hazardous buildings in a timely manner. This usually requires emergency service workers to enter the building and put their own lives at risk, even when there may be no people to extract. However, given recent advances in autonomous robotics, drones are expected to help humans in tasks such as search and rescue, and similar tasks, where coverage and time are key parameters. The aim is to complete a comprehensive search of the environment as quickly as feasible. Using multiple drones rather than a single drone can reduce search time, although performance can be poor if the searching is non-coordinated. Therefore, partitioning a terrain is important in order to effectively distribute the drone search work so that good coverage can be achieved in a reasonable amount of time and redundant searching is eliminated. In this paper a novel Square Based Terrain Partitioning (SBTP) algorithm is presented using a genetic algorithm to partition a known environment into multiple domains in a multi-robot exploration system. In addition, a second genetic algorithm is presented to allocate the domain search workload such that, given a certain number of drones, the overall search time is minimized.

Effective task allocation is important when attempting to achieve high utilization in multi-robot exploration systems [1,2]. In this process a group of robots collaborate to complete some complex task with better performance than using a single robot 1 or drone. The purpose of the task assignment is to minimize the task completion time whilst maximizing the search utilization of each robot.
[3] proposed a task assignment method based on social-welfare for multi-robot systems, the aim being to achieve the task completion and minimize resource consumption proportion to an acceptable amount. Zhang and Xie [4] put forward an adaptive task assignment method for multiple mobile robots based on swarm intelligence to perform cooperative tasks in unknown dynamic environments. A hierarchical architecture was applied to each robot. An alternative method based on a Genetic Algorithm (GA) was used for real-time task assignment of Multi-Unmanned Combat Aerial Vehicle in uncertain environments [5]. Irfan Younas et al. [6] also proposed a method based on GA for task assignment problems. In their approach, a group of collaborating agents work as a team to complete the tasks assigned to them.
In [1] the authors use a GA to solve a multi-robot task assignment problem. In their method the overall search area is divided into subareas and the authors assume that the size of the subarea assigned to each robot is the same and equal. However, the authors do not describe the area partitioning technique. Wei Sun et al. [7] propose a solution for the multi-robot task assignment in an environment with obstacles. The solution combines the A* algorithm with a genetic algorithm. The A* algorithm is used to find an optimal path whereas the GA is used to solve the task assignment problem. In [8] the authors introduce a Balanced Partitioned Surveillance Task (BPS) for multi-robot systems. Indeed, there are many methods to solve multi-robot task assignment problems, such as task assignment for robots with a limited communication range [9], vacancy chain scheduling for multi-robot task allocation [10], and clustering-based algorithms for multi-vehicle tasks [11]. For example, even multi-robot task allocation for cleaning public spaces has been put forward [12]. The aim is to allocate a group of robots to each cleaning zone based on status of the robot and the environment [12]. Also, dynamic task allocation is necessary process for proper management of the swarm in a robotic swarm systems. It allows the robotic swarm to do multiple tasks in such a way that a pre-defined proportion of execution of those tasks is achieved [13]. However, although there are many methods for solving Multi-Robot Task Assignment (MRTA) problems, every method has its own limitations. Different problems lend themselves to different partitioning and allocation schemes.
We propose a scheduling task allocation mechanism using GA that allocates one or more search domains to specific drones in a way that, given a certain number of drones, the overall average search time is minimized. To achieve this the given terrain needs to be partitioned into discrete search domains.
A challenging task in the field of mobile robotics is the efficient exploration of environments. Multirobot exploration algorithms often rely on occupancy grids [14]. However, if these environments are very large, search performance can be poor. Conversely, polygonal representations do not have this limitation [14]. Partitioning of an unknown terrain into a number of regions equal to the number of available robots has been proposed using K-means clustering with an occupancy grid representation [14]. According to [15], an unknown area is partitioned into multiple sub-regions and each different region is assigned to a number of available robots. In [15], the author uses a circle partitioning method. The aim is to explore the environment as quickly as possible. Furthermore, the coordinated use of multiple cleaning robots has been considered by many researchers (e.g., [16][17][18]). In [16] the authors employ an area partitioning method using a balloon model to divide the cleaning area into a number of equal-size subareas, each one assigned to a specific robot. However, they do not consider the shapes and locations of obstacles. In [17] an extended partitioning method considers identifying dirty areas in the environment. However, once again, they do not consider obstacles. As an alternative, in [14], the authors use a Voronoi space partitioning algorithm to partition an obstacles free space. However, no information is provided on the partitioning process when obstacles are present. On the other hand, a circle partitioning method, based on available robots, where obstacles occupy the search space is presented in [15].
In this paper, a novel SBTP algorithm is implemented using the GA to partition a known environment into multiple sub-regions for multirobot exploration. The aim is to achieve good search coverage in a reasonable amount of time with a given number of drones. The SBTP algorithm can partition any sized known rectangular terrain/space with or without obstacles.
The remainder of the paper is organized as follows. In the Section 2, the Square Based Terrain Partitioning (SBTP) algorithm is proposed to partition a known environment. In Section 3 an efficient GA-based scheme is proposed for allocating drones to these search partitions. Experimental results and analysis are presented in Section 4. Finally, in Section 5, conclusions and future work are discussed.

TERRAIN PARTITIONING INTO DISCRETE DOMAINS
In this section, a novel SBTP algorithm is presented using a GA to partition known environments with and without fixed obstacles (such as walls) into multiple sub-regions for multi-robot exploration. By known environments we mean, the floor-plan is available ahead of exploration. The GA mechanism is explained in Section II [19].
With this approach, we first select the number of domains. The algorithm then selects valid search origin points for each domain (i.e. x, y coordinates that do not correspond to walls, water, or other illegal terrain) and evaluates their potential using a GA. The algorithm expands the domain from this origin(s) by checking whether the location ((x+i, y) OR (x-i, y)) valid or not. Initially xmax & xmin = x and i = 1. If either location (x+i, y) OR (x-i, y) is valid then the algorithm will mark those grid-squares (x, y) as belonging to the domain and set xmax = x+i or xmin = x-i. The index i is then incremented. The process continues in parallel for each domain until an obstacle or another domain is encountered. If both of the location (x+i, y) and (x-i, y) is not valid then the algorithm resets the index, i=1, and commences checking the row[(xmax, y+i) to (xmin, y+i)] and row[(xmax, y-i) to (xmin, y-i)] whether these rows are valid or not. This takes place asymmetrically, expanding the row[(xmax, y+i) to (xmin, y+i)] OR row[(xmax, y-i) to (xmin, y-i)] whilst valid until obstacle(s) or other domains are encountered. As the expansion takes place, the gridsquares (x,y) of valid row(s) are marked and the index, i, is incremented. When both of the row expansion processes cease, i.e. because row[(xmax, y+i) to (xmin, y+i)] and row[(xmax, y-i) to (xmin, yi)] are not valid then the algorithm will stop the partitioning process for the domain(s) concerned.
The algorithm completes when all the domains have been expanded to their fullest extent [19].
As normal with GA schemes, multiple guesses are evaluated and refined to obtain a better partitioning of the terrain with or without obstacle(s). With this scheme 100% coverage is possible, but not always in a terrain that contains obstacle(s). In addition, the area of different domains can be unbalanced as the algorithm will discontinue expanding a specific domain when other domains or obstacles are encountered [19].
The SBTP algorithm flow chart is presented in Fig. 1.   In Fig. 3, we can see the area of different domains is somewhat unbalanced because the SBTP algorithm expands the partition asymmetrically. As a result, it will stop expanding domain partitions when domains encounter each other, to prevent overlapping, or if obstacles prevent further growth.

DOMAIN EXPLORATION WORK ALLOCATION MECHANISM
The concept of a Genetic Algorithm (GA) was first proposed by John Holland [20]. A GA is a search heuristic that is used to generate solutions for optimization and search problems. It commences its search with a set of random solutions (represented by chromosomes), called a population, usually coded into binary string structures. Solutions from one population are used to create a new population. The new solutions are called the offspring, which are selected according their fitness; the more suitable they are, the more chances they have to survive and reproduce. A flow chart for a traditional GA is presented in [1].
In this section, we describe a GA to allocate tasks between drones in a multi-robot exploration system. The purpose of this algorithm is to allocate search domains to drones so that, a given certain number of drones, the overall search time is minimized whilst maximizing the utilization of each drone. We assume M≥N; where M denotes maximum number of domains and N indicates the total number of drones. Therefore, the task scheduling assignment mechanism is implemented in such way that one or more drones will search separate multiple domains. The proposed GA differs from traditional GAs in its fitness function.

CHROMOSOME ENCODING
Genetic algorithms process chromosomes, each chromosome comprising a set of alleles. The group of chromosomes used in one generation (i.e. an iteration of an experiment) is referred to as the population. Each chromosome represents a possible solution to a problem and can be encoded in a number of ways when designing the experiment. In this paper value encoding is used where each and every chromosome is a set of some values, i.e., we construct a chromosome as an array of x,y domain (D1…Dn) origin coordinates and allocate a drone to each of 'n' domain as shown in Table 1. For example, we partition a 20x20 terrain/floorplan into 4 discrete domains using the SBTP algorithm shown in Fig. 1 Table 2.

FITNESS FUNCTION
The fitness function simply takes a candidate solution to the problem as input and produces a score based on how fit the solution is in respect to the problem under consideration. In this paper, the objective is to allocate the domain searching work in such way that the overall average search time is minimized given a specific number of drones. Therefore, the fitness function is designed as follows: where Rn represents the count of occurrences of n th drone/robot that is allocated to the i th domain according to the chromosome encoding. N and M denote the total number of drones and total number of domains, respectively. Di represents the i th domain and αcount is a method that returns the sum of the domains that are allocated to n th drone.
where j ={1,2,3...N} & µ0 = 0. µj, M and N represent a count of the j th domain exploration workload areas, total number of domains and total number of robots, respectively. Thus, if we have 3 drones the iterative form of the eq. (2) becomes: Step 1: Step 2: Step 3: where µ1, µ2, and µ3 denote the domain exploration workload areas: 1, 2 and 3, respectively. In the case of the scenario related to the chromosome shown in Table 3, we have N = 4 and M = 7. Therefore, from eq. (2) we obtain the domain searching workload areas as: µ1 = 2, µ2 = 2, µ3 = 2 and µ4 = 1. We then perform a comparison between each given chromosome domain allocation encoding and the analytical balanced domain assignment from eq. (1) & (2). Eq. (6) is formulated to check the equivalency of the domain count allocated to the n th drone with the set of j th domain searching workload area count according to the chromosomes encoding that has been calculated by using eq. (1) and (2). R n ≡ {µ 1, µ 2, µ 3, … µ j }; n = {1,2,3. . . N}, j = {1,2,3 … N} (6) Basically, we are conducting a logically equivalency test between eq. (1) and (2), i.e. a count of the areas allocated to each drone in the chromosome with a count of the balanced areas calculated theoretically.
Subsequently, in eq. (7) we check the logical AND with the output of the Rn comparison that has been calculated using eq. (6). If eq. (7) is logically true, we determine that the domain exploration workload, µj is fully matched among the drones according to the chromosome encoding and we will progress to eq. (8). Otherwise, the system will reject that chromosome encoding by assigning it the highest fitness (F1) value, where a low score is preferable.
(R 1 AND R 2 AND … AND R n ) = True (7) Only if eq. (7) is true, then the total transit time between the domains for all the drones, Tβ, is calculated as follows: where Ti indicates the transit time of the i th drones. From eq. (8), the first fitness term, F1 is: where Di, denotes the individual domain D1, D2, & Dm and Aф total area of the domains and size is a method that returns the total domain's area.
From (8) and (10), the second fitness term, F2 is: where N represents the maximum number of drones. A dynamic path finding algorithm A* is used to calculate the Tβ for each drone. The A* algorithm calculates transit between any points within the two domains in order to obtain the shortest transit path between them.
The fitness term F1 is used for drone searching work assignment in an obstacle and obstacle-free environment whereas F2 is used to evaluate how the average search time varies in terms of the number of drones for the resultant best F1 task allocation. The lowest F1 value means the drone searching work allocation is adjacent for the total number of drones and the lowest F2 value indicates the least average exploration time for that resultant best F1 domain searching allocation.

GENETIC OPERATORS
Three genetic operators: selection, crossover and mutation are mainly used in GA. Initially; a random population is created to form a chromosome pool of n chromosomes. The fitness of each chromosome in the population is evaluated and unless the stopping criteria are met (i.e. a sufficiently superior solution has been found) the fit chromosomes are used to create new offspring chromosomes. There are several existing methods to select the best chromosomes, such as [21]. In this paper, rank selection is used with elitist selection to ensure good solutions are retained until better alternatives are found.
For the crossover, 'single point' crossover is used and for the mutation we just randomly alter allele values (i.e. x,y coordinates). In 'single point' crossover, one chromosome is selected to crossover with a second parent chromosome. For example, Table 4, shows the process before crossover. Here, two chromosomes (C1, C2) containing (X, Y) coordinates for four domains (D1, D2, D3, and D4) are shown. A new child chromosome Cnew is created by performing single point crossover with chromosomes C1 and C2. The crossover point is randomly selected. In this instance it is from Domain 2 (D2) onwards as shown in Table 5.

RESULTS AND ANALYSIS
In this section, some experiments are carried out to demonstrate the efficacy and feasibility of the proposed method for multi-robot exploration and work assignment in a known environment.
The purpose of the experiment shown in Fig. 4 is to determine how the coverage varies with the number of domains. In this section, the GA-based SBTP algorithm is used to achieve the efficient coverage. The given terrain (shown in Fig. 2) is partitioned into 10 domains (shown in Fig. 3). The simulation is run for 100 generations, 100 chromosomes, 10% elite, 30% kill, with the crossover and mutation rate of 50% and 30%, respectively. The simulation is repeated 5 times with computer producing different random number generator seeds and the average percentage coverage is shown in Table 6.

Figure 4 -Coverage (%) versus number of domain(s) in an environment with and without obstacles
In Fig. 4, D1 to D10 represent the domains (1, 2…10) and the coverage is calculated using eq. (4) in Section II [19]. With 95% Confidence Intervals, we can see the exploration coverage gradually increases as the number of domains grow in a terrain that contains obstacles. However, in a free space environment (terrain does not contain obstacles), the exploration coverage is always 100% for the any number of domain(s) even in single generation of the chromosome population.

DRONE EXPLORATION WORK ASSIGNMENT IN ENVIRONMENT WITH AND WITHOUT OBSTACLES
In this subsection, a GA-based method is used to assign the domain searching work in a simple known environment with and without obstacles. When completing the task, the drones need to avoid colliding with obstacles. The given terrain (shown in Fig. 2a & 2b) is partitioned into 10 discrete domains (shown in Fig. 3a & 3b) and the maximum number of drones is 4. The simulation parameters for this experiment are: 200 generations, 100 chromosomes, 10% elite, 30% kill with a crossover and mutation rate of 50% & 30%, respectively. The results are shown in Figs. 5a, 5b, 6a and 6b.

ROUGHLY EQUAL, NON-ADJACENT TASK ALLOCATION
In this subsection a GA-based mechanism explained in Section III [19] is used to allocate the domain exploration work among the drones. Here the task allocation is roughly equal, meaning the workload (x-y coordinates) is almost equal but not necessarily adjacent domains when assigned to specific drones. Details of the roughly equal task allocation are provided in Section III(B) [19]. The experiment is run for the partitioned floor-plan shown in Figs. 3a & 3b and the fitness performance is calculated using eq. (6) in Section III [19]. The A* dynamic path finding algorithm is used for drone inter-domain movements.  Figs. 5a & 5b show the domain searching work assignment for different numbers of drones in a known simple environment with and without obstacles. The numbers (1-4) in Figs. 5a & 5b (a-d) denote drone 1 (R1), drone 2 (R2), drone 3 (R3) & drone 4 (R4), respectively. Basically this is an indication of which drone will search which domain. As we can see from Figs. 5a & 5b, the workload is roughly equal, meaning the area of the total partitioned domains are roughly equally distributed among the drones but they are not necessarily adjacent.

ADJACENT TASK ALLOCATION
In this subsection a GA method (explained in Section 3) is used for domain searching work allocation to drones. Here the fitness function (explained in Subsection 3.2) is designed in such a way that the task allocation to drones comprises adjacent domain allocations that are balanced. Adjacent and balanced task allocation means that if there are 4 domains and 2 drones, then each drone will be allocated to explore the closest 2 domains that are adjacent to them. The experiment is run for the partitioned floor-plan shown in Figs. 3a & 3b and the fitness performance is calculated using eq. (9). The A* dynamic path finding algorithm is used for inter-domain drone movements.
Figs. 6a & 6b show the domain searching work assignment for different numbers of drones in an environment with and without obstacles. The numbers (1-4) denote drone 1 (R1), drone 2 (R2), drone 3 (R3) & drone 4 (R4), respectively, in Figs. 6a & 6b (a-d). As we can see from Figs. 6a and 6b the domain searching work assignment for each drone is adjacent and the domain allocation is balanced. However, as expected, the workload is slightly imbalanced when the number of domains is not wholly divisible by the number of drones.

TASK ALLOCATION PERFORMANCE IN A FREE SPACE ENVIRONMENT
In this subsection, a performance comparison is conducted in an obstacle-free environment based on two task allocation methods: roughly equal, nonadjacent and adjacent task allocation, as shown in Figs. 5a & 6a. We can see from Fig. 5a, the workload is roughly equal, meaning the area of the total partitioned domain workload among the drones is distributed fairly equally but the allocation of the domains is not necessarily adjacent for each drone. On the other hand, we can see from Fig. 6a, the work assignment for each drone is adjacent and domain allocation is balanced as well. Suppose, if there are 8 domains and 2 drones; then the domain allocation for each drone will be the closest 4 domains that are adjacent to them. In addition, Table  7 gives a comparison of the average search time between the two domain searching allocation mechanisms shown in Fig. 5a in Subsection 4.1.1 & in Fig. 6a in Subsection 4.1.2 for different numbers of drones. In Fig. 7, we can see that the overall domain searching time is reduced when the number of drones increases.  In Fig. 7, we can see when the task allocation is adjacent, the overall domain searching time is less than when the task allocation is non-adjacent for a given number of drones due to the reduced interdomain transit time.

TASK ALLOCATION PERFORMANCE IN ENVIRONMENT WITH OBSTACLES
In this subsection, a performance comparison is conducted in an environment with obstacles based on two task allocation methods: roughly equal, nonadjacent and adjacent task allocation as shown in Figs. 5b & 6b. We can see from Figs. 5b and 6b, the workload is non-adjacent and adjacent for each drone, respectively. In addition, we can see from Fig. 5b & 6b, that 4 drones can complete the whole domain exploration task in approximately 705.70 and 631.50 seconds, respectively (shown in Table 8) without colliding with the obstacles.

TASK ALLOCATION ALOGORITHM PERFORMANCE IN AN ENVIRONMENT WITH AND WITHOUT OBSTACLES
In this subsection, the performance of the GA method explained in Section 3, is tested. The experiment is run for 1, 5, 10, 20, 30, 40 and 50 generations with the simulation parameters; 50 chromosomes, 10% elite, 30% kill and the crossover and mutation rate of 50% and 30%, respectively. According to the fitness function shown in eq. (9), the best adjacent task allocation is found in a free space environment, as shown in Fig. 6a and an obstacles space shown in Fig. 6b. However, the F1 values vary depending upon the drone inter-domain movement. This is due to where a drone is within one domain when it commences its transit to the next domain. In Fig. 9a, we can see that the best adjacent task assignment is found within 10 generations in an obstacle free environment for 2 robots and within 30 generations for 3 and 4 robots. On the other hand, in an environment with obstacles, as shown in Fig. 9b, we can see the finest solution is found for 2 robots in 30 generations. However, for 3 and 4 robots, the best solution is found within 30 and 40 generations, respectively. Overall, we can see, based on both scenarios, the GA converges to the best solution very quickly in a free space environment compared to one with obstacles environment.

CONCLUSION AND FUTURE WORK
In this paper, a novel Square-Based Terrain Partitioning (SBTP) scheme employing a Genetic Algorithm (GA) is used to partition known environments into multiple sub-areas in a multirobot exploration system where N robots are employed to survey a given area with some static obstacles. Also, a GA has been presented to solve Multi-Robot Task Assignment (MRTA) problems where one or more drones search multiple domains in such a way that for the given number of drones the overall search time is minimized. In applied GA, an appropriate fitness function is provided based on traditional GAs.
As shown in Section III [19] and Section 3 of this paper, we can see the terrain exploration coverage is increased for increasing number of domains. In addition, the utilization of each robot is increased by taking into account the transit time between domains within the F2 fitness function, which can reduce the overall search time. However, the new fitness function explained in eq. (1-9) in Subsection 3.2 performs better than the fitness function described in eq. (5)(6) in Section III(B) [19]. In both scenarios (terrain with and without obstacles), the overall domain searching time is effectively reduced when domain exploration work is adjacent compared to the non-adjacent work allocation for a given number of drones due to the reduced inter-domain transit time.
In the future work, the communication continuity constraint will be incorporated. This means that drones can no longer search independently but must regulate/coordinate their actions to remain in contact with each other, as shown in Fig. 10. A group of drones with sensors are sent into a hostile enclosed space typically comprising a number of rooms and corridors containing various obstacles. The drones must spread out to survey the terrain (In some instances the terrain is completely unknown; however, we initially focus on scenarios where a floor-plan is available) in a timely manner. However, they are required to remain in contact with each other to relay data and ensure the group functions as a single orchestrated unit. At various strategic points some of the drones may assume the role of a relay station whilst others actually perform the surveying. If the group becomes partitioned, remedial steps are taken to promptly re-establish contact.

REFERENCES
[1] S. Li, X. Xu, and L. Zuo, "Task assignment of multi-robot systems based on improved genetic algorithm,"