Skip to main content
. 2025 Oct 6;25(19):6181. doi: 10.3390/s25196181
Algorithm 1 Improved-ACO (Global Planning)
Input Grid map, start s, goal g, ACO parameters
Output best_path, best_cost
1 Initialize pheromone ττ0 on all feasible edges.
2 Precompute distance field D and fused heuristic ηfusion.
3 Set best_cost +, no_improve 0.
4 for t=1 to tmax do
5 perIterAntTau 0; perIterElite 0
6    T=Tmin+TmaxTmin21+cosπ(t1)tmax.
7    for k=1 to m do
8 pathk ConstructPath_Pro M,s,g,τ,ηfusion,T,Cmin,ξ,τ0,α,β.
9 pathkRemoveRedundant(pathk)
10 LkPathLength(pathk)
11 perIterAntTau  perIterAntTau+Δτ(pathk,Lk,Q)
12    end for
13    if all Lk= then
14 Cminmax0,CminΔC; rerun this iteration
15    if still infeasible then return failure
16    end if
17    Find best individual L,path amongLk,pathk
18    if L< best_cost then
19 bestcostL,best_pathpath,no_improve0
20    else
21 no_improve  no_improve +1
22    end if
23    perIterEliteQ/L added only on edges of path
24    q(t)expt1tmax1
25    τ(1ρ)τ+perIterAntTau+q(t)·perIterElite
26    τminτmax,maxτmin,τ
27    if no_improve P then
28 τ(1γ)τ+γτ0
29 no_improve  0
30    end if
31 end for
32 return best_path, best_cost