Jump to content

AI and other notes


Recommended Posts

Some notes on the AI and how it could potentially be improved. I know it is easier said than done:

1 - The AI does not appear to consider entrenchment bonuses and does a lot of unnecessary moving. For example, it bumps a garrison unit and replaces it. I would suggest it keep the garrison unit so as to preserve the entrenchment.

2 - The AI does too much SR - does it get that for free or does it pay? Even so, it does so when it could move normally, and this lowers morale. It also tends to do so right in front of enemy units, which makes it easier to kill the recently SR'd units. Suggest that except for a city or fortification, it does not SR adjacent to any enemy unit. In fact, an argument could be made that no one should be able to do so.

3 - Air Units - it does some bizarre things. One I think it should never do is repair when adjacent to enemy ground units. Instead it should redeploy or move out of the way. This will prevent easy air kills by the human player and it also feels absurd when the AI does this. It also moves in bizarre locations it has no need to.

4 - The AI does not seem to upgrade units enough. Also, does anyone know if it buys units at full tech always, or sometimes, or some combination? It does seem to buy rebuilds that way, which is smart, but not sure about new units. What if it can afford none, some, or all upgrades, what does it choose?

5 - an AI script mod for "unbumpable do or die" garrison might be nice

Some other game notes:

1) - We should NOT be able to see "potential tech" only ACTUAL. So if I right click a russian I should not be able to see say Infantry tech 0 (2) - just the 0

2) Is the script for a decision w/friendly positions an and or an or script? The reason I ask is my Ukraine script went but one position was not there but was a fortress - it appeared to work as an "and" for cities but NOT for the fortrerss. Is this correct or a potential bug?

3) Another bug appears to be I can see units exiting a loop.

Oh - I have a screenshot but nothing seems to be able to fit here as 19k is too small even as a jpg. In any case the USA made an amphibious in a lake where you cannot leave - no idea why

Link to comment
Share on other sites

Good thoughts.

Re #1 & #5. More important than entrenchment, AI should garrison major capitals with army or tank units, not corps. But yes, once placed, leave them.

Re #2. Increasing operational movement cost tends to decrease unnecessary AI moves. I've done this with my A3R mod and it seems a little better.

Re #3. Agreed, AI air unit redeployments could use some attention. I've provided comments to Hubert over the past year about this. In offensive situations, air units should advance to about 1/3 range from front and provide priority support to scripted and/or generic land offensive objectives. In defensive situations, air units should retreat to about 2/3 range from the front and provide intercept support.

I'll add a #6 regarding transports and amphibious transports. If only a single unit is scripted, the priority should be a corps. For multiple units, then include army and tank units. Too often I watch high value tank units sent off on low priority missions like invading Denmark and Norway. Problem with Norway is once there, they stay as garrison, so it's a waste to have a tank sit out the game like that.

Link to comment
Share on other sites

Nupremal, pzgndr, feel free to move this to the Beta forum as I think it would be more appropriate to discuss these items there.

That being said, if you can attach specific turns where you can point out precise behaviour of the AI that you would like improved that is always helpful, i.e. unit x does y but should do z etc. helps me to better understand the issue as I can not only watch the turn but also review it line by line in my code via my development environment.

Alternatively there is not much I can really do with any efficiency as I can only guess what the actual issues might be as you've described above.

Link to comment
Share on other sites

3) Another bug appears to be I can see units exiting a loop.

This one I can help you with as I saw the same thing.

Do not set delay to '0'

Set it to '1'

Set #FAILED_DELAY= 2

I coppied the stock loop scripts into my mod and could see enemy units when they exit the loop on a few of the loops but not others. When I compared the scripts that was the difference.

Someone official should check the stock loop scripts for this issue.

Oklahoma City --> Denver was one of them for all countries.

{

#NAME= (UK) Oklahoma To Denver

#POPUP= Unit(s) Continue To Denver

#IMAGE=

#SOUND=

#FLAG= 1

#TYPE= 2

#AI= 0

#LEVEL= 0

#GV= 1[1,100]

#LINK= 0[0]

#COUNTRY_ID= 1

#TRIGGER= 100

#FRIENDLY_POSITION=

#DELAY= 0

#FAILED_DELAY= 1

#START_POSITION= 1,22

#START_POSITION= 1,21

#START_POSITION= 2,22

#FINISH_POSITION= 254,22

}

That is from the 39 scenario.

Should be:

#Delay= 1

#Failed Delay= 2

Link to comment
Share on other sites

The failed delay setting likely does not make a difference as I've looked at the code and even tried a few sample tests of this behaviour all without any luck repeating it. If anyone has a saved turn where this is repeatable with a description of where it happens that would be great and I'll try and track it down.

Link to comment
Share on other sites

×
×
  • Create New...