• 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.

AI Government Choices

Ozymandias

In Terra Fantasia
Supporter
Joined
Nov 5, 2001
Messages
10,878
Location
The lone and level sands
Following up ontimerover51's questions, I'd like to know anecdotes (I presume no one's done serious research ... ?) about AI Government Choices.

embryodead stated here that the AI will always choose a government type by Corruption (Minimal > Nuisance > Communal > Problematic > Rampant > Catastrophic; it doesn't seem that the AI makes any calculations here, it won't choose Communal over Nuisance even with 50 cities on a standard map)

The full page reads as follows:

Spoiler :
Here are some results I got after further testing, with cleared favorite/shunned settings, and governments differing only in 1 feature.

These settings have effect on the AI government choice:

- Favorite government
- Shunned government
- Military Police Limit
- Unit Support (cost per unit, free units and support per city *combined* - the AI makes a calculation based on the number of units and settlements owned to determine the best option)
- Corruption (Minimal > Nuisance > Communal > Problematic > Rampant > Catastrophic; it doesn't seem that the AI makes any calculations here, it won't choose Communal over Nuisance even with 50 cities on a standard map)
- War Weariness (if at war)
- Standard Tile Penalty (avoided)
- Standard Trade Bonus (highly valued)

These settings have NO effect on the AI government choice:

- Rate Cap
- Worker Rate
- Assimilation Chance
- Draft Limit
- Hurry Method
- War Weariness (if at peace)
- Xenophobic and Forced Resettlement
- Resistance Modifiers
- Espionage (Diplomats, Spies, Immune to... etc.)
- Government-specific improvements and wonders

All of this is in no particular order. It's rather impossible to determine the exact value of each of the elements without hax0ring. But the list should help balancing the governments, at least.


What I'd like to know is how the AI chooses between two government types with the same Corruption level. Does embryodead have it nailed? What info can anyone add?

Many thanks (before I recuse myself to a dark, dank place for an indeterminate time puzzling this our myself, periodically cackling "It's alive!" ... Well, you get the drift.)

Obviously, I'd like as much info - hard experience and anecdotal experience alike - before I begin to tackle this Big Question myself.


Best,

Oz
 
Oz, what I may do is play with the Age of Discovery Scenario and the World Map variation and report back. Not sure that I want to run the World Map mod in Debug mode, but I probably could do that for the straight Age of Discovery scenario.

That is the one that got me wondering about this in the first place.
 
Lol, the first thing I was going to do when I saw the title was to link to ED's post. But since you got that covered:

In peace times the AI highly values (it can almost not be overstated) the trade bonus. They will really only change if they are hit by War Wearness. In my experience this is by far the most important factor.

If the governments are almost alike (same trade, same WW, same corruption) favourite government is likely to play in.
 
Also worth looking into is what the threshold is for an AI to switch to a government that it perceives to be better. I have on rare occasion see an AI stick with Feudalism for lengthy periods of time, and I'm not sure if that was because Feudalism was the first government the AI discovered after Despotism and it figured it wasn't worth the anarchy to switch to Republic, or if the AI thought Feudalism was the best government for it.

So, maybe try one scenario where the AIs start with Despotism with very slightly different Superior Government A and Superior Government B available, see which one it prefers, and then start again with all of them in the non-preferred one, and see if they switch.
 
Well, the whole reason for asking the initial question was that the Aztecs, Mayans, and Incas in the Age of Discovery (World Map) scenario stayed with Blood Cult until each build a Wonder, and then switched to Tribal Council, even though Blood Cult had been thoroughly nuked by me, and most of the Europeans had switched to Tribal Council. Prior to nuking Blood Cult, the Europeans except for England and Austria had all gone Blood Cult.
 
Has there since been any insights into the weighting for the various factors that the AI evaluates to choose a government? I have searched the forums extensively and haven't found much on this topic outside of this thread (and the linked discussions on the FUBAR Editor thread). My takeaway so far is that Trade Bonus is the weightiest factor, then probably corruption levels, and after that…who knows?

I am currently trying to rebalance the governments (mainly by nerfing Republic slightly and making Feudalism a more viable choice), but so far I've managed the more impressive feat of making the Americans choose Communism over Democracy when both are available to them. Clearly I need to return to the drawing board.

With regards to Republic, I have retained the Trade Bonus but increased the corruption rate to Problematic. The desired effect is that it still generates a lot of commerce in the early game when you haven't finished expanding, but doesn't scale so well, and gives more incentive to switch to Democracy unless you're prepared to use a lot of Policemen at the edges of your empire. I experimented with Communism's corruption rate to Minimal (no Trade Bonus) to make it more attractive, but it seems that this was too much and now the AI is dumping Republic/Democracy in favour of it, which seems to go against the advice that the Trade Bonus is the most important factor. In my test game, there has also been almost no wars, so they have largely stuck with Communism as a peacetime government.

I can post the changes I've made in full if required (possibly on another thread if there is interest), but I was mainly wondering if there had been any deeper understanding of this topic in the last 7 years.
 
Has there since been any insights into the weighting for the various factors that the AI evaluates to choose a government?

- Apologies! - Wrong link - I'm looking ...
 
Last edited:
I probably should have said "additional insights" (as in, closer to a formula) or did you mean to link to a thread other than this one?
 
I thought that was a an older thread about this ... But (dim) recollection suggests that the question first arose with PTW ( :old:) Then, it seemed apparent that the Government types' progression, in "Corruption & Waste," from "Catastrophic" to "Minimal" couldn't be overwritten, with Communism being a mystery - and remaining so in Conquests, as the "Communal" value is (according to the Editor help) the worst, below the "Catastrophic" value of "Anarchy"

That being said, with Conquests, "Republic" and "Fascism" have equal C&W, as do "Communism" & "Feudalism." A simple, but lengthy, test, can be done as follows:
  1. Pick one those pairs.
  2. Set up a scenario with one starting Tech.
  3. Have both Gov types available with that Tech.
  4. See which type the "AI" chooses.
  5. Start fiddling with values.
  6. Rinse; repeat.
Honestly, if I had the time, it's the type of thing I'd do - and did, once upon a time.
 
That ambiguity around Communal's relative value is partly why I decided to change Communism to Minimal, so that it is still good for maintaining large far-flung empires but lacks the Trade Bonus to make up for greater Unit Support. There's really no other point of difference for the AI to consider in how I have modified them (Diplomacy/Espionage/Worker Rates/Draft Limit/Hurry Method are apparently not considered).

Thanks for the idea about the scenario test: I think I will run those at some point, but I'm reluctant to nerf Communism much more in pursuit of bringing the AI into line, as the main goals of my mod is to overhaul the Monarchy-for-war-Republic-for-peace situation where the two ancient-era systems are so good there's rarely if ever any incentive to switch. More diversity from the AI would be nice, but not a dealbreaker for me in the end.
 
Back
Top Bottom