| Algorithm 1. Hybrid GA–MLP for optimizing MLP parameters |
| 1: Set GA parameters (Pc, Pm, n, gmax) |
| 2: Encode solutions (MLP parameters) using real value encoding |
| 3: Randomly generate n solutions |
| 4: Calculate the fitness value of each solution by the trained MLPs |
| 5: for i = 1, until gmax do |
| 6: for i = 1, until n/2 do |
| 7: Select two parents |
| 8: Crossover to create two children with Pc |
| 9: Mutate children with Pm |
| 10: end for 11: Replace parents with children |
| 12: end for |
| 13: Return the best solution |