Computer Engineering and Applications ›› 2008, Vol. 44 ›› Issue (21): 92-95.DOI: 10.3778/j.issn.1002-8331.2008.21.025

• 机器学习 • Previous Articles     Next Articles

Reasearch of HTN-based anytime planner in FPS games

LUO Wen-jie1,YANG Pei2,WANG Hao1,GAO Yang1   

  1. 1.National Laboratory for Novel Software Technology,Nanjing University,Nanjing 210093,China
    2.School of Management and Engineering,Nanjing University,Nanjing 210093,China
  • Received:2008-04-30 Revised:2008-06-02 Online:2008-07-21 Published:2008-07-21
  • Contact: LUO Wen-jie

FPS游戏中基于HTN的Anytime规划器的研究

罗文杰1,杨 佩2,王 皓1,高 阳1   

  1. 1.南京大学 软件新技术国家重点实验室,南京 210093
    2.南京大学 工程管理学院,南京 210093
  • 通讯作者: 罗文杰

Abstract: Dynamic and real-time are two key features of computer game worlds.Anytime planning is a method of generating behaviors that meets the demands of these two feature.HTN(Hierarchical Task Networks) is a formalism for representing hierarchical plans.It quite fit to express the complex goals of NPC(non-player character) in computer games.Taking Unreal Tournament 2004 which is a famous first-person shooter computer games as platforms,we design and implement an anytime planner based HTN for NPC and use Genetic Algorithm to adjust the priorities of goals.It allows agent to interrupt its planning process at anytime based on the changes of environment meanwhile return an available plan,it also has some adaptability.The experiments show that it makes the behaviors of NPC more intelligent.

Key words: first-person shooter, unreal tournament, NPC, HTN planning, anytime planning

摘要: 动态性和实时性电脑游戏世界的两个关键特征。Anytime规划是能够产生满足上述两个特征的行为的规划方法。分层任务网络(Hierarchical Task Network,HTN)是表示分层规划的一种形式,它非常适合于表达电脑游戏中非玩家角色(non-player character,NPC)复杂的目标。以著名的第一人称射击(First-Person Shooter,FPS)游戏虚幻竞技场2004(Unreal Tournament 2004)作为游戏平台,为NPC设计实现了一个基于HTN规划的anytime规划器,并使用遗传算法调整规划目标的优先级。该规划器可以根据环境变化随时中断规划并给出可用的规划结果,同时具有一定的适应性。实验表明它能够使NPC的行为更智能。

关键词: 第一人称射击游戏, 虚幻竞技场, 非玩家角色, 分层任务网络, anytime规划