&&AIREQRESPONSE

What is the world like in 2020? What are the different ways to play? How can I create my own futuristic scenario and country groupings?

Moderators: Balthagor, Legend

User avatar
Ruges
General
Posts: 3408
Joined: Aug 22 2008
Location: Nearby, really I'll see you tonight when your sleeping
Contact:

&&AIREQRESPONSE

Post by Ruges »

This post is about my exsperience with the AIParams file, Specificaly the &&AIREQRESPONSE. The reason I am writing this is so BG, and other moders can learn from what I have learned. First off here is what I have it currently set to:

Code: Select all

&&AIREQRESPONSE
0,2,19,1,2,19,2,2,19,1,1,12,3,2,19,2,1,7,2,1,9,3,1,13
0,1,9,0,0,3,0,0,5,0,1,7,0,1,10,0,1,12,0,1,11,0,1,10
1,0,0,2,0,2,3,1,11,2,0,4,0,1,7,0,0,1,0,0,4,3,0,2
3,0,6,3,1,14,0,0,6,3,1,7,0,1,14,2,1,14,0,0,6,2,0,6
1,1,9,0,1,11,0,1,10,0,1,7,3,1,13,3,1,12,3,1,7,2,1,11
0,1,14,0,0,6,1,0,6,2,1,14,2,0,6,2,2,20,3,1,14,3,0,6
0,2,20,0,2,16,0,1,14,2,2,20,2,2,16,2,1,14,3,2,20,3,2,16
0,2,15,0,2,16,0,2,17,0,2,18,0,2,19,2,2,17,2,2,18,2,2,15
0,0,0,0,0,2,3,0,1,2,1,7,1,1,11,1,0,4,2,0,4,3,0,0
0,0,0,2,0,4,1,1,11,1,0,2,1,0,5,0,1,7,0,0,1,3,0,0
2,0,0,1,0,2,2,0,4,3,0,5,1,1,10,1,0,1,1,0,3,0,1,7
1,1,9,1,1,10,1,1,11,0,2,17,0,2,18,2,1,13,3,1,9,2,1,9
1,0,0,1,0,1,1,0,2,3,0,5,1,1,11,2,0,4,2,1,13,2,0,0
1,0,0,1,0,1,1,0,2,3,0,5,1,1,11,3,0,4,3,1,13,2,0,0
1,0,0,1,0,1,1,0,2,0,1,7,1,1,11,2,0,4,1,1,13,2,0,0
0,0,0,1,0,0,0,0,2,1,0,2,2,0,4,1,1,13,1,1,11,3,0,0
&&END
I have done many tests on the subject. Creating dozens of caches to see what the AI will do. And I have come up with pretty interesting results. Now some of these tests where done in the xtreme. For instance in one build, I made it so the AI would only be able to request subs. This was an attempt to see if the AI would acualy move its subs. In that test the AI never even moved its subs. However it did deploy units, They pretty much just sat around there barracks or airfields or seapears, with the exception of sea transports and Patrol boats. they where still moving around like normal. So with this observation it is safe to say that subs, no mater how you do the request response the AI will not use them. They are broken. Must be somwhere else. I also did the same test with stratigic bombers, and while they did use em a bit, it was not nearly as much as I would have exspected. So strat bombers trigger should also get looked into.

A couple key points I have discovered in my testing. The first two lines are request for garrision and request for defense. here is what I am noticing with these two things. The AI likes to use them. however it uses them at the wrong locations on the map. It likes todo this at inconsiquential locations on the map. And the thing is once it does these requests on the map these units are locked into that request. This is one of the reason we wind up with units sitting around doing nothing. They are not really doing nothing, they are just stuck in this defense request that was givin. Now this defense request will continue to happen over and over. Going as far as to locking the majority of its units into this defensive stance, leaving no units free to go on the offensive. (you can see this by having fog of war off, all units around a city are greyed out meaning they are being requested todo somthing, the only thng they are doing is digging in and defending).

Now I tried a build with putting no units for the AI to request in these spots, but that seemd to negativly affect other requests. My solution to this was to put units that the AI was not using properly. For instance for the request to garrision, I told it, it should use subs. The AI does not use these units anyways, so it just fills a gap. I did the same for the defensive requests too. Instead of having it request ground forces I told it to request air units. Since an air unit will return to base which then cancel the order for defense which would have locked it into place. Now as you can see becouse of this change, in some situations AI defense is lacking. But by doing this we accomplish two things. One we free up units for offense, And we give jobs to air units which would have otherwise been wasted.

However it is not totaly defensless. Some units still remain in the back on defense as they have not been called to the front lines. AA units still heavily guard cities to prevent Airdrops behind the lines. Also there is a request to respond to cities lost, and territories lost. This is where you really see the heavy battles. one offensive AI will send his units to go on the attack. Once some land is taken, the defending AI will send some units to take that land, city, base... back. So its sort of an active defense now. With the downside being the defender does not have his units dug in. Which causes what would appear tobe defenders loosing more often. Also with more of the defenders units free at the start of the war. there ends up being an initial large battle. as the defender rushes his units to meet the attacking units. The attacker is also usualy the victor here becouse he usualy has the better army. Anouther thing to note Garrison strength has been greatly minimized. I might consider raising them back up a little inlight of this new AI. as they where lowered to the exspectations of previous AI.

Now anouther thing I have noticed. There seems tobe a range on how far away the AI may request units from. This is a huge issue, that cannot be solved with the AIParams file. For instance you will notice that Russia can move deep into europe with its initial wave. But once it starts sending those units back for repair, other units it has are not sent forward, Units that are in central Russia remain there idle. If you look at these units they have no order (they are gold). They are just out of range of any requests. Now I am not sure how this range is calculated (divide the country into quarters, Or X amount of hexes). But it needs tobe adjusted. I would probly need to know how this part acualy works before I could make a suggestion on how it should work. But as countries get larger and larger as they tend todo with these new settings, the AI ends up leaving needed units far off the frontline which it needs.

Anouther side effect I am noticing with these new settings is the AI amphib usage. With all these new free units the AI likes to send them on ampib assualts. The problem with this is it is not doing it properly. Heres what I notice with Russia. They send all there units to the center of the country to that navl pier there. Those units are especting to load into ships to go off somwhere. However Russia ends up having issues getting its transport ships there, so those ground units end up sitting there wasting away. Anouther issue is like with China, China sends a ton of its free units to a sea pier and loads them onto ships and sail them away. Becouse the sea attack request is not working properly, these transport ships end up getting destroyed, with china loosing hundreds of units. The same thing happens to several other countries. I have made sugestions about this in anouther topic.

Idealy the defensive changes I have made should be changed back, and the way the AI decides where to send its requests, and what type of request that should be sent should be changed. This would give it better defensive qualities, and better offensive qualities. Unfortunalty this is not somthing moding can change.

Evenauly i would like to go back in and play more with the requestresponse data, I think a few more changes here, along with a few changes in the orders.csv file will have an even greater impact on how the AI responds, And if the issues I have pointed out above are corrected we could really be looking at an AI that is worthly of a human opponent.
Gonzar
Brigadier Gen.
Posts: 592
Joined: Jul 24 2008
Location: Spain

Re: &&AIREQRESPONSE

Post by Gonzar »

Some time ago i took a look at the Aiparams file, specially regarding the build queue (buildsequence and unit weighting). We discussed it in this thread http://www.bgforums.com/forums/viewtopi ... 48&t=11434
Some of those suggestions were included in the following patch, making the AI take “better” decisions in what and how much to build. Some others, like the request to move the bridge units out of the transport group or to give them some supply, wasn’t included.

After the patch 6 i looked also a bit at the AIREQRESPONSE hoping to see ways to improve the use of some units like aircrafts, artillery/AA or naval units.
My experience was similar to what you describe. In case of war and when there is a common land accesible border, i could see the following reactions:
The AIREQ works well in the first wave of attack if the country wasn’t prior at war (or if it was, war ended over several months ago). You will see a quite good interaction of armor, inf, rec and antitank at the front, supported with air fighters when enemy aircrafts of any class cross the border. However there are several issues:
- AI will not use bombers of any class, except when enemy units come close to an airfield where they are stationed.
- All units move single, if there is a “wave” it is not a problem, but usually naval units will be not enough to build this wave and will come close to the enemy border more or less one by one, getting often obliterated quite easy.
- Subs will never move, even not to defend the coast, i agree with your observation here, no matter how do you change the AIREQ parameters.
- No airborne transport of any unit.

After the first wave AIREQ will continue making their requests depending of the settings, but the problem is: there are usually not enough units to answer this call. That means that after the first wave all units that are not destroyed are back at barracks or airfields to repair. Those repairings provoke that single units or small group of units, as soon as they are again deployed, are suddenly call through AIREQ to the front. They react as always one by one, but this time there are not enough of them to make a wave. The result is that they are unable to defeat the garrison stacks. Now a very long lasting phase begins where these units get damage and go back to repair while other single or small groups advance towards the front. They also get damaged and repeat. This provoke both the stagnation of fronts and the garrison stacks that lose their place in the cities/facilities and begin to accumulate nearby.

In the view of the player it is even worse in large countries, because of the through the game engine (i guess) limited range of their requests. I agree with your observation that some range away from the front, units will sit idle and won’t react to the front calls. Only when the front advance towards them they could suddenly be in range of those AIREQs and than answer in form of a new mini-wave.

Here comes the problem of balance. I can guess why the devs set this range: to avoid that all units concentrate on one front, leaving the rest of the land free to counterattacks from the player (recently also from the AI: amphibious invasions) or from war declarations from another border-countries far away from the actual front. As i said, i can understand why there is a max range set, but the actual solution handicaps the AI also in other ways: it never uses all its forces to defeat an enemy. A big mistake against human players. Against other Ais it provokes often “frozen wars” or that superpowers can’t conquer small countries because they are engage in several fronts.

Well, this post is getting very large. I will stop here for now. As conclusion to my test with patch 6: i haven’t seen a way to better the warfare capacity from the AI changing the AIREQ because there are several design aspects that we can not mod:
- Units answer AIREQ single
- The AIREQ happens continuisly, there is not the option to for example “wait till a X number of land units are able to answer the call so they form a wave”
- AIREQ in wartime has a hardcoded range counting from the front lines where units will answer the call, outside from it nothing happens.
- Some units are neglected (bombers, recon, subs, bridge)

There is only one aspect i see we could improve via Aiparams and that is the number of INF and AT units that are used to guard or defend cities. For example, as you already said, using air units. But i haven’t tested it yet using other land or air unit classes.

Also i find interesting your observation about higher call for amphibious invasion if there are many “free” infantry units. This would be good for some countries and bad for others, like Rusia you mention, mainly depending on geographic issues i guess. Not sure how it works that one city is use to gather the amphibious invasion forces, but maybe changing the boarding place of those units this could be worked around. Through with no basic navy AI at place (like now), more AI amphibious invasion fleets would make no difference towards the human player, just more units sunk.
Hullu Hevonen
General
Posts: 3604
Joined: Dec 11 2008
Location: Turunmaa/Turunseutu, Suomi
Contact:

Re: &&AIREQRESPONSE

Post by Hullu Hevonen »

Gonzar wrote:Some time ago i took a look at the Aiparams file,...
Much to read! I'll read and maybe pose questions tomorrow or when I have time. I have also started small experimenting with this file on my own, though I have problems understanding what I am really changing and what effects it has. Still learning, hope your threads will help :-)

[Edit by moderator: Quote size reduced]
Happy Linux user!
Links: List of Mods
GIJoe597
Board Admin
Posts: 2918
Joined: Sep 29 2008
Human: Yes
Contact:

Re: &&AIREQRESPONSE

Post by GIJoe597 »

May I make a request Hulla? Do you really need to qoute a post made just before you respond to it? I think its clear what you are communicating and it just clutters up the view.
https://www.youtube.com/user/GIJoe597


Older/retired gamers, who do not tolerate foolishness.
http://steamcommunity.com/groups/USARG
User avatar
Balthagor
Supreme Ruler
Posts: 22106
Joined: Jun 04 2002
Human: Yes
Location: BattleGoat Studios

Re: &&AIREQRESPONSE

Post by Balthagor »

I'll fix it...
Chris Latour
BattleGoat Studios
chris@battlegoat.com
Hullu Hevonen
General
Posts: 3604
Joined: Dec 11 2008
Location: Turunmaa/Turunseutu, Suomi
Contact:

Re: &&AIREQRESPONSE

Post by Hullu Hevonen »

ou, that wasn't the meaning to clutter
EDIT: do you have to recache after editing these values
Happy Linux user!
Links: List of Mods
User avatar
Ruges
General
Posts: 3408
Joined: Aug 22 2008
Location: Nearby, really I'll see you tonight when your sleeping
Contact:

Re: &&AIREQRESPONSE

Post by Ruges »

Hullu Hevonen wrote: EDIT: do you have to recache after editing these values
It does not get baked into the cache. So I dont think you need to redo the cache. I only found this out after I did a bunch of my testing. Which pretty much means you can fiddle with the as much as you like and not have todo a cache. I would be suprized if you could start a saved game and use a new AIParams file.
User avatar
Balthagor
Supreme Ruler
Posts: 22106
Joined: Jun 04 2002
Human: Yes
Location: BattleGoat Studios

Re: &&AIREQRESPONSE

Post by Balthagor »

Ruges wrote:...I would be suprized if you could start a saved game and use a new AIParams file.
AFAIK you can. In fact, you must. There is only one AIParams file and it is looked at by the AI for decisions, that's why it's in the INI folder. You'd have to test to be sure, but it is "map independent" IIRC.
Chris Latour
BattleGoat Studios
chris@battlegoat.com
User avatar
Mesenion
Corporal
Posts: 6
Joined: Nov 14 2008
Location: Sunny Russia

Re: &&AIREQRESPONSE

Post by Mesenion »

Ruges wrote:There seems tobe a range on how far away the AI may request units from. This is a huge issue, that cannot be solved with the AIParams file. For instance you will notice that Russia can move deep into europe with its initial wave. But once it starts sending those units back for repair, other units it has are not sent forward, Units that are in central Russia remain there idle.
Balthagor, can you explain how exactly this range is calculated?
kill all humans
User avatar
Balthagor
Supreme Ruler
Posts: 22106
Joined: Jun 04 2002
Human: Yes
Location: BattleGoat Studios

Re: &&AIREQRESPONSE

Post by Balthagor »

I haven't the foggiest idea...
Chris Latour
BattleGoat Studios
chris@battlegoat.com
tonystowe
Colonel
Posts: 462
Joined: Apr 10 2006
Location: Tennessee

Re: &&AIREQRESPONSE

Post by tonystowe »

I have been looking at these files, but I am truly lost and do not understand the meaning those files. Care to elaborate on some of the information for those of us outside of the programming loop?

Thanks

Tony
User avatar
Balthagor
Supreme Ruler
Posts: 22106
Joined: Jun 04 2002
Human: Yes
Location: BattleGoat Studios

Re: &&AIREQRESPONSE

Post by Balthagor »

As I am also "outside the programming loop", I'm left to wonder if that is addressed to me? 8_
Chris Latour
BattleGoat Studios
chris@battlegoat.com
User avatar
Ruges
General
Posts: 3408
Joined: Aug 22 2008
Location: Nearby, really I'll see you tonight when your sleeping
Contact:

Re: &&AIREQRESPONSE

Post by Ruges »

tonystowe wrote:I have been looking at these files, but I am truly lost and do not understand the meaning those files. Care to elaborate on some of the information for those of us outside of the programming loop?

Thanks

Tony
The info you seek is already located in the file, on the forums and on the wiki. In pretty good detail too, broken down and made examples of.
User avatar
George Geczy
General
Posts: 2688
Joined: Jun 04 2002
Location: BattleGoat Studios
Contact:

Re: &&AIREQRESPONSE

Post by George Geczy »

I've just started to review Ruge's AIPARAMS work to borrow some of it for Update 7, and so I thought I would make a few notes here...

First of all, the issue with subs not responding to AIREQRESPONSE entries... Subs are actually in their own 'mtype' - the supremewiki was in error for not pointing this out. The mtypes are 0/1/2/3 for land/air/surface/sub. Now the casual observer may notice that this is also redundant with the 'class' of the response (since units in a certain class all belong to the same mtype), but the reasons for this duplication are buried in the mists of time and space.

I am, however, removing this redundancy in update 7, and the 'mtype' column will no longer be used, only the class will be required.

Also, as noted above, AIPARAMS is not stored in the cache, so it can be modified to adjust scenarios/caches that have been built and will even affect saved games in progress.

It is loaded as part of a file called "AllLoad.ini", which is a list of non-cached data files that are loaded each time a save game or scenario is started.

It is also possible to over-ride the "AllLoad.ini" file with another file name in a .scenario specification - under the &&GMC section add something like:
inclfile: "RugeLoad"
Then in the INI directory, include a "RugeLoad.ini" file, and that could specify a "RugeAIParams.csv" file to load instead of the regular AIPARAMS file - this will let you specify AIPARAMS on a scenario-by-scenario basis. (Mind you, this stuff has not been well tested, so YMMV).

-- George.
Hullu Hevonen
General
Posts: 3604
Joined: Dec 11 2008
Location: Turunmaa/Turunseutu, Suomi
Contact:

Re: &&AIREQRESPONSE

Post by Hullu Hevonen »

George Geczy wrote:I've just started to review Ruge's AIPARAMS work to borrow some of it for Update 7, and so I thought I would make a few notes here...

First of all, the issue with subs not responding to AIREQRESPONSE entries... Subs are actually in their own 'mtype' - the supremewiki was in error for not pointing this out. The mtypes are 0/1/2/3 for land/air/surface/sub. Now the casual observer may notice that this is also redundant with the 'class' of the response (since units in a certain class all belong to the same mtype), but the reasons for this duplication are buried in the mists of time and space.

I am, however, removing this redundancy in update 7, and the 'mtype' column will no longer be used, only the class will be required.

Also, as noted above, AIPARAMS is not stored in the cache, so it can be modified to adjust scenarios/caches that have been built and will even affect saved games in progress.

It is loaded as part of a file called "AllLoad.ini", which is a list of non-cached data files that are loaded each time a save game or scenario is started.

It is also possible to over-ride the "AllLoad.ini" file with another file name in a .scenario specification - under the &&GMC section add something like:
inclfile: "RugeLoad"
Then in the INI directory, include a "RugeLoad.ini" file, and that could specify a "RugeAIParams.csv" file to load instead of the regular AIPARAMS file - this will let you specify AIPARAMS on a scenario-by-scenario basis. (Mind you, this stuff has not been well tested, so YMMV).

-- George.
but, if you use mtypes in future, will they be ignored by the engine or will you have to delete every mtype value?
Happy Linux user!
Links: List of Mods
Post Reply

Return to “Scenarios, Mods and More - 2020”