Better Random Game AI, finally

Advanced Tactics is a versatile turn-based strategy system that gives gamers the chance to wage almost any battle in any time period. The initial release focuses on World War II and includes a number of historical scenarios as well as a full editor! This forum supports both the original Advanced Tactics and the new and improved Advanced Tactics: Gold Edition.

Moderator: Vic

Post Reply
User avatar
Zaratoughda
Posts: 714
Joined: Sat Nov 15, 2008 4:00 pm
Location: NE Pa, USA

Better Random Game AI, finally

Post by Zaratoughda »

Had some problems in getting the AI in random games to be competitive previously, even allowing them to move first and giving them AI+.

So, more recently tried playing with just 50% land (on 50x30 map, two AI+ opponents, optimize for AI, shroud, map wrap... previously it is 99% land) and....

If anything the AI seemed to be even less competitive with this setup. Particularly if it was on an island with just one city... it would build fleets of cargoships and large units while I was sending out single cargoships with two AC units and capturing everything and if the AI ever made it I already had armies developed there. Also, I remember one time I was on this one extreme part of a continent and when I got to the other side found one of the AI opponents... cowering there <g>.

This with both random AI personalities turned off and turned on.

So, decided to give one last idea a shot..... turned off random AI personalities, set SetAIConservative to 200 (making for a very aggressive AI) and dropped the research value from .05 to .01 (with this the AI still does research but puts a lot more funds into units) and..... far out... the AI started playing a lot more competitive.

In testing this... there were times when I was not doing bad at all in exploration but one or the other of the AI was doing better. Another time started across this continent I started on and ran into one of the AIs with... a lot of armored cars... making it very difficult to defeat.

Still.... even if an AI has as many cities and towns as I have.... I still typically kick it's butt... even though the AI has got the 100% production bonus. This with me building mostly armor and the AI mixing armor and infantry.... I believe that is it's main problem (yeah, wise to get air superiority as a first priority).

But, with the above setup at least the AI is competitive enough that it has a chance.

So, what I did, was add this option to my ARHS 'scenario' (available on the community web site) in my ARHS_WW2.ptmaster file. The new option is 'Aggressive AI', and if this is selected the game is exactly as with Vic's Advanced.ptmaster file, with the exceptions noted above to make the AI more competitive.

Zaratoughda
User avatar
Jeffrey H.
Posts: 3154
Joined: Fri Apr 13, 2007 6:39 pm
Location: San Diego, Ca.

RE: Better Random Game AI, finally

Post by Jeffrey H. »

Interesting, I'll give it a try.
History began July 4th, 1776. Anything before that was a mistake.

Ron Swanson
User avatar
Zaratoughda
Posts: 714
Joined: Sat Nov 15, 2008 4:00 pm
Location: NE Pa, USA

RE: Better Random Game AI, finally

Post by Zaratoughda »

Hmmmm..... I have done some more testing on this and it appears my mod only makes the AI smarter under certain circumstances.

The way to test.... is to generate a game as you would normally except no shroud and no fog of war.... and do nothing with your own force but watch what the AI is doing.

And.... in the case where the AI gets a starting town with many roads out and no sea access...... it does a reasonable job of initial exploring (not optimal for sure..... takes an extra turn to get going compared to me and then has a tendancy of putting infantry units in with it's armored cars in some cases slowing them down to foot speed.... but it at least does a reasonable job in this case). This is the case where my mod helps.... and I believe it is in turning off the random AI personalities... because with those turned on the AI might STILL sit there.... doing research, building air or whatever... and in any case not exploring.

But, I saw one case where there were towns in one direction but roads needed to be built there and the AI..... didn't bother to explore in the other directions but instead took a single-minded approach to building the roads.... building a ton of engineers and, again, not bothering to explore in the other directions until the roads got built.

Also, if the starting town is at a port.... the AI will build ships in preference to exploring. Again, not sending armored cars or anything else out to explore the land but instead just sitting there building ships. This also brings into play the other problem that the AI has initially, not sending out ships until it has battleships to protect them which intially is very poor compared to the approach I use of sending out individual cargoships each carrying two armored car units.

So, the AI has a problem with being single-minded, and putting a higher priority on things like building roads and building fleets of ships, over initial land exploration and that is not wise.

Of course, one can use the mod I have in ARHS, of having initial countries and armies and with that the AI is much more competitive.... with even normal AI being a challange (as opposed to AI+). But, with that you skip all the initial exploration which is otherwise a lot of the fun..... unfortunately that is what the AI is poorest at... even at AI+.

Also, in my testing I have seen cases where the AI gets a start with no port access and a lot of roads out and.... on a large starting continent with me starting on a small island and not much else on the map. In this case, an AI+ opponent might be close to impossible to defeat... with it not only having a production bonus but a lot more cities after the initial exploration.

So, hard to get a balanced game here, and I don't believe there is much else in the rulevars that I can do to change this (e.g. don't believe I can change the priorities for things like road building and fleet building to be less than that for initial exploration).

Not sure what to say at this point.... except would be nice if in some future release or game to see the AI acting more intelligently and having a continuously variable AI strength that one could adjust to their liking as one goes along.

Zaratoughda
User avatar
Jeffrey H.
Posts: 3154
Joined: Fri Apr 13, 2007 6:39 pm
Location: San Diego, Ca.

RE: Better Random Game AI, finally

Post by Jeffrey H. »

I played the mod a bit last night. I really like it, in fact, I plan on playing it a few hours again tonight.
&nbsp;
Doing as you suggest, eliminating shroud and FOW allows me to see the AI moves and it's revealing as you point out. Some interesting observations:
&nbsp;
  • Prefab armies are great and watching the AI use, (or try to use really) some of the things it never builds shows up some issues. The different personalities use the items differently as well.
  • Artillery was used as a front line assault unit by one of the AI types and not at all by the others.
  • Some of the AI types were essentially defensive about their own borders and high production value cities. They sort of oscillated between hedgehog defense of the high value cities and covering the border hexes. For the most part they formed defensive perimeters around the high production value cities and just sat there.
  • The defensive AI types tended to abandon the little cities with low production value and having two defensive AI types with a common border was kind of amusing to watch them abandon cities and not even bother to recon or probe defenses. I did watch a little see saw battle between the two AI nations around one of the little cities, it was sort of amusing.
  • The AI did use aircraft fairly well when given them to start with. The AI doesn't research advanced AC types even when being obliterated by them.
  • The borders created a false sense, (IMHO) of agressiveness since the AI really just wanted to defend, (ultimately occupy)&nbsp;it's borders and&nbsp;was exceptionally timid about going beyond those borders.
  • The "base" AI behaviours are still there and although the starting armies help make them less of a factor, the AI still reverts to the stupid things we've all&nbsp;come to know it for in the end when it comes time to produce things.
I'm going to play it some more and see if any other AI types surface, I have the feeling that there may be a more agressive type out there that I haven't seen yet.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
History began July 4th, 1776. Anything before that was a mistake.

Ron Swanson
User avatar
Zaratoughda
Posts: 714
Joined: Sat Nov 15, 2008 4:00 pm
Location: NE Pa, USA

RE: Better Random Game AI, finally

Post by Zaratoughda »

Hmmm.... the 'Aggressive AI' option turns off the 'random AI personalities' and sets the AI at 9000 which is about as aggressive as you can get. This should eliminate the problems with AI getting too defensive.

Another option is to leave the random AI personalities on but jack em up to AI+ pr AI++.

Zaratoughda
User avatar
Zaratoughda
Posts: 714
Joined: Sat Nov 15, 2008 4:00 pm
Location: NE Pa, USA

RE: Better Random Game AI, finally

Post by Zaratoughda »

Oh... there are other options in the Rulevars which you can tinker with.

One is 'defense in depth'. There are various Rulevar paraments that control this and I guess the whole thing can essentially be turned off.

Zaratoughda
User avatar
Max 86
Posts: 698
Joined: Tue Nov 06, 2007 6:54 pm

RE: Better Random Game AI, finally

Post by Max 86 »

What I have found to be a challenging random game is to set the number of cities up to 80, city size to 2 to limit production and the key is to play with Peoples Republic on.  With this many cities the People Republic comes at you in swarms like Zulus at Roarke's drift. This really limits your ability to race across the map snatching up cities in droves.  Also, the city size set to 2 forces you to scout and direct your offensives at the larger cities since they are far and few between.

I also set the rivers, forests and mountains to 50 or more to to restrict rapid movement and gives the AI better defensive terrain and lets face it, the AI needs a little help.

Besides that, I adjust some AI variables to limit the front coverage, increase defense in depth and some others mentioned in other threads that increase aggressiveness.

What I need to learn is how to save these settings as a ptmaster file. I was also thinking about reducing the number of sfts available to build since neither me or the AI builds all of the types. In fact I usually build rifles, engineers, AA, tanks and cars, ftrs and dive bombers, thats about it. The AI uses even fewer from what I have seen.
No problem Chief!
User avatar
Jeffrey H.
Posts: 3154
Joined: Fri Apr 13, 2007 6:39 pm
Location: San Diego, Ca.

RE: Better Random Game AI, finally

Post by Jeffrey H. »

One idea I've been toying with is to reduce or eliminate the combat effeciveness of HQ's and Staff SFT's. I think one reason the AI goes mad with HQ's and staff sft's is because it sees them as effective combat units. It's really strange and silly to see the AI loading up on staff sft's in HQ units and sending them out to the front. Of course, there is probably a reason for the settings being what they are.
History began July 4th, 1776. Anything before that was a mistake.

Ron Swanson
Post Reply

Return to “Advanced Tactics Series”