Tips for developing metaheuristic algorithms

  • Based on the characteristics of the problem and the design of encoding and decoding, different metaheuristic algorithms can be used.
  • The balance between exploration and exploitation is important, otherwise the algorithm may converge to a local optimum prematurely.
  • Completely random search is inefficient, especially when the solution space is large. The design of the neighborhood operator should be combined with the characteristics of the problem, and a greedy strategy can be considered.
  • Google OR-Tools is a very good comparison tool. If your problem can be solved by OR-Tools, it is difficult to develop a metaheuristic algorithm by yourself to achieve a better solution (especially in terms of quality) than it. This requires careful algorithm design and parameter optimization.
  • Repairing infeasible solutions may be necessary, depending on the algorithm's search performance. A large number of infeasible solutions will cause the algorithm to waste a lot of time on ineffective searches.
  • It is very helpful to collect algorithm data and visualize it, which helps to observe the algorithm's search process and effect, and discover some code bugs.
  • Automated testing of algorithm parameters might be worth trying.