• We are currently performing site maintenance, parts of civfanatics are currently offline, but will come back online in the coming days. For more updates please see here.

Joltis AI tweaks

joltis

Chieftain
Joined
Mar 15, 2011
Messages
34
Hi all,

I decided to do a AI mod. Purely change AI behavior, no game changes. This project kicked start with an observation that the most of AI:s build first a monument for their capital:crazyeye:. So I run the Firetuner to see actually this happening.

The mod concentrates on early AI behavior. Now it is mostly max. 100 turns at standard.

Mod name is same as the title.

change log:

version 1:

-More units
-More workers
-Bettering workers and settlers movements
-Better early build order
-Early scout
-Money spending changes

version 2:

-Build order changes
-AI REX
-More likely scout
-Trying worker escort

version 3:
-amount of scouting smaller
-official patch upgrade
-decrease small city wonders
-naval correction

version 4:

-settlers
-military amount
-wonders production
-grand strategy guess

version 5:

-grand strategy levels
-some wonder changes
-city specialization

version 6:

-diplomacy overhaul
-cooperation changed
-warmonger hate smaller
-increase opinion threshold a bit
-decrease event based opinion penalties
-sharpened approaches

version 7 (under construction):
-failed scouting try
-grand strategy flavors
-disable overriding wonder production

Issues at the moment:

-military size (still too many units in production)
-make minimum number of units depend on total population. Now number of cities (source issue)
-science problems (tech progression slow because other things slow down)
-redo unit flavors and building flavors (These do not fit each other)
-Worker and settler escorting (source issue)
-Auto scouting: need more circular pattern (source issue)
-Auto scouting: get starting warrior back to defense (source issue)
-Random rolls of policies, techs and city production (source issue)
-Muster point of armies near enemy border instead of cities (source issue)
-Negative modifier for settling 4-6 hex away from city (source issue)
-Grand strategy guess early. Too high value.
-multiunitformations need tech activated and tech obsoleted (source issue)
-every single unit type (such as ranged unit) needs own tactical table (source issue) (workers, settlers and barbarian have their own) (With one table it is hard to know what is happening)
-Usage of gold: upgrade, trade, CS, baying buildings and baying units balance.
-Grand strategy at GlobalAIDefines.xml
-More wars agains CS
-Broader city specializations with grand strategy: Now too narrow scope
-diplomacy issue: allying (possible source issue)
-diplomacy issue: late game ganging up against leader
-diplomacy issue: better trade
-diplomacy issue: demand purpose
-minor civ wars (very important because Diplo Victory gets hard)
-evaluation of wars agains other civ
-Great person usage (source)
-Liberation/pillage/puppy/... (source)

Joltis
 
There are certain things which are possible without source. Standard game AI has a lot of room for improvements. AI is now far from optimal parametrization. There are enough stuff in AI now to make fairly complex behaviors but parameters are sub-optimally.

Now, for example, I have been meddling with AI REX. I noted that early REX system actually newer starts, namely ECONOMICAISTRATEGY_EARLY_EXPANSION under economic strategies does not activate. This is responsible for REX. I needed to change AI_STRATEGY_EARLY_EXPANSION_NUM_UNOWNED_TILES_REQUIRED, under defines, from 25 to 5 to obtain correct REX. Even this is sub optimal but closer to correct than 25.

I like to have source so that i have an idea how AI actually works. Now it is very hard to know what different parameters do. There is sometimes even two similar parameters which is even more confusing.

Hopefully get next version on this week.

Joltis
 
Looks cool. :goodjob: Will be watching this mod, and with your permission, maybe integrating it into my scenario
 
New version is out.

If someone wants please leave comments. I need some feedback. It would greatly help me. Also suggestion and links about AI are welcome.

Joltis
 
Compatible with TBC?

Sort of, but not really. Load order would be screwy as they edit the same variables, and TBC pretty much does all of these things already via the WWGD AI rebalancing mod.
 
Sort of, but not really. Load order would be screwy as they edit the same variables, and TBC pretty much does all of these things already via the WWGD AI rebalancing mod.

Sorry Sneaks, but there really aren't same variables at the moment because I had been interested in early game economic AI. With WWGD version 6 there are 3 changes which change same variable and they are not terrible. We both have similar kind of change in these cases. We had been working on different fields of AI programming. Only thing to note is that VEM (and probably TBC) does overwrite all values so you need to load my mod after VEM (/TBC).

While going through WWGD files I noted that you had changed AIGrandStrategy_Flavors and AIGrandStrategy_FlavorMods. Do you know where these affects? Because there are also grand strategy modifiers in economic table which affects to buildings and units.
 
Sorry Sneaks, but there really aren't same variables at the moment because I had been interested in early game economic AI. With WWGD version 6 there are 3 changes which change same variable and they are not terrible. We both have similar kind of change in these cases. We had been working on different fields of AI programming. Only thing to note is that VEM (and probably TBC) does overwrite all values so you need to load my mod after VEM (/TBC).

While going through WWGD files I noted that you had changed AIGrandStrategy_Flavors and AIGrandStrategy_FlavorMods. Do you know where these affects? Because there are also grand strategy modifiers in economic table which affects to buildings and units.

WWGD in TBC has been carried much further along than what I had done solo, which is why I believe there is greater overlap than where my solo mod had been left off. I know Thal did far more adjustment.

As for the flavor values, they alter how likely a strategy is to be chosen. The lower the value, the lower the threshold that flavor is to choose that strategy. I attempted to even out the thresholds across the board to make victory choices a bit more equitable. In vanilla, the AI would not choose a spaceship grand strategy til very late in the game due to its high spaceship threshold, which I found tended to inhibit its capacity to plan ahead for this. On the other end, conquest was a bit too easily chosen, so I upped the value for that.

FlavorMods actually will adjust the leader's flavor values in the LeaderAI files depending on the active grand strategy. This is the best way to tweak AI
choices once they have a grand strategy in hand. I did several small tweaks to "keep the AI focused" in my initial WWGD, such as dropping the Offense flavor for the AI when pursuing space victories. This tool is REALLY powerful, and if you tweak the numbers a lot in either direction, you can vastly alter how the AI plays.
 
New version out. This time mostly focusing onto city specialization and grand strategy. Doing AI bit more victory driven. I decide to upgrade version now because I will be soon on holiday and not home.

Joltis
 
Can AI behaviour related to Diplomatic victory be tweaked? It's fairly common AI has lots of gold (50000+) and it does nothing with it. AI should try to bribe all CS.

I don't know if this can be done by touching only lua and xml files.

The common problem that AI has a lot of gold is an effect from another AI problem, namely bad production. What happens, AI is one or two city warrior/ spearman rushing to you in early game. After those units are killed way or another we have left AI with bad production. This causes maintenance to be extremely low -> lot of money on AI's bank.

Generally I think bribing is ok. I haven't investigated late game bribing because I have concentrated to fix early game problems.

Joltis
 
Are there changes in diplomacy?

ANd is this the continuation of what would ghandi do mod or somemthing else colpletly?
 
Are there changes in diplomacy?

ANd is this the continuation of what would ghandi do mod or somemthing else colpletly?

Currently there is only very small changes in diplomacy. I am currently doing version 6 which will overhaul diplomacy (see details in first post).

This mod is separated from WWGD and developed by me completely. The main idea of this mod has been to fix AI economic in early game.

Joltis
 
New version up. This time about diplomacy. I changed a lot of stuff. I am quite happy now how AI gets upset with you but not about friendship (seems to be needing source). Very visible change is that approach will vary a lot of.
 
Back
Top Bottom