最美情侣中文字幕电影,在线麻豆精品传媒,在线网站高清黄,久久黄色视频

歡迎光臨散文網(wǎng) 會(huì)員登陸 & 注冊

智能AI:NPC如何以有效、有趣、多樣的方式運(yùn)作?

2023-09-01 23:38 作者:機(jī)槍豌豆射手159  | 我要投稿

智能AI:NPC如何以有效、有趣、多樣的方式運(yùn)作?

Intelligent Artificial Intelligence: How Do NPCs Operate In An Effective, Flavorful, And Varied Way?

為什么回合制戰(zhàn)略游戲是復(fù)雜人生模擬的合適媒介?

And Why Turn Based Strategy Games Are The Proper Medium For Sophisticated Sims

AXIOMS

2023年4月19日

簡介

Introduction

我在這里和其他地方寫過很多關(guān)于回合制游戲如何實(shí)現(xiàn)卓越AI的文章,尤其是在有大量代理的游戲中,我們希望代理能做一些實(shí)際復(fù)雜的事情。在這里,我將嘗試對這一話題進(jìn)行更詳細(xì)的闡述,并對我如何計(jì)劃制作有趣的AI進(jìn)行高水平的解釋。

I’ve written a lot here and elsewhere on how turn based games allow for superior AI, especially in games with lots of agents who we want to do actually complex things. I’m going to try to go into more detail here about that topic as well as provide a high level explanation of how I plan to make an interesting AI.

除了關(guān)于玩家和他們對AI的需求的嚴(yán)肅討論之外,關(guān)于使用計(jì)算機(jī)控制代理的電子游戲以及如何讓它們運(yùn)行的討論也持續(xù)了很長時(shí)間。它們應(yīng)該有趣嗎?有趣味性/歷史性(如果游戲是關(guān)于歷史的)?它們是否應(yīng)該棘手?作弊是否公平?復(fù)制人類的強(qiáng)度玩法?或者,如果沒有這兩條捷徑,AI是否應(yīng)該很困難?

There are several long running debates about video games with computer controlled agents and how to make them work in addition to serious debates about players and what they want from an AI. Should they be fun? Flavorful/historical(if the game is about history)? Should they be tough? Is cheating fair? What about copying human meta-gaming? Or should they be difficult without those two shortcuts?

此外,我還將討論一些潛在的游戲規(guī)則,這些規(guī)則適用于那些不想要最優(yōu)玩法天才敵人(即使是非常有味道的敵人)的人。最后,我將談?wù)勅绾问褂冒胪接?jì)算機(jī)代理。它們擁有與你相同的工具和許多相同的目標(biāo),但有時(shí)它們也有 "個(gè)人 "目標(biāo)和個(gè)人 "實(shí)現(xiàn)目標(biāo)的偏好"。

Additionally I’ll be discussing some potential game rules for people who don’t want the most min-maxed genius enemy, even a very flavorful one. Finally I’ll be talking about how to use semi-asynchronous computer agents. They have all the same tools as you and many of the same goals but sometimes they have “personal” goals and personal “preferences for achieving their goals”.

回合制 VS 實(shí)時(shí)

Turn Based Vs Real Time

我是回合制復(fù)雜戰(zhàn)略游戲的忠實(shí)擁護(hù)者。我認(rèn)為這有很多重大優(yōu)勢。首先,通過兩階段的規(guī)劃/行動(dòng)系統(tǒng),你可以在第一階段大量使用多線程,甚至可以在玩家的回合中執(zhí)行。實(shí)際上,我曾試圖構(gòu)建游戲結(jié)構(gòu),讓玩家每回合至少花費(fèi)幾分鐘時(shí)間,以減少高質(zhì)量AI的回合時(shí)間成本。

I’m a big advocate of turn based games for complex strategy. I think it provides a lot of major advantages. Firstly with a two phase plan/act system you can heavily utilize multithreading for the first phase and even execute it during the player’s turn. I actually tried to structure the game so the player would spend at least a couple minutes per turn so as to ameliorate the turn time cost of an high quality AI.

我試圖讓用戶界面盡可能高效、低點(diǎn)擊率,但每時(shí)每刻的游戲和每回合的潛在行動(dòng)次數(shù)應(yīng)該會(huì)讓 2-5 分鐘的回合既有趣又常見。此外,雖然理論上可以進(jìn)行多線程實(shí)時(shí)游戲或 "基于時(shí)間點(diǎn)"的游戲,但當(dāng)目標(biāo)隨著時(shí)間點(diǎn)的流逝而不斷變化時(shí),就很難做到這一點(diǎn)了。

I tried to make the UI as effective and low-click as possible but the moment to moment gameplay and per turn potential action count should make 2-5 minute turns both interesting and common. Additionally while you could theoretically multi-thread real time or “tick-based” games it is hard to do so when the target is constantly changing as ticks pass.

回合制游戲還允許有更多時(shí)間進(jìn)行復(fù)雜的戰(zhàn)斗模擬。雖然在《Axioms Of Dominion》中無法觀看或控制戰(zhàn)斗,但你可以在一定程度上計(jì)劃戰(zhàn)斗,而且正如我在最近的文章中所討論的那樣,戰(zhàn)斗仍然有詳細(xì)的模擬。所有戰(zhàn)斗都會(huì)在玩家回合結(jié)束后立即使用多線程運(yùn)行。戰(zhàn)斗無論如何都不會(huì)發(fā)生交互,因此這就允許使用相對簡單的多線程,而我作為一個(gè)非專業(yè)人士也能成功做到這一點(diǎn)。希望如此,我還沒有像研究AI多線程那樣深入研究戰(zhàn)斗多線程。

Turn based games also allow for more time for complex battle simulations. Although you can’t watch or control battles in Axioms you can plan them to some degree and they still have a detailed simulation, as I’ve discussed in recent posts. All battles are run immediately after the player’s turn using multithreading. Battles don’t interact in anyway so this allows for relatively simple multithreading which I as a non-PhD/professional can implement effectively. Well I hope so, I haven’t gone deep into the battle multi-threading like I have for AI multi-threading.

此外,回合制允許 "社交場合"(如本博客同名文章所述)比其他游戲更具互動(dòng)性、趣味性和影響力。在我看來,這其中就包括《CK3》新公布的 "盛大活動(dòng)"。實(shí)際上,它們與我在去年的博文中對 "社交場合 "的高水平描述非常相似,就像《CK3》的秘密與我在2014年的博客中對《Axioms Of Dominion》秘密系統(tǒng)的描述一樣,但這可能只是巧合。只是因?yàn)椤禔xioms Of Dominion》是回合制游戲,所以有時(shí)間為 "社交場合 "進(jìn)行更復(fù)雜的決策、更好的規(guī)劃和更詳細(xì)的互動(dòng)。

Additionally being turn based allows the “Social Occasions”, as described in the eponymous post on this blog, to be much more interactive and interesting and impactful than they are in other games. That includes, in my admittedly biased opinion, the new “Grand Events” announced for CK3. They actually have a pretty strong resemblance to my high level description in last year’s post of “Social Occasions”, as CK3 Secrets did to my 2014 blog post on the Secrets system for Axioms, but this is probably a coincidence. There is just time for much more complex decision making and better planning and more detailed interactions for Social Occasions because Axioms is turn based.

《Axioms Of Dominion》中的角色所做的事情遠(yuǎn)比其他策略或社交模擬游戲中的代理所做的事情更詳細(xì)、更綜合、更有味道。正如我將在本篇文章中詳述的那樣,他們與任何非線性敘事視頻游戲中平淡無奇、容易被遺忘、可隨意替換的角色都截然不同。正如之前討論 "角色 "的文章所指出的,他們擁有完整的意識模擬,包括意識形態(tài)、性格、興趣、欲望、技能和目標(biāo)。 它們還具有語言、宗教和其他更多面向策略的方面,而且這些系統(tǒng)在《Axioms Of Dominion》中的深度也是獨(dú)一無二的。

What the Characters in Axioms do is far more detailed, integrated, and flavorful than anything agents do in other strategy or social simulation games. As I’ll detail in this post they are very dissimilar from the bland, forgettable, and interchangeable agents in any non linear narrative video game. They have a full consciousness simulation including, as noted in previous posts discussing Characters: Ideology, Personality, Interests, Desires, Skills, and Goals. They also have Language, Religion, and other more strategy oriented aspects and also these systems are uniquely deep in Axioms.

難度、多樣性還是真實(shí)性?

Difficulty Or Variety Or Verisimilitude?

策略游戲中的計(jì)算機(jī)代理應(yīng)該有趣、有能力還是有味道? 為什么選擇我說。 雖然在高度抽象或非常不切實(shí)際的控制方案下運(yùn)行的游戲?qū)嶋H上只能選擇難度作為AI目標(biāo),盡管開發(fā)人員聲稱不然。但在具有詳細(xì)和集成模擬的游戲中,我們可以使我們的角色變得有趣、令人難忘、獨(dú)特,并且有能力。 大多數(shù)策略游戲都將你作為不朽的蜂巢指揮來運(yùn)作。 無論是RTS、戰(zhàn)術(shù)策略、策略角色扮演等。 他們無法以任何其他方式運(yùn)作。

Should computer agents in strategy games be interesting, competent, or flavorful? Why choose I say. While games that operate at very high abstraction levels or with very unrealistic control schemes can really only choose difficulty as an AI goal, despite devs claiming otherwise, in a game with a detailed and integrated simulation we can make our characters interesting, memorable, distinct, and competent. Most strategy games operate with you as an immortal hivemind command node. RTS, tactical strategy, strategt rpg, etc. Doesn’t matter. They can’t operate any other way.

在《Axioms Of Dominion》中,每個(gè)代理(主要是角色,但有時(shí)也包括下面提到的其他類型)都應(yīng)該是有能力的(除非他們特別沒有意識),與其他代理不同/有區(qū)別,并且至少可以根據(jù)他們的意識以半理解的方式運(yùn)作。

In Axioms each agent, mostly Characters but sometimes other kinds as noted below, should be competent(unless they specifically aren’t Consciousness wise), varied/distinct from other agents, and operate in at least a semi-understandable way based on their Consciousness.

角色想要什么

What Characters Want

《Axioms Of Dominion》中的代理對玩家的角色可能是敵對、中立或友好。代理種類繁多,包括角色、人口、神靈和精靈/惡魔/生物/怪物。在這些代理類型中,還有各種子類型等等。

Agents in Axioms can be hostile, neutral, or friendly to the player’s Character. There are a wide variety of agents including Characters, Populations, Deities, and Spirits/Demons/Creatures/Monsters. Within these agent types there are a variety of subtypes and such.

角色可以是統(tǒng)治者、將軍、政治家、操縱者等各種類型的領(lǐng)導(dǎo)者。他們也可以是商人、雇傭兵、冒險(xiǎn)者、工匠、研究員等等。在這里,我將主要關(guān)注那些玩 "偉大游戲 "的人。政治領(lǐng)袖可能會(huì)涉足一個(gè)或多個(gè)其他領(lǐng)導(dǎo)角色,他們在《Axioms Of Dominion》中的性質(zhì)和行為都是多種多樣的。

Characters can be leaders of various types like rulers, generals, statesment, manipulators, and so forth. They can also be merchants, mercenaries, adventurers, crafters, researchers, and more. I’m going to focus primarily on those playing the “great game” here. Political leaders, who may dabble in one or more other leadership roles, are quite varied in Axioms both in their nature and actions.

兩個(gè)領(lǐng)導(dǎo)人面對同樣的問題,會(huì)根據(jù)他們的 "意識 "采取不同的解決方式。意識是一種類別類型,在代碼中是一個(gè)子類,包含了角色的意識形態(tài)、性格、興趣、欲望、技能和目標(biāo)。人口也有意識形態(tài),但沒有別的。

Two leaders with the same problem will solve it in distinct ways based on their Consciousness. Consciousness is the class type, a subclass compositionally in the code, that contains the Ideology, Personality, Interests, Desires, Skills, and Goals that Characters will have. Populations also have Ideology but not the others.

其他類型的游戲,包括基于角色的策略游戲、社會(huì)模擬游戲和RPG,可能會(huì)像敘事 RPG 游戲那樣給角色提供一個(gè)簡單的倫理系統(tǒng),或者像社會(huì)模擬游戲或基于角色的策略游戲那樣給角色提供一套簡單的性格特征,僅此而已。他們沒有完整的個(gè)性,很少有多極化的意識形態(tài),他們的文化/背景更像是一組次要的修正,任何用于技能檢查之類的 "技能 "系統(tǒng)都非常簡單。

Other genres including character based strategy, social simulation, and RPGs might give a character a simplistic ethical system like in a narrative RPG, or a simple set of personality traits like a social sim or a character based strategy game and that is really it. They don’t have a full Personality, they’ll rarely have a multi-polar ideology, their Culture/Background will be more like a minor set of modifiers, and any “Skill” system used for skill-checks and such will be quite simple.

在敘事性角色扮演游戲中,角色可能會(huì)有預(yù)定義的任務(wù),但在這些類型的游戲中,他們都不會(huì)有有意義的興趣/愛好、個(gè)人愿望或你可以幫助他們實(shí)現(xiàn)的目標(biāo)。如果他們想成為大法師或成功的商人,你最多只能完成一次線性敘事冒險(xiǎn)。你不會(huì)和他們一起訓(xùn)練,也不會(huì)用資源資助他們,你和他們也不會(huì)與其他感興趣的角色建立實(shí)際的聯(lián)系。

Characters might have predefined quests in a narrative rpg but in none of these genres will they have meaningful interests/hobbies, personal desires, or goals you can help them with. If they want to be an archmage or a successful merchant you’ll at most complete a linear narrative adventure. You won’t train with them or stake them with resources, you and they won’t build up actual contacts with other interesing characters.

角色會(huì)有興趣和欲望。他們會(huì)希望與自己的興趣互動(dòng),并按照自己的愿望行事。欲望可以由他們的性格、站位、興趣、意識形態(tài)、宗教、關(guān)系等產(chǎn)生。愿望可以是任何事情,從為愛女找一個(gè)好丈夫到征服一個(gè)大陸,從收集史前魔法知識到向仇敵復(fù)仇等等。博客上專門關(guān)于 "欲望 "的帖子詳細(xì)介紹了這些潛在的選項(xiàng)。

Characters will have Interests and Desires. They’ll want to engage with their Interests and act upon their Desires. Desires can be generated by their Personality, Station, Interests, Ideology, Religion, Relationships, and so forth. A Desire can be anything from finding a good husband for their beloved daughters to conquering a continent to gathering estoric magical knowledge to getting revenge on a hated enemy and more. The post on the blog specifically about Desires expands on the potential options.

欲望會(huì)被動(dòng)或主動(dòng)地影響你的人際關(guān)系。在一個(gè)政體中,角色可以自主滿足自己的欲望,他們會(huì)更快樂,也更有支持者。你也可以主動(dòng)幫助其他角色,這樣他們的幸福感和與你的關(guān)系都會(huì)得到提升。

Desires will impact your relationships both passively and actively. In a polity where Characters can fulfill their own desires autonomously they’ll be happier and more supporter. You can also actively assist other Characters in which case the boost to their happiness and their relationship with you will be more intense.

興趣是角色和關(guān)系與眾不同的另一個(gè)方面。當(dāng)你出于某種原因想讓一個(gè)角色喜歡你時(shí),無論是戀愛、政治支持還是純粹的友誼,實(shí)現(xiàn)目標(biāo)的最佳方式都取決于他們的意識,尤其是他們的興趣。一般來說,一個(gè)人可以滿足一個(gè)愿望,而且是一次性的。任何數(shù)量的角色都可以讓一個(gè)其他角色參與他們的興趣。

Interests create another aspect of the distinctness of Characters and Relationships. When you want to make a Character like you for some reason whether romance or political support or pure friendship the optimal way to achieve your goal depends on their Consciousness and especially their Interests. A Desire can be fulfilled by one person generally and is a one off boost. Any number of Characters can engage a single other Character in their Interests.

馬術(shù)和自然主義者通常會(huì)非常樂意在山間林間小道上騎馬。不同的角色對其他角色的看法只會(huì)得到基本的互動(dòng)提升。相反,他們可能更喜歡討論當(dāng)時(shí)的學(xué)術(shù)問題或去酒館。如果你想追求某個(gè)貴族女孩,也許她想在舞會(huì)上跳舞?;蛘咚憛捨钑?huì),想偷偷溜去看魔術(shù)師或訓(xùn)練長矛或長劍。

A Character who is an equestrian and naturalist will generally be very happy to ride horses on wooded trails in the hills. A different Character would get only the base interaction boost to their Opinion of the other Character. They might instead prefer to debate scholarly issues of the day or go to the taverns. If you want to court some noble girl maybe she wants to dance at balls. Or maybe she hates balls and wants to sneak away to watch a magician or train with a spear or sword.

此外,你的角色會(huì)對這些不同的活動(dòng)做出不同的反應(yīng)。你可能討厭在公共場合跳舞,但為了兒時(shí)的暗戀對象而忍著,需要通過其他活動(dòng)來解壓。這同樣適用于NPC與NPC之間的互動(dòng)。有些性格類型會(huì)減少或消除這種摩擦。具有這種特質(zhì)的角色可能會(huì)成為一名出色的間諜或外交官。

Additionally *your* Character will react differently to these different activities. You might hate dancing in public but suffer it for your childhood crush and then need to decompress with some other activity. The same applies to NPC to NPC interactions. Some Personality types will reduce or remove such friction. A Character with such a trait might make a fantastic spy or diplomat.

角色如何實(shí)現(xiàn)目標(biāo)

How Characters Achieve Goals

假設(shè)一個(gè)角色需要實(shí)現(xiàn)某個(gè)目標(biāo)。也許是削弱一個(gè)敵對國家。不同的角色會(huì)根據(jù)他們的意識以不同的方式實(shí)現(xiàn)相同的目標(biāo)。一個(gè)擁有強(qiáng)健體魄的角色,如果是軍國主義者,對戰(zhàn)斗和戰(zhàn)略感興趣,就會(huì)傾向于嘗試以戰(zhàn)爭為基礎(chǔ)的戰(zhàn)略。野心勃勃的角色可能渴望征服。貪婪的角色可能會(huì)單純掠奪征服的領(lǐng)土,而不愿費(fèi)心統(tǒng)治。

Suppose that a Character needs to achieve some Goal. Perhaps bringing low a rival nation. Different Characters will consistently achieve the same goal in different ways based on their Consciousness. One Character with strong physical traits who is militaristic and has an interest in combat and strategy would be predisposed to attempt a war based strategy. An Ambitious Character might crave conquest. A Greedy Character might engage in a campaign of raiding and pillaging and not want to bother ruling conquered territory.

然而,一個(gè)擁有強(qiáng)大外交或陰謀技能的角色可能會(huì)試圖在社會(huì)上孤立敵人,導(dǎo)致聯(lián)盟終止或取消婚約。具有宣傳技能的角色可能會(huì)制造惡毒的謠言來降低敵對國家的聲望。擁有政治和間諜技能的角色可能會(huì)在封臣中制造叛亂。根據(jù)怨恨的程度,簡單地讓敵人顏面掃地或讓封臣要求降低稅收,都可能奏效。

However a Character with strong diplomatic or intrigue skills might attempt to socially isolate their enemy causing allies to break alliances or betrothals to be cancelled. Perhaps a Character skill at Propaganda might create nasty rumors to lower the prestige of the opposing nation. One with Political and Espionage skills might create a revolt among vassals. Depending on the degree of the grudge simply causing them to lose face or have vassals demand lower taxes or something migt work.

當(dāng)角色選定一個(gè)主要目標(biāo),然后評估潛在的解決方案時(shí),他們就更有可能選擇符合自己意識的策略。如果以前的國王是軍國主義者,建立了一支龐大的軍隊(duì),那么注重經(jīng)濟(jì)的新國王仍然會(huì)考慮他們的軍事實(shí)力,但他們會(huì)比以前的國王更傾向于制裁、關(guān)稅或經(jīng)濟(jì)破壞。因此,他們不會(huì)盲目忽視自己的實(shí)際情況。此外,除非角色是個(gè)笨蛋或愚蠢的人,否則他們一般都會(huì)想出一個(gè)看起來有可能成功的有價(jià)值的方法。一個(gè)專注于管理或貿(mào)易的國王,即使他不喜歡沖突或認(rèn)為自己是個(gè)拙劣的戰(zhàn)略家,但如果有必要,他很可能會(huì)發(fā)動(dòng)一場大規(guī)模戰(zhàn)爭,作為首要目標(biāo)的一部分,同時(shí)隨著時(shí)間的推移,他還會(huì)建立自己的信使網(wǎng)絡(luò)或貿(mào)易艦隊(duì)。

When a Character picks a primary goal and then evaluates potential solutions they will be more likely to pick strategies in line with their Consciousness. If the old king was militaristic and built up a large army, the new economics focused king will still consider their military power but they’ll be much more likely to prefer sanctions or tariffs or economic sabotage than the previous king. So they don’t blindly ignore their actual situation. Additionally unless a Character is dull or foolhardy or some such thing they’ll generally try to come up with a worthwhile method that seems likely to succeed. A king focused on administration or trade might very well launch a big war if he has to as part of a primary goal, even if he dislikes conflict or considers himself a poor strategist, while also building up their messenger network or trade fleet over time.

《Axioms Of Dominion》中的角色需要管理自己的精神狀態(tài)、家庭狀況,并考慮他們的支持度,而AI知道這一點(diǎn)。等我進(jìn)一步完善AI并進(jìn)行游戲測試后,我們就會(huì)知道它們在平衡方面有多有效,但它們每回合都會(huì)評估這些因素。即使是玩家也不可能在任何時(shí)候都無視自己的意識,為了一個(gè)特定的目標(biāo)而盲目地橫沖直撞。

Characters in Axioms need to manage their mental state, family situation, and consider their popular support and the AI knows this. We’ll see how effective they are at balancing things once I get farther into fleshing out the AI and doing playtesting but they will evaluate these factors every turn. Even the player won’t be able to blithly rampage along ignoring their Consciousness minmaxing for a single specific goal at all times.

疲憊、抑郁、生病或其他影響會(huì)對統(tǒng)治者的行動(dòng)產(chǎn)生各種懲罰。有些角色甚至?xí)驗(yàn)槟承┮蛩囟P(guān)注自己的內(nèi)心狀態(tài),而不是外部環(huán)境。例如,殘忍的角色需要對他人做壞事,否則就會(huì)面臨幸福懲罰。他們也會(huì)高估戰(zhàn)爭或酷刑等對他們來說是標(biāo)簽化的解決方案。其他性格類型也是如此。

Tired, depressed, ill, or otherwise impacted rulers will have various penalties to their actions. Some Characters even have factors causing them to focus more on their internal state than their external situation. Cruel Characters for instance will need to do bad stuff to others or face happiness penalties. They’ll also upweight solutions like war or torture that are tagged for them. The same with other personality types.

角色也會(huì)嘗試考慮他們目標(biāo)的交叉點(diǎn)。 我想獲得榮耀并增加收入,征服、掠奪或強(qiáng)迫進(jìn)貢都行。 我也想打倒我討厭的對手。 我恨他的程度達(dá)到X,擊敗他的國家難度為Y,是攻擊他還是選一個(gè)更容易的國家? 出于文化原因,我需要進(jìn)口肉桂。 我討厭的對手有肉桂,我應(yīng)該嘗試打破他與供應(yīng)方的關(guān)系還是應(yīng)該采取更簡單的選擇?

Characters will attempt to consider the intersections of their goals as well. I want to gain glory and increase revenues. Conquest or raiding or enforcing tribute is good. I also want to bring down a hated rival. I hate him X amount and his nation will be Y harder to defeat, is it worth it to go for him over an easier country? I need to import Cinnamon for cultural reasons. My hated rival has Cinnamon. Should I try to break his relationship with his supplier or should I take an easier option?

合格、有趣、逼真的AI需要時(shí)間

Competent, Interesting, And Realistic AI Takes Time

現(xiàn)在我們回到一開始的話題。與其他策略或社交模擬游戲相比,《Axioms Of Dominion》中由電腦控制的代理的操作要復(fù)雜得多。它們要考慮更多相互關(guān)聯(lián)的變量和更多總體變量。即使采用了巧妙的多線程和高效的處理策略,這也需要大量的處理時(shí)間。

Now we get back to where we were at the start. The computer controlled agents in Axioms are operating at a much more complex level than those in other strategy or social simulation games. They are considering more interrelated variables and more variables overall. This requires a significant amount of processing time even with clever multi-threading and efficient processing strategies.

例如,《Axioms Of Dominion》試圖永遠(yuǎn)不處理字符串比較。如果你愿意承受字符串比較所帶來的性能損失,你就能編寫出更簡單、更容易的代碼,但《Axioms Of Dominion》無法以這種方式運(yùn)行。即使使用最高效的算法,你也無法在消費(fèi)級硬件上實(shí)時(shí)完成《Axioms Of Dominion》所做的工作。

Axioms tries to never deal with string comparison for instance. You could get simpler and easier to write code if you were willing to take the string comparison performance hit but Axioms couldn’t function that way. Even with the most efficient algorithms you simply can’t do what Axioms does in real time on consumer hardware.

同樣,《Axioms Of Dominion》對內(nèi)存的要求也很高。為什么?我們從模擬代理之間非常復(fù)雜的關(guān)系中獲得了很多價(jià)值,但我們也必須存儲這些數(shù)據(jù)。我在代碼復(fù)雜度上付出了很大代價(jià),才將 "好感修正 "的 RAM占用率從57字節(jié)降至4字節(jié)。當(dāng)你有成百上千個(gè)代理,每個(gè)代理都與成千上萬個(gè)其他代理有關(guān)系時(shí),你所擁有的 "好感"數(shù)量就會(huì)迅速激增。中小型地圖可能至少需要32GB內(nèi)存。在進(jìn)行更深入的游戲測試和性能測試之前,我不會(huì)有最終的數(shù)據(jù)。

Similarly Axioms has significant RAM requirements. Why? Well we gain a lot of value from simulating very complex relationships between agents but we also have to store that data. At a significant cost in code complexity for me I got the RAM usage from “opinion modifiers” down from 57 to 4 bytes. When you have 100s of 1000s of agents who each have relationships with 1000s of other agents the number of Opinions you have spikes very fast. You’ll probably need a minimum of 32GB of RAM for small to medium maps. I won’t have final numbers until I get much farther into playtesting and performance testing.

我預(yù)計(jì)中型地圖在游戲后期可能一回合需要一分鐘處理,不過我們還不能確定,這只是因?yàn)?"規(guī)劃階段 "是在玩家回合時(shí)完成的。因此,只有 "執(zhí)行階段 "是在按下 "結(jié)束回合 "和新回合之間完成的。在游戲后期,"規(guī)劃階段 "可能需要 5 分鐘,即使有大量的多線程處理。單核處理一回合可能需要 40 多分鐘。

I’d expect medium maps to require maybe a minute of turn time processing in the late game, though we can’t know for sure yet, and this is only because the “planning phase” is done while it is the player’s turn. Thus only the “implementation phase” is done between when you press end turn and the new turn. The “planning phase” would probably take 5 minutes in the late game, even though there is significantly multithreading. Single core processing would arguably take 40+ minutes a turn.

當(dāng)然,對我來說,《Axioms Of Dominion》提供了重要的價(jià)值,以換取基于回合的要求、高內(nèi)存使用率和占用大量 CPU 時(shí)間。智能代理擁有不同的目標(biāo),他們的反應(yīng)是可以理解和預(yù)測的,并且需要獨(dú)特的互動(dòng)來處理。

Of course Axioms provides, for me anyways, significant value in exchange for the requirement to be turn based, for the high RAM usage, and for using a ton of CPU time. Smart agents, with varied goals, who respond in an understandable and somewhat predictable way and who require unique interaction to deal with.

智能AI:NPC如何以有效、有趣、多樣的方式運(yùn)作?的評論 (共 條)

分享到微博請遵守國家法律
中西区| 喀什市| 双柏县| 喀喇| 高台县| 揭阳市| 宽城| 同心县| 自治县| 泾阳县| 孟州市| 阿巴嘎旗| 廉江市| 买车| 九台市| 大埔县| 连州市| 博罗县| 东台市| 南昌县| 思茅市| 九龙城区| 合川市| 西吉县| 曲松县| 舒兰市| 长沙县| 额敏县| 余姚市| 淳安县| 邳州市| 韩城市| 林西县| 和硕县| 阿拉善盟| 西林县| 京山县| 庐江县| 新邵县| 琼海市| 台湾省|