Jump to content

TESTING AI PLANS


WimO

Recommended Posts

I discovered what I consider to be a very helpful, great even, way to test A.I. plan pathing and timing. I took one of my earlier scenarios and deleted all of the player units. In this case the American paratroopers and left just the German A.I. I then played, or rather ran, the scenario through its full time and observed the A.I.'s behaviour. It revealed areas that could be improved. Tomorrow I will do it again but will record some notes along the way.

Link to comment
Share on other sites

I do simular things.

First step is to get the AI troops to follow 'the plan' sucessfully without any opposition. Then comes the tweaking to get the AI to perform okish also when it comes under fire.

Be aware though. This is the tricky part. When the AI units comes under fire it has a tenacy to seriously mess up the co-ordination of the AI forces.

Getting the AI to do what you want is fairly easy until the bullits start flying 😎

 

Link to comment
Share on other sites

It's usually good to keep the player forces in their initial deployment positions or zones and not moving when testing to check when the AI plan will definitely make contact with the player even if they are very conservative and barely move their forces. Also flags possible problems with first turn spots and LOF. Unless that is intended.

Link to comment
Share on other sites

1 hour ago, PEB14 said:

One stupid question (I'm used to them): using this way of testing, how do you test the second side's AI plan ? If you delete the first side's units you'll lose tha ssociated AI plans, won't you?

If you have designed a scenario with AI plans for both sides you simply test the scenario one side at the time and switch the side you as a player controll.

No need to delete anything.

If you need to move some opposing units out of the way while doing testing runs for a particular sides AI plan simply add a large deploymentzone to the map to allow for some repossitioning of the player controlled forces in the set.up face of the testrun and move them out of the way. This will have no affect on the scenario design. only this current test run.

When yo are satisfied with how the AI is performing remove the big deploymentzone and replace it with the zones required for the scenario.

 

 

Link to comment
Share on other sites

Once you start to play against a human it is so difficult to gather the energy to write an AI plan.

The AI scripting I do now is always the most rudimentary plan. 

I am sorry to pee on the general idea of AI plan writing and testing efforts.

It is not meant as an insult to anybody here...it is just my opinion from laziness and a bad attitude.

I am tomorrow releasing a few FRANCE 1940 scenarios with noted as "PLAY AS AXIS VERSUS ALLIED AI" for example.

But I have a bigger one that is just for H2H play as I am not going to invest the time for the AI plans. I started to but then slapped myself with cold water.

 

 

Link to comment
Share on other sites

Jumping in a bit late here. I've been testing and rewriting AI plans for just two scenarios, 12-16 hours per day for a week now. And all that just to have the German AI attack across the La Fiere causeway.  The goal is to make it "appear" as if the the German AI is being thoughtful about timing and co-ordination - which in reality it is not. It is just a V1, which once launched cannot be retrieved. Player's units shooting disrupts the plans through the effect on AI morale and the resultant debacle can leave players with the impression that the author has done a poor job programming. Whatever. It is very difficult and time consuming to create a convincing AI attack.

As for the AI defending. Similar to our colleague above, I also use triggers to create "apparent" defender responses. It creates a pseudo "IF - THEN" phenemenon. I feel that it is essential in large scenarios since the player, by punching through on one flank of the AI, might outflank the whole defensive line - a favourite tactice of players. By adding triggers to flanking areas, AI units might at least respond a little.

I have also come up with a solution for preventing players giving the command to Cease Fire prematurely. That is to say, selecting Cease FIre as soon as they have captured an objective and before the AI can counter ... or ... sitting on a defend objective during a campaign and ending the scenario on turn one ... thus bypassing the scenario with a victory. The solution is to have one small AI unit sit at the AI's extreme map edge on an AI-only terrain objective of tremendously high value and exit that objective just two minutes before the end of the scenario. Prior to exiting, the AI is guaranteed a Total Victory, after exiting, VPs are calculated normally.

 

 

Link to comment
Share on other sites

10 minutes ago, WimO said:

I have also come up with a solution for preventing players giving the command to Cease Fire prematurely. That is to say, selecting Cease FIre as soon as they have captured an objective and before the AI can counter ... or ... sitting on a defend objective during a campaign and ending the scenario on turn one ... thus bypassing the scenario with a victory. The solution is to have one small AI unit sit at the AI's extreme map edge on an AI-only terrain objective of tremendously high value and exit that objective just two minutes before the end of the scenario. Prior to exiting, the AI is guaranteed a Total Victory, after exiting, VPs are calculated normally.

That sounds clever. But I'm afraid that, doing so, you forbid the AI to achieve a Major of Total Victory…

But you really need to explicitely warn the player NOT to ceasfire; as a player, when you have reached your objectives and satsified the scenario briefing's instructions, if there are still 15 minutes to play, it isn't unfair to ask for a cease fire…

Link to comment
Share on other sites

1 hour ago, WimO said:

12-16 hours per day for a week now.

No sir! It is my 2 cents to say this. But I must say that for your Magnum Opus it should be just for H2H play. 

To borrow and change an old saying.

You cannot make an AI plan "fool proof" as fools and idiots are so clever!

Link to comment
Share on other sites

1 hour ago, PEB14 said:

That sounds clever. But I'm afraid that, doing so, you forbid the AI to achieve a Major of Total Victory…

But you really need to explicitely warn the player NOT to ceasfire; as a player, when you have reached your objectives and satsified the scenario briefing's instructions, if there are still 15 minutes to play, it isn't unfair to ask for a cease fire…

The No Ceasefire trick was not included in the scenarios that you played. It is included in the ones that I am working on now, and indeed the introduction to every scenario advises the player if the NO Ceasefire rule is in effect or not.

Link to comment
Share on other sites

24 minutes ago, kohlenklau said:

No sir! It is my 2 cents to say this. But I must say that for your Magnum Opus it should be just for H2H play. 

To borrow and change an old saying.

You cannot make an AI plan "fool proof" as fools and idiots are so clever!

I appreciate your viewpoint Kohlenklau and I wish I had never started the converting my H2H scenarios to sp and campaign play. But since I have started on this project, my obsessive personality won't let me give up until I get it right. I don't like the idea of letting a project defeat me. Anyway, I'm retired and this is presently my main passtime, aside from springtime work in the garden starting today.

Link to comment
Share on other sites

Since the No Ceasefire trick is turned off in the last two minutes of play and it is regulated only by two AI troopers in a kubelwagen, it has NO effect on normal scoring at the end of the game. Both sides are able to achieve any level of victory. I have play tested it many times in the past week and a variety of victory levels was achieved.

Link to comment
Share on other sites

12 minutes ago, WimO said:

I appreciate your viewpoint Kohlenklau and I wish I had never started the converting my H2H scenarios to sp and campaign play. But since I have started on this project, my obsessive personality won't let me give up until I get it right. I don't like the idea of letting a project defeat me. Anyway, I'm retired and this is presently my main passtime, aside from springtime work in the garden starting today

Yes sir. I wish you the best. You are a good man. But after this one...I hope you just go hang out and relax with your hoe. :D

 

Link to comment
Share on other sites

10 hours ago, WimO said:

I appreciate your viewpoint Kohlenklau and I wish I had never started the converting my H2H scenarios to sp and campaign play. But since I have started on this project, my obsessive personality won't let me give up until I get it right. I don't like the idea of letting a project defeat me. Anyway, I'm retired and this is presently my main passtime, aside from springtime work in the garden starting today.

You clearly didn't chose an easy topic. Lot of offensive AI programming on very difficult (bottlenecked) terrain. Very challenging. Once finished it will really be impressive!

Link to comment
Share on other sites

10 hours ago, WimO said:

The No Ceasefire trick was not included in the scenarios that you played. It is included in the ones that I am working on now, and indeed the introduction to every scenario advises the player if the NO Ceasefire rule is in effect or not.

Yes, that I had fully understood; this was not what I meant (see below).

 

10 hours ago, WimO said:

Since the No Ceasefire trick is turned off in the last two minutes of play and it is regulated only by two AI troopers in a kubelwagen, it has NO effect on normal scoring at the end of the game. Both sides are able to achieve any level of victory. I have play tested it many times in the past week and a variety of victory levels was achieved.

Well, if the VP associated with the Kubelwagen's objective are really that big, the AI can't achieve a Total Victory once it leaves the map; this is because a Total Victory requires that the winning side gets at least 80% of his available VP to do so. Same issue with Major Victory (55% of his total VP required) and even for Tactical Victory (30%).

So if you give, say, 100 VP for the Kübelwagen trick and that all the other VP combined amount to another 100 VP, the AI will never achieve more than a Tactical Victory.

Which is not necessarily an issue…

Link to comment
Share on other sites

19 hours ago, WimO said:

sitting on a defend objective during a campaign and ending the scenario on turn one ... thus bypassing the scenario with a victory. The solution is to have one small AI unit sit at the AI's extreme map edge on an AI-only terrain objective of tremendously high value and exit that objective just two minutes before the end of the scenario. Prior to exiting, the AI is guaranteed a Total Victory, after exiting, VPs are calculated normally. 

Interesting stuff.  Something similar will work to accommodate players who want extra time in scenarios.  Example: The scenario time limit is set at one hour and the briefing advises the player he is expected to be finished in one hour for maximum possible VPs.  However the actual scenario is longer than one hour.  If the player decides he wants (or maybe needs) to go past one hour mark he can.  But at about one hour and five minutes the AI spawns a reinforcement on a touch or occupy objective worth a modest amount of VPs.  This reinforcement typically spawns inside an inaccessible building in the AI corner of the map.  A small building with no doors or windows in heavily forested tiles surrounded by swamp tiles.  The touch / occupy objective is scored to keep the player from total or major victory but will not by itself defeat the player.  So the player has a choice of playing in a more methodical slow way or going for the max points in one hour.  This method helps to accommodate the two different styles of play.

I often include friendly reinforcements which are OpFor spot objectives.  I learned this from @George MC.  Example: At 20 minutes into the scenario the player receives a platoon of tanks as reinforcements.  They spawn in an area out of sight of the AI OpFor.  The briefing explains this platoon is part of the battalion reserve or some such.  The tank platoon is a 300VP spot objective for the OpFor.  The player now has a choice.  Accomplish the mission without the tanks and get the maximum VPs possible or maybe use the tanks to take more occupy objectives.  If the remaining occupy objectives are 400 VPs maybe it is worth using the battalion commanders reserve?  IMO decisions are part of the fun of the game.   

I've used this in scenarios like Kriegsburg, and Alarmeinheiten.  I think I used both the extra time method and spot objective in Coup d'etat.   

A lot of fun and interesting stuff working with the AI.   

      

Link to comment
Share on other sites

Quite a bit of interesting stuff in this discussion. Too bad info like this was never written up in a How To manual. As a creator, I would have like to know the degree of  protection afforded by different buildings and terrain.

Link to comment
Share on other sites

On 4/9/2023 at 2:18 AM, PEB14 said:

Well, if the VP associated with the Kubelwagen's objective are really that big, the AI can't achieve a Total Victory once it leaves the map; this is because a Total Victory requires that the winning side gets at least 80% of his available VP to do so. Same issue with Major Victory (55% of his total VP required) and even for Tactical Victory (30%).

So if you give, say, 100 VP for the Kübelwagen trick and that all the other VP combined amount to another 100 VP, the AI will never achieve more than a Tactical Victory.

Hello PEB14: It has taken me a few days to fully understand the significant of what you have pointed out to me. It has given me pause for thought. At first glance it does not appear to affect the flow of my campaign since everything depends on the VP level of the player. However, if this also affects the VP calculation for the player then it is significant. I will put it through the vp calculator today to test and see if I need to discard or change this solution.

Link to comment
Share on other sites

20 hours ago, WimO said:

As a creator, I would have like to know the degree of  protection afforded by different buildings and terrain.

A SIDE TOPIC TO YOUR MAIN ISSUE IN THIS THREAD BUT IT TOUCHES A NERVE (hey! that is a dentist joke WimO! You are or were a dentist, right? :D )

Yes, it angers me a bit as when BFC started the whole shebang, they could have set it like in ASL. We should have a clear set of incremented strength of a building that is shown visually too: wooden buildings or stone buildings or fortified buildings. Visually a scenario author could then know what he was plopping down on his map. Now it is all mixed up and vague. You see bricks or stone but it collapses like a wooden barn. The textures cycle through a wooden look but then for the same building it shows a stone facade. If we were soldiers, would we hide in the wooden barn or the stone farmhouse? 

I tried to have a modded solution...my [tuffhaus] project to use the stone church as a house

 

Link to comment
Share on other sites

PEB14 is correct to state that my "No Early Cease Fire" fix results in making it impossible for the German A.I. to achieve a Total Victory or even a Major.. I have been testing various vp's in Ithikiel's Victory Calculator and the best balance I can achieve while retaining my 'fix' is that both sides can at best achieve a Tactical Victory. This is adequate to proceed through the campaign. I will advise the player to expect this possibility.

Link to comment
Share on other sites

1 hour ago, WimO said:

PEB14 is correct to state that my "No Early Cease Fire" fix results in making it impossible for the German A.I. to achieve a Total Victory or even a Major.. I have been testing various vp's in Ithikiel's Victory Calculator and the best balance I can achieve while retaining my 'fix' is that both sides can at best achieve a Tactical Victory. This is adequate to proceed through the campaign. I will advise the player to expect this possibility.

I agree with you that this should not affect the balance of the campaign, as long as you don't expect the AI to win by a large margin.

That would be an issue with two of the scenarios: "Levy at Cauquigny", and "Millet's breakout": getting Millet capture shall result at least in a Major Victory for the AI, and losing Cauquigny shall lead the player to the same issue…

Link to comment
Share on other sites

19 minutes ago, PEB14 said:

I agree with you that this should not affect the balance of the campaign, as long as you don't expect the AI to win by a large margin.

That would be an issue with two of the scenarios: "Levy at Cauquigny", and "Millet's breakout": getting Millet capture shall result at least in a Major Victory for the AI, and losing Cauquigny shall lead the player to the same issue…

Not every scenario will include the hidden 'No Early Cease Fire' fix.  I might be able to avoid it with Millet Breaks out.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...