Panzer Corps AI discussion

PC : Turn based WW2 goodness in the mold of Panzer General. This promises to be a true classic!

Moderators: Slitherine Core, Panzer Corps Moderators, Panzer Corps Design

robman
Sergeant Major - SdKfz 234/2 8Rad
Sergeant Major - SdKfz 234/2 8Rad
Posts: 635
Joined: Mon Jan 30, 2012 10:05 pm

Re: Panzer Corps AI discussion

Post by robman »

OldGiants wrote:We aren't playing with the Imperial Japanese army, after all.
But hopefully we will be soon...? (hint, hint)
comradep
Staff Sergeant - StuG IIIF
Staff Sergeant - StuG IIIF
Posts: 279
Joined: Wed Oct 18, 2006 7:47 pm

Re: Panzer Corps AI discussion

Post by comradep »

My biggest gripe about the AI is the retreat choices it makes for both my units and the enemy.
In almost all cases that I've seen, the unit retreated to the hex on the other side of the unit compared to the hex I attacked from. I don't recall seeing the AI retreat in the direction of my units if there was a valid retreat possibility "behind" the unit as seen from the direction my own unit attacked from. To put it in numerical terms using the layout of the keypad: if I attack from 4, the unit (at 5) usually retreats to 6.
Rudankort
FlashBack Games
FlashBack Games
Posts: 3836
Joined: Sat Aug 21, 2010 2:23 pm
Contact:

Re: Panzer Corps AI discussion

Post by Rudankort »

comradep wrote:In almost all cases that I've seen, the unit retreated to the hex on the other side of the unit compared to the hex I attacked from. I don't recall seeing the AI retreat in the direction of my units if there was a valid retreat possibility "behind" the unit as seen from the direction my own unit attacked from. To put it in numerical terms using the layout of the keypad: if I attack from 4, the unit (at 5) usually retreats to 6.
Yes, that's correct. If a unit can retreat to the hex opposite to the attacking enemy, it uses that hex. Then, it tries two hexes next to it. And if those are unavailable as well, it will try to retreat to one of the hexes next to attacking enemy.
OldGiants
Lance Corporal - SdKfz 222
Lance Corporal - SdKfz 222
Posts: 28
Joined: Sat May 12, 2012 6:44 pm

Re: Panzer Corps AI discussion

Post by OldGiants »

Rudankort wrote:
comradep wrote:In almost all cases that I've seen, the unit retreated to the hex on the other side of the unit compared to the hex I attacked from. I don't recall seeing the AI retreat in the direction of my units if there was a valid retreat possibility "behind" the unit as seen from the direction my own unit attacked from. To put it in numerical terms using the layout of the keypad: if I attack from 4, the unit (at 5) usually retreats to 6.
Yes, that's correct. If a unit can retreat to the hex opposite to the attacking enemy, it uses that hex. Then, it tries two hexes next to it. And if those are unavailable as well, it will try to retreat to one of the hexes next to attacking enemy.
Would that that were true.

My description of the AI retreats continues to happen. Units with no one 'behind the lines' will plunge straight forward deeper into enemy units rather than go in the opposite direction to safety.

I'll try to take a screen shot next time it happens.
El_Condoro
Panzer Corps Moderator
Panzer Corps Moderator
Posts: 2119
Joined: Tue Jun 03, 2008 9:32 am

Re: Panzer Corps AI discussion

Post by El_Condoro »

What sort of terrain is in that 'open' hex? If the terrain is impassable to the unit, for whatever reason, it can't retreat into it. The screen shot will help, too.
OldGiants
Lance Corporal - SdKfz 222
Lance Corporal - SdKfz 222
Posts: 28
Joined: Sat May 12, 2012 6:44 pm

Re: Panzer Corps AI discussion

Post by OldGiants »

Here's a simple example of what I mean. The Brit infantry was attacked in the town. Instead of retreating to the southwest, an open terrain terrain road not next to any German units, it went North next to the captured Somua, the only unit left that could attack it, and was destroyed.

This happens a lot, not always, but a lot.

http://www.flickr.com/photos/75917869@N08/7314779932/
Tarrak
Panzer Corps Moderator
Panzer Corps Moderator
Posts: 1183
Joined: Mon Jul 11, 2011 11:01 pm

Re: Panzer Corps AI discussion

Post by Tarrak »

OldGiants wrote:Here's a simple example of what I mean. The Brit infantry was attacked in the town. Instead of retreating to the southwest, an open terrain terrain road not next to any German units, it went North next to the captured Somua, the only unit left that could attack it, and was destroyed.

This happens a lot, not always, but a lot.

http://www.flickr.com/photos/75917869@N08/7314779932/
In this case the unit is behaving exactly as Rudankort wrote a few posts above. It is first trying to retreat opposite of the attacking unit but that field is blocked by the artillery so it tries the two hexes next to it. It either picks one at random or simply scans them in some order (probably defined by the coordinates). Of course one could implement a check to prefer a hex without any enemy unit neighboring but it wouldn't be always the better move as well. In the end there are so many variables you need to consider it becomes impracticable to check them all.
OldGiants
Lance Corporal - SdKfz 222
Lance Corporal - SdKfz 222
Posts: 28
Joined: Sat May 12, 2012 6:44 pm

Re: Panzer Corps AI discussion

Post by OldGiants »

Survival is always the better move.

The hex to the SW would allow for reinforcement and survival.

How hard is it to code a preference for no contiguous enemy units? Even I could do that in a few minutes.
deducter
Lieutenant Colonel - Fw 190A
Lieutenant Colonel - Fw 190A
Posts: 1140
Joined: Thu Aug 11, 2011 11:00 pm

Re: Panzer Corps AI discussion

Post by deducter »

OldGiants wrote:Survival is always the better move.

The hex to the SW would allow for reinforcement and survival.

How hard is it to code a preference for no contiguous enemy units? Even I could do that in a few minutes.
Not necessarily. You are not considering all possible factors. There are ways to exploit the situation you outlined. The main one is that you can select the retreat path even more carefully now, and use a unit with movement points left to finish off the weakened unit anyway.

I can think of situations that arise where you can force a retreat into more favorable terrain, so that a unit you have with movement can go up and finish off the weakened unit. For an advanced player, this means making it even easier to force the AI to retreat onto rivers, close terrain, etc. where it becomes even easier to pick off the weakened unit.
OldGiants
Lance Corporal - SdKfz 222
Lance Corporal - SdKfz 222
Posts: 28
Joined: Sat May 12, 2012 6:44 pm

Re: Panzer Corps AI discussion

Post by OldGiants »

deducter wrote:
OldGiants wrote:Survival is always the better move.

The hex to the SW would allow for reinforcement and survival.

How hard is it to code a preference for no contiguous enemy units? Even I could do that in a few minutes.
Not necessarily. You are not considering all possible factors. There are ways to exploit the situation you outlined. The main one is that you can select the retreat path even more carefully now, and use a unit with movement points left to finish off the weakened unit anyway.

I can think of situations that arise where you can force a retreat into more favorable terrain, so that a unit you have with movement can go up and finish off the weakened unit. For an advanced player, this means making it even easier to force the AI to retreat onto rivers, close terrain, etc. where it becomes even easier to pick off the weakened unit.
I'm considering more factors than the AI currently considers. That would be an improvement in the spirit of this thread.

Your 'consider all' is much further from the current situation, and not a standard that need be met to make a large improvement.
deducter
Lieutenant Colonel - Fw 190A
Lieutenant Colonel - Fw 190A
Posts: 1140
Joined: Thu Aug 11, 2011 11:00 pm

Re: Panzer Corps AI discussion

Post by deducter »

I'm sorry if I sounded rude, but my point is that your proposed change wouldn't necessarily make the AI smarter. I would argue your proposed changes is not better than the current system, because I can still take advantage of it in other ways.
OldGiants
Lance Corporal - SdKfz 222
Lance Corporal - SdKfz 222
Posts: 28
Joined: Sat May 12, 2012 6:44 pm

Re: Panzer Corps AI discussion

Post by OldGiants »

deducter wrote:I'm sorry if I sounded rude, but my point is that your proposed change wouldn't necessarily make the AI smarter. I would argue your proposed changes is not better than the current system, because I can still take advantage of it in other ways.
I don't view your valid point of 'take advantage' as an exploit to be avoided because it requires planning and application of reserves to make it happen.

If the unit had gone to the SW, it would have required me to have a unit in reserve which could move into attack position on that turn. If the player has such a unit, it is good planning, not an exploit.

By moving adjacent to my unit which could no longer move but had an attack available, the AI made it simple for me to destroy that unit on that turn without any planning on my part (I had moved that unit up to get the multi-hex side attack benefit--my choice instead of keeping a reserve).

I don't want to the AI to make me gifts of extra attacks, or to plunge weakened units into areas where they can be more easily destroyed when an alternative route might save them--or at least cause me to allocate movement and/or attack resources to complete the job.

And I don't understand how you could 'take advantage' of my suggestion. An example would help me comprehend that.
Post Reply

Return to “Panzer Corps”