Abstract
Particle swarm optimization (PSO) is a well-known optimization algorithm that shows good performance in solving different optimization problems. However, PSO usually suffers from slow convergence. In this article, a reinforcement learning-based online parameters adaption method (RLAM) is developed to enhance PSO in convergence by designing a network to control the coefficients of PSO. Moreover, based on RLAM, a new RLPSO is designed. In order to investigate the performance of RLAM and RLPSO, experiments on 28 CEC 2013 benchmark functions are carried out when comparing with other online adaption method and PSO variants. The reported computational results show that the proposed RLAM is efficient and effective and that the proposed RLPSO is more superior compared with several state-of-the-art PSO variants.
Introduction
Particle Swarm Optimization (PSO) is a powerful metaheuristic inspired by social behavior, widely used for global optimization in complex landscapes. However, its efficacy is highly sensitive to its internal control parameters: the inertia weight ($w$) and acceleration coefficients ($c1, c2$). Poorly chosen parameters lead to a "Goldilocks" problem where the swarm either converges prematurely into local optima or wanders aimlessly without finding a solution.
Traditionally, these parameters are tuned manually, via linear decay schedules, or through fuzzy logic. However, these methods often lack the intelligence to react to the specific state of a search in real-time. This research proposes a more dynamic approach: the Reinforcement Learning-based online parameters Adaption Method (RLAM), which treats parameter selection as a continuous control problem.
Taxonomy of Adaptation Schemes
To understand the contribution of RLAM, it is helpful to view the broader landscape of parameter adaptation in PSO. Adaptation schemes can be categorized by their target, method, and source of information.
As shown in Figure 1, adaptation can target coefficients, strategies, or topologies. RLAM specifically focuses on the online adaptation of coefficients ($w, c1, c2$) by leveraging sources such as iteration progress and swarm diversity. By using a pre-trained neural network, the system "learns" how to steer the swarm based on its current state.
The RLAM Framework
The core of RLAM is a Deep Deterministic Policy Gradient (DDPG) agent. Unlike traditional Q-learning which relies on discrete action spaces, DDPG allows for continuous control, enabling the agent to output precise values for PSO coefficients.
The agent's state representation includes three critical metrics:
- Iteration Progress: The percentage of total iterations completed.
- Stagnation Metric: The number of iterations since the last improvement in the global best ($Gbest$).
- Swarm Diversity: A measure of how spread out the particles are.
To enhance the neural network's sensitivity to these inputs, a "sine-encoding" method is applied to map inputs into a more salient feature space. Furthermore, RLAM employs group dynamics, dividing the swarm into five sub-groups. This allows the RL agent to assign different search strategies to different groups simultaneously—for instance, allowing some particles to act as "scouts" while others act as "miners."
Experimental Results
The proposed method was rigorously tested against the CEC 2013 benchmark suite, comprising 28 diverse test functions ranging from simple unimodal functions to complex composition functions. RLAM was integrated into six well-known PSO variants (such as CLPSO and LIPS), resulting in an average performance improvement of 19.2% across the board.
A new variant, RLPSO, was developed by combining RLAM with Comprehensive Learning PSO and a mutation mechanism. In comparative studies against state-of-the-art PSO variants, RLPSO achieved the best performance on 18 out of 28 test functions, demonstrating significant statistical superiority verified via Wilcoxon tests.
Conclusion and Future Work
RLAM demonstrates that "pre-training" an optimizer using reinforcement learning can yield a more robust and adaptive search process. By using swarm diversity as a feedback signal, the RL agent learns to navigate complex landscapes more effectively than rigid, rule-based schedules. While the training phase for the DDPG network requires significant computational effort, the resulting inference step is efficient. Future work will focus on refining state selection and extending this RL-based tuning framework to other metaheuristic algorithms beyond particle swarms.
Summary updated