# Path Planning of Inspection Robot Based on Improved Ant Colony Algorithm
## 2 Problem Description
### Traditional Ant Colony Algorithm  
The traditional ant colony optimization algorithm is a bio-inspired intelligent optimization method that emulates the foraging behavior of ants in their natural habitat. During the foraging process, ants deposit chemical pheromones along the routes they traverse, and subsequent ants are more likely to select paths with higher concentrations of these pheromones [23].  
In the conventional ant colony algorithm, the following formula defines the transition probability:  
\[Q_{ij}^{k}(t)=\left\{\begin{array}{cc}\left[\omega_{ij}(t)\right]^{\alpha} \left[\gamma_{ij}(t)\right]^{\beta}&j\in allowed_{k}\\ \frac{\left[\omega_{ij}(t)\right]^{\alpha}\left[\gamma_{ij}(t)\right]^{\beta }}{\sum_{i\to allowed_{k}}\left[\omega_{ij}(t)\right]^{\alpha}\left[\gamma_{ ij}(t)\right]^{\beta}},\,j\in allowed_{k}\\ 0,&\text{otherwise}\end{array}\right. \tag{1}\]  
The Formula (1) represents the probability; \(Q_{ij}^{k}(t)\): the probability that ant \(k\) will move from node \(i\) to node \(j\) at time \(t\). \(\omega_{ij}(t)\): the pheromone concentration on the edge (path) between nodes i and j at time t. Paths with higher pheromone concentrations are more likely to be chosen. \(\alpha\): the parameter that controls the influence of pheromones on the decision-making process. A larger \(\alpha\) value means more reliance on pheromone trails. \(\beta\): the parameter that controls the influence of the heuristic value (typically distance). A larger \(\beta\) value means that the ant is more likely to prioritize shorter paths. \(allowed_{k}\): the set of feasible nodes that ant k can move to from its current position (nodes that have not yet been visited.  
The first part of the formula applies to paths within the set of allowed nodes for the ant, indicating that the ant has not yet visited these nodes. The probability of selecting a path is a function of both the pheromone level and the heuristic value (such as distance). The denominator serves to normalize the probability by summing over all possible nodes to which the ant can move.  
The second part of the formula applies to nodes that the ant cannot access (those that have already been visited), thereby ensuring that the ant does not revisit these nodes.  
\(\gamma_{ij}(t)\): the heuristic value, typically the inverse of the distance between nodes \(i\) and \(j\). This encourages ants to favor shorter paths. The expression is as follows:  
\[\gamma_{ij}(t)=\frac{1}{d_{ij}} \tag{2}\]  
\(d_{ij}\) indicates the Euclidean distance from node \(i\) to node \(j\); Formula (3) illustrates the Euclidean distance.  
\[d_{ij}=\sqrt{\left(x_{i}-x_{j}\right)^{2}+\left(y_{i}-y_{j}\right)^{2}} \tag{3}\]  
The pheromone update expression is as follows:  
\[\omega_{ij}(t+n)=(1-\sigma)\cdot\omega_{ij}+\Delta\omega_{ij} \tag{4}\]\[\Delta\omega_{ij}(t)=\sum_{k=1}^{m}\Delta\omega_{ij}^{k}(t) \tag{5}\]  
\[\Delta\omega_{ij}^{k}(t)=\left\{\begin{array}{cc}Q/L_{k},&\text{The path of ant $k$ through this iteration }<i,j>\\ 0,&\text{other}\end{array}\right. \tag{6}\]  
In the formula, \(\sigma\) denotes the chemical signals evaporation rate, and \(1-\sigma\) is the retention factor following chemical signals evaporation, ranging in value from 0 to 1. \(\Delta\omega_{ij}(t)\) is the overall amount of chemical signals increments deposited by M ants on path nodes <\(i\), \(j\)> after one iteration, and \(\Delta\omega_{ij}^{k}(t)\) is the pheromone residue left on nodes <\(i\), \(j\)> by the k-th ant. \(Q\) is a constant, representing the pheromone intensity coefficient, and \(L_{k}\) is the \(k\)-th ant's path distance during this iteration. The settings for each parameter are shown in Table 1.