Code-Based in-Depth Guide to Diplomatic AI

Опубликовано: 15 Апрель 2026
на канале: Data Timelapses
2,295
119

I looked into the game files to better understand the diplo ai, since many players were confused why the ai joins against them in diplomatic plays. With this knowledge, i made this code-based indepth guide to ai behaviour in diplomatic plays for the game victoria 3 (VIC 3) by paradox interactive. With the presented knowledge, players can anticipate if and why an ai country might join a diploplay against them.
There are the following Chapters:

0:00 Motivation
0:23 AI Diplo Strategies
4:32 Neutrality
8:02 Preference - Rational
10:25 Preference - Sympathy
13:09 Attacking Greece

After briefly presenting the common problem of having to fight a great power in a war, i show the influence of different ai diplomacy strategies on the actual behaviour in game. In the next chapter, i show which actions and circumstances the ai considers for staying (or not staying) neutral in the diploplay. I show the weights from the gamefile and explain the meaning behind each factor.

The preference score (whether or not a country will support an other nation in a diploplay) consists of the determinstic rational part and the semi-random part called sympathy by the developers. For both parts, i show and explain everything the ai takes into consideration. I especially showcase with an example, why many players may find the actions of the diplomacy ai confusing. This is because high infamy wars have a lot of impact of the semi-random component. Adding a lot of infamy through war goals makes the random part very important.

In the end, i show with an example by attacking greece how to anticipate the action of the ai ingame.







External Assets:
confused Man by Hermaji setyo on vecteezy: https://www.vecteezy.com/vector-art/1...
angry "exploding" boy by pikisuperstar on Freepik: https://www.freepik.com/free-vector/h...
grumpy soldier by brgfx on Freepik: https://www.freepik.com/free-vector/s...
happy soldier by brgfx on Freepik: https://www.freepik.com/free-vector/h...