Local Defense 0 > Static Defense?

Moderators: Order of Battle Moderators, The Artistocrats

Post Reply
Horst
Brigadier-General - 15 cm Nblwf 41
Brigadier-General - 15 cm Nblwf 41
Posts: 1927
Joined: Mon Feb 18, 2013 1:22 pm

Local Defense 0 > Static Defense?

Post by Horst »

While watching another AI dumbness again, I wonder why not using Local Defense 0 instead of Static Defense by default. I did a couple of tests then:

With Static Defense, the AI units won't even recapture a 120-supply flag next to them and rather only attacks either in range or next to it if the combat result is favourable.
With Local Defense 0, the AI is capable of cutting off units and capturing flags/supply. Attacks are done the same way like on Static Defense: units, including artillery, won't move in attack-range with Local Defense 0, but will still cut off or recapture flags/supply on opportunity. The AI tries to capture either any flags, any supply point amount, or both. If a cut-off or capture move leads to a favorable attack, the AI won't miss the chance.

What I forgot to mention: on Static Defense, I couldn't watch any overriding AI behavior to reestablish a supply line. That AI engineer unit in my scenario was sitting next to an unoccupied 120-supply flag-point but didn't bother to move an inch to quench its thirst. That should have never happen with the Local Defense 0 behavior.
So I ask, why still bother with Static Defense if even static structures can attack normally with that local behavior?
bru888
Order of Battle Moderator
Order of Battle Moderator
Posts: 6214
Joined: Sun Jan 10, 2016 5:39 pm
Location: United States

Re: Local Defense 0 > Static Defense?

Post by bru888 »

Good information. I get Static Defense; it means "Stay put, no matter what." Please elaborate a bit on Local Defense.

If Distance is set to 0, how is the AI "capable of cutting off units and capturing flags/supply"? You say, "units, including artillery, won't move in attack-range with Local Defense 0, but will still cut off or recapture flags/supply on opportunity." What do you mean by they won't move in attack-range? Do the units move around on Local Defense 0 and how far? What about Distance 1, 2, etc.? Is distance measured from point of origin; i.e., where they were placed/spawned on the map?

While awaiting clarification on that, I do have a couple of guesses as answers for "why still bother with Static Defense if even static structures can attack normally with that local behavior?" First, Static Defense is appropriate for immobile units like coastal guns. Second, there are times when you absolutely do not want mobile units to move, thereby leaving a gap in battle lines or neglecting its guard duty.
- Bru
GabeKnight
Lieutenant-General - Karl-Gerat 040
Lieutenant-General - Karl-Gerat 040
Posts: 3710
Joined: Mon Nov 27, 2017 10:24 pm

Re: Local Defense 0 > Static Defense?

Post by GabeKnight »

Uran wrote about this in another thread. It may clarify:
uran21 wrote: Thu Feb 22, 2018 1:34 pm
Horst wrote:I’m also still curious about all the other AI behaviors which aren’t that clear, for example, which is better: Defend Hex or Local Defense?
Defend Hex existed before Local Defense, later was added on request. Defend hex is centered around particular hex but this is not always the most optimal solution because radius is checked from the single hex. You may want surrounding units to have micro reactions when player is approaching from different directions. In case of Defend Hex they would all attack invader when in radius and counterattack could be overwhelming. To counter this several (too many) Defend Hex AI Teams should be made. Here comes Local Defense as diferent and time saving (when it comes to setup) behaviour. Radius is set around units current position. So when unit counterattacks on the next turn radius will apply from its current position. For Defend Hex you can set up exact locations where defenders should be. If invaders go out of radius defending units will not pursue but rather return to their posts.
Horst
Brigadier-General - 15 cm Nblwf 41
Brigadier-General - 15 cm Nblwf 41
Posts: 1927
Joined: Mon Feb 18, 2013 1:22 pm

Re: Local Defense 0 > Static Defense?

Post by Horst »

I remember that explanation. Defend Hex shouldn't matter here, but rather if Local Defense 0 can replace Static Defense, as local seems superior compared to the rather useless static shoot-me-up defense.
I've done quite some tests, so I recommend designers to try it out as well. Simply change your static units to local-0 to see what plays better. Static Defense is all but for structures horribly inactive and can lead to player-exploits.
bru888
Order of Battle Moderator
Order of Battle Moderator
Posts: 6214
Joined: Sun Jan 10, 2016 5:39 pm
Location: United States

Re: Local Defense 0 > Static Defense?

Post by bru888 »

So far, I have these notes:

Static Defense - Unit does not move; will defend itself when attacked; will attack if enemy is within range.

Defend Hex - Unit may move within a radius set as Distance from a certain hex in order to attack or conquer a strategic point. When finished, the unit returns to its assigned hex.

Local Defense - Each turn, unit is allowed to roam within a radius set as Distance from its current hex in order to attack or conquer a strategic point.


But again, while I am agreeing with Horst's support for Local Defense 0 > Static Defense, I am wondering how is it possible for units to move if their order is Distance = 0? Is it one of those AI "advisory" things; that is, generally respected but not necessarily? What is the granular difference between Local Defense 0 and Local Defense 1?
- Bru
Horst
Brigadier-General - 15 cm Nblwf 41
Brigadier-General - 15 cm Nblwf 41
Posts: 1927
Joined: Mon Feb 18, 2013 1:22 pm

Re: Local Defense 0 > Static Defense?

Post by Horst »

Local Defense seems to support these special capture/cut-off exception-behaviors what Static Defense doesn't.
Local Defense (radius) 1+ allows the AI unit to do a 1+hex move for attacks of favourable circumstances. This is possibly not desired if you rather want a defensive line intact most of the time.
However, I still think that these special capture/cut-off maneuvers are essential to keep AI units alive and kicking. If a scenario includes plenty static defenders, then the player never really has to bother about keeping thin supply lines intact or defend any important hexes where you have recently kicked-off a static AI defender.

What I've also observed with Local Defense 1+ is that the AI sometimes moves to different hexes, possibly more favorable for e.g. AI-inf vs. nearby Human-tank like to a forest. However, I haven't done that many tests yet how such defensive moves without attacks are chosen.
bru888
Order of Battle Moderator
Order of Battle Moderator
Posts: 6214
Joined: Sun Jan 10, 2016 5:39 pm
Location: United States

Re: Local Defense 0 > Static Defense?

Post by bru888 »

Thanks, Horst. I just found your excellent thread "AI-Team Tests" from which Gabe took his quote of uran21. I have that bookmarked (I must have missed it; I don't remember it) and I will peruse it for additional information.
- Bru
Horst
Brigadier-General - 15 cm Nblwf 41
Brigadier-General - 15 cm Nblwf 41
Posts: 1927
Joined: Mon Feb 18, 2013 1:22 pm

Re: Local Defense 0 > Static Defense?

Post by Horst »

Two scenarios where I have tested AI behaviors:
Test-AI.7z
(4.18 KiB) Downloaded 105 times
In the NoThreat scenario, there is no visible enemy to the AI, in the Threat it is.
In both scenarios, the AI usually circles around to grab all supplies and/or flags. Rarely, it ignores a flag.
Interesting to observe are the starving infantry units. Only the upper left local defender without flag is moving next to the flag with supply. The other static defender on the right is keep starving. The local defender on the upper-right sitting on a supply-less flag is still starving although it could grab the saving supply-points next to it. This shows that guarding this flag somehow has a pitiful priority to this local defender.
Also note the local defender on the middle-left: it won’t move a single hex, not leaving its flag+supply although much more attractive supply points including better inf-protection by cities await it next to it.
Test-AI-NoThreat1.jpg
Test-AI-NoThreat1.jpg (295.84 KiB) Viewed 3778 times
Test-AI-NoThreat2.jpg
Test-AI-NoThreat2.jpg (415.59 KiB) Viewed 3778 times
Last edited by Horst on Wed May 22, 2019 6:23 pm, edited 2 times in total.
Horst
Brigadier-General - 15 cm Nblwf 41
Brigadier-General - 15 cm Nblwf 41
Posts: 1927
Joined: Mon Feb 18, 2013 1:22 pm

Re: Local Defense 0 > Static Defense?

Post by Horst »

With threat nearby, the result is almost the same. The only difference is mainly that the local defender on the middle-left is suddenly moving around grabbing flags and supply.
It’s also highly disappointing what the upper local defender does: it abandons its only nearby supply reserve to grab all these many empty flags, starving to 0-eff meanwhile.
Test-AI-Threat1.jpg
Test-AI-Threat1.jpg (406.38 KiB) Viewed 3777 times
Test-AI-Threat2.jpg
Test-AI-Threat2.jpg (413.3 KiB) Viewed 3777 times
Keep in mind these are a rather extreme examples with plenty supply points and flags nearby what is hardly the situation in most playable scenarios.
What have we maybe learned? The AI seemingly doesn’t bother much grabbing either flags or supply points, or both at same time in a particular priority order. However, it can still make a difference if starting on a flag, with supply or not.
bru888
Order of Battle Moderator
Order of Battle Moderator
Posts: 6214
Joined: Sun Jan 10, 2016 5:39 pm
Location: United States

Re: Local Defense 0 > Static Defense?

Post by bru888 »

It's interesting to see that there is some randomness involved. I ran each test scenario three times for 15 turns; some things happened (or didn't happen) exactly the same every time but others did not. Notice the different patterns and the occasional shyness of the lower left unit:

No Threat:

Screenshot 15.jpg
Screenshot 15.jpg (354.91 KiB) Viewed 3770 times
Screenshot 16.jpg
Screenshot 16.jpg (366.78 KiB) Viewed 3770 times
Screenshot 17.jpg
Screenshot 17.jpg (363.74 KiB) Viewed 3770 times

Threat:

Screenshot 18.jpg
Screenshot 18.jpg (367.69 KiB) Viewed 3770 times
Screenshot 19.jpg
Screenshot 19.jpg (367.98 KiB) Viewed 3770 times
Screenshot 20.jpg
Screenshot 20.jpg (368.38 KiB) Viewed 3770 times
- Bru
bru888
Order of Battle Moderator
Order of Battle Moderator
Posts: 6214
Joined: Sun Jan 10, 2016 5:39 pm
Location: United States

Re: Local Defense 0 > Static Defense?

Post by bru888 »

So here are your AI teams:

Screenshot 22.jpg
Screenshot 22.jpg (215.44 KiB) Viewed 3767 times

and here is how they are assigned:

Screenshot 21.jpg
Screenshot 21.jpg (360.49 KiB) Viewed 3767 times

You have four teams assigned to Local Defense 0. Two of them (middle left, upper right) are guarding existing Japanese capture points which probably explains why they don't move, threat or no threat. The others, having nothing initially to guard, have more freedom to move around.

The unit on Local Defense 0 in the lower left is somewhat shy compared to the unit on Seek & Destroy in the lower right but it may or may not accomplish the same as that unit (hence the implication of a measure of randomness).
- Bru
bru888
Order of Battle Moderator
Order of Battle Moderator
Posts: 6214
Joined: Sun Jan 10, 2016 5:39 pm
Location: United States

Re: Local Defense 0 > Static Defense?

Post by bru888 »

Your tests (which were great, by the way), proved something else: The unit which was set for Local Defense 1 (upper middle) roamed up to three hexes from its starting point in one turn:

Screenshot 25.jpg
Screenshot 25.jpg (516.24 KiB) Viewed 3763 times

Which leads me to these conclusions: Local Defense is advisory, not absolute, and is subject to strategic considerations and even to randomness. The difference between Static Defense and Local Defense is stark (the team on Static Defense just stands there, waiting to be punched) but a unit's performance on Local Defense can vary and the Distance setting for Local Defense may not in fact be meaningful.
- Bru
Horst
Brigadier-General - 15 cm Nblwf 41
Brigadier-General - 15 cm Nblwf 41
Posts: 1927
Joined: Mon Feb 18, 2013 1:22 pm

Re: Local Defense 0 > Static Defense?

Post by Horst »

The static defender on the middle-right without flag clearly shows that no emergency moves are done to regain supply. Static = idle if it comes to moving.
This is in contrast to the upper-left local defender which grabs the supply.
The strangeness is still the upper-right local defender which doesn’t seem to bother to starve even if supplies are nearby. I gave it Local Defense 1 in hope that helps for a saving move but it didn’t work. However, that means that there is not necessarily an overriding supply-saving move kicking in as long as a unit is guarding a (pointless) flag.
Ignoring the lazy guy on the middle-left, the other inf units are usually circling around: first downwards then clockwise around most of the time. Maybe this has something to do with the scan procedure on which hex around a unit the scan checks for interesting things. Like I mentioned, it’s usually the way. If you keep repeating these scenarios, you still sometimes observe irregular moves, like skipping flags or moving in another direction.

It also shows on another screenshot that the type of flags don’t seem to matter either. The AI will simply move southwards on turn 2, ignoring golden and silver flags. Also, the lower-left one grabs the 8-supply instead of the flagged 9er which shows that there is no real priority for point amount and actually a flag.
Test-AI-NoThreat3.jpg
Test-AI-NoThreat3.jpg (515.77 KiB) Viewed 3759 times
bru888
Order of Battle Moderator
Order of Battle Moderator
Posts: 6214
Joined: Sun Jan 10, 2016 5:39 pm
Location: United States

Re: Local Defense 0 > Static Defense?

Post by bru888 »

So what about Defend Hex? I altered the Threat test accordingly, reassigning Static Defense to Defend Hex 5:

Screenshot 5.jpg
Screenshot 5.jpg (346.71 KiB) Viewed 3753 times

Then I drove my tank away and the unit made hay while the sun shined:

Screenshot 6.jpg
Screenshot 6.jpg (428.18 KiB) Viewed 3753 times
Screenshot 7.jpg
Screenshot 7.jpg (427.7 KiB) Viewed 3753 times

And that wasn't all. Okay, this is within 5 hexes:

Screenshot 9.jpg
Screenshot 9.jpg (431.26 KiB) Viewed 3753 times

But this isn't. It's 7 hexes away, while my tank is within easy driving distance of the two capture points:

Screenshot 10.jpg
Screenshot 10.jpg (434.5 KiB) Viewed 3753 times

I am coming to the opinion that all AI tasks are general tendencies while we are looking for them, erroneously as it happens, to be absolutes.
- Bru
Horst
Brigadier-General - 15 cm Nblwf 41
Brigadier-General - 15 cm Nblwf 41
Posts: 1927
Joined: Mon Feb 18, 2013 1:22 pm

Re: Local Defense 0 > Static Defense?

Post by Horst »

It’s indeed rather disappointing to see how Defend Hex fails there. I already mentioned this is truly an unusual map there with a ridiculous amount of flags and supply hexes around.

Maybe let’s roughly summarize:
Don’t overdo it with flags and supply point hexes. The lesser flags and supplies hexes there are, the more focused the AI can (maybe) play.

Rivers or any other terrain marked with enemy flag to show its name, are possibly traps for AI units to go for. Better use impassable terrain on these flagged hexes if these are on map edges!

To avoid too much fatal idleness, better stick to Local Defense 0 instead of Static Defense, so the AI can occasional do some useful moves like (re-)capturing flags and supply or cutting-off lines.
If there are actually important points to defend then a proper Defend Hex task is maybe the best choice. Local Defense is not the holy grail of default behaviour tasks either, but I think it’s still better than hopelessly being idle.

Favorable combat results, flags, supply points, cut-off opportunities: all this can heavily influence the AI with whatever task it has and won't necessarily produce smart and effective moves.

PS: Bru, only the player should have the reavealed map, so the AI won't necessarily see everything like a tank somewhere.
LNDavoust
Staff Sergeant - StuG IIIF
Staff Sergeant - StuG IIIF
Posts: 258
Joined: Fri Apr 13, 2018 12:24 am

Re: Local Defense 0 > Static Defense?

Post by LNDavoust »

Uh, very useful info, guys, a lot of lessons to be learnt from this thread. Thanks to everyone ^_^
GabeKnight
Lieutenant-General - Karl-Gerat 040
Lieutenant-General - Karl-Gerat 040
Posts: 3710
Joined: Mon Nov 27, 2017 10:24 pm

Re: Local Defense 0 > Static Defense?

Post by GabeKnight »

Agree, thanks guys, useful thread. I'll bookmark it for further reference.
Horst
Brigadier-General - 15 cm Nblwf 41
Brigadier-General - 15 cm Nblwf 41
Posts: 1927
Joined: Mon Feb 18, 2013 1:22 pm

Re: Local Defense 0 > Static Defense?

Post by Horst »

Well, Defend Hex isn't fantastically working either with defined defensive positions as far as I have tested. The units just race off and leave flags as defended position unguarded.
I'm currently auto-play testing a modified US-Pacific "War Plan Orange-3" scenario. The AI has such a trouble getting to the primary flags. I test if Seek & Destroy or Move to Hex works better. I also test how the AI behaves with more sub-teams, e.g. each regiment gets his own AI team instead the whole division.
bru888
Order of Battle Moderator
Order of Battle Moderator
Posts: 6214
Joined: Sun Jan 10, 2016 5:39 pm
Location: United States

Re: Local Defense 0 > Static Defense?

Post by bru888 »

I wonder how much of this behavioral variation is intended and how much is bad design or bug. After all, any student of military history knows how orders are often failed, ignored, forgotten, or overridden in the heat of battle. Static Defense seems to be ironclad but Local Defense, Defend Hex, and the others seem "advisory" and that may be as it should be but we will never know for sure.
- Bru
Horst
Brigadier-General - 15 cm Nblwf 41
Brigadier-General - 15 cm Nblwf 41
Posts: 1927
Joined: Mon Feb 18, 2013 1:22 pm

Re: Local Defense 0 > Static Defense?

Post by Horst »

I never expect West Point maneuvres in games, but at least less stupidity like assaulting with artillery units what I have noticed during Move Hex tasks.
What seems promising so far is that use of small teams. With too large Seek & Destroy groups, the AI tends to focus only on single targets like flags or enemy units with dozens of units. I had already tested in the past that artillery preparation fire and flanking is usually better in groups then with individual operating units.
You surely get timely better results with a Move Hex order to bring units to a certain location but more chaotic with less care for threats of units that block the way. There are still alternatives to test though like a huge Local Defense 30 that could work like Seek & Destroy, or a Defend Hex could also maybe better lead units to desired points.
It’s a nice huge waste of time as always.

I'm also not that fond of Air Patrol for fighters. It happens too often that targets are ignored and a move to the defined hexes is forced. This behavior is better used for recon planes.
Having fighters and bombers in the same group can't hurt either if fighters strafe the same targets while also touching the bombers for defensive fire. If you don''t restrict targets for Air Seek & Destroy, bombers and fighters can still pick widely different targets on the map.
Chaos still rules with most AIs in games, that's for sure.
Post Reply

Return to “Order of Battle : World War II - Scenario Design”