*4.2. The Proposed MOGWO Exploration Algorithm*

Equations (6) and (7) define the objectives of the exploration in this study. For such problems, there is no single solution that satisfies all objectives simultaneously at one time. It is not possible to explore new cells (*f* 1) and to revisit explored cells (*f* 2) at the same time. Based on the GWO parameter *a* in Equation (5), the search process is divided into two parts. When *a* > 1, it searches new waypoints. When *a* < 1, the process switches to revisiting already explored areas to improve the map accuracy. Thus, the approach serves two MOOPs in a single run-time.

Algorithm 1 demonstrates the MOGWO exploration for the multi-robot system. The process begins with the random initialization of waypoints in the search space. Their positions are set only once in the first iteration and will not be upgraded throughout the whole exploration. In line 1, it was noted that the number of waypoints should be higher than *nRbt*<sup>3</sup> because each robot needs at least three of the best solutions α, β, γ for the search.

```
Algorithm 1. The pseudocode of the proposed MOGWO exploration
1: Set waypoints wpw randomly in unknown space (wp > nRbt3)
2: Set the archive is empty
3: Set initial robot position rj (j = nRbt)
4: Initialize a, A, C
5: while t is not over
6: Update A, C
7: Set the archive is empty
8: for j = 1: nRbt
9: Find current position x, y of r1, r2, r3
10: Find frontier point Vnx,y (n = 1, ... ,8) of rj
11: Insert rays to the map from x, y position
12: Calculate the distances by the objective function (f1) wpw
13: Calculate the probability values by objective function (f2) for wpw
14: if a ≥ 1
15: if wpw is explored
16: Then, to increase wpw cost
17: if else wpw is unexplored
18: Then, wpw cost
19: end if
20: Find minimum wpα, wpβ, wpδ costs and save in archive
21: Find Dα, Dβ, Dδ of rj by Equation (2)
22: Find X1, X2, X3 and X(i + 1) by Equations (3) and (4)
23: Find rj(t + 1) = min 
                              eucl_dist
                                      Vnx,y, X(t + 1)

24: end if
25: if a ≤ 1
26: Divide probability cost by distance cost
27: Find maximum wpα, wpβ, wpδ costs and save in archive
28: Find rj(t + 1) = min 
                              eucl_dist
                                      Vnx,y, wpα

29: end if
30: end for
31: Reduce a
32: show map
33: end while
```
The proposed algorithm uses the archive for the same purposes as MOGWO does. It allows the storage of the non-dominated solution, which prevents the repeated selection of the same waypoint by the robots. For each iteration in the loop, the robots upgrade the positions, the GWO parameters, and the positions and probability costs of the frontier cells (lines 9, 10).

Two objective functions are used for all stages (lines 12, 13). The first one calculates the distances between waypoints and robots. The second objective function computes the probability values in the waypoint positions. Thus, the waypoints have distance costs of *f*<sup>1</sup> and probability costs *f*2.

Lines 14–24 show the exploration stage for *a* ≥ 1. At first, the algorithm needs to divide the waypoints into explored and unexplored ones due to the probability costs in lines 15–19. Then, it can select the unexplored *wp*α, *wp*β, and *wp*γ according to the distance costs (Figure 5). In lines 21 and 22, it computes the position *X*(*t* + 1). However, the robots cannot jump physically to the position, thus, the frontier cell, which is the closest to *X*(*t* + 1), is selected for the next robot position.

**Figure 5.** MOGWO exploration: (**a**) selection of the closest waypoints *wp*α, *wp*β, *wp*<sup>γ</sup> among *wpw*; (**b**) the waypoints that are located in the explored space have the lowest probability to be selected by the robot than waypoints in unknown space; (**c**) the best waypoints for one robots should not be duplicated for another robot.

Lines 25–28 illustrate the exploitation stage for *a* ≤ 1. It divides the probability cost *f*<sup>2</sup> by the distance cost *f*1. Afterward, it finds the maximum value of the result in line 26 and saves it in the archive. The next robot position is one of the frontier cells, which is closest to the alpha waypoint.

In line 30, the *a* parameter is reduced from 2 to 0 iteratively. Lastly, the map is upgraded by all robots in the end of iteration.

The implementation results are performed in the next section. The multi-robot exploration by MOGWO algorithm obtained notable results, which can be observed in various conditions by adjusting the numbers of waypoints and iterations.
