{"title":"角色扮演游戏中非玩家角色的A∗与迭代深化A∗算法的比较","authors":"Anggina Primanita, Rusdi Effendi, Wahyu Hidayat","doi":"10.1109/ICECOS.2017.8167134","DOIUrl":null,"url":null,"abstract":"Role Playing Game (RPG) needs realistic Artificial Intelligence, pathfinding is one of the requirements to achieve it. One of the popular algorithm for pathfinding is A∗, but A∗ still has problem about its memory usage. Iterative Deepening A∗ (IDA∗) is an algorithm like A∗ that uses Depth First Search to prevent the large memory usage. This research develops a game that implements pathfinding method to enemy character using A∗ and IDA∗ algorithms to compare their memory and time usages for pathfinding. Heuristic function that used is Manhattan Distance. This research uses 3 different types of map (without obstacle, simple obstacle, and complex obstacle) with 3 different samples in each type of map as tool for comparing the memory and time usage by A∗ and IDA∗. The conclusion of this research are memory and time usage for A∗ and IDA∗ is affected by the size of map (node quantity), position of the obstacles on map, and the obstacle quantity. Then, IDA∗ Algorithm is generally better than A∗ in case of memory and time usage especially if the map doesn't have any obstacle, but IDA∗ can be worse if the enemy character and player are at the parallel position that covered by obstacle.","PeriodicalId":6528,"journal":{"name":"2017 International Conference on Electrical Engineering and Computer Science (ICECOS)","volume":"3 1","pages":"202-205"},"PeriodicalIF":0.0000,"publicationDate":"2017-08-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"3","resultStr":"{\"title\":\"Comparison of A∗ and Iterative Deepening A∗ algorithms for non-player character in Role Playing Game\",\"authors\":\"Anggina Primanita, Rusdi Effendi, Wahyu Hidayat\",\"doi\":\"10.1109/ICECOS.2017.8167134\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"Role Playing Game (RPG) needs realistic Artificial Intelligence, pathfinding is one of the requirements to achieve it. One of the popular algorithm for pathfinding is A∗, but A∗ still has problem about its memory usage. Iterative Deepening A∗ (IDA∗) is an algorithm like A∗ that uses Depth First Search to prevent the large memory usage. This research develops a game that implements pathfinding method to enemy character using A∗ and IDA∗ algorithms to compare their memory and time usages for pathfinding. Heuristic function that used is Manhattan Distance. This research uses 3 different types of map (without obstacle, simple obstacle, and complex obstacle) with 3 different samples in each type of map as tool for comparing the memory and time usage by A∗ and IDA∗. The conclusion of this research are memory and time usage for A∗ and IDA∗ is affected by the size of map (node quantity), position of the obstacles on map, and the obstacle quantity. Then, IDA∗ Algorithm is generally better than A∗ in case of memory and time usage especially if the map doesn't have any obstacle, but IDA∗ can be worse if the enemy character and player are at the parallel position that covered by obstacle.\",\"PeriodicalId\":6528,\"journal\":{\"name\":\"2017 International Conference on Electrical Engineering and Computer Science (ICECOS)\",\"volume\":\"3 1\",\"pages\":\"202-205\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2017-08-01\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"3\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"2017 International Conference on Electrical Engineering and Computer Science (ICECOS)\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1109/ICECOS.2017.8167134\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"2017 International Conference on Electrical Engineering and Computer Science (ICECOS)","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/ICECOS.2017.8167134","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
Comparison of A∗ and Iterative Deepening A∗ algorithms for non-player character in Role Playing Game
Role Playing Game (RPG) needs realistic Artificial Intelligence, pathfinding is one of the requirements to achieve it. One of the popular algorithm for pathfinding is A∗, but A∗ still has problem about its memory usage. Iterative Deepening A∗ (IDA∗) is an algorithm like A∗ that uses Depth First Search to prevent the large memory usage. This research develops a game that implements pathfinding method to enemy character using A∗ and IDA∗ algorithms to compare their memory and time usages for pathfinding. Heuristic function that used is Manhattan Distance. This research uses 3 different types of map (without obstacle, simple obstacle, and complex obstacle) with 3 different samples in each type of map as tool for comparing the memory and time usage by A∗ and IDA∗. The conclusion of this research are memory and time usage for A∗ and IDA∗ is affected by the size of map (node quantity), position of the obstacles on map, and the obstacle quantity. Then, IDA∗ Algorithm is generally better than A∗ in case of memory and time usage especially if the map doesn't have any obstacle, but IDA∗ can be worse if the enemy character and player are at the parallel position that covered by obstacle.