Implementasi Unity-Gymnasium sebagai Alternatif Metode Reinforcement Learning dalam Pengembangan Environment Sliding Puzzle menggunakan Game Engine Unity
Abstract
Artificial intelligence (AI) plays an important role in the gaming industry, its application commonly found in non-player character (NPC) and procedural content generation (PCG). One of the popular methods for developing AI is reinforcement learning (RL). Unity, as one of the most dominant game engines, has its own RL framework called Unity ML-Agents Toolkit. Unity with its capabilities to simulate realistic environments. allowing Unity ML-Agents Toolkit to develop and test RL agents in various complex scenarios. However, Unity ML-Agents Toolkit only has limited RL algorithms. This study aims to introduce an alternative method for implementing reinforcement learning in Unity, while addressing the Unity ML-Agents Toolkit’s limitations. The proposed method is Unity-Gymnasium, which integrates Unity with Gymnasium, and tested by developing a sliding puzzle environment. The result of this study demonstrates that the Unity-Gymnasium method works well and allows access to total 38 different RL algorithms from various RL libraries that compatible with Gymnasium, such as Stable Baseline 3, CleanRL, Tianshou, Ray Rllib, and Dopamine, this number is significantly higher compared to Unity ML-Agents Toolkit which only offer five RL algorithm options.
Downloads
References
M. Ranjitha, K. Nathan, dan L. Joseph, “Artificial Intelligence Algorithms and Techniques in the computation of Player-Adaptive Games,” dalam Journal of Physics: Conference Series, Institute of Physics Publishing, Jan 2020. doi: 10.1088/1742-6596/1427/1/012006.
C. Hu, Y. Zhao, Z. Wang, H. Du, dan J. Liu, “Games for Artificial Intelligence Research: A Review and Perspectives,” IEEE Transactions on Artificial Intelligence, vol. 5, no. 12, hlm. 5949–5968, Des 2024, doi: 10.1109/TAI.2024.3410935.
A. Filipović, “The Role Of Artificial Intelligence In Video Game Development,” KULTURA POLISA, vol. 20, no. 3, hlm. 50–67, Nov 2023, doi: 10.51738/kpolisa2023.20.3r.50f.
Y. Lu dan W. Li, “Techniques and Paradigms in Modern Game AI Systems,” Algorithms, vol. 15, no. 8, hlm. 282, Agu 2022, doi: 10.3390/a15080282.
P. Almeida, V. Carvalho, dan A. Simões, “Reinforcement Learning Applied to AI Bots in First-Person Shooters: A Systematic Review,” 1 Juli 2023, Multidisciplinary Digital Publishing Institute (MDPI). doi: 10.3390/a16070323.
Z. Zhang, “Basic things about reinforcement learning,” Applied and Computational Engineering, vol. 6, no. 1, hlm. 199–203, Jun 2023, doi: 10.54254/2755-2721/6/20230788.
A. Barczak dan H. Woźniak, “Comparative Study on Game Engines,” Studia Informatica, no. 23, hlm. 5–24, Des 2020, doi: 10.34739/si.2019.23.01.
A. Jungherr dan D. B. Schlarb, “The Extended Reach of Game Engine Companies: How Companies Like Epic Games and Unity Technologies Provide Platforms for Extended Reality Applications and the Metaverse,” Social Media and Society, vol. 8, no. 2, Apr 2022, doi: 10.1177/20563051221107641.
Kushagra, A. Sajjan, S. Jaiswal, H. Mishra, dan S. Singh, “Development and Evaluation of Autonomous Parking System Utilising Reinforcement Learning Agents Within Unity3D Environment,” International Journal For Multidisciplinary Research, vol. 6, no. 3, Jun 2024, doi: 10.36948/ijfmr.2024.v06i03.21878.
Y. Savid, R. Mahmoudi, R. Maskeliūnas, dan R. Damaševičius, “Simulated Autonomous Driving Using Reinforcement Learning: A Comparative Study on Unity’s ML-Agents Framework,” Information (Switzerland), vol. 14, no. 5, Mei 2023, doi: 10.3390/info14050290.
M. Towers dkk., “Gymnasium: A Standard Interface for Reinforcement Learning Environments,” ArXiv, Jul 2024, doi: 10.48550/arXiv.2407.17032.
M. A. B. Abbass dan H.-S. Kang, “Drone Elevation Control Based on Python-Unity Integrated Framework for Reinforcement Learning Applications,” Drones, vol. 7, no. 4, hlm. 225, Mar 2023, doi: 10.3390/drones7040225.
Y. Mao, F. Gao, Q. Zhang, dan Z. Yang, “An AUV Target-Tracking Method Combining Imitation Learning and Deep Reinforcement Learning,” J Mar Sci Eng, vol. 10, no. 3, Mar 2022, doi: 10.3390/jmse10030383.
E. Beeching, J. Debangoye, O. Simonin, dan C. Wolf, “Godot Reinforcement Learning Agents,” ArXiv, Des 2021, doi: 10.48550/arXiv.2112.03636.
M. Ranaweera dan Q. H. Mahmoud, “Deep Reinforcement Learning with Godot Game Engine,” Electronics (Switzerland), vol. 13, no. 5, Mar 2024, doi: 10.3390/electronics13050985.
M. Malagón, J. Ceberio, dan J. A. Lozano, “Craftium: An Extensible Framework for Creating Reinforcement Learning Environments,” ArXiv, Jul 2024, doi: 10.48550/arXiv.2407.03969.
Y. Akbar dan A. A. Albahy, “Implementasi Game 2D Edukasi Pengetahuan Islam untuk Remaja Menggunakan Unity,” Jurnal JTIK (Jurnal Teknologi Informasi dan Komunikasi), vol. 9, no. 1, hlm. 120–129, Nov 2024, doi: 10.35870/jtik.v9i1.3019.
“RL Algorithms — Stable Baselines3 2.0.0a7 documentation.", Stable Baseline3. [Daring]. Tersedia: https://stable-baselines3.readthedocs.io/en/master/guide/algos.html. [Diakses: 6 Februari 2025].
“Overview - CleanRL.”, CleanRL. [Daring]. Tersedia: https://docs.cleanrl.dev/rl-algorithms/overview/. [Diakses: 6 Februari 2025].
“Welcome to Tianshou! — Tianshou Documentation.", Tianshou. [Daring]. Tersedia: https://tianshou.org/en/stable/. [Diakses: 6 Februari 2025].
“Algorithms — Ray 2.0.0.,”, Ray Rllib. [Daring]. Tersedia: https://docs.ray.io/en/latest/rllib/rllib-algorithms.html. [Diakses: 6 Februari 2025].
"Deepmind Github Repository", Google Deepmind. [Daring]. Tersedia: https://github.com/google/dopamine/. [Diakses: 6 Februari 2025].
B. L. M. de Oliveira, M. L. da Luz, B. Brandão, L. G. B. Martins, T. W. de L. Soares, dan L. C. Melo, “Sliding Puzzles Gym: A Scalable Benchmark for State Representation in Visual Reinforcement Learning,” ArXiv, Okt 2024, doi: 10.48550/arXiv.2410.14038.
Bila bermanfaat silahkan share artikel ini
Berikan Komentar Anda terhadap artikel Implementasi Unity-Gymnasium sebagai Alternatif Metode Reinforcement Learning dalam Pengembangan Environment Sliding Puzzle menggunakan Game Engine Unity
Pages: 1715-1723
Copyright (c) 2025 Agus Julpian Alwi, Chandra Kusuma Dewa

This work is licensed under a Creative Commons Attribution 4.0 International License.
Authors who publish with this journal agree to the following terms:
- Authors retain copyright and grant the journal right of first publication with the work simultaneously licensed under Creative Commons Attribution 4.0 International License that allows others to share the work with an acknowledgment of the work's authorship and initial publication in this journal.
- Authors are able to enter into separate, additional contractual arrangements for the non-exclusive distribution of the journal's published version of the work (e.g., post it to an institutional repository or publish it in a book), with an acknowledgment of its initial publication in this journal.
- Authors are permitted and encouraged to post their work online (e.g., in institutional repositories or on their website) prior to and during the submission process, as it can lead to productive exchanges, as well as earlier and greater citation of published work (Refer to The Effect of Open Access).






















