yairm210 / Unciv

Open-source Android/Desktop remake of Civ V
Mozilla Public License 2.0
8.5k stars 1.58k forks source link

AI (Deity?) wins mostly on scientific victory in recent patches (with data) #12407

Open PathosEthosLogos opened 4 days ago

PathosEthosLogos commented 4 days ago

Is there an existing issue for this?

Game Version

4.14

Describe the bug

I have been running Deity AI simulations -- previous reddit post (data provided for back then): https://old.reddit.com/r/Unciv/comments/1at4tvo/unciv_gk_deity_ai_tierlist_for_landbased_world (don't worry, Korea is no longer OP anymore -- as matter of fact, they're extremely weak now)

   version   win victory        n
   <chr>   <dbl> <chr>      <int>
 1 4.10.9      1 diplomatic    15
 2 4.10.9      1 domination    23
 3 4.10.9      1 scientific     9
 4 4.10.9      1 time           2
 5 4.12.9      1 cultural       8
 6 4.12.9      1 diplomatic    20
 7 4.12.9      1 domination     2
 8 4.12.9      1 scientific    22
 9 4.12.9      1 time           1
10 4.14.1      1 diplomatic     1
11 4.14.1      1 domination     6
12 4.14.1      1 scientific    44

Before, at least two victory paths were viable avenues for the AI to win, but now, well over 80% of the AI wins are scientific victories.

Furthermore, it seems that there was some kind of research boost/buff somewhere that allowed the AIs to win much faster. In version 4.10.9, the mean turns to win was 292 turns. In 4.14.1, it is 192 turns. (I set the max number of turns to 350, 300 recently, in the game settings)

  version   min   max  mean median
  <chr>   <dbl> <dbl> <dbl>  <dbl>
1 4.10.9    213   350  292.   302.
2 4.12.9    197   350  245.   242 
3 4.14.1    175   219  192.   190.

Not only that, it seems that Korea does not seem to pursue scientific victory for some reason. I also see other holes in civ AIs in general for defending themselves, but maybe that's a discussion for another time.

Steps to Reproduce

  1. Start a game with 4 AIs in a medium (20) size map
  2. Fully automate run the game
  3. Record the wins/losses/etc.

Screenshots

image

Link to save file

No response

Operating System

Windows

Additional Information

No response

yairm210 commented 4 days ago

What I'm getting from 2-player is that domination is the common case


SimulationCiv1:
100% total win rate 
Scientific: 0%    Cultural: 0%    Domination: 100%    Diplomatic: 0%    Time: 0%    

Average speed: 16.6 turns/s 
Average game duration: 18.367s
Total time: 18.367s

SimulationCiv2 won Domination victory on turn 135
Simulation step (2/400)

SimulationCiv1:
50% total win rate 
Scientific: 0%    Cultural: 0%    Domination: 100%    Diplomatic: 0%    Time: 0%    

SimulationCiv2:
50% total win rate 
Scientific: 0%    Cultural: 0%    Domination: 100%    Diplomatic: 0%    Time: 0%    

Average speed: 22.8 turns/s 
Average game duration: 9.947s
Total time: 19.894s

SimulationCiv2 won Domination victory on turn 272
Simulation step (3/400)

SimulationCiv1:
33% total win rate 
Scientific: 0%    Cultural: 0%    Domination: 100%    Diplomatic: 0%    Time: 0%    

SimulationCiv2:
66% total win rate 
Scientific: 0%    Cultural: 0%    Domination: 100%    Diplomatic: 0%    Time: 0%    

Average speed: 23.5 turns/s 
Average game duration: 10.245333333s
Total time: 30.736s

SimulationCiv2 won Domination victory on turn 212
Simulation step (4/400)

SimulationCiv1:
25% total win rate 
Scientific: 0%    Cultural: 0%    Domination: 100%    Diplomatic: 0%    Time: 0%    

SimulationCiv2:
75% total win rate 
Scientific: 0%    Cultural: 0%    Domination: 100%    Diplomatic: 0%    Time: 0%    

Average speed: 26.2 turns/s 
Average game duration: 8.845250s
Total time: 35.381s

SimulationCiv2 won Domination victory on turn 250
Simulation step (5/400)

SimulationCiv1:
20% total win rate 
Scientific: 0%    Cultural: 0%    Domination: 100%    Diplomatic: 0%    Time: 0%    

SimulationCiv2:
80% total win rate 
Scientific: 0%    Cultural: 0%    Domination: 100%    Diplomatic: 0%    Time: 0%    

Average speed: 26.5 turns/s 
Average game duration: 8.817200s
Total time: 44.086s

SimulationCiv2 won Domination victory on turn 225
Simulation step (6/400)

SimulationCiv1:
16% total win rate 
Scientific: 0%    Cultural: 0%    Domination: 100%    Diplomatic: 0%    Time: 0%    

SimulationCiv2:
83% total win rate 
Scientific: 0%    Cultural: 0%    Domination: 100%    Diplomatic: 0%    Time: 0%    

Average speed: 28.4 turns/s 
Average game duration: 8.251500s
Total time: 49.509s

SimulationCiv1 won Domination victory on turn 212
Simulation step (7/400)

SimulationCiv1:
28% total win rate 
Scientific: 0%    Cultural: 0%    Domination: 100%    Diplomatic: 0%    Time: 0%    

SimulationCiv2:
71% total win rate 
Scientific: 0%    Cultural: 0%    Domination: 100%    Diplomatic: 0%    Time: 0%    

Average speed: 29.7 turns/s 
Average game duration: 7.785142857s
Total time: 54.496s

SimulationCiv2 won Scientific victory on turn 258
Simulation step (8/400)

SimulationCiv1:
25% total win rate 
Scientific: 0%    Cultural: 0%    Domination: 100%    Diplomatic: 0%    Time: 0%    

SimulationCiv2:
75% total win rate 
Scientific: 16%    Cultural: 0%    Domination: 83%    Diplomatic: 0%    Time: 0%    

Average speed: 30.0 turns/s 
Average game duration: 7.831750s
Total time: 1m 2.654s

SimulationCiv1 won Domination victory on turn 260
Simulation step (9/400)

SimulationCiv1:
33% total win rate 
Scientific: 0%    Cultural: 0%    Domination: 100%    Diplomatic: 0%    Time: 0%    

SimulationCiv2:
66% total win rate 
Scientific: 16%    Cultural: 0%    Domination: 83%    Diplomatic: 0%    Time: 0%    

Average speed: 29.5 turns/s 
Average game duration: 8.062111111s
Total time: 1m 12.559s

SimulationCiv2 won Diplomatic victory on turn 318
Simulation step (10/400)

SimulationCiv1:
30% total win rate 
Scientific: 0%    Cultural: 0%    Domination: 100%    Diplomatic: 0%    Time: 0%    

SimulationCiv2:
70% total win rate 
Scientific: 14%    Cultural: 0%    Domination: 71%    Diplomatic: 14%    Time: 0%    

Average speed: 27.7 turns/s 
Average game duration: 8.870300s
Total time: 1m 28.703s

SimulationCiv1 won Domination victory on turn 249
Simulation step (11/400)

SimulationCiv1:
36% total win rate 
Scientific: 0%    Cultural: 0%    Domination: 100%    Diplomatic: 0%    Time: 0%    

SimulationCiv2:
63% total win rate 
Scientific: 14%    Cultural: 0%    Domination: 71%    Diplomatic: 14%    Time: 0%    

Average speed: 28.0 turns/s 
Average game duration: 8.780090909s
Total time: 1m 36.581s

SimulationCiv2 won Domination victory on turn 265
Simulation step (12/400)

SimulationCiv1:
33% total win rate 
Scientific: 0%    Cultural: 0%    Domination: 100%    Diplomatic: 0%    Time: 0%    

SimulationCiv2:
66% total win rate 
Scientific: 12%    Cultural: 0%    Domination: 75%    Diplomatic: 12%    Time: 0%    

Average speed: 27.9 turns/s 
Average game duration: 8.882083333s
Total time: 1m 46.585s

SimulationCiv1 won Domination victory on turn 214
Simulation step (13/400)

SimulationCiv1:
38% total win rate 
Scientific: 0%    Cultural: 0%    Domination: 100%    Diplomatic: 0%    Time: 0%    

SimulationCiv2:
61% total win rate 
Scientific: 12%    Cultural: 0%    Domination: 75%    Diplomatic: 12%    Time: 0%    

Average speed: 28.3 turns/s 
Average game duration: 8.628307692s
Total time: 1m 52.168s

SimulationCiv2 won Domination victory on turn 227
Simulation step (14/400)

SimulationCiv1:
35% total win rate 
Scientific: 0%    Cultural: 0%    Domination: 100%    Diplomatic: 0%    Time: 0%    

SimulationCiv2:
64% total win rate 
Scientific: 11%    Cultural: 0%    Domination: 77%    Diplomatic: 11%    Time: 0%    

Average speed: 29.0 turns/s 
Average game duration: 8.357500s
Total time: 1m 57.005s

SimulationCiv1 won Scientific victory on turn 290
Simulation step (15/400)

SimulationCiv1:
40% total win rate 
Scientific: 16%    Cultural: 0%    Domination: 83%    Diplomatic: 0%    Time: 0%    

SimulationCiv2:
60% total win rate 
Scientific: 11%    Cultural: 0%    Domination: 77%    Diplomatic: 11%    Time: 0%    

Average speed: 28.1 turns/s 
Average game duration: 8.762533333s
Total time: 2m 11.438s

SimulationCiv1 won Scientific victory on turn 289
Simulation step (16/400)

SimulationCiv1:
43% total win rate 
Scientific: 28%    Cultural: 0%    Domination: 71%    Diplomatic: 0%    Time: 0%    

SimulationCiv2:
56% total win rate 
Scientific: 11%    Cultural: 0%    Domination: 77%    Diplomatic: 11%    Time: 0%    

Average speed: 27.4 turns/s 
Average game duration: 9.064312500s
Total time: 2m 25.029s

SimulationCiv1 won Domination victory on turn 231
Simulation step (17/400)

SimulationCiv1:
47% total win rate 
Scientific: 25%    Cultural: 0%    Domination: 75%    Diplomatic: 0%    Time: 0%    

SimulationCiv2:
52% total win rate 
Scientific: 11%    Cultural: 0%    Domination: 77%    Diplomatic: 11%    Time: 0%    

Average speed: 28.0 turns/s 
Average game duration: 8.872588235s
Total time: 2m 30.834s
yairm210 commented 4 days ago

I do see that when increased to 4-player, the dominant path seems to be Scientific, with Korea yes taking the scientific path:

Starting new game with major civs: SimulationCiv1, SimulationCiv2, Korea, Babylon and minor civs: 
Babylon won Scientific victory on turn 300
Simulation step (1/400)

Babylon:
100% total win rate 
Scientific: 100%    Cultural: 0%    Domination: 0%    Diplomatic: 0%    Time: 0%    

Average speed: 16.7 turns/s 
Average game duration: 18.839s
Total time: 18.839s

SimulationCiv2 won Scientific victory on turn 271
Simulation step (2/400)

SimulationCiv2:
50% total win rate 
Scientific: 100%    Cultural: 0%    Domination: 0%    Diplomatic: 0%    Time: 0%    

Babylon:
50% total win rate 
Scientific: 100%    Cultural: 0%    Domination: 0%    Diplomatic: 0%    Time: 0%    

Average speed: 17.8 turns/s 
Average game duration: 16.447500s
Total time: 32.895s

Babylon won Scientific victory on turn 278
Simulation step (3/400)

SimulationCiv2:
33% total win rate 
Scientific: 100%    Cultural: 0%    Domination: 0%    Diplomatic: 0%    Time: 0%    

Babylon:
66% total win rate 
Scientific: 100%    Cultural: 0%    Domination: 0%    Diplomatic: 0%    Time: 0%    

Average speed: 18.9 turns/s 
Average game duration: 15.29s
Total time: 45.87s

Korea won Scientific victory on turn 298
Simulation step (4/400)

SimulationCiv2:
25% total win rate 
Scientific: 100%    Cultural: 0%    Domination: 0%    Diplomatic: 0%    Time: 0%    

Korea:
25% total win rate 
Scientific: 100%    Cultural: 0%    Domination: 0%    Diplomatic: 0%    Time: 0%    

Babylon:
50% total win rate 
Scientific: 100%    Cultural: 0%    Domination: 0%    Diplomatic: 0%    Time: 0%    

Average speed: 18.8 turns/s 
Average game duration: 15.359250s
Total time: 1m 1.437s

Korea won Scientific victory on turn 271
Simulation step (5/400)

SimulationCiv2:
20% total win rate 
Scientific: 100%    Cultural: 0%    Domination: 0%    Diplomatic: 0%    Time: 0%    

Korea:
40% total win rate 
Scientific: 100%    Cultural: 0%    Domination: 0%    Diplomatic: 0%    Time: 0%    

Babylon:
40% total win rate 
Scientific: 100%    Cultural: 0%    Domination: 0%    Diplomatic: 0%    Time: 0%    

Average speed: 18.9 turns/s 
Average game duration: 15.115600s
Total time: 1m 15.578s

Babylon won Scientific victory on turn 287
Simulation step (6/400)

SimulationCiv2:
16% total win rate 
Scientific: 100%    Cultural: 0%    Domination: 0%    Diplomatic: 0%    Time: 0%    

Korea:
33% total win rate 
Scientific: 100%    Cultural: 0%    Domination: 0%    Diplomatic: 0%    Time: 0%    

Babylon:
50% total win rate 
Scientific: 100%    Cultural: 0%    Domination: 0%    Diplomatic: 0%    Time: 0%    

Average speed: 19.4 turns/s 
Average game duration: 14.770166666s
Total time: 1m 28.621s

Babylon won Scientific victory on turn 315
Simulation step (7/400)

SimulationCiv2:
14% total win rate 
Scientific: 100%    Cultural: 0%    Domination: 0%    Diplomatic: 0%    Time: 0%    

Korea:
28% total win rate 
Scientific: 100%    Cultural: 0%    Domination: 0%    Diplomatic: 0%    Time: 0%    

Babylon:
57% total win rate 
Scientific: 100%    Cultural: 0%    Domination: 0%    Diplomatic: 0%    Time: 0%    

Average speed: 19.4 turns/s 
Average game duration: 14.949428571s
Total time: 1m 44.646s

Babylon won Scientific victory on turn 287
Simulation step (8/400)

SimulationCiv2:
12% total win rate 
Scientific: 100%    Cultural: 0%    Domination: 0%    Diplomatic: 0%    Time: 0%    

Korea:
25% total win rate 
Scientific: 100%    Cultural: 0%    Domination: 0%    Diplomatic: 0%    Time: 0%    

Babylon:
62% total win rate 
Scientific: 100%    Cultural: 0%    Domination: 0%    Diplomatic: 0%    Time: 0%    

Average speed: 19.4 turns/s 
Average game duration: 14.988625s
Total time: 1m 59.909s

Babylon won Scientific victory on turn 297
Simulation step (9/400)

SimulationCiv2:
11% total win rate 
Scientific: 100%    Cultural: 0%    Domination: 0%    Diplomatic: 0%    Time: 0%    

Korea:
22% total win rate 
Scientific: 100%    Cultural: 0%    Domination: 0%    Diplomatic: 0%    Time: 0%    

Babylon:
66% total win rate 
Scientific: 100%    Cultural: 0%    Domination: 0%    Diplomatic: 0%    Time: 0%    

Average speed: 19.6 turns/s 
Average game duration: 14.853333333s
Total time: 2m 13.68s

SimulationCiv1 won Domination victory on turn 259
Simulation step (10/400)

SimulationCiv1:
10% total win rate 
Scientific: 0%    Cultural: 0%    Domination: 100%    Diplomatic: 0%    Time: 0%    

SimulationCiv2:
10% total win rate 
Scientific: 100%    Cultural: 0%    Domination: 0%    Diplomatic: 0%    Time: 0%    

Korea:
20% total win rate 
Scientific: 100%    Cultural: 0%    Domination: 0%    Diplomatic: 0%    Time: 0%    

Babylon:
60% total win rate 
Scientific: 100%    Cultural: 0%    Domination: 0%    Diplomatic: 0%    Time: 0%    

Average speed: 19.7 turns/s 
Average game duration: 14.557500s
Total time: 2m 25.575s

SimulationCiv1 won Scientific victory on turn 293
Simulation step (11/400)

SimulationCiv1:
18% total win rate 
Scientific: 50%    Cultural: 0%    Domination: 50%    Diplomatic: 0%    Time: 0%    

SimulationCiv2:
9% total win rate 
Scientific: 100%    Cultural: 0%    Domination: 0%    Diplomatic: 0%    Time: 0%    

Korea:
18% total win rate 
Scientific: 100%    Cultural: 0%    Domination: 0%    Diplomatic: 0%    Time: 0%    

Babylon:
54% total win rate 
Scientific: 100%    Cultural: 0%    Domination: 0%    Diplomatic: 0%    Time: 0%    

Average speed: 19.8 turns/s 
Average game duration: 14.502454545s
Total time: 2m 39.527s

SimulationCiv1 won Domination victory on turn 300
Simulation step (12/400)

SimulationCiv1:
25% total win rate 
Scientific: 33%    Cultural: 0%    Domination: 66%    Diplomatic: 0%    Time: 0%    

SimulationCiv2:
8% total win rate 
Scientific: 100%    Cultural: 0%    Domination: 0%    Diplomatic: 0%    Time: 0%    

Korea:
16% total win rate 
Scientific: 100%    Cultural: 0%    Domination: 0%    Diplomatic: 0%    Time: 0%    

Babylon:
50% total win rate 
Scientific: 100%    Cultural: 0%    Domination: 0%    Diplomatic: 0%    Time: 0%    

Average speed: 20.0 turns/s 
Average game duration: 14.454750s
Total time: 2m 53.457s

SimulationCiv2 won Domination victory on turn 294
Simulation step (13/400)

SimulationCiv1:
23% total win rate 
Scientific: 33%    Cultural: 0%    Domination: 66%    Diplomatic: 0%    Time: 0%    

SimulationCiv2:
15% total win rate 
Scientific: 50%    Cultural: 0%    Domination: 50%    Diplomatic: 0%    Time: 0%    

Korea:
15% total win rate 
Scientific: 100%    Cultural: 0%    Domination: 0%    Diplomatic: 0%    Time: 0%    

Babylon:
46% total win rate 
Scientific: 100%    Cultural: 0%    Domination: 0%    Diplomatic: 0%    Time: 0%    

Average speed: 20.1 turns/s 
Average game duration: 14.455769230s
Total time: 3m 7.925s

Korea won Scientific victory on turn 290
Simulation step (14/400)

SimulationCiv1:
21% total win rate 
Scientific: 33%    Cultural: 0%    Domination: 66%    Diplomatic: 0%    Time: 0%    

SimulationCiv2:
14% total win rate 
Scientific: 50%    Cultural: 0%    Domination: 50%    Diplomatic: 0%    Time: 0%    

Korea:
21% total win rate 
Scientific: 100%    Cultural: 0%    Domination: 0%    Diplomatic: 0%    Time: 0%    

Babylon:
42% total win rate 
Scientific: 100%    Cultural: 0%    Domination: 0%    Diplomatic: 0%    Time: 0%    

Average speed: 20.1 turns/s 
Average game duration: 14.425571428s
Total time: 3m 21.958s

SimulationCiv1 won Domination victory on turn 255
Simulation step (15/400)

SimulationCiv1:
26% total win rate 
Scientific: 25%    Cultural: 0%    Domination: 75%    Diplomatic: 0%    Time: 0%    

SimulationCiv2:
13% total win rate 
Scientific: 50%    Cultural: 0%    Domination: 50%    Diplomatic: 0%    Time: 0%    

Korea:
20% total win rate 
Scientific: 100%    Cultural: 0%    Domination: 0%    Diplomatic: 0%    Time: 0%    

Babylon:
40% total win rate 
Scientific: 100%    Cultural: 0%    Domination: 0%    Diplomatic: 0%    Time: 0%    

Average speed: 20.3 turns/s 
Average game duration: 14.171866666s
Total time: 3m 32.578s

SimulationCiv2 won Scientific victory on turn 294
Simulation step (16/400)

SimulationCiv1:
25% total win rate 
Scientific: 25%    Cultural: 0%    Domination: 75%    Diplomatic: 0%    Time: 0%    

SimulationCiv2:
18% total win rate 
Scientific: 66%    Cultural: 0%    Domination: 33%    Diplomatic: 0%    Time: 0%    

Korea:
18% total win rate 
Scientific: 100%    Cultural: 0%    Domination: 0%    Diplomatic: 0%    Time: 0%    

Babylon:
37% total win rate 
Scientific: 100%    Cultural: 0%    Domination: 0%    Diplomatic: 0%    Time: 0%    

Average speed: 20.2 turns/s 
Average game duration: 14.189750s
Total time: 3m 47.036s

SimulationCiv1 won Domination victory on turn 272
Simulation step (17/400)

SimulationCiv1:
29% total win rate 
Scientific: 20%    Cultural: 0%    Domination: 80%    Diplomatic: 0%    Time: 0%    

SimulationCiv2:
17% total win rate 
Scientific: 66%    Cultural: 0%    Domination: 33%    Diplomatic: 0%    Time: 0%    

Korea:
17% total win rate 
Scientific: 100%    Cultural: 0%    Domination: 0%    Diplomatic: 0%    Time: 0%    

Babylon:
35% total win rate 
Scientific: 100%    Cultural: 0%    Domination: 0%    Diplomatic: 0%    Time: 0%    

Average speed: 20.3 turns/s 
Average game duration: 14.111705882s
Total time: 3m 59.899s
yairm210 commented 4 days ago

When I include civs with domination as preferred victory type, things change - but for some reason the Huns absolutely dominate so they skew the data

Suffice to say:

Starting new game with major civs: The Huns, Mongolia, Korea, Babylon and minor civs: 

...

The Huns:
90% total win rate 
Scientific: 50%    Cultural: 0%    Domination: 50%    Diplomatic: 0%    Time: 0%    

Mongolia:
9% total win rate 
Scientific: 0%    Cultural: 0%    Domination: 100%    Diplomatic: 0%    Time: 0%    
yairm210 commented 4 days ago

This seems to hold for other civs as well My take here is that the work we put into making AIs declare war only when they have a lot to gain has paid off and that they're now winning better and smarter (in both meanings) :)

yairm210 commented 4 days ago

Another test with 4 civs:

Starting new game with major civs: England, Siam, Sweden, Ethiopia and minor civs: 
Simulation step (11/400)

Siam:
54% total win rate 
Scientific: 50%    Cultural: 0%    Domination: 50%    Diplomatic: 0%    Time: 0%    

Sweden:
45% total win rate 
Scientific: 40%    Cultural: 0%    Domination: 60%    Diplomatic: 0%    Time: 0%    

Average speed: 18.7 turns/s 
Average game duration: 15.519545454s
Total time: 2m 50.715s
PathosEthosLogos commented 9 hours ago

Domination victory with 2 civs should be the most common, so not a big surprise there.

Otherwise, thanks for the simulation data. How did you run the simulations?

yairm210 commented 6 hours ago

ConsoleLauncher, with some changes for 4 civs - I'll make a change now that will make it easier for others