• We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.

Pang Bingxun

Field Marshal
2 Badges
Nov 22, 2011
5.596
185
  • Arsenal of Democracy
  • 500k Club
There are situations where AI adds Infra to the building queue. Provinces with many resources are prefered. This is even true if Infra is already at 200%. I have just seen this at a large scale.
 
Upvote 0
Yup, the AI seems to be able to ignore some of the checks imposed on the player. Nuclear reactors are another example. As soon as it can build them and decides to do so, it can build them up to level 10, even if the current tech wouldn't allow it for a human. And the AI doesn't wait for secret weapon events, and won't even check the conditions for these events before going for the tech itself. You can easily check this if you add additional prerequisites to the event, but not to the tech itself.

If this isn't the cause of the problem, it might be similar to some Infra builds ending at 195% for the player. That one is very probably an example of "floats are never equal". If you compare floating point numbers, you'll always have to add a margin of error to account for rounding errors by the CPU. These errors are not even consistent or repeatable. You can have the same piece of code evaluating to different binary values on the same machine, depending on what operations happen in between and how much free space you currently have in the processor cache.
 
I experienced something similar with forts. Setting AI for Germany to build "Westwall" with lvl 4 forts caused it to built forts with average 4 value, but it was often like 4-3-5 or 4-4-5 (i set it only for 3 provs). I think, it was more likely to happen, when used [border] command as location instead of specific provinces.
 
I've also seen the AI try and build infra in a province with 200 infra.