Issue

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
An Adaptive Swarm Clustering Algorithm for Game AI Based on Reinforcement Learning Godot and Particle Swarm Optimization (RLGPSO)
Corresponding Author(s) : Trisna Gelar
Kinetik: Game Technology, Information System, Computer Network, Computing, Electronics, and Control,
Vol. 11, No. 2, May 2026
Abstract
The management of extensive agent swarms presents significant challenges in dynamic, real-time environments, particularly within the context of game artificial intelligence, such as real-time strategy games. Traditional Particle Swarm Optimization (PSO) techniques demonstrate effectiveness in optimization tasks; however, they frequently exhibit suboptimal convergence and insufficient flexibility in complex and challenging scenarios. This study presents a hybrid methodology that combines Reinforcement Learning (RL) and Particle Swarm Optimization (PSO) to develop an adaptive swarm clustering system. This method utilizes a Deep Deterministic Policy Gradient (DDPG) agent operating externally through an API to dynamically adjust Particle Swarm Optimization (PSO) parameters, thereby maintaining a separation between adaptive intelligence and the simulation engine. This allows the swarm to effectively navigate and group within a procedurally generated 2D simulation environment with physical obstacles, unlike previous studies that rely on static mathematical benchmarks. A quantitative analysis employing Mixed Linear Model Regression (MLMR) indicates that this hybrid method significantly outperforms traditional, manually tuned PSO in terms of convergence time and diversity value. The RLGPSO model showed an 11.46% decrease in convergence time on highly complex maps. This result was statistically significant, with a p-value of 0.002 from the MLMR analysis. This research presents a framework for the deployment of intelligent, self-organizing agent swarms, enhancing the realism and efficacy of contemporary game artificial intelligence.
Keywords
Download Citation
Endnote/Zotero/Mendeley (RIS)BibTeX
- E. Z. Elfeky et al., “A Systematic Review of Coevolution in Real-Time Strategy Games,” IEEE Access, vol. 9, pp. 136647–136665, 2021. https://doi.org/10.1109/ACCESS.2021.3115768
- Y. Zhen, Z. Wanpeng, and L. Hongfu, “Artificial Intelligence Techniques on Real-time Strategy Games,” in Proceedings of the 2018 2nd International Conference on Computer Science and Artificial Intelligence, New York, NY, USA: ACM, Dec. 2018, pp. 11–21. https://doi.org/10.1145/3297156.3297188
- J. Tang, G. Liu, and Q. Pan, “A Review on Representative Swarm Intelligence Algorithms for Solving Optimization Problems: Applications and Trends,” IEEE/CAA J. Autom. Sin., vol. 8, no. 10, pp. 1627–1643, Oct. 2021. https://doi.org/10.1109/JAS.2021.1004129
- A. Xu, H. Li, Y. Hong, and G. Liu, “Autonomous Decision-Making for Air Gaming Based on Position Weight-Based Particle Swarm Optimization Algorithm,” Aerospace, vol. 11, no. 12, p. 1030, Dec. 2024. https://doi.org/10.3390/aerospace11121030
- A. G. Gad, “Particle Swarm Optimization Algorithm and Its Applications: A Systematic Review,” Arch. Comput. Methods Eng., vol. 29, no. 5, pp. 2531–2561, Aug. 2022. https://doi.org/10.1007/s11831-021-09694-4
- M. R. Bonyadi and Z. Michalewicz, “Particle Swarm Optimization for Single Objective Continuous Space Problems: A Review,” Evol. Comput., vol. 25, no. 1, pp. 1–54, Mar. 2017. https://doi.org/10.1162/EVCO_r_00180
- M. Kamosi, A. B. Hashemi, and M. R. Meybodi, “A New Particle Swarm Optimization Algorithm for Dynamic Environments,” 2010, pp. 129–138. https://doi.org/10.1007/978-3-642-17563-3_16
- B. F. Azevedo, A. M. A. C. Rocha, and A. I. Pereira, “Hybrid approaches to optimization and machine learning methods: a systematic literature review,” Mach. Learn., vol. 113, no. 7, pp. 4055–4097, Jul. 2024. https://doi.org/10.1007/s10994-023-06467-x
- Z. Jiang, D. Zhu, X.-Y. Li, and L.-B. Han, “A Hybrid Adaptive Particle Swarm Optimization Algorithm for Enhanced Performance,” Appl. Sci., vol. 15, no. 11, p. 6030, May 2025. https://doi.org/10.3390/app15116030
- K. Shao, Z. Tang, Y. Zhu, N. Li, and D. Zhao, “A Survey of Deep Reinforcement Learning in Video Games,” no. 61573353, pp. 1–13, 2019. https://doi.org/10.48550/arXiv.1912.10944
- N. Justesen, P. Bontrager, J. Togelius, and S. Risi, “Deep Learning for Video Game Playing,” IEEE Trans. Games, vol. 12, no. 1, pp. 1–20, Mar. 2020. https://doi.org/10.1109/TG.2019.2896986
- O. Aoun, “Deep Q-Network-Enhanced Self-Tuning Control of Particle Swarm Optimization,” Modelling, vol. 5, no. 4, pp. 1709–1728, 2024. https://doi.org/10.3390/modelling5040089
- W. Li, Y. Xiong, and Q. Xiong, “Reinforcement Learning-Guided Particle Swarm Optimization for Multi-Objective Unmanned Aerial Vehicle Path Planning,” Symmetry (Basel)., vol. 17, no. 8, p. 1292, Aug. 2025. https://doi.org/10.3390/sym17081292
- Z. Dong, Q. Wu, and L. Chen, “Reinforcement Learning-Based Formation Pinning and Shape Transformation for Swarms,” Drones, vol. 7, no. 11, p. 673, Nov. 2023. https://doi.org/10.3390/drones7110673
- F. Zhang and Z. Chen, “A Novel Reinforcement Learning-Based Particle Swarm Optimization Algorithm for Better Symmetry between Convergence Speed and Diversity,” Symmetry (Basel)., vol. 16, no. 10, p. 1290, Oct. 2024. https://doi.org/10.3390/sym16101290
- K. H. Sharif and S. Yousif Ameen, “Game Engines Evaluation for Serious Game Development in Education,” in 2021 International Conference on Software, Telecommunications and Computer Networks (SoftCOM), IEEE, Sep. 2021, pp. 1–6. https://doi.org/10.23919/SoftCOM52868.2021.9559053
- Y. Chen and H. Sundaram, “Estimating Complexity of 2D Shapes,” in 2005 IEEE 7th Workshop on Multimedia Signal Processing, IEEE, Oct. 2005, pp. 1–4. https://doi.org/10.1109/MMSP.2005.248668
- M. Rothgänger, A. Melnik, and H. Ritter, “Shape Complexity Estimation Using VAE,” 2024, pp. 35–45. https://doi.org/10.1007/978-3-031-47715-7_3
- R. Poli, J. Kennedy, and T. Blackwell, “Particle swarm optimization,” Swarm Intell., vol. 1, no. 1, pp. 33–57, Oct. 2007. https://doi.org/10.1007/s11721-007-0002-0
- E. H. Sumiea et al., “Deep deterministic policy gradient algorithm: A systematic review,” Heliyon, vol. 10, no. 9, p. e30697, May 2024. https://doi.org/10.1016/j.heliyon.2024.e30697
- S. Yin et al., “Reinforcement-learning-based parameter adaptation method for particle swarm optimization,” Complex Intell. Syst., vol. 9, no. 5, pp. 5585–5609, Oct. 2023. https://doi.org/10.1007/s40747-023-01012-8
- E. Beeching, J. Debangoye, O. Simonin, and C. Wolf, “Godot Reinforcement Learning Agents,” Dec. 2021. https://doi.org/10.48550/arXiv.2112.03636
- M. Ranaweera and Q. H. Mahmoud, “Deep Reinforcement Learning with Godot Game Engine,” Electronics, vol. 13, no. 5, p. 985, Mar. 2024. https://doi.org/10.3390/electronics13050985
- A. Rafiq, T. Asmawaty Abdul Kadir, and S. Normaziah Ihsan, “Pathfinding Algorithms in Game Development,” IOP Conf. Ser. Mater. Sci. Eng., vol. 769, no. 1, p. 012021, Feb. 2020. https://doi.org/10.1088/1757-899X/769/1/012021
- S. R. Lawande, G. Jasmine, J. Anbarasi, and L. I. Izhar, “A Systematic Review and Analysis of Intelligence-Based Pathfinding Algorithms in the Field of Video Games,” Appl. Sci., vol. 12, no. 11, p. 5499, May 2022. https://doi.org/10.3390/app12115499
References
E. Z. Elfeky et al., “A Systematic Review of Coevolution in Real-Time Strategy Games,” IEEE Access, vol. 9, pp. 136647–136665, 2021. https://doi.org/10.1109/ACCESS.2021.3115768
Y. Zhen, Z. Wanpeng, and L. Hongfu, “Artificial Intelligence Techniques on Real-time Strategy Games,” in Proceedings of the 2018 2nd International Conference on Computer Science and Artificial Intelligence, New York, NY, USA: ACM, Dec. 2018, pp. 11–21. https://doi.org/10.1145/3297156.3297188
J. Tang, G. Liu, and Q. Pan, “A Review on Representative Swarm Intelligence Algorithms for Solving Optimization Problems: Applications and Trends,” IEEE/CAA J. Autom. Sin., vol. 8, no. 10, pp. 1627–1643, Oct. 2021. https://doi.org/10.1109/JAS.2021.1004129
A. Xu, H. Li, Y. Hong, and G. Liu, “Autonomous Decision-Making for Air Gaming Based on Position Weight-Based Particle Swarm Optimization Algorithm,” Aerospace, vol. 11, no. 12, p. 1030, Dec. 2024. https://doi.org/10.3390/aerospace11121030
A. G. Gad, “Particle Swarm Optimization Algorithm and Its Applications: A Systematic Review,” Arch. Comput. Methods Eng., vol. 29, no. 5, pp. 2531–2561, Aug. 2022. https://doi.org/10.1007/s11831-021-09694-4
M. R. Bonyadi and Z. Michalewicz, “Particle Swarm Optimization for Single Objective Continuous Space Problems: A Review,” Evol. Comput., vol. 25, no. 1, pp. 1–54, Mar. 2017. https://doi.org/10.1162/EVCO_r_00180
M. Kamosi, A. B. Hashemi, and M. R. Meybodi, “A New Particle Swarm Optimization Algorithm for Dynamic Environments,” 2010, pp. 129–138. https://doi.org/10.1007/978-3-642-17563-3_16
B. F. Azevedo, A. M. A. C. Rocha, and A. I. Pereira, “Hybrid approaches to optimization and machine learning methods: a systematic literature review,” Mach. Learn., vol. 113, no. 7, pp. 4055–4097, Jul. 2024. https://doi.org/10.1007/s10994-023-06467-x
Z. Jiang, D. Zhu, X.-Y. Li, and L.-B. Han, “A Hybrid Adaptive Particle Swarm Optimization Algorithm for Enhanced Performance,” Appl. Sci., vol. 15, no. 11, p. 6030, May 2025. https://doi.org/10.3390/app15116030
K. Shao, Z. Tang, Y. Zhu, N. Li, and D. Zhao, “A Survey of Deep Reinforcement Learning in Video Games,” no. 61573353, pp. 1–13, 2019. https://doi.org/10.48550/arXiv.1912.10944
N. Justesen, P. Bontrager, J. Togelius, and S. Risi, “Deep Learning for Video Game Playing,” IEEE Trans. Games, vol. 12, no. 1, pp. 1–20, Mar. 2020. https://doi.org/10.1109/TG.2019.2896986
O. Aoun, “Deep Q-Network-Enhanced Self-Tuning Control of Particle Swarm Optimization,” Modelling, vol. 5, no. 4, pp. 1709–1728, 2024. https://doi.org/10.3390/modelling5040089
W. Li, Y. Xiong, and Q. Xiong, “Reinforcement Learning-Guided Particle Swarm Optimization for Multi-Objective Unmanned Aerial Vehicle Path Planning,” Symmetry (Basel)., vol. 17, no. 8, p. 1292, Aug. 2025. https://doi.org/10.3390/sym17081292
Z. Dong, Q. Wu, and L. Chen, “Reinforcement Learning-Based Formation Pinning and Shape Transformation for Swarms,” Drones, vol. 7, no. 11, p. 673, Nov. 2023. https://doi.org/10.3390/drones7110673
F. Zhang and Z. Chen, “A Novel Reinforcement Learning-Based Particle Swarm Optimization Algorithm for Better Symmetry between Convergence Speed and Diversity,” Symmetry (Basel)., vol. 16, no. 10, p. 1290, Oct. 2024. https://doi.org/10.3390/sym16101290
K. H. Sharif and S. Yousif Ameen, “Game Engines Evaluation for Serious Game Development in Education,” in 2021 International Conference on Software, Telecommunications and Computer Networks (SoftCOM), IEEE, Sep. 2021, pp. 1–6. https://doi.org/10.23919/SoftCOM52868.2021.9559053
Y. Chen and H. Sundaram, “Estimating Complexity of 2D Shapes,” in 2005 IEEE 7th Workshop on Multimedia Signal Processing, IEEE, Oct. 2005, pp. 1–4. https://doi.org/10.1109/MMSP.2005.248668
M. Rothgänger, A. Melnik, and H. Ritter, “Shape Complexity Estimation Using VAE,” 2024, pp. 35–45. https://doi.org/10.1007/978-3-031-47715-7_3
R. Poli, J. Kennedy, and T. Blackwell, “Particle swarm optimization,” Swarm Intell., vol. 1, no. 1, pp. 33–57, Oct. 2007. https://doi.org/10.1007/s11721-007-0002-0
E. H. Sumiea et al., “Deep deterministic policy gradient algorithm: A systematic review,” Heliyon, vol. 10, no. 9, p. e30697, May 2024. https://doi.org/10.1016/j.heliyon.2024.e30697
S. Yin et al., “Reinforcement-learning-based parameter adaptation method for particle swarm optimization,” Complex Intell. Syst., vol. 9, no. 5, pp. 5585–5609, Oct. 2023. https://doi.org/10.1007/s40747-023-01012-8
E. Beeching, J. Debangoye, O. Simonin, and C. Wolf, “Godot Reinforcement Learning Agents,” Dec. 2021. https://doi.org/10.48550/arXiv.2112.03636
M. Ranaweera and Q. H. Mahmoud, “Deep Reinforcement Learning with Godot Game Engine,” Electronics, vol. 13, no. 5, p. 985, Mar. 2024. https://doi.org/10.3390/electronics13050985
A. Rafiq, T. Asmawaty Abdul Kadir, and S. Normaziah Ihsan, “Pathfinding Algorithms in Game Development,” IOP Conf. Ser. Mater. Sci. Eng., vol. 769, no. 1, p. 012021, Feb. 2020. https://doi.org/10.1088/1757-899X/769/1/012021
S. R. Lawande, G. Jasmine, J. Anbarasi, and L. I. Izhar, “A Systematic Review and Analysis of Intelligence-Based Pathfinding Algorithms in the Field of Video Games,” Appl. Sci., vol. 12, no. 11, p. 5499, May 2022. https://doi.org/10.3390/app12115499