## Main Design of ERF-IMCS
### Image-Based Monte Carlo Localization
For the current view image \(I_{t}\) of the robot, the importance weight \(\omega_{t}^{i}\) is defined as:  
\[\omega_{t}^{i}=\frac{1}{N}\sum_{j=1}^{N}S(I_{t},\ I_{j})(D-dist(I_{i},\ I_{j})), \tag{5}\]  
where \(D\) is the metric distance between the particle \(i\) and the farthest node, and \(dist(I_{i},\ I_{j})\) is the distance between the particle \(i\) and the node \(j\). 3. Adaptive Genetic Algorithm  
However, the particle set is prone to diverge and fall into kidnapping when the samples do not lie in the vicinity of ground-truth location, if the weighted particles generated by the above model are directly adopt to approximate the nonlinear posterior distribution. Then, a large number of particles are required to inject into the map and approximate the posterior distribution, resulting in computational burden. To this end, we introduce the adaptive evolution strategy of genetic algorithm to increase the diversity of samples and reduce the computational burden, which requires relatively few particles to approximate the posterior distribution rapidly and precisely. The adaptive genetic algorithm simulates the particle convergence problem as a biological evolution process which performs the iteratively updates through operations of crossover and mutation to gradually eliminate samples with low fitness function values and increase samples with high fitness function values. Its process is as follows:  
Crossover: selecting two parent particles \(\{x_{t}^{m},x_{t}^{n}\}\) for \(s_{t}\) randomly and generating two new particles as defined below:  
\[\hat{x}_{t}^{m}=\alpha x_{t}^{m}+(1-\alpha)x_{t}^{n}+\eta, \tag{6}\]  
\[\hat{x}_{t}^{n}=\alpha x_{t}^{n}+(1-\alpha)x_{t}^{m}+\eta, \tag{7}\]  
where \(\eta\sim N(0,\Sigma),\alpha\sim U(0,1),\eta\sim N(0,\Sigma)\) is normal distribution, and \(U(0,1)\) is uniform distribution. \(\hat{x}_{t}^{m}\) is accepted if \(p(z_{t}|\,\hat{x}_{t}^{m})>max\{p(z_{t}|\,x_{t}^{m}),p(z_{t}|\,x_{t}^{n})\}\). Otherwise, accept with the probability of \(p(z_{t}|\,\hat{x}_{t}^{m})/max\{p(z_{t}|\,x_{t}^{m}),p(z_{t}|\,x_{t}^{n})\}\). The same operation for \(\hat{x}_{t}^{n}\). Mutation: selecting a parent particles. Then, the mutation operation is performed to generate a new particle according to the following formula:  
\[\hat{x}_{k}^{j}=x_{k}^{j}+\eta,\ \eta\sim N(0,\Sigma). \tag{8}\]  
\(\hat{x}_{t}^{j}\) is accepted if \(p(z_{t}|\,\hat{x}_{t}^{j})>p(z_{t}|\,x_{t}^{k})\). Otherwise, accept with the probability of \(p(z_{t}|\,\hat{x}_{t}^{j})/p(z_{t}|\,x_{t}^{k})\). In basic genetic algorithm, crossover probability \(p_{c}\) and mutation probability \(p_{m}\) generally take fixed values which may lead to problems in the state estimation of complex system, such as low accuracy and premature convergence of particles. Therefore, an adaptive adjustment strategy is  
Figure 5: The definition of the similarity between the current view and topological nodes. introduced to adjust the crossover probability and mutation probability by means of individual fitness value. The implementation is as follows:  
\[p_{c}=\left\{ \begin{array}{ccc}\frac{k_{1}(f_{\max}-f^{\prime})}{f_{\max}-f_{ \mathrm{avg}}}\,&f^{\prime}\geq f_{\mathrm{avg}}\\ k_{3}\,&f^{\prime}<f_{\mathrm{avg}}\end{array} \right., \tag{9}\]  
\[p_{m}=\left\{ \begin{array}{ccc}\frac{k_{2}(f_{\max}-f)}{f_{\max}-f_{\mathrm{ avg}}}\,&f\geq f_{\mathrm{avg}}\\ k_{4}\,&f<f_{\mathrm{avg}}\end{array} \right., \tag{10}\]  
where \(f_{\max}\) is maximum fitness value, \(f_{\mathrm{avg}}\) is average fitness value, \(f^{\prime}\) represents the larger fitness value of the two crossover samples, and \(f\) represents the fitness value of the mutation sample. By setting \(k_{1}\), \(k_{2}\), \(k_{3}\), and \(k_{4}\), the adaptive adjustment of \(p_{c}\) and \(p_{m}\) can be achieved.. The detailed process of the image-based Monte Carlo localization is shown in Algorithm 1.