Implementasi Algoritma A Berbasis Pathfinding Dalam Pengembangan Game Menanam Pohon

A-7

ABSTRAK
Siapapun pasti menempuh jalan yang mereka anggap sebagai jalan
terpendek bila mereka berpergian dari suatu tempat ke tempat lainnya. Namun
akan sulit bagi seseorang tersebut untuk memilih jalan mana yang terpendek,
karena bisa saja jalan yang dipilih bukan jalan terpendek. Metode untuk
menentukan jalan terpendek tersebut adalah Pathfinding. Pathfinding banyak
digunakan di berbagai bidang Ilmu Komputer, salah satunya pada bidang
pengembangan game. Dalam penelitian ini penulis akan mendesain dan
menganalisis

pathfinding

diimplementasikan

pada

dengan
aplikasi


menggunakan
game

dalam

algoritma
pembuatan

A*

dan

AI(Artificial

Intelligence) sederhana. AI pada game tersebut akan menemukan jalan
terpendeknya sendiri dari start node menuju goal node. Heuristik Algoritma A*
yang digunakan adalah Manhattan Distance yang memungkinan AI dapat berjalan
pada 4 arah yang berbeda. Dari hasil pengujian pathfinding A* didapatkan bahwa
pada proses pencarian, jumlah node yang dikunjungi akan semakin banyak jika
jumlah node penghalang meningkat. Dari hasil pengujian juga menunjukkan

bahwa semakin banyak jumlah node penghalang maka Running Time akan
semakin besar dan waktu rata-rata proses pathfinding A* adalah 0.0732 detik.
Kata kunci : A*, Artificial Intelligence, Game, Pathfinding

Universitas Sumatera Utara

A-8

IMPLEMENTATION OF THE A*-BASED PATHFINDING ALGORITHM
ON GAME DEVELOPMENT OF PLANT TREES

ABSTRACT

Anyone would take the path that they consider to be the shortest path
when they travel from one place to another. But it would be difficult for such a
person to choose which path is the shortest, because it could be the chosen path is
not the shortest path. The method for determining the shortest path is pathfinding.
Pathfinding is widely used in various fields of Computer Science, one of them on
the field of video game development. In this research, the authors will design and
analyze the pathfinding using the A * algorithm and implemented it on a game

application for the creation of a simple AI (Artificial Intelligence). The AI in the
game will find its own shortest path from the start node to the goal node. The
heuristic of Algorithm A * that be used is the Manhattan Distance that allows AI
can walk on 4 different directions. Number of visited nodes will increase if the
grid has many obstacle nodes. The average time of A* pathfinding process is
0.0732 seconds.
Keywords : A*, Artificial Intelligence, Game, Pathfinding

Universitas Sumatera Utara