UWAI Log
UWAI Log
The AI-controlled Team 1, consisting of Charlemagne, reviews its war plans. This
includes both ongoing wars and wars still in preparation. In this example, there is just
one war plan to be reviewed, namely an ongoing war against me (Team 0, Zara
Yaqob). Charlemagne can either continue the war or try to make peace. In this case,
he can’t exactly make peace because a bug outside the SDK prevents the AI from
offering peace to a human player, but the same computation would happen if I
contacted Charlemagne suing for peace.
The war plan is evaluated by comparing two scenarios: one in which the war is
continued for a foreseeable future of 25 turns, and one in which the war is
immediately ended.
War scenario
The military power of the war parties is broken down into several branches: A (home)
guard that is assumed to be available only for defense; an (invasion) army that can
be used both offensively and defensively; a fleet of warships to accompany or fend
off a naval invasion or for bombarding city defenses; “logistics” is the total cargo
capacity for naval landings – not relevant here because everyone is on the same
landmass.
I’m assumed to have a relatively small guard because the AI is aware that humans
tend to leave few units at home. Charlemagne’s army is a small one by AI standards;
he hadn’t taken much time to prepare for this war. Ramesses has just Heliopolis left,
but it’s a large city filled with units. Most of his units are cavalry because he has lost
his metal sources.
The model assumes that more units are trained during the simulated 25-turn period,
but not all of these units will be deployed in time to make a difference; military build-
up is projected for 13 turns. This projection works much like in K-Mod. One main
factor is the amount of available production (see below), the other the available
military technology, which determines how production translates into power.
Archers are the typical defensive units of all war parties. Both Zara and Charlemagne
can train Swordsmen, but Ramesses only Horse Archers, which are assumed to be a
tiny bit less efficient (power 25 for 50 production) than Swordsmen (21 for 40).
Charlemagne does a similar projection for himself and Ramesses, and, after factoring
in the typical units, arrives at the following power ratings for the military analysis. As
he’s assuming wartime build-up for himself and peacetime build-up for me, he’s
outnumbering me. (Once I start training more units, he’ll adjust his projection.)
In more complicated wars, three or more civs can target each other in a cycle. Here
it’s just a cycle between me and Ramesses. The cycle is broken by assuming that
our armies clash into each other. Since Charlemagne also targets me, and because
his army is far larger than Ramesses’s, 72% of my army is assumed to be busy
fending off Charlemagne, and thus unavailable for the clash with Ramesses.
Simulating graph component starting at Charlema
Cycle
Zara Yaq --> Ramesses -->
Both clashing armies take some losses. I lose the clash, meaning that I won’t get to
attack Heliopolis, while the armies of Ramesses and Charlemagne proceed to attack
my cities. Ramesses is the first to reach a city, and his target is Thebes, his former
capital. However, the surviving portion of his army isn’t enough (45%) to defeat my
garrisons. Ramesses gets to make no further attacks.
Build-up is assumed to happen during the entire 25 turns, although only units trained
in the first half are assumed to fight. The other units still cost production.
In summary, the results of the military analysis: Charlemagne hopes to conquer two
cities. Is this worth more than 1000 production invested in military build-up? There
are some other aspects to consider as well …
Cities lost:
Gondar
Thebes
Lost power from casualties: Guard 64, Army 234
Net power gain (build-up minus losses): Guard 75, Army -164
Invested production: 477
Wars continued:
Charlema
Ramesses
Cities conquered:
Gondar
Thebes
Lost power from casualties: Army 223
Net power gain (build-up minus losses): Guard 218, Army 280
Invested production: 1063
Wars continued:
Zara Yaq
Let’s start by evaluating the conquered cities as economical assets. The per-city
asset scores are updated once per turn and cached; this isn’t shown in the log. Most
of the score probably comes from Thebes, which is home to two shrines. The utility
value of 59 results from a division by the total score of Charlemagne’s present cities.
Since Charlemagne expects to win the war, he’s counting on being paid for peace in
some form at some point.
Charlemagne also likes that he’s taking cities away from me because he hates my
guts (worst enemy and furious attitude).
Their lost assets: 67; their present assets: 248; our present
assets: 204; asset ratio: 33 percent
Difference in lost power (adjusted): 122; their projected
power: 328; our projected power: 915; military ratio: 13
percent
Loss rating for Zara Yaq: 24
Our vengefulness: 2
Divisor from number of rivals (7): 2
Loathing from Zara Yaqob: 17
Additionally, he’s afraid that I might attack him in the long run, and by taking my
cities, he’s reducing that threat.
More importantly, only him and I and two other civs (not Ramesses) look like they
might win the game, and Charlemagne definitely does not want me to win.
There are eight more pro-war aspects, none of which apply here. Most of the anti-war
aspects don’t apply either.
For evaluating the war effort, opportunity cost is taken into account. Charlemagne
has barbarians to fight and cities to found (not shown in the log), which is why he
values his production highly at 3.21 gold. He also considers whether his military will
be unnecessarily large after the war (rather not; invested production reduced to
33%). The gold for unit supply is, as usually, negligible.
The AI can’t evaluate the tactical situation nearly as well as a human player,
therefore, it is always reluctant to make peace when opposing units are near each
other. In this case there is very little entanglement though, just a single Holy Roman
Archer blocking a gemstone mine next to Thebes.
While the conquered assets alone are barely worth the effort, the Kingmaking aspect
leads to a high utility of the war scenario on the bottom line. And some build-up is
also undertaken in the peace scenario …
—
Total utility for Charlemagne: 94
Greed for assets total: 59
Greed for cash total: 4
Loathing total: 17
Pre-emptive War total: 6
Kingmaking total: 52
Effort total: -48
Tactical situation total: 4
Bottom line: 94
Peace scenario
The armament forecast differs a lot from the one in the war scenario. Since it’s a
fictional scenario, Charlemagne doesn’t trust the trend of the power curves, and
rather assumes that I’m doing what Charlemagne would do, which is full military
build-up. Now, it doesn’t make sense for military spending to increase after making
peace – perhaps something I should fix somehow. That said, it’s a minor artifact in
the big picture.
Cities conquered:
Heliopolis
Lost power from casualties: Army 172
Net power gain (build-up minus losses): Guard 98, Army 521
Invested production: 1504
Wars continued:
Ramesses
Eliminated
Cities lost:
Heliopolis
Lost power from casualties: Guard 85, Army 107, Cavalry 108
Net power gain (build-up minus losses): Guard 16, Army -171,
Cavalry -89
Invested production: 88
Wars continued:
Zara Yaq
Negative utility from Loathing, Pre-emptive War and Kingmaking because conquering
Heliopolis makes me a stronger adversary. Moreover, Ramesses is a trade partner of
Charlemagne. The only upside of peace is that my ill will toward Charlemagne is
reduced; we might, in the medium term, cooperate again.
The total utility of the war plan is computed by subtracting the utility of peace from the
utility of war. Obviously, Charlemagne isn’t seeking peace, and I’d have to pay him so
much that no peace deal is even possible; he refuses to talk.
While I did not actually come close to losing cities to Charlemagne, the war forced
me to train additional units and pay Ramesses 40 gold for a temporary peace. The
main misjudgment of the AI was that I’d continue to not train units. By now, I’ve made
a change to address this: The AI assumes increased human build-up while at war,
even if the power curve suggests otherwise.