Skip to main content
. 2026 May 27;11(6):370. doi: 10.3390/biomimetics11060370
Algorithm 1 Original Fungal Growth Optimizer (FGO)
  •   1:

    Input: Population size N, maximum function evaluations MaxFEs, problem dimension D, bounds SL→,SU→

  •   2:

    Initialize N hyphae Si→ using Equation (1)

  •   3:

    Evaluate fitness f(Si→) and identify the global best S∗→

  •   4:

    FEs←N, t←1

  •   5:

    while FEs<MaxFEs do

  •   6:

        Generate random numbers r9,r10∼rand(0,1)

  •   7:

        if r9<r10 then                       ▹ Execute Hyphal Tip Growth loop

  •   8:

            for i=1 to N do

  •   9:

               if FEs≥MaxFEs then

  • 10:

                   break

  • 11:

               end if

  • 12:

               Compute exploration rate Er and normalized fitness probability pi

  • 13:

               if pi<Er then

  • 14:

                   Update Sit+1→ via Exploration Phase I (Equation (2))

  • 15:

               else

  • 16:

                   Update Sit+1→ via Exploitation Phase I (Equation (2))

  • 17:

               end if

  • 18:

               Evaluate Sit+1→ and set FEs←FEs+1

  • 19:

               Greedy selection: if f(Sit+1→)<f(Sit→), set Sit→←Sit+1→

  • 20:

            end for

  • 21:

        else                        ▹ Execute Branching and Germination loop

  • 22:

            for i=1 to N do

  • 23:

               if FEs≥MaxFEs then

  • 24:

                   break

  • 25:

               end if

  • 26:

               Generate random number r7∼rand(0,1)

  • 27:

               if r7<0.5 then

  • 28:

                   Update Sit+1→ via Hyphal Branching (Equation (3))

  • 29:

               else

  • 30:

                   Update Sit+1→ via Spore Germination (Equation (4))

  • 31:

               end if

  • 32:

               Evaluate Sit+1→ and set FEs←FEs+1

  • 33:

               Greedy selection: if f(Sit+1→)<f(Sit→), set Sit→←Sit+1→

  • 34:

            end for

  • 35:

        end if

  • 36:

        Update global best S∗→ if a better solution is found

  • 37:

        t←t+1

  • 38:

    end while

  • 39:

    Output: Global best solution S∗→