设为首页收藏本站

塞爱维(CIV)文明联盟

 找回密码
 注册
查看: 7758|回复: 14

A Better AI源代码下载和更新详细介绍

[复制链接]
发表于 2006-11-30 21:39:59 | 显示全部楼层 |阅读模式
此补丁源代码发布在sourceforge,使用TortoiseSVN进行源代码版本控制和管理。原文位置:
http://sourceforge.net/docman/di ... amp;group_id=178407
1)先安装TortoiseSVN软件,下载地址:http://tortoisesvn.net/downloads
2)建一个文件夹,用来存放和检查源代码用,名字可以叫A Better AI,或者在A Better AI下再建立个子目录,命名为BetterAITrunk或者任意你喜欢的名字。
3)右键你要导入源代码的文件夹,选择“SVN checkout”。
4)在对话窗口的“url repository”项目里面填写:
https://svn.sourceforge.net/svnroot/civ4betterai/trunk/
来搜索warloard战神A Better AI源代码库的最近更新
5)按“OK”,就可以自动进行下载源代码了
6)更新源代码方法,右键那个你存放源代码的文件夹,比如BetterAITrunk文件夹,选择“SVN update”,即可自动更新。可以选择“show log”查看更新日志。

第一次使用速度会慢些,因为要更新和检查C++ boost库和python文件。如果选择Only check out the top folder就不必检查这些了,速度快了,但是你可能会错过重要的东西。建议不要选择。
另外就是Tortoise (or Sourceforge)会周期发生网络连接问题,不过不用担心,只需要重新update就可以了。

下面给几张安装和使用的截图
发表于 2006-12-1 08:15:55 | 显示全部楼层
支持一下儿,大家一块儿来研究
发表于 2006-12-1 08:22:18 | 显示全部楼层
我的理解版本管理是用于多人协同开发、检查代码修改及与其他SDK级MOD项目合并等情况的。
发表于 2007-1-29 22:57:40 | 显示全部楼层
要是能改成汉化版也能用就好了
发表于 2007-3-14 16:40:58 | 显示全部楼层
想知道这个跟原版的确切变化,就算简单介绍一下也好
发表于 2007-3-14 23:42:29 | 显示全部楼层

这个阿?前段时间很有名的说,简单介绍的话,我转个贴

fix various AI/Auto Worker bugs and you can now download the updated AI mod for Warlords Patch 2.08.
我确信2。08版本中的改进是很有兴趣的,不过,没有多少时间用来作改进,而且这个过程也被加快了。我一直在改进AI,修改AI中自动工人的错误。你现在可以下载改进过的AI补丁,

Why might you want to use this mod? Firstly it is fully save-game compatible (if placed in CustomAssets) and game rules are completely unchanged. The change log includes some interesting improvements:
你为什么会需要这个mod呢。首先,它是完全的存盘兼容的(如果放在CustomAssets中),并且游戏规则没有任何改变(应该是让AI更加聪明了)。下面是改变的条目:

Quote:
- Fix to irrigation chaining bugs which would result in the AI farming excessively and flip-flopping between farms and cottages.
修改灌溉链错误。这个错误会导致AI过多的并且在不停中农场和村庄中切换。
- General worker unit AI improvements to make them more flexible, they will also stack.
一般工人AI的改进,他们更加自由的工作。可以叠在一起工作了。
- Auto workers now come back and road up resources which had been built before roads were available.
在那些已经改进资源但未修路的地方,自动工人可以自动给修路。
- Workers are now less fearful of enemy units, they should only run away if they are in actual danger of dying.
工人现在不怎么害怕敌人的单位了。他们只在真正有危险的时候才跑开
- Tweaks to auto workers to achieve a better balance of hammers, they should build more mines now.
修改了自动工人,可以得到更多锤子,现在他们应该会挖更多的矿。
- Code to add awareness of jungle chopping when choosing research.
改进代码,知道可以进行清理jungle。
- Great People usage improved, the AI should be less Golden Age happy, only starting one if it’ll actually pay off compared with lightbulbs/settling.
伟人使用改进。AI不是那么喜欢黄金时代了。只有在科研/settling有赚头的时候,才去开启黄金时代。
- Great Prophet Shrines valued a little more accurately.
大预言家的圣地的价值变得更精确了。
- Great Merchant cash bomb logic added.
加入大商人的金钱炸弹
- AI's will now spend gold to perform deficit (100%) research and will decline to trade gold reserved for such research, enabling them to make better use of gold boons from huts, plunder, refunds, great merchants, etc.
AI科研可以100%进行,即使是赤字的。AI不会把这些钱用来做交易的。他们可以更好的利用从村庄,掠夺,大商人等地方来的钱。
- AI Missionary code adjusted - both when choosing destination and when determining the number needed.
AI的传教代码改进,在于选择传教目标以及需要多少教士。
- Awareness of freebie promotions (such as Aggressive Combat I, or Red Cross Medic I) when choosing which unit to train.
建立新单位的时候,AI现在知道兵种的天生,比如侵略AI的天生力量1级,或者红十字医疗1级。
- The AI will now chop Wonders and will chop to assist a war effort.
AI会砍树抢奇迹和出兵打战。
- The AI will no longer pillage Barbarian Cities.
AI不会去摧毁野人城市了。
- City Founding logic has been improved, a bug was fixed which could "force" the AI to found on top of resources that it otherwise wouldn't, the AI is also aware of existing culture (it's own) making tiles workable.
改变城市建立的逻辑。修了一个错误,这个错误会导致AI在资源上面建立(其实可以不要这么做的)。AI同时也会注意到现有的自己文化边界,使得这块地可用。
- City Founding logic has been diversified, Creative leaders are more "Greedy", grabbing as many resources as possible per city, Organized leaders are the opposite, being more inclined to found cities right next to resources and founding more cities overall.
不同的AI有不同的城市建立的逻辑。创造性的AI更加贪婪。每个城市会尽量的占有资源。组织性的AI相反,城市更靠近资源,而且城市数目更多。

I now have a Sourceforge project page for source control and distribution, thanks to Iustus of CFC/RBCiv. My intention is to use that for distribution of date-stamped test builds, once a build has been confirmed to be mostly stable without crashes or glaring AI flaws it will be given a version number and uploaded to the major Civilization Sites mod repositories. You can help in this process by testing, both reporting things which appear broken and things which do work, of particular value would be experience on larger maps. I would greatly value any report of experience, even if it's as simple as "I played out a full game and didn't notice any problems". Save games, especially from later in the game (ie before a world war, entering industrial era...), would also be quite useful as testing grounds.
我现在在sourceforge上建立一个项目,用来管理源代码和发行版本的。很感谢Iustus,我的目标是用sourceforge管理不同的发行版本。一旦某个版本已经确认是稳定了。将会给一个版本好的,并且发给CIV大网站。你们都可以来帮忙测试。报告错误。

Since these will probably come up:
A Vanilla Build is not available yet, it is my intention to only work on Warlords and to get someone else to merge the changes back into Vanilla.
The AI is not better at tactics, yet. My AI should build better, research faster, pump out more stuff and be more varied in it's play style, but it's still just a big a dunce as ever on the battle field. As such there's not really much point in pointing out tactical flaws or problems.
I am not posting this in a modding forum because I believe that there will be people who are interested who do not frequent mod forums and since the base gameplay is unchanged it's not so much a mod as a user-made patch.
以后的改进:
Vanilla版本,我现在专注用战神,其他人可以把这些改动放到Vanilla版本中。
AI的战术策略还不好。我修改的AI应该会更好的,研究更快,产出更多东西并且有更多的游戏方式。但在战场上,我的AI还是一个傻瓜(没有改进)。还好没有人抱怨过。我没有把它放在MOD的论坛,因为我相信有感兴趣的人,他们不喜欢MOD,因为他们是要玩未修改的游戏。这个不是MOD,这个是用户自制的补丁。

Link to the Sourceforge Project.
Link to the Original Thread at Apolyton.

Enjoy,
Blake.

PS. For feedback and stuff, this thread is as good a place as any for now. I'm also crossposting this over on Poly and will check both threads.
发表于 2007-3-14 23:44:49 | 显示全部楼层
First thing: Usage.
使用说明

The zip you need is the one not containing the word "Source", the source means source code - you don't need that as a user.
找到ZIP文件,它的文件名没有“source”字符串。source的zip文件是源代码,作为用户你不需要的。

In the zip you'll find a folder called BetterAI and inside that folder you'll find CvGameCoreDLL.dll. You can either place the betterAI folder inside your Mods folder then load it as a mod in game (using Advanced Menu), or you can take the CvGameCoreDLL.dll file and place it directely inside your CustomAssets folder (not any of the sub folders), which if you go to My Documents should be:
My Games/Warlords/Custom Assets/
在ZIP文件,你可以看到一个叫做BetterAI的目录,这个目录里面,有CvGameCoreDLL.dll,你可以把betterAI目录放到你的MOD目录,然后把它当作普通的MOD进行游戏。或者你把这个DLL文件,拷贝到你的CustomAssets目录下,一般是在“my documents"中的My Games/Warlords/Custom Assets/

To return to normal play simply delete the CvGameCoreDLL.dll file.
要恢复正常运行CIV,你只需把这个DLL文件删除。

Both methods work equally well, I reccomend using the mod method if you use other mods, and the Custom Assets method if you don't play with mods.
两种方式都一样的。我建议,如果你用其他的MOD,就用MOD方式安装。如果你没有MOD,就拷贝DLL在CUSTOMASSETS下运行。


Okay other things mentioned many times...
其他的说明。

Difficulty Levels:
难度
The first thing I want to point out is that my mod primarly addresses the mid to late game AI incompetence, where the AI starts to spin it's wheels and not go anywhere, like the AI couldn't make use of Biology at all. It is not much harder at the start of the game, I mean sure, I improved some things like workboat and worker gettage, and I've ensured the AI wont be left without critical techs like Pottery or Iron Working (if Jungled). The main thing, is you can't rely on the AI stagmenting, it's not enough to get a lead at one point in the game then sit on your laurels, trusting the AI's to stagment. Now the AI's can leverage many more techs and gain an advantage.
第一件必须指出的事情是,我的MOD主要是针对游戏中后期AI,那时候,AI在空转,没有任何进展。比如AI不能利用生物学的发现。在早期游戏,应该没有什么难度上的增加。我作了一些改进,比如渔船和工人。AI不会因为关键的科技(比如制陶或者铁器)而落后的,(意思应该是AI会自己主动获取这些关键科技)。主要的是,你不能一次领先以后,就一直保持领先的(废话)。AI可以利用很多科技。

You certainly need a REAL edge to beat the AI's at Monarch+, you can't just rely on their incompetence to be their undoing. For example you can use smart wonder usage, or you can use the crutch of warmongering, altough I've noticed the AI is certainly capable of bogging down an invasion under sheer weight of units (and now I've made them chop during wars, yikes...).
在MONARCH以上难度,你需要更快的刀去打败AI。你不能利用AI的无能。你可以做的事情:比如,你可以更聪明的利用奇迹,你利用战神。AI当然可以用各种单位让入侵者陷入苦战。现在我让他们会在战争期间砍树(或者意思是:更加主动的攻击入侵者)。

My long term plan is to tie play style to difficulty level, there's a few things which could change by difficulty level. Firstly, the skill in taking cities, a higher level AI would only attack when it knows it will win, while the lowbies will continue with "lemming attacks" (or as I like to call it, "Whack a mole" gameplay). Other possibilities are things like city placement, with the higher level AI's going for more cities overall (I've noticed newbie players tend to place cities far too spread out). Also chopping and whipping tend to be used more by skilled players and I might make the AI do that.
我的长期计划是给不同的难度不同的的游戏方式。有一些事情可以随着难度改变而改变的。第一,如何进攻城市,高难度的AI只进攻能够赢的城市,低级难度的AI会漫无边际的进攻。另外,城市的位置也会改变的。高难度AI会有更多城市(新手的城市太分散了)。AI砍树会被加入的。

For now, the advantage gained, is that the game is more "balanced" - it's no longer just an early game where you gain an advantage then cruise to victory. You can lower the difficulty level, and I hope, have a more interesting later game. Also I'm also adding more variety in the AI play styles, you'll probably recognize this the first time you see an AI switch to Pacifism, or if you download my new mod, when a Great Merchant appears on your borders - in other words, not only have I made the AI play stronger in the same way handicap bonuses do, I've also taught it new tricks.
现在,好处是游戏更加平衡了。不在是在早期你有了领先,就一路领先了。你可以降低难度。我希望后期的游戏也很有意思的。我加入更多AI的游戏方式,你可能会第一次看到AI转Pacifism。或者大商人在你的边界出现了。换句话,我不仅让AI更加强有力(就像缺省设置中给AI的好处),我还教给AI新的技巧。


Another topic: Tech Trading.
科技交换
I have not changed this other than making them put a higher priority on Alphabet (in one monarch game I played every AI had alphabet by 1AD, I didn't, yikes, but that's an exception not the rule). The AI's have generally far better research power. With my newer mod, not only do they have the stronger economy, they can also leverage gold boni into research, what's more they no longer squander Great People, meaning they might use that mid game GS to pop Education and thus win liberalism rather than wasting him on a GA, the AI who bags the Economics GM will probably use him for a Cash Bomb, resulting in another burst of research. As far as I can tell, most of the AI's higher tech speed is from their sheer researching speed moreso than any change in tech trading - they just really do reserach that fast. My AI seems to have reached the point where on Monarch they research faster than old Emperor AI's, I'm very reliant on tech trading tricks I used to do on Emperor, like Compass for one.
我只不过让AI更加优先研究字母。在MONARCH难度的游戏,我的一次游戏中发现所有AI在公元1年都发现字母(这个只是例外,不是内定规矩)。在我的MOD中,AI有更多的研究能力。他们不仅经济强,而且他们可以利用钱做研究。他们不在浪费伟人,比如他们可以用大科发现教育学进而发现自由主义,而不会浪费在建立研究院(GA)。有大商人的AI会用它挣钱,然后把钱花在研究上。就我所知,AI的高速研究,是从自己研究能力提升开始的,而不是从交换科技中获得的。他们确实研究很快的。我的MOD,在MONARCH难度上的科研速度比原来版本中帝王难度的AI速度还快。过去在帝王难度,我一般很依赖科技交换来获取指南针技术。
发表于 2007-4-1 03:06:47 | 显示全部楼层
我把那个dll文件拷贝到My Games/Warlords/Custom Assets/里,结果进入游戏就出错。然后那个源代码下载下来究竟有什么用?
发表于 2007-5-7 13:21:22 | 显示全部楼层
确定游戏是2.08版?他分几个版本的
发表于 2007-6-4 01:07:13 | 显示全部楼层


各位大虾,  请问有没有懒人用的那种, 直接装就可以用的?
发表于 2007-6-5 00:21:23 | 显示全部楼层
我觉得要让ai变难可以
设计这么一条,让有侵略属性的ai第一个分城直接坐在马或者铜上,开城只看粮食,造完粮仓造兵营造完兵营造兵,人口过2就杀,工人造完高粮就砍树。这样的话电脑一定会很难打
发表于 2007-6-5 12:38:29 | 显示全部楼层
你说的这些挺复杂的…………
发表于 2007-6-5 19:08:04 | 显示全部楼层
第一条复杂点,很难把握什么时候不惜代价去连资源。
后面都很简单啊,搞一个分析,比如设20格内粮食总数是x,计算粮食在+3以上的格子,+5food的就是5,相加,得到x的值。然后把城市的地点放在不同的格子,得出不同的20格内粮食总数(只算有+3以上粮食的格子),选择一个数字最大的x,x取这个值的时候的城市地点就是要开的城的地点

建筑顺序纯粹是序列,就按纪念碑-粮仓-兵营的顺序造

杀人么就是一个if then


不懂编程,不过想想这个要实现好像不太难吧
发表于 2007-6-25 18:11:40 | 显示全部楼层
怎么那么繁啊,谁下载好了打包压缩一下,发到mofile共享空间上去让我们下载一下
发表于 2007-6-25 18:22:01 | 显示全部楼层
better AI里面有个匕首策略,有点像GameTheory在11L的方法
侵略性强的AI如果开局地形差的话就可能采用这个策略
开局就一直暴兵,直到把邻国打残。

但后来又改了很多,因为如果玩家不小心是那个国家的邻国的话 ................

[ 本帖最后由 孟仲玄 于 2007-6-25 18:23 编辑 ]
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|塞爱维(CIV)文明联盟    

GMT+8, 2024-5-17 08:15

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表