Genetic Algorithm for Artificial Neural Networks in Real-Time Strategy Games

Yudi Widhiyasana - Politeknik Negeri Bandung, West Java, Bandung, Indonesia
Maisevli Harika - Politeknik Negeri Bandung, West Java, Bandung, Indonesia
Fahmi Faturahman Nul Hakim - Politeknik Negeri Bandung, West Java, Bandung, Indonesia
Fitri Diani - Politeknik Negeri Bandung, West Java, Bandung, Indonesia
Kokoy Siti Komariah - Pukyong National University, 45 Yongso-ro, Nam-Gu, Busan, Republic of Korea
Diena Rauda Ramdania - UIN Sunan Gunung Djati, West Java, Bandung, Indonesia


Citation Format:



DOI: http://dx.doi.org/10.30630/joiv.6.2.832

Abstract


Controlling each member of the soldiers to carry out battle with Non-Playable Characters (NPC) is one of the secrets to winning Real-Time Strategy games. The game could be more complicated and offer a more engaging experience if every NPC acts like humans rather than machines with patterned behavior. Like people during a war, each army member's command requires rapid reflexes and direction to strike or evade attacks. An intelligent opponent based on ANN as NPC can react quickly to their opponents. The accuracy of ANN could be enhanced by weight modifications using a Genetic Algorithm (GA). The crossover and mutation rates significantly impact GA's performance as an ANN setup. This research aims to find the best crossover and mutation rates in GA as a weight adjustment in ANN. Experiments were conducted using an RTS game simulator using 20 scenarios on a maximum of 4000 iterations. The initial setup of each troop is random, with a seven-unit type available. In this research, the troops won because their men were subjected to fewer attacks than the opposing forces. The GA optimal crossover and mutation rates are determined using troop victories as a baseline. According to the findings, the best crossover rate for GA as an ANN weight adjustment is 0.6, whereas the specific mutation rate is 0.09. The crossover rate of 0.6 has the highest average win value and tends to increase every generation. As for the mutation rate of 0.09, it has the highest average win value. Thus, this preliminary study can develop NPC more humanly.

Keywords


Artificial neural networks; game AI; human-like behavior; real-time strategy games.

Full Text:

PDF

References


L. F. Bicalho, B. Feijó, and A. Baffa, “A culture model for non-player characters’ behaviors in role-playing games,” in Brazilian Symposium on Games and Digital Entertainment, SBGAMES, 2020, vol. 2020-Novem, pp. 9–18, doi: 10.1109/SBGames51465.2020.00013.

M. Mostafa and O. S. Faragallah, “Development of Serious Games for Teaching Information Security Courses,” IEEE Access, vol. 7, pp. 169293–169305, 2019, doi: 10.1109/ACCESS.2019.2955639.

M. Černý, T. Plch, M. Marko, J. Gemrot, P. Ondráček, and C. Brom, “Using behavior objects to manage complexity in virtual worlds,” IEEE Trans. Comput. Intell. AI Games, vol. 9, no. 2, pp. 166–180, 2017, doi: 10.1109/TCIAIG.2016.2528499.

D. Rauda Ramdania, M. Harika, S. Rahmadika, and G. Giftia Azmiana, “The Use of Relations and Functions Games Based on Balanced Design in Mathematics Subjects to Improve Student Learning Outcomes,” J. Phys. Conf. Ser., vol. 1175, no. 1, 2019, doi: 10.1088/1742-6596/1175/1/012069.

D. Novak, D. Verber, J. Dugonik, and I. Fister, “A comparison of evolutionary and tree-based approaches for game feature validation in real-time strategy games with a novel metric,” Mathematics, vol. 8, no. 5, 2020, doi: 10.3390/MATH8050688.

L. Wu and A. Markham, “Evolutionary machine learning for RTS game starcraft,” in 31st AAAI Conference on Artificial Intelligence, AAAI 2017, 2017, pp. 5007–5008.

Y. Zhen, Z. Wanpeng, and L. Hongfu, “Artificial intelligence techniques on real-time strategy games,” in ACM International Conference Proceeding Series, 2018, pp. 11–21, doi: 10.1145/3297156.3297188.

D. Churchill et al., “StarCraft Bots and Competitions,” Encycl. Comput. Graph. Games, pp. 1–18, 2016, doi: 10.1007/978-3-319-08234-9_18-1.

F. F. Duarte, N. Lau, A. Pereira, and L. P. Reis, “A survey of planning and learning in games,” Appl. Sci., vol. 10, no. 13, 2020, doi: 10.3390/app10134529.

F. Dai, J. Gong, J. Huang, and J. Hao, “Macromanagement and Strategy Classification in Real-Time Strategy Games,” Proc. - 2nd China Symp. Cogn. Comput. Hybrid Intell. CCHI 2019, pp. 263–267, 2019, doi: 10.1109/CCHI.2019.8901957.

M. J. Kim, K. J. Kim, S. Kim, and A. K. Dey, “Performance Evaluation Gaps in a Real-Time Strategy Game between Human and Artificial Intelligence Players,” IEEE Access, vol. 6, pp. 13575–13586, 2018, doi: 10.1109/ACCESS.2018.2800016.

C. A. Cruz and J. A. R. Uresti, “HRLB^2: A reinforcement learning based framework for believable bots,” Appl. Sci., vol. 8, no. 12, 2018, doi: 10.3390/app8122453.

V. M. Petrovic, “Artificial Intelligence and Virtual Worlds-Toward Human-Level AI Agents,” IEEE Access, vol. 6, pp. 39976–39988, 2018, doi: 10.1109/ACCESS.2018.2855970.

M. Kopel and T. Hajas, “Implementing AI for Non-player Characters in 3D Video Games,” in Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics), vol. 10751 LNAI, 2018, pp. 610–619.

O. I. Abiodun, A. Jantan, A. E. Omolara, K. V. Dada, N. A. E. Mohamed, and H. Arshad, “State-of-the-art in artificial neural network applications: A survey,” Heliyon, vol. 4, no. 11, 2018, doi: 10.1016/j.heliyon.2018.e00938.

M. A. J. Idrissi, H. Ramchoun, Y. Ghanou, and M. Ettaouil, “Genetic algorithm for neural network architecture optimization,” Proc. 3rd IEEE Int. Conf. Logist. Oper. Manag. GOL 2016, 2016, doi: 10.1109/GOL.2016.7731699.

T. Suratno, N. Rarasati, and Z. Gusmanely, “Optimization of Genetic Algorithm for Implementation Designing and Modeling in Academic Scheduling,” Eksakta Berk. Ilm. Bid. MIPA (E-ISSN 2549-7464), vol. 20, no. 1, pp. 17–24, 2019.

S. Ernawati, E. R. Yulia, Frieyadie, and Samudi, “Implementation of the Naïve Bayes Algorithm with Feature Selection using Genetic Algorithm for Sentiment Review Analysis of Fashion Online Companies,” in 2018 6th International Conference on Cyber and IT Service Management, CITSM 2018, 2019, pp. 1–5, doi: 10.1109/CITSM.2018.8674286.

S. Leonori, M. Paschero, F. M. F. Mascioli, and A. Rizzi, “Optimization strategies for Microgrid energy management systems by Genetic Algorithms,” Appl. Soft Comput., vol. 86, p. 105903, 2020.

A. García-Dominguez et al., “Feature Selection Using Genetic Algorithms for the Generation of a Recognition and Classification of Children Activities Model Using Environmental Sound,” Mob. Inf. Syst., vol. 2020, 2020, doi: 10.1155/2020/8617430.

V. I. Svetlichnaya, E. O. Savkova, O. O. Shumaieva, O. V Chengar, and V. I. Shevchenko, “Using genetic algorithms for operational planning of cement mills loading,” in IOP Conference Series: Materials Science and Engineering, 2021, vol. 1047, no. 1, p. 12134.

Y. Qiu, D. Wang, and H. Yan, “Research on Application of Genetic Algorithms in Corporal Portal Search Engines,” in 2021 IEEE 5th Advanced Information Technology, Electronic and Automation Control Conference (IAEAC), 2021, vol. 5, pp. 1310–1314.

H. Hong, P. Tsangaratos, I. Ilia, J. Liu, A.-X. Zhu, and C. Xu, “Applying genetic algorithms to set the optimal combination of forest fire-related variables and model forest fire susceptibility based on data mining models. The case of Dayu County, China,” Sci. Total Environ., vol. 630, pp. 1044–1056, 2018.

M. A. Alonso-Arévalo, A. Cruz-Gutiérrez, R. F. Ibarra-Hernández, E. García-Canseco, and R. Conte-Galván, “Robust heart sound segmentation based on spectral change detection and genetic algorithms,” Biomed. Signal Process. Control, vol. 63, p. 102208, 2021, doi: 10.1016/j.bspc.2020.102208.

D. Mokadem, A. Amine, Z. Elberrichi, and D. Helbert, “Detection of urban areas using genetic algorithms and kohonen maps on multispectral images,” Int. J. Organ. Collect. Intell., vol. 8, no. 1, pp. 46–62, 2018.

M. Ratshilengo, C. Sigauke, and A. Bere, “Short-Term Solar Power Forecasting Using Genetic Algorithms: An Application Using South African Data,” Appl. Sci., vol. 11, no. 9, p. 4214, 2021.

M. H. Hratmh and S. A. Mirzaee, “Intelligent diagnosis of breast cancer using neural networks and genetic algorithms.”

W. Rahmaniar and A. E. Rakhmania, “Mobile Robot Path Planning in a Trajectory with Multiple Obstacles Using Genetic Algorithms,” J. Robot. Control, vol. 3, no. 1, pp. 1–7, 2022.

S. Muthaiyah and V. A. Singh, “Bone Cancer Survivability Prognosis with KNN and Genetic Algorithms,” in Concepts and Real-Time Applications of Deep Learning, Springer, 2021, pp. 123–134.

H. Chit Siu and V. Pankratius, “Genetic Algorithms for Starshade Retargeting in Space-Based Telescopes,” arXiv e-prints, p. arXiv-1907, 2019.

K. Shao, Y. Zhu, and D. Zhao, “StarCraft Micromanagement with Reinforcement Learning and Curriculum Transfer Learning,” IEEE Trans. Emerg. Top. Comput. Intell., vol. 3, no. 1, pp. 73–84, 2019, doi: 10.1109/TETCI.2018.2823329.

G. K. Soon, T. T. Guan, C. K. On, R. Alfred, and P. Anthony, “A comparison on the performance of crossover techniques in video game,” in Proceedings - 2013 IEEE International Conference on Control System, Computing and Engineering, ICCSCE 2013, 2013, pp. 493–498, doi: 10.1109/ICCSCE.2013.6720015.




Refbacks

  • There are currently no refbacks.


Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.

__________________________________________________________________________
JOIV : International Journal on Informatics Visualization
ISSN 2549-9610  (print) | 2549-9904 (online)
Organized by Department of Information Technology - Politeknik Negeri Padang, and Institute of Visual Informatics - UKM and Soft Computing and Data Mining Centre - UTHM
W : http://joiv.org
E : joiv@pnp.ac.id, hidra@pnp.ac.id, rahmat@pnp.ac.id

View JOIV Stats

Creative Commons License is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.