Skip to main content
. 2023 Jul 1;23(13):6087. doi: 10.3390/s23136087
Algorithm 1: Pseudocode of Grey Wolf Algorithm
# Grey Wolf algorithm parameter initialization
1. population_size = 20
2. max_iterations = 15
3. lower_bound = [8, 10−4, 100, 16]
4. upper_bound = [200, 5 × 10, 600, 128]
# Grey Wolf algorithm population initialization
5. population = initialize_population(population_size, lower_bound, upper_bound)
# Iteratively search for the optimal solution
6. for iteration in range(max_iterations):
7.        fitness = evaluate_fitness(population) # Calculate the fitness value
8.        update_positions(population, fitness) # Update wolf pack position
9. best_solution = get_best_solution(population) # Get the optimal solution
# Output the hyperparameters of the optimal solution
10. best_hyperparameters = decode_parameters(best_solution)