Skip to main content
. 2024 Aug 29;9(9):519. doi: 10.3390/biomimetics9090519
Algorithm 2 Framework of the ADBO Algorithm
  • Input: 

    Maximum iteration Tmax, population size N

  • Output: 

    Optimal position Xbest2 and its corresponding fitness value fmin

  • 1:

    Initialize the population of particles, indexed as i=1,2N, and define relevant parameters, setting ωmaxA and ωmin.

  • 2:

    while tTmaxdo

  • 3:

       Initialize dung beetle positions using Gaussian chaotic mapping according to Equation (8).

  • 4:

       Update the weight factors using Equation (13).

  • 5:

       for i belonging to the rolling dung beetles group. do

  • 6:

         a=rand(1)

  • 7:

         if a0.9 then

  • 8:

            Update the location of the rolling dung beetle using Equation (1).

  • 9:

         else

  • 10:

            Simulate rolling the ball in the presence of obstacles using Equation (2) to update the location.

  • 11:

         end if

  • 12:

       end for

  • 13:

       Calculate the nonlinear convergence factor as R=1t/Tmax.

  • 14:

       for i belonging to the spawning dung beetles group. do

  • 15:

         Using Equation (3) to determine the range of spawning dung beetles and Equation (11) to update the position of the spawning dung beetles.

  • 16:

       end for

  • 17:

       for i belonging to the foraging dung beetles group. do

  • 18:

         Determine the range of foraging dung beetles using Equation (5) and update the position of the foraging dung beetles using Equation (12).

  • 19:

       end for

  • 20:

       for i belonging to the stealing dung beetles group. do

  • 21:

         Update the location of the stealing dung beetle using Equation (13).

  • 22:

       end for

  • 23:

    end while

  • 24:

    return Return the optimal position Xbest2 and its corresponding fitness value fmin.