PERANCANGAN AGEN MUSUH BERBASIS KECERDASAN BUATAN PADA PLATFORM SCRATCH

DESIGN AND IMPLEMENTATION OF AN AI-BASED ENEMY AGENT IN THE SCRATCH PROGRAMMING ENVIRONMENT

Authors

  • Yoseph Satria Praka Politeknik Negeri Jakarta

DOI:

https://doi.org/10.52972/hoaq.vol17no2.p259-270

Keywords:

Kecerdasan Buatan, Agen Cerdas, Scratch, Jarak Euclidean, Gim

Abstract

Penelitian ini bertujuan untuk merancang dan mengimplementasikan agen musuh berbasis kecerdasan buatan pada platform Scratch menggunakan mekanisme pemilihan target terdekat berdasarkan jarak Euclidean. Agen dirancang menggunakan pendekatan goal-based agent dengan tujuan memilih dan mengumpulkan objek terdekat untuk meningkatkan skor. Penelitian menggunakan model pengembangan 4D yang terdiri atas Define, Design, Development, dan Disseminate. Subjek penelitian berupa gim Wayang War yang melibatkan satu Player dan satu agen AI yang berkompetisi mengumpulkan tiga jenis objek selama 30 detik. Pengujian dilakukan melalui black-box testing terhadap 19 skenario fungsional dan 50 percobaan gameplay. Data dianalisis menggunakan statistik deskriptif dan paired-samples t-test. Hasil black-box testing menunjukkan tingkat keberhasilan sebesar 100%. Dari 50 percobaan gameplay, Player memperoleh win rate sebesar 54%, AI sebesar 40%, dan draw rate sebesar 6%. Rata-rata skor Player sebesar 52,90 (SD = 8,72), sedangkan AI sebesar 52,64 (SD = 9,01). Hasil paired-samples t-test menunjukkan tidak terdapat perbedaan yang signifikan secara statistik antara skor Player dan AI (t(49) = 0,233; p = 0,817), dengan ukuran efek Cohen's dz sebesar 0,0329. Hasil tersebut menunjukkan bahwa agen mampu melakukan pemilihan target secara otonom berdasarkan kondisi permainan dan menjalankan perilaku musuh berbasis tujuan.

 

This study aims to design and implement an artificial intelligence-based enemy agent on the Scratch platform using a nearest-target selection mechanism based on Euclidean distance. The agent was designed using a goal-based agent approach to select and collect the nearest available object to increase its score. The research employed the 4D development model consisting of Define, Design, Development, and Disseminate. The research subject was a game called Wayang War, featuring one Player and one AI agent competing to collect three types of objects within a 30-second gameplay session. Testing consisted of black-box testing involving 19 functional scenarios and 50 gameplay trials. The data were analyzed using descriptive statistics and a paired-samples t-test. Black-box testing achieved a 100% success rate. Across the 50 gameplay trials, the Player achieved a 54% win rate, while the AI achieved a 40% win rate and a 6% draw rate. The Player obtained a mean score of 52.90 (SD = 8.72), while the AI obtained a mean score of 52.64 (SD = 9.01). The paired-samples t-test indicated no statistically significant difference between the Player and AI scores (t(49) = 0.233; p = 0.817), with a Cohen's dz effect size of 0,0329. These findings indicate that the agent was able to autonomously select targets based on the game state and perform goal-based enemy behavior.

References

G. Zeng, “A review of AI-Based Game NPCs Research,” Applied and Computational Engineering, vol. 15, no. 1, pp. 155–159, Oct. 2023, doi: 10.54254/2755-2721/15/20230827.

R. Firoz and Nikita, “A Comprehensive Review of AI-Driven NPC Intelligence and Procedural Content Generation in Video Games,” in 2026 9th International Conference on Trends in Electronics and Informatics (ICOEI), IEEE, Apr. 2026, pp. 920–927. doi: 10.1109/ICOEI68323.2026.11541480.

R. R. Karthigasu, M. B. Jasser, S. M. Ajibade, S. Abdipoor, and H. N. Chua, “A Review on Artificial Intelligence Techniques Employed for Enhancing NPC Behavior in Video Games,” in 2026 IEEE International Conference on Automatic Control and Intelligent Systems (I2CACIS), IEEE, Jun. 2026, pp. 221–226. doi: 10.1109/I2CACIS69435.2026.11600010.

V. Levytskyi, M. Tsiutsiura, A. Yerukaiev, N. Rusan, and T. Li, “The Working Principle of Artificial Intelligence in Video Games,” in 2023 IEEE International Conference on Smart Information Systems and Technologies (SIST), IEEE, May 2023, pp. 246–250. doi: 10.1109/SIST58284.2023.10223491.

N. Abdullasim, “Adaptive AI Behaviour in Stealth NPCs: A Narrative Review of Current Approaches and Research Directions,” Asia-Pacific Journal of Information Technology and Multimedia, vol. 15, no. 01, pp. 320–331, Jun. 2026, doi: 10.17576/apjitm-2026-1501-20.

Y. S. Praka, C. R. T. Prameswari, N. Wahyuni, and A. Maria, “Implementation of a Pathfinding-Based Intelligent Agent for Enemy Behavior in the ‘Run to BIPOL’ Maze Tournament Game,” Journal of Games Game Art and Gamification, vol. 11, no. 2, p. 38, Aug. 2026, doi: 10.21512/jggag.v11i2.16155.

P. Dúo-Terrón, “Analysis of Scratch Software in Scientific Production for 20 Years: Programming in Education to Develop Computational Thinking and STEAM Disciplines,” Education Sciences, vol. 13, no. 4, p. 404, Apr. 2023, doi: 10.3390/educsci13040404.

B. Batni, S. N. Junaini, J. Sidi, W. A. Mustafa, and Z. I. Awang Ismail, “Current Research Trends of Scratch Block based Programming for K-12: A Systematic Review,” Journal of Advanced Research in Applied Sciences and Engineering Technology, vol. 51, no. 2, pp. 138–152, Sep. 2024, doi: 10.37934/araset.51.2.138152.

G. C. Winarko and A. N. Cahyono, “Project-Based Learning with Scratch to Improve Students’ Creative Thinking Ability: Systematic Literature Review,” Griya Journal of Mathematics Education and Application, vol. 4, no. 2, pp. 190–196, Jun. 2024, doi: 10.29303/griya.v4i2.440.

U. Chotijah, H. D. Bhakti, D. Saputra, M. V. S. Pratama, and M. D. Anwar, “Integrasi Artificial Intelligence dan Game-Based Learning dalam Pembelajaran Matematika Menggunakan Unity dan Scratch,” SAMBARA: Jurnal Pengabdian Kepada Masyarakat, vol. 4, no. 2, pp. 405–420, May 2026, doi: 10.58540/sambarapkm.v4i2.1702.

J. Juanda, Z. Zikrillah, and N. Nasrullah, “Building a Space Shooter Game: Utilizing Scratch for an Engaging Action Game,” Gameology and Multimedia Expert, vol. 1, no. 4, pp. 90–94, Oct. 2024, doi: 10.29103/game.v1i4.18857.

A. F. A. A. Kusuma and F. Syah, “Maze Game Design Using Scratch 3 Android Based,” Jurnal Dinamika Informatika, vol. 11, no. 1, pp. 100–113, 2022, doi: 10.31316/jdi.v11i1.139.

R. A. E. Perkasa and J. Wantoro, “Game Edukasi Interaktif Sejarah Kerajaan Hindu-Buddha menggunakan Platform Scratch,” Edumatic: Jurnal Pendidikan Informatika, vol. 8, no. 1, pp. 36–45, Jun. 2024, doi: 10.29408/edumatic.v8i1.25161.

F. Ardiansyah, A. Kharisma Hidayah, A. Wijaya, and M. Imanullah, “Pengembangan Game Up 2 Down Birdie Melalui Integrasi Algoritma Circle Collision Detection Menggunakan Platform Scratch,” JATI (Jurnal Mahasiswa Teknik Informatika), vol. 10, no. 3, pp. 4353–4358, May 2026, doi: 10.36040/jati.v10i3.18028.

A. R. Pangestu, S. Sugiyanto, T. Pinandita, and D. K. Hakim, “Game Edukasi Ilmu Pengetahuan Sosial (IPS) Berbasis Android menggunakan Metode R&D 4D di SMP Negeri 2 Rawalo,” Jurnal Teknologi Informasi dan Multimedia, vol. 8, no. 2, pp. 382–393, May 2026, doi: 10.35746/jtim.v8i2.990.

I. Sonjaya, M. Rosalina, T. D. Ariyanti, A. S. Azmi, and D. A. Martono, “Development Of Educational Media Based On Virtual Reality Multiplayer Games For Basic Communication Learning For Students With Intellectual Disabilities,” in 2025 8th International Conference of Computer and Informatics Engineering (IC2IE), IEEE, Sep. 2025, pp. 1–6. doi: 10.1109/IC2IE67206.2025.11283385.

N. Marcheta and L. K. P. H. Hartanto, “Pengembangan Game Edukasi 3D ‘MathRoom’ Sebagai Media Pembelajaran Bilangan Pecahan Matematika Siswa Kelas 5 Sekolah Dasar Menggunakan Unity Engine,” MULTINETICS, vol. 10, no. 1, pp. 21–30, Jul. 2024, doi: 10.32722/multinetics.v10i1.5100.

M. F. R. Fauzian, R. A. Krisdiawan, and N. A. Asikin, “Gamified English Vocabulary Puzzle Game with FSM-Based Emotional Feedback and Fisher–Yates Shuffle,” Media Jurnal Informatika, vol. 18, no. 1, pp. 75–89, Jun. 2026, doi: 10.35194/mji.v18i1.6402.

I. Al Mahdi, S. Bukhori, and M. A. Furqon, “Implementation of Finite State Machine in Flowchart-Based Visual Programming Game,” Journal of Games, Game Art, and Gamification, vol. 10, no. 3, pp. 93–105, Dec. 2025, doi: 10.21512/jggag.v10i3.12133.

I. Benawan, D. M. K. Nugraheni, B. Noranita, and G. Aryotejo, “Digital Education Game for TK-A Level Students Using Multimedia Development Life Cycle Method,” INTENSIF: Jurnal Ilmiah Penelitian dan Penerapan Teknologi Sistem Informasi, vol. 7, no. 1, pp. 68–83, Feb. 2023, doi: 10.29407/intensif.v7i1.18671.

Downloads

Published

03-11-2026

How to Cite

Praka, Y. S. (2026). PERANCANGAN AGEN MUSUH BERBASIS KECERDASAN BUATAN PADA PLATFORM SCRATCH: DESIGN AND IMPLEMENTATION OF AN AI-BASED ENEMY AGENT IN THE SCRATCH PROGRAMMING ENVIRONMENT. HOAQ (High Education of Organization Archive Quality) : Jurnal Teknologi Informasi, 17(2), 259–270. https://doi.org/10.52972/hoaq.vol17no2.p259-270