The AI

Moderators: rbodleyscott, Slitherine Core, Gothic Labs

Post Reply
HobbesACW
Staff Sergeant - StuG IIIF
Staff Sergeant - StuG IIIF
Posts: 279
Joined: Thu Jun 27, 2013 9:31 pm

The AI

Post by HobbesACW »

Hi folks, I just looked at a scenario that is playable by both sides and I am amazed at the difference in troop quality. Where the human side has untrained or below average troops - when played by the AI they are above average and highly superior. Is it really necessary to make such a huge change to give the AI a chance? I suppose I will find out but I'm hoping I won't have to go to that extreme. I assumed bumping up a few units a little where the quality could be questioned would be enough.
Paul59
General - King Tiger
General - King Tiger
Posts: 3800
Joined: Tue Jul 21, 2015 11:26 pm

Re: The AI

Post by Paul59 »

I'm afraid that bumping up a few units slightly will not make any noticeable difference. Even though the P&S AI is very good, it is still no match for a skilled human opponent. You really do have to give the AI a significant advantage if you want to make the scenario challenging.

For instance in my next scenario, Lesnaya, I first made it playable as the Swedish and when play testing I was winning quite comfortably. When I created the Russian player version, and play tested it without changing the unit quality, it was an easy win for the Russians!

In Sengoku Jidai, the official scenarios are often playable from both sides. To make the scenarios challenging, the developers have gone down the route of giving the AI side a greater number of units. For instance in the Battle of Sekigahara, the Tokugawa side has about 34 units (depending upon the difficulty level and how you spend your points allocation) when you control them. When the AI controls them they get 51 units!


Paul
Field of Glory II Scenario Designer - Age of Belisarius, Rise of Persia, Wolves at the Gate and Swifter than Eagles.

Field of Glory II Medieval Scenario Designer.

FOGII TT Mod Creator

Warhammer 40,000: Sanctus Reach Tournament Scenario Designer.
HobbesACW
Staff Sergeant - StuG IIIF
Staff Sergeant - StuG IIIF
Posts: 279
Joined: Thu Jun 27, 2013 9:31 pm

Re: The AI

Post by HobbesACW »

Thanks Paul. I'll see how it goes. I may have to make Jankau multi-player only I feel.
fogman
Sr. Colonel - Wirbelwind
Sr. Colonel - Wirbelwind
Posts: 1780
Joined: Wed Jun 20, 2012 1:29 pm

Re: The AI

Post by fogman »

an unorthodox way is to restrict maneuver by using map overlays and immobile units. no need to change quality, no need to beef up unit count. and as a bonus, a much more natural flow (ie. no dogfight with units all over the place at the end of the game). see the 'sweden high noon' scenarios.
Odenathus
Staff Sergeant - StuG IIIF
Staff Sergeant - StuG IIIF
Posts: 287
Joined: Sat Jun 27, 2009 10:02 pm

Re: The AI

Post by Odenathus »

I agree with both of the above - although the AI is pretty good at handling two roughly equal forces rolling into each other, a scenario designed as MP being converted to SP really does need some monster handicapping in favour of the AI. A quick and easy fix is to set the human side to 'Captain-General' in the BSF, i.e. 'Very hard'. This has the effect of lowering your own morale, and raising that of the AI's units, but it does mean that - for example - your previously Elite Swedes may then fall to Superior or Highly Superior, while the AI's Turkish levies turn from Raw to Below Average. Some players don't like seeing this. Other solutions include changing morale, numbers and even weaponry in the data file; using scripting to hold the human-controlled units in place; reducing human-controlled units' speed; adding extra units that 'might' have been available and, as fogman says, deliberately adjusting the terrain to channel either side's units along particular routes. In fact, I'd almost go so far as to say that you'll end up with two quite different scenarios if you want both MP and SP versions of the same battle.
HobbesACW
Staff Sergeant - StuG IIIF
Staff Sergeant - StuG IIIF
Posts: 279
Joined: Thu Jun 27, 2013 9:31 pm

Re: The AI

Post by HobbesACW »

Hi folks, if I had known all of this I probably wouldn't have bought the game as an AI with unfair advantages has always been a bugbear of mine. However I've enjoyed the game immensely so I better put that behind me to a certain extent. I will have problems making such huge changes for the AI myself. I might have to look for scenarios with a decent what-if option or scenarios that are naturally easier to play for the AI and multiplayer (or maybe any scenarios I make will be fairly easy to win - sometimes that's quite nice :))

Thanks,
Chris
Odenathus
Staff Sergeant - StuG IIIF
Staff Sergeant - StuG IIIF
Posts: 287
Joined: Sat Jun 27, 2009 10:02 pm

Re: The AI

Post by Odenathus »

Hi Chris, perhaps we've (I've) sounded a bit too discouraging above. An SP game against the AI can be made very challenging, with a wide variety of different responses according to how the game develops. My point was to agree with Paul that a few slight changes to an MP game's units won't easily convert it to a satisfactory SP one, it does require a bit of thought. It isn't so much giving the AI an 'unfair' advantage as making the changes necessary for it to function as you want.

I've played a lot of PC strategy games, and in my experience human opponents are always more cunning, unpredictable, ambitious and sometimes downright stupid than lines of code.
HobbesACW
Staff Sergeant - StuG IIIF
Staff Sergeant - StuG IIIF
Posts: 279
Joined: Thu Jun 27, 2013 9:31 pm

Re: The AI

Post by HobbesACW »

Yes - for many years I would only play fellow humans at strategy games due to their cunning nature! It's only recently I have been playing a few games against the AI and I've not found any of them to be awful - but obviously no match for a competent player. Ideally I like to win games rather than lose. But there is an ideal 60% to 70% win ratio for me.
Paul59
General - King Tiger
General - King Tiger
Posts: 3800
Joined: Tue Jul 21, 2015 11:26 pm

Re: The AI

Post by Paul59 »

Odenathus wrote:Hi Chris, perhaps we've (I've) sounded a bit too discouraging above. An SP game against the AI can be made very challenging, with a wide variety of different responses according to how the game develops. My point was to agree with Paul that a few slight changes to an MP game's units won't easily convert it to a satisfactory SP one, it does require a bit of thought. It isn't so much giving the AI an 'unfair' advantage as making the changes necessary for it to function as you want.

I've played a lot of PC strategy games, and in my experience human opponents are always more cunning, unpredictable, ambitious and sometimes downright stupid than lines of code.
Yes Chris, please don't be put off. We can't expect any AI to match a skilled human player, and the P&S (and SJ) AI is the best that I have come across. It just needs a little help sometimes from the scenario designer to make it a challenging opponent. It isn't always a case of bumping up the unit morale values, there are lots of other things that can be done to give the AI a boost. I will use my new Lesnaya scenario as an example;

Originally I had wanted the Russian reinforcements to appear on the battlefield in march order, one regiment at a time, as they probably would have done historically. But that was making it very easy for the Swedish player to destroy them one by one as they appeared. So I extended the map at that edge, and made the Russian reinforcements arrive all at once and fully deployed in battle order. That makes it much more challenging for the human player.


Cheers


Paul
Field of Glory II Scenario Designer - Age of Belisarius, Rise of Persia, Wolves at the Gate and Swifter than Eagles.

Field of Glory II Medieval Scenario Designer.

FOGII TT Mod Creator

Warhammer 40,000: Sanctus Reach Tournament Scenario Designer.
edward77
Sergeant - 7.5 cm FK 16 nA
Sergeant - 7.5 cm FK 16 nA
Posts: 231
Joined: Wed Nov 10, 2010 9:11 pm

Re: The AI

Post by edward77 »

I too was very surprised at the differences in troop quality in scenarios that are playable by both sides. I think loss tolerance as in TOAW is better idea. So lowering player or increasing the AI rout levels is a better method for balance with the AI.
fogman
Sr. Colonel - Wirbelwind
Sr. Colonel - Wirbelwind
Posts: 1780
Joined: Wed Jun 20, 2012 1:29 pm

Re: The AI

Post by fogman »

yes altering the rout thresholds is something i employed too when converting from sp to mp; that requires lengthy testing and witht the lack of hotseat is an absolute chore. The other thing i didn't mention was the tinkering of action points; using dynamic APs can limit human players in what they can do (by lowering them), or make the ai more unpredictable (by increasing them). This also approximates command and control issues; in the nordlingen scenario for example, imperialist cavalry on the right have higher than normal APs to simulate their sudden and successful assault against the swedish left.
HobbesACW
Staff Sergeant - StuG IIIF
Staff Sergeant - StuG IIIF
Posts: 279
Joined: Thu Jun 27, 2013 9:31 pm

Re: The AI

Post by HobbesACW »

I'm just getting back into the Jankow scenario after a holiday and trying to work out how to change the unit names / values etc. I feel I have a pretty good understanding now so will crack on. I was going to send the AI units on their historical course but it occurred to me that as long as they start in their historical position you can guide them to any position you want really. If you play a human you don't necessarily expect the human player to duplicate historical moves so why expect the AI to do this? I just wondered how players feel about this? A historical start but then a scenario designer can do what they like with AI orders really?
P.S. this also depends upon what time you decide to make the historical start. When units are almost in range to open fire or far before that time. Lined up for battle (which gives a player little room for manoeuvre) or hours before. I sometimes find scenarios that have two long lines of units in close proximity with infantry in the middle and cavalry on the flanks a little boring. However that is often the more historical way these battles played out. If given too much room to manoeuvre a far less historically accurate battle would probably result.
Odenathus
Staff Sergeant - StuG IIIF
Staff Sergeant - StuG IIIF
Posts: 287
Joined: Sat Jun 27, 2009 10:02 pm

Re: The AI

Post by Odenathus »

I'm sure you know that this question of 'What is a historical wargame for?' is a constant theme in hobby forums. If it doesn't play out exactly like - say - Naseby, then can you even call it the Battle of Naseby? Might you not just as well just set up a random ECW challenge and see what you get? I try to get the historical terrain, OOBs and initial dispositions to conform as far as possible to generally accepted wisdom, great chunks of which are available on the internet, or from a wide range of specialist publications, then make the map large enough to give players some alternatives to the historical narrative. There are always gamers who want the Spartans, Waffen SS, Tree Ents or the Klingons to be invincible. My preference is for MP games, as I always think that SPs are a matter of fooling the AI, although I appreciate that if you want a game to last a couple of hours you can't wait while your human opponent feeds the cat, goes on holiday, dies, etc. For SPs my opinion would be that you should try to design the AI so that it plays out broadly as it did historically. The P&S game engine has one of the better and more flexible tactical AIs. On the other hand it's intended to be a game, not a classroom teaching aid, so there has to be some wriggle room. If you look at some of the player-designed scenarios you'll see how to change names and values, it's largely adding to or altering the Text and Squads files, but do revert if something isn't clear.
edward77
Sergeant - 7.5 cm FK 16 nA
Sergeant - 7.5 cm FK 16 nA
Posts: 231
Joined: Wed Nov 10, 2010 9:11 pm

Re: The AI

Post by edward77 »

We all have different views on the balance between historical accuracy and playability. For me It is always more interesting to create some "wriggle" with a larger map at some time before the historical positions are reached so that alternative tactics are possible which in turn then encourages more replaying of the scenario.
In many historical battles eg for the period 1650-1750 integrated attacks were fairly rare, and were mostly piecemeal and reactive. A large proportion were concluded long before the 40% rout level was reached, generals preferring to fight another day rather than risk wholesale defeat and subsequent demotion.
In others large sections of the Army never participated eg Austrians at Soor and Kesselsdorf, French at Oudenarde. In P&S all the battles without a fairly sophisticated .bsf file or using fogmans approach are more integrated and usually go to the 40% limit and sometimes beyond, a far cry from historical reality.
Odenathus
Staff Sergeant - StuG IIIF
Staff Sergeant - StuG IIIF
Posts: 287
Joined: Sat Jun 27, 2009 10:02 pm

Re: The AI

Post by Odenathus »

All true, it's a question of how much flexibility to allow in the scenario while still being able to convince yourself (and others) that it resembles the historical battle. You're right about casualties, but very few tactical games allow part of army to make an attack and then retire, if beaten off, in any sort of order: in virtually all the games (not just P&S) I've played, defeat always looks like utter disaster for the losing side. I usually console myself with the thought that it doesn't really mean that 60% of your men are lying dead on the field, the vast majority have in fact slunk off, deserted, fallen back without orders etc, and that it really represents their units being unable to maintain high-intensity combat. From a purely visual standpoint it would be better if routed units still count towards the victory level, but many more rally if they aren't pursued - then the loser would at least be left with a lot of Fragmented (and therefore unuseable) units on his side of the field.
HobbesACW
Staff Sergeant - StuG IIIF
Staff Sergeant - StuG IIIF
Posts: 279
Joined: Thu Jun 27, 2013 9:31 pm

Re: The AI

Post by HobbesACW »

I've tested Jankow a few times and it's not good at all. Far too easy for the player - so I'll have to advance the start time to put the AI into a better position (but still historical). The terrain is not easy for the AI to negotiate well and it is attacking piecemeal. I'm still holding off on decreasing the players unit quality but maybe I will have to tread those dark paths yet. Thanks for all the replies.

Chris
HobbesACW
Staff Sergeant - StuG IIIF
Staff Sergeant - StuG IIIF
Posts: 279
Joined: Thu Jun 27, 2013 9:31 pm

Re: The AI

Post by HobbesACW »

I just played a few more enjoyable scenarios - but the problem with the AI is that it normally doesn't react well if you move all or most of your troops to one side of the field.
This seems like a killer strategy and makes playing against the AI too easy. There are a few scenarios where this tactic doesn't work so well but it does in most scenarios. Still I enjoy winning - but getting a bit jaded using the same tactic in so many scenarios now.
rbodleyscott
Field of Glory 2
Field of Glory 2
Posts: 28007
Joined: Sun Dec 04, 2005 6:25 pm

Re: The AI

Post by rbodleyscott »

HobbesACW wrote:I just played a few more enjoyable scenarios - but the problem with the AI is that it normally doesn't react well if you move all or most of your troops to one side of the field.
This seems like a killer strategy and makes playing against the AI too easy. There are a few scenarios where this tactic doesn't work so well but it does in most scenarios. Still I enjoy winning - but getting a bit jaded using the same tactic in so many scenarios now.
You can't really talk about "the AI" as if all of it is an integral part of the base game. There is integral AI, but it only covers what the units do in local situations, it does not cover grand manoeuvres. AI that covers these is a separate layer which needs to be scripted for each scenario if it is to cover all eventualities.

The vanilla scenarios and skirmishes have complex AI that can react to enemy grand manoeuvres.

Most of the user-created scenarios rely on the much simpler AI that can be set in the Editor, or scripted very simply without really taking into account the evolving enemy grand plan.

Essentially the AI is only going to be as good as the scenario designer makes it.
Richard Bodley Scott

Image
HobbesACW
Staff Sergeant - StuG IIIF
Staff Sergeant - StuG IIIF
Posts: 279
Joined: Thu Jun 27, 2013 9:31 pm

Re: The AI

Post by HobbesACW »

Thanks Richard, that's a good point.
Post Reply

Return to “Scenario Design”