# Multi-Robot Exploration Based on Multi-Objective Grey Wolf Optimizer
## 4 MOGWO Exploration for Multi-Robot System
### 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^{3}\) because each robot needs at least three of the best solutions \(\alpha,\ \beta,\ \gamma\) for the search. ```
1:Set waypoints \(wp_{w}\) randomly in unknown space (\(wp>\ nRbt^{3}\))
2:Set the archive is empty
3:Set initial robot position \(r_{j}\) (\(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 \(r_{1},\ r_{2},\ r_{3}\)
10:Find frontier point \(Vn_{x,y}\) (n = 1,....8) of \(r_{j}\)
11:Insert rays to the map from \(x,y\) position
12:Calculate the distances by the objective function (\(f_{1}\)) \(wp_{w}\)
13:Calculate the probability values by objective function (\(f_{2}\)) for \(wp_{w}\)
14:if\(a\geq 1\)
15:if\(wp_{w}\) is explored
16:Then, to increase \(wp_{w}\) cost
17:ifelse\(wp_{w}\) is unexplored
18:Then, \(wp_{w}\) cost
19:endif
20:Find minimum \(wp_{\alpha},wp_{\beta},\ wwp_{\delta}\) costs and save in archive
21:Find \(D_{\alpha},\ D_{\beta},\ D_{\delta}\) of \(r_{j}\) by Equation (2)
22:Find \(X_{1},\ X_{2},\ X_{3}\) and \(X(i+1)\) by Equations (3) and (4)
23:Find \(r_{j}(t+1)=min\left(eucl\_dist\big{[}Vn_{x,y},X(t+1)\big{]}\right)\)
24:endif
25:if\(a\leq 1\)
26:Divide probability cost by distance cost
27:Find maximum \(wp_{\alpha},wp_{\beta},\ wwp_{\delta}\) costs and save in archive
28:Find \(r_{j}(t+1)=min\left(eucl\_dist\big{[}Vn_{x,y},wp_{\alpha}\big{]}\right)\)
29:endif
30:endfor
31:Reduce a
32:show map
33:endwhile
```  
**Algorithm 1** The pseudocode of the proposed MOGWO exploration  
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_{1}\) and probability costs \(f_{2}\). Lines 14-24 show the exploration stage for \(a\geq 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_{\alpha},\ wp_{\beta}\), and \(wp_{\gamma}\) 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. Lines 25-28 illustrate the exploitation stage for \(a\leq 1\). It divides the probability cost \(f_{2}\) 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.