Comparison of A∗ and Iterative Deepening A∗ algorithms for non-player character in Role Playing Game

Anggina Primanita, Rusdi Effendi, Wahyu Hidayat
{"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}
引用次数: 3

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.
角色扮演游戏中非玩家角色的A∗与迭代深化A∗算法的比较
角色扮演游戏(RPG)需要逼真的人工智能,寻径是实现这一目标的必要条件之一。常用的寻路算法之一是A∗,但A∗仍然存在内存使用问题。迭代深化A * (IDA *)是一种类似于A *的算法,它使用深度优先搜索来防止大量内存的使用。本研究开发了一个游戏,使用a *和IDA *算法来比较它们的寻路内存和时间使用。使用的启发式函数是曼哈顿距离。本研究使用3种不同类型的地图(无障碍、简单障碍和复杂障碍),每种地图中有3个不同的样本,作为比较A∗和IDA∗的内存和时间使用情况的工具。本研究的结论是A∗和IDA∗的记忆体和时间使用受到地图大小(节点数量)、地图上障碍物的位置和障碍物数量的影响。那么,在内存和时间使用方面,特别是在地图没有任何障碍物的情况下,IDA∗算法通常优于A∗,但如果敌人角色和玩家处于被障碍物覆盖的平行位置,IDA∗可能会更差。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术官方微信