Skip to main content
. 2023 Apr 19;8(2):165. doi: 10.3390/biomimetics8020165

Table 1.

The procedures for implementing the CM-CSA algorithm.

  • Input:

    The Initial Position of the Crow Population

  • Output:

    The Optimal Solution of the Problem (the Best Position in the Memory of All Crows) and the Optimal Individual

Step 1: Start
  • Step 2:

    Initialization. Randomly generate n crows in the d-dimensional feasible region, where each crow Xi,iter=x1,x2,x3,,xn represents a feasible solution, and initialize the maximum iteration evaluation times and the awareness probability AP.

  • Step 3:

    Initialize the crow memory value and calculate the fitness value.

Step 4: Update the parameter gbest.
  • Step 5:

    Use Formula (11) to perform Cauchy mutation on gbest and perform cross-border processing.

Step 6: Use Formula (13) to adaptively adjust the step length fl.
Step 7: Use Formula (14) to perform displacement update operation.
Step 8: Check the feasibility of the new location.
Step 9: Calculate the fitness of the new position and update the memory value.
  • Step 10:

    Repeat steps 4 to 9 until the termination condition is reached, and then stop the iteration.

Step 11: Output the optimal solution and the optimal individual.
Step 12: End.