|
本帖最后由 贤狼赫萝 于 2018-10-26 15:15 编辑
Greetings warriors of Calradia!
Artificial intelligence (AI) is one of the most important features of any single player game. Getting it right is key to the experience: it has to be almost invisible, so players (sort of) forget that they are playing against a machine. It has to be clever and fast enough to be a worthy opponent, but not too much – humans are fallible, after all; and ultimately the player, as the hero of the story, is supposed to win. It has to make use of the game mechanics at hand, not just to be fun and varied but to show the player what can be done. This rings especially true in a game such as Mount & Blade II: Bannerlord, where skill-based combat and epic large-scale battles are at the core of the experience.
卡拉迪亚的战士们,大家好!
人工智能(AI)是单机游戏中最重要的功能。游戏体验的关键在于正确得做法:这必须是无形的,才能让玩家(或多或少)忘记他们是在和电脑玩。它必须聪明而且灵活才能成为一个有价值的对手,但也不能太强——毕竟人类能力是有限的,还有就是玩家作为游戏的主角也需要赢。所以必须利用手头的游戏机制,不只是为了好玩和多样性,而且还能向玩家展示可以做到哪些。在骑砍2中更是如此,一个基于技能的战斗和史诗般的大规模战斗才是游戏体验的核心。
在上一作游戏中,AI的战斗表现很出色,但并不是最先进的。战术AI用的比较基础的,要么全军突击,要么防守玩家进攻。没有考虑到地形,而且AI任何时候都不会尝试利用对手军队的弱点或者玩家犯的错误展开进攻。这种游戏深度的缺乏让AI成为游戏的缺点,一个讨厌而没有真正价值的对手。在骑砍2里,这一点已经得到了全面的改善。我们希望玩家能够受到挑战,利用智慧并利用已有的战斗机制获得胜利——而有时候玩家也会因为各种不明智的决定或者错误而受到惩罚。为了这一点,考虑到骑砍中战斗可以是一对一决斗或者大规模战斗,我们必须设计一个更先进,反应更快的战斗AI,将其分为三种不同的类型:独立,编队和战术AI。

独立AI
Each individual agent in a battle is controlled by its own AI. Moving to a position (pathfinding), selecting a target, attacking and defending are all managed on this level. Individual AI needs to be extremely fast and responsive and its results should be correct within a very small margin of error (swinging a weapon, engaging an enemy that just charged them out of nowhere on horseback, etc.). In addition to this, orders need to be carried out across the entire formation at the same time. Ultimately, timing and execution need to be as close to perfect as possible.
To put it simply, individual AI needs to be as precise as possible to ensure that each agent can perform effectively in combat. It needs to carry out any orders that are issued to it, as well as, assess the current situation to make its own decisions on what actions to take.
战斗中的每个NPC都有自己的AI。移动到指定位置(寻路),选择一个目标,进攻和防守都能在自身的级别上得到管理。独立AI需要非常迅速而且快速反应,并能在非常小的误差范围内正确反应(挥动武器,马上冲刺敌人等)。此外,命令需要能同时间指挥整个阵型。最终,时机的把控和战术纸性也需要尽可能地接近完美
简单地说,独立AI需要尽可能地准确来确保每个NPC都能有效地作战。它需要执行所有收到的命令,还有评估现状,以便决定自己应该采取什么行动。
And when you have hundreds of agents performing all of these calculations at the same time, performance becomes a huge potential issue that needs addressing (which in our case is solved by using parallel processing).
当你有上百个NPC同时进行计算的时候,性能就成为了需要解决的巨大潜在问题(于是我们用平行计算来解决)
编队AI
Formation AI sits at a level just above individual AI. Formation AI is used to issue commands to each agent within a formation and decide what behaviour that the formation should perform (i.e. attack, defend, flank, retreat, etc.). However, it is important to note that the orders issued by the formation AI only determine what is expected of each individual agent, but it doesn’t directly make them do anything: this is left to the individual AI to interpret and carry out.
The formation AI has access to the same interface and set of commands as the player. In other words, our combat AI doesn’t cheat! It uses every piece of information that a player would have access to (although, perhaps slightly more detailed and accurate than a player’s guesstimates) to make its decisions.
编队AI比单人AI更一等。编队AI是用于将命令发送到某个阵中的每个NPC并让决定让他们如何作战(比如说攻击,防守,侧绕,撤退等)然而需要注意的是编队AI发出的命令只能决定每个NPC的预期,而不能直接让他们做任何事情:这个需要由独立AI做出最终决定。
编队AI的游戏接口和命令集与玩家是一样。也就是说,战斗AI是不作弊的!每条信息都能被玩家解读(虽然说这些信息可能比玩家猜测的要更详细准确点)并做出相应的决策。
战术AI
Tactic AI is what gives an AI army its overall battle plan. It looks at the terrain of the battlefield, as well as the compositions of each army to determine the best tactic. To keep each battle varied and to further the emergent narrative for the player, this layer of the combat AI is influenced by the AI lord commanding the army. Some lords might be more cautious and prefer to seize the high ground before setting up in a defensive formation, whereas other lords might be a little more rash, putting pressure onto their opponents by committing to an early assault.
The tactic chosen sets the overall battle plan in that each formation knows what is expected of them but they aren't strictly tied to it. What this means is that each formation's AI will make immediate battlefield decisions independent of the tactic when necessary, such as exploiting advantages or pulling back when necessary, but when there isn’t an urgent action that needs to be carried out they will try to stick to the plan.
One way to look at it would be to think of the AI as having its own chain of command, with tactic AI being the general at the head of the army, issuing commands to its subordinates and expecting them to carry the order out to the best of their ability.
战术AI指的是AI军队的整体战斗计划。它会根据战场地形,以及军队组成来确定最佳战术。为了保持每场战斗的变化并对玩家步步紧逼,这一层战斗AI会受到AI领主的指挥影响。一些领主可能会更谨慎,并更偏向于占领高地后再结阵防御,而其他领主可能会更加急躁,希望能通过早期进攻直接给对手造成压力。
战术抉择设定决定了整体战斗计划,每个编队都知道他们有什么命令,但并不会严格依赖命令。这意味着每个编队的AI都会再必要时刻做出战场抉择,比如在必要时刻乘胜追击或者撤退,但在没有比较紧急的状态下,它们会按照计划行动。
其实可以把这个看作为AI特有的指挥链,战术AI是军队首领,向下属发出命令并希望它们将命令发挥到极致。

One of our main considerations while developing this new combat AI system was to ensure that any decisions that the AI makes are believable to players. The AI needs to make logical decisions that make sense to the player, otherwise, the system could be easily gamed and player immersion would be adversely affected. So far, we are pretty happy with the results. We think that Bannerlord’s AI will be a fresh challenge to returning players to the series, and provide players new and old players alike with dynamic combat experiences that test their individual combat skills and tactical prowess.
我们在开发这种新的战斗AI系统时,主要考虑的因素之一就是确保AI做出的任何决定都能传达到玩家上。AI需要做出对玩家来说有意义有逻辑的决策,否则系统很容易玩弄,而且也会对玩家的沉浸感造成不利的影响。目前为止,我们对结果非常满意。我们认为霸主的AI对于回归玩家来说是一种新的挑战,并为新老玩家提供动态战斗体验,以测试玩家的个人技巧和战术实力。
Finally, we would like to mention that Bannerlord’s AI is also moddable, too -- and its separation into three different levels is important for modders, making their life easier and allowing for more complex modifications. Tactical, formation behaviour and agent levels being separate is essential: just as commanders changing their orders during battle does not change their soldiers themselves, adding a new tactic doesn't require you to model every single formation behaviour or agent AI. Adding new formation behaviours doesn't require you to delve into agent AI either because the interface the AI uses and you will use is the medium between the hierarchies. This lets modders create a custom AI that suits their needs without breaking anything, using a complex or simple set of orders and logic to create new formation behaviours and new tactics using various formation behaviours.
最后我们想说的是霸主的AI也可以修改的,它分为三个不同级别,这对于MOD制作者很重要,这会让他们的活更轻松,也允许更复杂的修改。战术,编队的行为以及NPC层面的区分是很重要的:就像指挥官在战斗中改变命令并不能改变他们的士兵一样,增加一个新的战术并不需要你顺便把每个编队或者独立NPC都给修改。添加新编队行为并不需要你去深入研究NPC AI,因为AI都有使用接口,而且你需要利用指挥链层次之间的中介。这就让MOD制作者能够自定义AI来满足需求而不破坏任何东西,利用复杂或者简单的命令和逻辑来创造一个新的编队行为和利用各种编队行为而生成一个新战术。
In next week’s blog, we will talk to 3D Artist, ülker Dikmen. If you have any questions you would like to ask her, please leave a reply in the comments and we will pick one out for her to answer!
下周的开发日志,我们会采访3D美工ülker Dikmen。如果你有什么问题要问她,请留言,我们会选择问题来对她进行采访!
|
评分
-
查看全部评分
鲜花鸡蛋wz200283 在2018-11-8 16:32 送朵鲜花 并说:我非常同意你的观点,送朵鲜花鼓励一下 iLoveFG 在2018-10-26 09:44 送朵鲜花 并说:我非常同意你的观点,送朵鲜花鼓励一下
|