Jump to content

Q about AI build/research scripts


Recommended Posts

Just something I noticed, which likely applies to all SC versions. Both help sections have the following comment:

"Research type [unit type purchase] lines are read one line at a time so there is no need to

set a total sum of research purchase percentages equal to 100%, i.e. each line is read and

the % chance of purchasing the research type is based on the % chance assigned to the

particular research type."

Since MPPs are typically limited, wouldn't this mean that the top units/research types would still have a greater chance of getting bought than ones at the bottom, even if the % was the same (or even higher)? Say the AI has 180 MPPs, and during his turn it goes through the appropriate research lines one at a time, rolling for each percentage. Say it gets a hit on "Jets" (third from the top), and spends the 150 MPPs for the chit. Well the rest of the lines no longer matter, even if Jets was set at 20% and something like Production Tech was at 30%, because there's no way to buy the remaining chits without sufficient MPPs, right?

Which means that if Production Tech is always at the bottom (as it seems to be in the several scenarios I've checked) then it will very rarely be bought, unless most everything else has been zeroed out. Which means that techs must be prioritized not only in terms of the %, but also by its position in the list. Thus if you want to make sure that a given country must make PT its #1 priority, you had better put that first, not last (or zero everything else out).

If Hubert or Blashy or someone wants to chime in and confirm or refute my analysis, please do. Or do all of them get rolled, and only then are chits assigned, with the one with the highest percentage getting the first chit, and so on down the line until all MPPs are gone?

Link to comment
Share on other sites

I believe you are correct. It's been awhile since I did scripting but I'm pretty sure that is how it works. The flip side to your argument is that it still is random. One game the first two may get hit many more times than another, while the bottom ones get hit more in another game.

Another thing you can do to help control it better set new research goals more often, like every 6 to 8 months, flipping the order each time and/or increasing the % for the ones you want specifically for that time frame will at least help push the AI down a more specific path.

Link to comment
Share on other sites

×
×
  • Create New...