How has the A.I been improved ?

A new story begins...
The sequel to a real classic: Panzer Corps is back!

Moderator: Panzer Corps 2 Moderators

Molve
Master Sergeant - U-boat
Master Sergeant - U-boat
Posts: 535
Joined: Wed Jul 27, 2011 10:06 am

Re: How has the A.I been improved ?

Post by Molve »

For all those clamoring for better AI:

Careful what you wish for.

Personally I would say the predictability and simplemindedness of PG/PC AI is one of the game's greatest strengths. As someone said upthread, "sometimes the computer needs to be stupid". Having the AI relentlessly hunt down any unit you are careless with is already an issue, ameliorated mainly by your army containing beefier units with better experience. That is, the AI never makes that first move, that then weakens our unit enough to be easy pickings. A better AI would see through easy stunts like that. In other words, by attacking in the "right" order, the number of combat losses would drastically increase assuming the same enemy armies. The very real risk is that the majority of players would find the game much less fun. (I know I found Modern General much less fun. It had the same stupid AI as the other five-star games, but since it featured modern weaponry with vastly increased ranges, even the rudimentary AI usually managed to kill the unit it set its sights to... and very Panzer General game is a fantasy hero game in disguise, so this was catastrophic to my enjoyment.) I fear the same could easily happen even with small "innocent" improvements in the AI!

This is not something that can be fixed simply by having different AI settings. The strength lies in the illusion (or fantasy) of being a real General fighting the Allies. If you can select a much smarter AI the box of Pandora is opened, and it will always feel silly to select a more stupid setting. (Obviously not including how the training levels should feature reduced AI)

The only solution is for us to trust Rudankort & Co in not making the AI any smarter than it needs to be! :D
Molve
Master Sergeant - U-boat
Master Sergeant - U-boat
Posts: 535
Joined: Wed Jul 27, 2011 10:06 am

Re: How has the A.I been improved ?

Post by Molve »

I don't think the Chess vs Panzer discussion is adding much, I'm afraid.

Even if the strategic layer would be much more difficult than chess, that's not what the computer needs most, and it isn't what most people think of when they discuss "stupid AI".

After all, as long as the game takes us from one scenario to the next, it's up to the scenario designer to provide the computer's order of battle and initial placement. In most scenarios the computer is quickly occupied by the tactical layer.

"Which of the available enemy units should I kill off?"

Just by having even an inkling of suppression rules (using artillery and air BEFORE attacks) the AI would become significantly more difficult, and more to the point, would make it significantly harder to keep your units alive (without becoming an overly cautious commander).

Instead of being restricted to one unit class at a time (and in a predefined order at that), just sorting out which unit should go first would make the AI much harder and deadlier.

Running unprotected trucks into unseen territory. Moving entrenched units out of their trenches because a "bait" unit is nearby. All of these quirks are what makes up the specific "panzer general" skill. An AI that never makes stupid mistakes like that isn't something to long for, it's something to dread.

I don't think anyone claims these rudimentary tactics is anywhere near chess in complexity.

And we haven't even begun talking about teaching the computer about a strategic sense; which hexes to occupy - where to yield ground and where to hold fast.

All that is indeed very difficult. Luckily, it is also mostly unnecessary, at least for the historical (pre-made) campaign. Leaving all that up to the scenario developer with unit AI settings and scripts is perfectly acceptable.

My point is: even the simplest, most obvious, AI improvement needs to be considered carefully, and not be implemented uncritically just because it can be done.
PeteMitchell
Major-General - Tiger I
Major-General - Tiger I
Posts: 2333
Joined: Tue Jul 10, 2018 1:18 pm

Re: How has the A.I been improved ?

Post by PeteMitchell »

@Molve:
I think there is truth in what you are saying although I am not fully with you on all points (yet).

I played chess before I knew that there will be computers (or even computer games) in this world. I understand chess and PzC are different things (for many reasons, e.g.: maps, starting positions, number of different units and corresponding moves/attacks in one turn, overall complexity, etc.). However, the early computer chess programs still made “very stupid” mistakes (similar to “moving a truck to the front line”), later on people got used to the fact that they may have to choose a “more stupid setting” so they can have a chance as well… More recently you had some very interesting developments around the game Go, e.g. compare here: https://en.wikipedia.org/wiki/AlphaGo

All I want to say is that currently many players play maps/scenarios that have overwhelming enemies (i.e. the AI has much more and/or stronger units) to face a real challenge. So wouldn’t it be nicer/more fun:
- if the AI didn’t need these overwhelming odds to get medium to strong players into serious trouble?
- if you could really choose the AI strength that fits your skill?

FYI, you may have seen this discussion as well?
viewtopic.php?f=464&t=87288
Comprehensive Battlefield Europe AAR:
http://www.slitherine.com/forum/viewtopic.php?f=145&t=86481
Sourdust
Senior Corporal - Destroyer
Senior Corporal - Destroyer
Posts: 102
Joined: Mon Feb 06, 2012 1:34 am

Re: How has the A.I been improved ?

Post by Sourdust »

AlphaZero really is a game-changer, pardon the pun. It's a shame this approach won't be widely available in time for PC2. But I do think PC2 will be among the last strategy games where AI programming is something humans have to grapple with. I'm guessing from about 2022, you'll be able to just buy a commercially available AlphaZero implementation, and your AI will sort itself out.

The biggest challenge will cease to be "how can I make an AI that gives the player a plausible challenge?" and will become instead "how can I dumb the AI down a bit or adjust play balance so the player has even a tiny chance?"
Rudankort
FlashBack Games
FlashBack Games
Posts: 3836
Joined: Sat Aug 21, 2010 2:23 pm
Contact:

Re: How has the A.I been improved ?

Post by Rudankort »

I think, Molve is making a very good general point that any advancement in AI tactics will make it much more likely for the player to lose his core units, which is really harmful in a campaign environment. Even a simple ability to concentrate several attacks on a single unit will make the AI vastly more deadly than it is now. However, it is possible to fix by adjusting the AI's priorities. In any competitive game finishing off opponent's units fast is very high on priority list. But for a lower level AI this priority can be completely disabled. So instead of finishing off a 1-strength unit, the AI will prefer to attack a different unit which will cause more steps of damage and thus look more "attractive". Plus, the AI can be made more passive in general on lower settings. So, this is doable, but we need to be very careful with this.

As for AlphaGo, I have already commented on it earlier in this topic. Yes, it's achievement with Chess and some other games is impressive. But keep in mind that every single chess position can be encoded in about 32 bytes of data. Compare it with the size of Panzer Corps game state: all hexes with their parameters, all units with their parameters, equipment table etc., its several orders of magnitude bigger. Just look at the saved game size. How much larger do we need to make the neural network to cover such a complex game? And how much longer will it take to train this network on the same hardware? Will it be a month, or a year, or a century? That is the question. Also, will the AI able to beat Poland play something as different as Battlefield Europe just as successfully? We cannot be sure about it. A generic AI which can play any game we throw at it may still be further away than it seems. ;) However, if in 2022 we do get something like that, I don't see why it cannot be patched into PzC2 at that point. :)
prestidigitation
Sergeant First Class - Panzer IIIL
Sergeant First Class - Panzer IIIL
Posts: 374
Joined: Sat May 27, 2017 1:24 am

Re: How has the A.I been improved ?

Post by prestidigitation »

Rudankort wrote: Thu Jan 17, 2019 2:57 pm I think, Molve is making a very good general point that any advancement in AI tactics will make it much more likely for the player to lose his core units, which is really harmful in a campaign environment. Even a simple ability to concentrate several attacks on a single unit will make the AI vastly more deadly than it is now. However, it is possible to fix by adjusting the AI's priorities. In any competitive game finishing off opponent's units fast is very high on priority list. But for a lower level AI this priority can be completely disabled. So instead of finishing off a 1-strength unit, the AI will prefer to attack a different unit which will cause more steps of damage and thus look more "attractive". Plus, the AI can be made more passive in general on lower settings. So, this is doable, but we need to be very careful with this.
This isn't an AI problem, it's a game design problem. If you believe units being pursued to a complete kill in a single round is a problem, then boost base unit HP without changing damage and this will become a rare issue. For example if HP went from 10HP to 100HP while damage and suppression values remained constant it would be much more important to suppress an enemy unit into surrender or retreat than to focus fire and annihilate it. Defending terrain against dislodged enemy formations would also become a critical part of the campaign, thereby emulating some of the issues faced by many armies when they raced toward an objective : bypassed enemy formations are still potentially capable of substantial offensive action and necessarily cause a dissipation of FEBA combat power to rear area security operations.

This would require some changes to game rules to support, but it would remove a problem caused by degenerate player strategies (AI and human in the case of MP). It would also more closely map to reality. After all, it's pretty rare that even a footmobile formation is completely destroyed through frontal assault. Much more common are

* withdrawal in good order
* envelopment and surrender
* flight (with partial or total loss of heavy equipment) and reformation

AI emulating the behavior of a competent player is not a problem. Design decisions that allow for degenerate strategies disliked by both the designer and the player communities are the problem.

BTW, I'm not suggesting that raising HP is the correct solution to the problem of focus fire or that a game of PzC that involved distributing force between the defense of previously captured objectives and attacking new objectives would be particularly fun. It is merely A solution, not THE solution.

THE solution is, of course, ensuring high quality Soviet, US, and Commonwealth Grand Campaigns. Obviously.
auda
Corporal - 5 cm Pak 38
Corporal - 5 cm Pak 38
Posts: 42
Joined: Mon Mar 27, 2017 11:37 pm

Re: How has the A.I been improved ?

Post by auda »

Rudankort wrote: Thu Jan 17, 2019 2:57 pm ...any advancement in AI tactics will make it much more likely for the player to lose his core units, which is really harmful in a campaign environment. Even a simple ability to concentrate several attacks on a single unit will make the AI vastly more deadly than it is now. However, it is possible to fix by adjusting the AI's priorities.
I agree, that when the AI is focusing on destroying one unit it could result in a frustrating game play for the human. A significant improvement over the current AI in PC would be if the AI moved/maneuvered its units as a whole, not just sitting around like they do now. I do not mean by this the AI will be concentrating against one player's unit, only against the player's main body of force. For instance, the AI could employ one or several units in a patrol/recon movement to seek out targets. Simple 'flags' could be used for the AI to 'remember' unit concentrations of the human player in a previous turn and act accordingly, that is either repositioning, counterattacking (weak, or piece-meal counterattacks) or withdrawing. This could add an interesting dynamic, where the speed of advance or maneuver by the player could offset the AI move that is effectively working with 'outdated' information.

In another example, if the AI has 20 units, 10 of those units would be used in static defense, while the rest used for maneuvering. What I'm trying to say is that the maneuvering AI element would not be 'one-unit-focused' but attack on a broader front.

The AI could have also different commander traits. For instance at the briefing, the player would be given intelligence information regarding the enemy commander. Simple traits, like defensive-oriented, reckless, or trickster, or offensive-minded. So the player, as he progresses through campaign, can face a different enemy commander with different traits on each scenario. Sometimes there would be no intelligence information and the player will have to face an unknown opponent, or the higher enemy HQ sends a determined commander to stop you, so you face him through several missions consequently, until you capture him or destroy him (maybe a commander could be represented by an HQ vehicle or something).
PeteMitchell
Major-General - Tiger I
Major-General - Tiger I
Posts: 2333
Joined: Tue Jul 10, 2018 1:18 pm

Re: How has the A.I been improved ?

Post by PeteMitchell »

@auda:
Personally, I like your suggestions, especially the one with the different characters/traits of commanders, it might differentiate the standard setting of active/passive a bit...
Last edited by PeteMitchell on Sat Jan 19, 2019 6:28 pm, edited 1 time in total.
Comprehensive Battlefield Europe AAR:
http://www.slitherine.com/forum/viewtopic.php?f=145&t=86481
PeteMitchell
Major-General - Tiger I
Major-General - Tiger I
Posts: 2333
Joined: Tue Jul 10, 2018 1:18 pm

Re: How has the A.I been improved ?

Post by PeteMitchell »

I am actually less worried about the AI being more focused on destroying core units. Human opponents in MP do it as well. In my opinion, it’s not so much a question of how smart the AI is (let’s make it as smart as possible to start with: it should do whatever is needed to win or at least not to lose depending on the scenario), so I think it is rather a question of game balance, i.e. if you can make the AI smarter (than it is currently) and also give it as many units as it currently has in many (if not most scenarios), then of course this is a big issue for fresh/unexperienced players…

However, if you can make the AI smarter so that it can work (or “be successful” for this matter) with less units (maybe even an equal amount to the number of units the human player has) then this is really an improvement… and it might also increase enjoyment/fun as players might have to think a bit more…

And yeah I know, after 1942 the Allies outnumbered the Axis 4:1 (or even more) on almost anything, nonetheless if you want to show more historic accuracy (which would be great, and therefore have for example more Soviet troops) in some scenarios, you could still dump down the AI (for these scenarios) if really needed…

As already said in a previous post, winning (in principle) is cool but it’s rather unrealistic having many DVs along a Grand Campaign and then fighting for Berlin with an army of Tiger IIs (while in reality less than 500 were built in total during the entire war…)
Comprehensive Battlefield Europe AAR:
http://www.slitherine.com/forum/viewtopic.php?f=145&t=86481
Post Reply

Return to “Panzer Corps 2”