View Single Post
Old 03-11-2014, 04:30 AM   #3
Vanshilar
Abandonia nerd

 
Join Date: Mar 2009
Location: Los Angeles, United States
Posts: 81
Default

This post is about the bonuses that the AI gets at different difficulties.

The data is stored in DIFF.DAT. There are 6 two-byte values for each difficulty, stored in little-endian (smallest units first) form. The values are:

* Percentage bonus to starting ship points
* Unknown
* Worth in notches for that AI level (how much your ranking changes based on outcome of battle)
* Culture bonus per turn
* Tech bonus per turn
* Resources bonus per turn

For starting ship points, if it's a battle with no special start, then that percentage bonus is applied to the AI's starting ship points. If it's a battle using historical start or a campaign, then roughly 7/8 of the percentage bonus is applied (there are some off-by-1 rounding differences from just taking 7/8 of the percentage bonus). So those are slightly easier at the higher difficulties and slightly harder at the lower difficulties compared to a battle with no special start. In either case, 40 points is then added on top of this. I suppose the 40 points is to roughly offset the benefit of the free flagship.

I don't know what the unknown variable does. It's somewhat strange because it's 0 for the lowest difficulties, then goes up to 20 at difficulty 4, and decreases from there.

For the culture, tech, and resource bonuses, those are applied on top of whatever the computer naturally gets from cities. Strategically, this bonus is more significant in the early stages, when both sides are still trying to get established.

Based on the numbers, it seems like AI difficulty 9 is the "fairest"; the AI doesn't get any penalties nor bonuses at this difficulty (other than the 40 starting points bonus).

I have no idea if the AI actually changes its strategies based on difficulty, or if the same strategies are used regardless of difficulty and the difficulties only affect the bonuses that the AI gets.

The data from DIFF.DAT is below:

Code:
  1   2   3   4   5   6   7  8  9 10 11 12 13 14 15 16 17 18 19 20 21  AI difficulty
-40 -35 -30 -25 -20 -15 -10 -5  0  7 15 22 30 37 45 52 60 67 75 82 90  Starting points % bonus
  0   0   0  20  20  20  20 20 15 10 10 10 10  5  5  5  5  5  5  5  5  Unknown
  1   1   1   2   2   2   3  3  3  4  5  6  7  8  9 10 11 12 13 14 15  Worth in notches
  0   0   0   0   0   0   0  0  0  0  1  2  3  4  5  6  7  8  9 10 11  Bonus culture points per turn
  0   0   0   0   0   0   0  0  0  0  0  1  1  1  2  2  2  3  3  3  4  Bonus tech points per turn
  0   0   0   0   0   0   0  0  0  1  1  2  2  3  3  4  4  5  5  6  6  Bonus resource points per turn
Tested starting points values are below:

Code:
  1   5   9  13  17  21  AI difficulty
-40 -20   0  30  60  90  Starting points % bonus
 85                 182  Battle 75 points (no special start)
160                 420  Battle 200 points (no special start)
265 340             752  Battle 375 points (no special start)
137 164 190 229 268 308  Battle 150 points (historical start)
170                 398  Campaign 200 points
202 247 290 355 420 487  Battle 250 points (historical start)
267 330             666  Battle 350 points (historical start)
378                 970  Campaign 520 points
Oh. I also found a bug that allows you to see where the computer units are even if you're not supposed to see them:

spoiler

Last edited by Vanshilar; 03-11-2014 at 06:42 AM.
Vanshilar is offline                         Send a private message to Vanshilar
Reply With Quote