欢迎光临散文网 会员登陆 & 注册

Stellaris开发日志#227 | 10/7 照看人工智障

2021-10-15 21:40 作者:牧有汉化  | 我要投稿

牧游社 牧有汉化翻译


Stellaris Dev Diary #227 - Looking after the AI

Narkerns, Recruit


Hello and welcome to a new Dev Diary,

大家吼,欢迎来到新的开发日志,


My name is Guido and today I'm here in my role as a Principal Designer on Stellaris to talk about AI in a bit more detail.

我是Guido,今天我作为Stellaris的首席设计师来聊聊更多关于AI的细节。


You probably have heard about the Custodian Initiative by now which has been created to keep improving the game on a more regular basis and in order to be quicker when reacting to player feedback. A part of this initiative is also to put some more love and attention to the AI of the game going forward - an AI initiative inside the Custodians, basically.

你们现在可能已经听说了守护者团队,它是为了定期改进游戏和更快的对玩家反馈作出反应而建立的。这个计划一方面也是为了对以后游戏的AI给予更多的爱和关注——基本上来说就是一个守护者团队内部的AI相关计划。


For this, we have set some goals for ourselves going forward:

对此,我们为自己设定了几个未来的目标:


1. Always work on AI-related topics, regardless of what else is going on
1、不管其他情况如何,始终致力于AI相关的主题

2. Move the AI towards being challenging to players in an entertaining way, rather than be optimized to min-max its way to victory
2、让AI用更有趣的方式向玩家提出挑战,而不是(简单)优化为用极小化极大算法去计算胜利方法。

3. Move the AI towards being more distinctive, so that not all empires feel strong in the same way
3、将AI变得更加有特点,从而避免使所有帝国给人的强大的感觉都是一样的。

4. Support future DLCs from the get-go
4、从一开始就支持未来的DLC

5. Constantly make small improvements to the AI
5、持续对AI做小改进

6. React quicker to player feedback
6、更快地对玩家反馈作出反应

7. Occasionally make a push for more significant improvements
7、偶尔推动更重要的改进


Speaking of which, for the upcoming patch in November, we have some significant updates in store.

说到改进,在商店11月即将发布的补丁中,我们有一些重要的更新。


Economic Script Update

经济脚本更新


First of all, the biggest change you will notice is how we have changed the economic plans script. This script is the core of the economic behavior of our empires. It defines what resources they strive to get when building districts and buildings. How much population growth they should go for and how much research and unity they want.

首先,你们会发现最大的改变是我们修改了经济计划脚本。这个脚本是帝国们经济行动的核心。它决定了帝国们是为了去努力获得什么资源而区划和建筑、它们应该追求多少人口增长,以及它们想要多少科研和凝聚力产出。


The functionality of the script hasn't changed much, but how we are using it has changed.

这个脚本的功能并没有很多变化,但是我们改变了应用它的方式。


Previously the script was divided into early-, mid-and late-game. Depending on the phase of the game, empires would prioritize resources differently. For example, focus on research was lower in the early game than in the later stages of the game. However, this approach didn't take into account the various situations an empire can find itself in. Especially after a war or when a new empire breaks off an existing one. In those cases, even if the game phase was in the late game, for the respective empires it meant that they were in a much more 'early game' position.

之前这个脚本(里的经济计划)被分为早期、中期和晚期游戏(三个)。在不同的游戏阶段,帝国会优先获取不同的资源。举例来说,相比起后期游戏,科研产出在前期并不是关注重点。但是这样的设计方式并没有考虑到帝国可能面临的各种不同的处境。特别是对于处在战后的帝国或者一个分裂而出的新帝国来说。这种情况下,即使游戏已经进行到了后期,对于这些帝国来说意味着它们还处在一个更“早期”的阶段。



Instead of having 3 different economic plans, we feature 1 base plan instead. In order to get more flexibility and to react to the empire's situation, we're relying much more on the 'subplans' inside that base plan.

相比于三个不同的经济计划,我们提供了一个基础的计划。为了去满足更大的灵活性以及对帝国当前情况作出反应,我们更多地依赖于基础计划之下的“子计划”。


Improved economic subplans

改进的经济子计划


Subplans can be turned on or off, depending on the situation the empire finds itself in. Our main rationale was to ensure that an empire would be economically stable before it spends resources on 'bonus' things like research, population growth, defensive modules on starbases, and unity buildings.

根据帝国自己的情况,子计划可以被打开或关闭。我们是为了让一个帝国在将资源花在研究、人口增长、行星基地的防御模块、凝聚力建筑等“锦上添花”的部分之前,先保证它的经济稳定。


Previously those things were prioritized too early and without enough respect to the basic income of energy and minerals, leading to empires that produced alloys, but had big deficits in energy and mineral production. And this deficit would be the start of an economic death spiral, where the resource debuffs would further reduce production and everything just escalated to the point where an empire was bankrupt on all resources. This became especially problematic after the economic system has been rebalanced to focus resource production more on the districts, rather than the buildings of a planet.

在之前的版本里,帝国们会过早地注重这些“锦上添花”的部分,而不会充分考虑能量和矿物的基础收入。这导致虽然帝国们在制造合金,但是(它们在)能量和矿物生产方面却存在巨大的赤字。而这一赤字将是经济死亡漩涡的开始,资源减益将进一步降低产量,一切都会演变为让帝国在所有资源上都破产。当经济系统再平衡为更注重区划的资源产出而不是行星建筑的资源产出后,这个问题变得尤其严重。


Here's an example of what the economic situation generally looked for empires in a game that went on for around 80 years:

这里有一个例子,是游戏开始80年后帝国们的大致经济情况:



These are screenshots from Stellaris version 3.0.3

这些截图来自Stellaris 3.0.3版本号。


Our updated economic script prioritizes basic income first and takes the new economic rebalance into account. Energy and minerals are most important.

我们更新后的经济脚本首先会优先考虑基本收入,并考虑到新的经济再平衡。能量和矿物的产出是最重要的。


The difference between the 'income' and 'focus' block is that if the monthly income is below what is defined in the 'focus' block - districts and buildings which produce those resources get an extra bonus in weight, when deciding what to build.

“收入”和“焦点”代码块之间的区别是,如果(能源和矿物的)月收入低于“焦点”部分中的设定值,那么在选择将要建造的东西时候,产出这些资源的区划和建筑会获得额外的权重。



Then the first subplan kicks in. If a country uses food (therefore, Machine empires will have this subplan turned off) it will prioritize food production.

然后第一个子计划会开始。如果一个国家消耗粮(因此,机械帝国将不会执行这个子计划),那么它会优先生产粮食。



The next subplan will check conditions for focusing on consumer goods. Again, checking if the empire actually uses them or not - and then only focus on producing them if the empire has at least a monthly income of minerals of 30. Based on the fact that in order to create consumer goods you require minerals.

下一个子计划将会考虑是否关注消费品生产。再一次地,先检查帝国是否消耗消费品——且只有在每回合至少收入30矿物的情况下,帝国会开始生产它们。这是因为生产消费品需要矿物。



Further down we activate the plans for prioritizing research and all the higher-level resources

再之后我们会启动优先科研和其他更高阶的资源的计划。



Resulting behavior improvements

由此产生的行为改进


So, the script can check for various situations in AI empires - from the fact if they are a Gestalt Empire, using food to monthly income of specific resources. This gives the AI a lot more flexibility in managing its economy.

因此,这个脚本可以检查AI帝国的不同状态——从是否是格式塔帝国、是否消耗食物,到特定资源的月收入。这使AI可以更灵活地管理它的经济。


As an example, here we have a 100-year old Galaxy with 13 AIs and every empire is able to manage its economy in a decent enough way. Notice the resource tab at the top - almost all empires have positive income in all resources; the ones with a negative income only have a small deficit:

举个例子,这里我们有一个发展了100年的拥有13个AI帝国的银河系;而所有帝国都能够像样地管理它们的经济。注意看顶上的资源条——几乎所有帝国在所有资源上的收入都是正的;而其中那些负的收入也只带来了很小的赤字:



Apart from this, there were some small, but significant code changes that helped the AI in running the show.

除此之外,还有一些很小但很重要的代码更改,可以让AI有更好的表现。


Conclusion

总结


The code for the AI has been optimized heavily in the past in order to improve performance a lot. However, this has led to some unforeseen and unintended behaviors which have now been corrected. Some of the districts and buildings weren't considered at all and city districts were weighted way too high. The AI is also now able to build temples and holo theaters, for example.

为了提升AI的表现,我们之前优化了大量相关的代码。但是这也导致了一些无法预料和计划之外的AI行为;不过我们已经把它们更正了。举个栗子,在之前的版本中,一部分区划和建筑从来都不会被建造,而城市区划的权重又相当之高,但现在版本的AI也会主动建造寺庙和全息影像剧场。


Finally, the AI has also been given a bit of support in how it will set up its starbases, especially in conjunction with the hydroponics starbase building, which can play a larger role in how you provide food for your empire. The AIs can now use more varied setups when building their starbases, making use of Curator Think Tanks, Nebula Refineries, and other special buildings where it makes sense.

最后,我们也在AI决定如何建设恒星基地时为其提供了一点帮助,特别是与水培仓相结合,使其可以在为帝国提供食物时发挥更大的作用。AI现在可以在建设它们的恒星基地使用更多样化的设置,比如建造策展人智库、星云精炼厂和其他有帮助的特殊建筑。


And all of this was built on the foundation of the last major rework of the economic AI, so kudos to @sidestep for making this evolutionary step possible.

而所有这些都是基于上一次对经济AI的重大改动,感谢@sidestep让这一进化步骤成为可能。


With your help, we’re looking forward to giving the AI the attention it deserves and making it even better in the future.

借助你的帮助,我们期望给予AI它应得的关注,并让它在未来变得更好。


Cheers,

干杯,


Guido

Guido敬上。



翻译:qqqqyyy

校对:一水战阿部熊 三等文官猹中堂


欢迎关注UP主和主播小牧Phenix

欢迎关注牧游社微信公众号和知乎专栏!微信公众号改版为信息流,欢迎【置顶订阅】不迷路,即时获得推送消息!

B站在关注分组中设置为【特别关注】,将会在私信内及时收到视频和专栏投稿的推送!

欢迎加入牧有汉化,致力于为玩家社群提供优质内容!组员急切募集中!测试群组822400145!   

Stellaris开发日志#227 | 10/7 照看人工智障的评论 (共 条)

分享到微博请遵守国家法律