Jump to content
Captain_Colossus

creating grid areas to script computer opponent behavior

Recommended Posts

i have been scripting behavior for computer opponents using a area grid system- a grid overlay is created out of several rectangular areas, and then computer behavior and movements are plotted based on conditions of each individual area. for example, a tank platoon in area 5 will embark to area 7 if an enemy tank unit is detected in area 23.

 

in theory this creates a reasonable system which allows a computer opponent to react to conditions anywhere on the map. it can be a bit tedious to create these grids by hand though- if this makes sense or seems like a good idea, i request a feature that the program can automatically create grids without having to size and place every individual square by hand this way (eg., a user defines the size of the grid, say, 8 X 8 50 m squares, or 10 x 10 1km square grids, and so on, and then the program generates the grid).

 

 

SS_13_34_50.jpg

Share this post


Link to post
Share on other sites

Wouldn't it need some inherent behaviour associated though?. otherwise you will end up having to make routes for every grid ^ every other grid?.

Share this post


Link to post
Share on other sites

if i understand your question, it still retains the waypoints and routes as the inherent system. it doesn't change anything from what already exists- you can create an area now and plot movements to or from that area, all it does is permit more areas to be drawn at the same time and overlaid wherever you like

Share this post


Link to post
Share on other sites

I really wish we had an external scripting system, java or LUA or similar, which could automate zone creation and unit spawning to name a few things..

 

It would solve your problem and have a huge number of other uses for making AI behaviour :)

Share this post


Link to post
Share on other sites
1 hour ago, ben said:

I really wish we had an external scripting system, java or LUA or similar, which could automate zone creation and unit spawning to name a few things..

 

It would solve your problem and have a huge number of other uses for making AI behaviour :)

I would be really cool to be able to have pre scripted AI behavior templates     +1  

Share this post


Link to post
Share on other sites
11 minutes ago, Lumituisku said:

I would be really cool to be able to have pre scripted AI behavior templates     +1  

Well to an extent you already do. The manual describes the default (or template) behaviours (refer pp 110 and 112):

 

Unit behavior (vehicles) for route tactics
Route tactic
Unit behavior
Engage
• If enemy is within range, stop to find a hull-down position facing enemy. The maximum range is determined by the value of the fire-control property and ammo range.
• If in column formation, try to stay on roads.
Assault
• Always stay on route. (Stop if entering an ICM artillery field.)
• If in column formation, try to stay on roads.
March
• Stay on route unless under direct fire and enemy is near and flanking (in which case stop to find a hull-down position facing enemy).
• If in column formation, try to stay on roads.
• All vehicle types travel at the same speed if given the same speed setting.
Retreat
• Always stay on route. (Stop if entering an ICM artillery field.)
• At the start of route, back up and pop smoke if enemy are present.
• If in column formation, try to stay on roads.
Breach
• Always stay on route. (Stop if entering an ICM artillery field.)
• Units with obstacle reduction capability will attempt to create a lane through an obstacle on such a route.
• Bridge layers will try to lay a bridge over water if the bridge is long enough to span the water.
• Do NOT try to stay on roads.
• Minimally avoid water.
Scout
• If an enemy is encountered, always stop to seek a turret- down position facing enemy.
• If under fire, retreat back along route (thus taking on retreat tactics).
• Look for and expose enemy minefields.
• Do NOT try to stay on roads

 

Unit behavior for waypoint tactics
Wpt tactic
Unit behavior
Hold
• While no enemies are detected, assume a turret-down position facing a specified direction.
• Temporarily move from position to avoid ICM artillery attack.
• Do NOT move from position to engage enemies that cannot be seen, or to avoid HE artillery attacks.
• Infantry will enter nearby buildings.
Defend
• While no enemies are detected, assume a turret-down position facing a specified direction.
• Temporarily move from position to avoid ICM artillery attack, or to avoid HE artillery attack if not engaging an enemy.
• Can move a few hundred meters from position to engage enemies on front flanks that cannot currently be seen.
• Embark on the first attached, non-conditioned route if moderate losses are sustained.
• Infantry will enter nearby buildings.
Guard
Same as Defend except:
• Embark on the first attached, non-conditioned route if under fire.
• Infantry will stay outside nearby buildings.
Stay
The unit will just sit and not move regardless of the tactical situation and enemy presence. This obviously is a dangerous option and should be used only in special cases such as resupply. You can assign typical resupply formations like herringbone and coil to a unit staying at a resupply point.
Suppress
Same as Stay except:
• The unit will fire at the focus point of the battle position. The rate of fire will slow down over time unless the order to suppress (or “fire here”) is renewed.
None
Use None to remove any other tactic previously assigned.
In essence, having no tactic assigned allows a unit to seamlessly continue onward to another route.
With None selected without a follow-on route to go:
• The unit will remain in place and will not move except temporarily to avoid incoming artillery.The unit will orient on any enemies they see.

 

Edited by Gibsonm

Share this post


Link to post
Share on other sites
On 11/29/2019 at 9:48 PM, Captain_Colossus said:

i have been scripting behavior for computer opponents using a area grid system- a grid overlay is created out of several rectangular areas, and then computer behavior and movements are plotted based on conditions of each individual area. for example, a tank platoon in area 5 will embark to area 7 if an enemy tank unit is detected in area 23.

 

in theory this creates a reasonable system which allows a computer opponent to react to conditions anywhere on the map. it can be a bit tedious to create these grids by hand though- if this makes sense or seems like a good idea, i request a feature that the program can automatically create grids without having to size and place every individual square by hand this way (eg., a user defines the size of the grid, say, 8 X 8 50 m squares, or 10 x 10 1km square grids, and so on, and then the program generates the grid).

 

 

SS_13_34_50.jpg

I've been experimenting with a similar layout lately. Very interesting!

My contribution to this is to be able to make this grid, or any other drawing, into layers, which could be locked, unlocked, shown, hidden, move to top, move down...

 

Share this post


Link to post
Share on other sites
11 hours ago, Gibsonm said:

Well to an extent you already do. The manual describes the default (or template) behaviours (refer pp 110 and 112):

 

Unit behavior (vehicles) for route tactics
Route tactic
Unit behavior
Engage
• If enemy is within range, stop to find a hull-down position facing enemy. The maximum range is determined by the value of the fire-control property and ammo range.
• If in column formation, try to stay on roads.
Assault
• Always stay on route. (Stop if entering an ICM artillery field.)
• If in column formation, try to stay on roads.
March
• Stay on route unless under direct fire and enemy is near and flanking (in which case stop to find a hull-down position facing enemy).
• If in column formation, try to stay on roads.
• All vehicle types travel at the same speed if given the same speed setting.
Retreat
• Always stay on route. (Stop if entering an ICM artillery field.)
• At the start of route, back up and pop smoke if enemy are present.
• If in column formation, try to stay on roads.
Breach
• Always stay on route. (Stop if entering an ICM artillery field.)
• Units with obstacle reduction capability will attempt to create a lane through an obstacle on such a route.
• Bridge layers will try to lay a bridge over water if the bridge is long enough to span the water.
• Do NOT try to stay on roads.
• Minimally avoid water.
Scout
• If an enemy is encountered, always stop to seek a turret- down position facing enemy.
• If under fire, retreat back along route (thus taking on retreat tactics).
• Look for and expose enemy minefields.
• Do NOT try to stay on roads

 

Unit behavior for waypoint tactics
Wpt tactic
Unit behavior
Hold
• While no enemies are detected, assume a turret-down position facing a specified direction.
• Temporarily move from position to avoid ICM artillery attack.
• Do NOT move from position to engage enemies that cannot be seen, or to avoid HE artillery attacks.
• Infantry will enter nearby buildings.
Defend
• While no enemies are detected, assume a turret-down position facing a specified direction.
• Temporarily move from position to avoid ICM artillery attack, or to avoid HE artillery attack if not engaging an enemy.
• Can move a few hundred meters from position to engage enemies on front flanks that cannot currently be seen.
• Embark on the first attached, non-conditioned route if moderate losses are sustained.
• Infantry will enter nearby buildings.
Guard
Same as Defend except:
• Embark on the first attached, non-conditioned route if under fire.
• Infantry will stay outside nearby buildings.
Stay
The unit will just sit and not move regardless of the tactical situation and enemy presence. This obviously is a dangerous option and should be used only in special cases such as resupply. You can assign typical resupply formations like herringbone and coil to a unit staying at a resupply point.
Suppress
Same as Stay except:
• The unit will fire at the focus point of the battle position. The rate of fire will slow down over time unless the order to suppress (or “fire here”) is renewed.
None
Use None to remove any other tactic previously assigned.
In essence, having no tactic assigned allows a unit to seamlessly continue onward to another route.
With None selected without a follow-on route to go:
• The unit will remain in place and will not move except temporarily to avoid incoming artillery.The unit will orient on any enemies they see.

 

Sort like that, but beyond that. Something like:

 

Engage route + Bounding overwatch + multiple units (just to name one of a thousand possibilities) where one binds 2 or more different units to the same route pattern and they behave according to a predefined or scripted "doctrine".

Share this post


Link to post
Share on other sites

abrogate

2 hours ago, stormrider_sp said:

Sort like that, but beyond that. Something like:

 

Engage route + Bounding overwatch + multiple units (just to name one of a thousand possibilities) where one binds 2 or more different units to the same route pattern and they behave according to a predefined or scripted "doctrine".

 

Well the whole idea of this product is to train people to make those decisions. In the main those people are Troop / Platoon commanders, Cbt Team commanders and BG / unit commanders.

 

If you just script everything and the Blue player is reduced to just hitting "go" then its not really a training tool is it? ;) Also you remove the "art" from the "art and the science" thing by just applying templates.

 

Certainly its is already easy enough to have OPFOR scripted to be "doctrinal" so that Blue can fight against a known enemy and their known TTPs.

 

But as I say eliminating the flexibility inherent in most NATO countries planning / training is problematic.

 

I suspect this is a side effect of wanting single players to control scenarios well beyond their "span of command" e.g. A person running BG missions - 4 x Cbt Teams - say 20+ Platoon sized units + Arty + Air + ...

 

There is a reason why command structures exist. Most Commanders can cope with 5 - 6 sub units and that's why a Company or a Cbt Team is say 4 x Platoons, a slice of CSS and a HQ unit or going up a level, a Battalion / BG is 4 x Cbt Teams, a slice of CSS and a HQ. The Commander has to plan / write orders for at most 6 sub units at any given level and the subordinate HQ does the planning / writes the orders for the sub element that they in turn command.

 

The other issue is that no doubt the AI complexity will have to go through the roof to support that.

 

We already have people moaning about the AI. In your example what is the determinant for the unit to continue to use Bounding Overwatch until it either transitions to Travelling Overwatch or adopts a defensive posture. Does no contact for X minutes means it goes to travelling overwatch? If it is "contacted" what is the determinant to stopping its advance (having indirect fire land on it but taking no damage, taking small arms fire, one poorly aimed ATGM that doesn't hit anything, one tank round, one vehicle hit but not damaged, two vehicles hit but not damaged, one vehicle hit and K killed, ...).

 

These are decisions the player needs to make based on a range of inputs and just abrogating that to the AI IMHO is bad.

 

Edited by Gibsonm
Poor choice of verb - watching to much of "The Crown".

Share this post


Link to post
Share on other sites

i don't mind if people want to discuss the merits of alternatives to what i'm proposing, as long as what i am suggesting doesn't presume to be thrown out in the debate.  the whole point of my grid is to plan the computer opponent's moves, which doesn't have the benefit of company grade or field grade officers making decisions in real time against a human who does- to reasonably orient the computer's forces to the map, to predict and to react to conditions in the future, and to refine those behaviors. it's not in itself a doctrine or a template: it's simply to orient those routes and any planned movements and behaviors. it can facilitate a detailed plan with

contingencies or behaviors whether they are in the field manual or not (for example, i want to simulate a guerrilla unit failing a morale check, panicking and retreating to different areas). in sum, the grid allows the mission designer an easier way to visualize future events and plot more complex behaviors rather than sit in place die or move forward on only one or two routes through a kill zone like zombies. in a way there already is the map grid, it's just that the scenario logic does not recognize the inherent map grid squares for purposes of defining functional areas, nor are the grid squares resizable.

Edited by Captain_Colossus

Share this post


Link to post
Share on other sites
4 hours ago, Captain_Colossus said:

the whole point of my grid is to plan the computer opponent's moves, which doesn't have the benefit of company grade or field grade officers making decisions in real time against a human who does-

 

I get it and agree, its a great way to make a computer opponent make intelligent(ish) responses to your actions.

 

Regarding grids; I prefer making irregular grids which follow the actual terrain.  I use the LOS tool to find kill zones and choke points and each one will get a zone.  Seems to give better results in less time for me.

 

Share this post


Link to post
Share on other sites
2 hours ago, ben said:

Regarding grids; I prefer making irregular grids which follow the actual terrain.  I use the LOS tool to find kill zones and choke points and each one will get a zone.  Seems to give better results in less time for me.

I am more inclined to do it this way also. Having the entire map divided into grids seems unnecessary to me. Drawing a few zones on key terrain features, high speed avenues of approach etc seems sufficient.

Share this post


Link to post
Share on other sites

You might want to look at "Named Areas of Interest", "Targeted Areas of Interest" and "Decision Points" for a real world application of what you are proposing here if I understand the OP's intent.

Share this post


Link to post
Share on other sites
11 hours ago, Bond_Villian said:

I am more inclined to do it this way also. Having the entire map divided into grids seems unnecessary to me. Drawing a few zones on key terrain features, high speed avenues of approach etc seems sufficient.

 

the map already has grid squares overlaid on- across the entire map. again, this is only to make the grid squares functional.

 

how someone would use it is up to them- if they want to use it in select areas, that's fine. like i said in the beginning, the point is to make it scalable and user defined however they wish- say a 10 x 10 grid, or 5 x 5, or perhaps 3 grids, 1 that is 10 x 10, 2 that are 5 x 5.

 

in my example above, this is just showing what it might look like. it's not a prescription.  in this example i am using a larger grid to help visualize the key areas in relation to areas that may not be as relevant, using a large grid does not mean that all grid squares need be functional and have some behavior assigned to it, but it

allows me to see things in relation to one another. so again, the map already inherently has a grid overlaid across the whole thing, there is nothing unnatural about this.

Share this post


Link to post
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
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...