PERBANDINGAN ALGORITMA GREEDY DAN A STAR UNTUK PENGEJARAN OLEH GHOST DALAM PERMAINAN PAC-MAN
Daftar Isi:
- Chasing pattern by NPC in a game oftenly can be predicted by player, therefore it needs strategy to chasing player in the game. Greedy algorithm is one of the most popular algorithm which used to solve path finding problem. And A* is an algorithm which used a heuristic function to find the path. This research comparing greedy and A* algorithm to determine chasing path by ghost. The test planned by two ways, there are with patterned and random test, in 10x in the patterned test greedy has better time in 7 of 10 test with mean time 0.122 seconds or 1.6% faster than A*. And in 10x in the random test greedy has better time in 9 of 10 test with mean time 3.39 seconds. The factor that influence in chasing time are the amount of intersection and the size of game area. Based on test result the conclusion is greedy algorithm is better than A* in time of chasing in Pac-Man game.