Advertisement

Unit Control (orders), Leadership, and integration

Started by March 12, 2002 10:15 PM
13 comments, last by Dauntless 22 years, 9 months ago
I was thinking about a design in which units in an RTS would be controlled via Intelligent Agents. First let me explain some terminology. Unit: A single instance that are the building blocks used to create Organized Units (OU). Units can not be controlled by the player directly. Examples- single tank, infantry squad, one artillery piece, one warship, etc. Organized Unit (OU): OU''s are groupings of Units that are the smallest units that can be controlled directly. OU''s need not be homogenuous, for example, a reinforced mounted infantry platoon might be composed of 3 rifle squads, an AT Squad, and 4 M2 Bradley''s. Control Group (CG): CG''s are the composition of "Armies". Control Groups can be user defined by the player. This is the hierarchical representation of military structure, i.e. companies, brigades, regiments, etc. Commanders: Commanders are attached to every OU and are the actual mechanism by which OU''s are committed to action. Commanders must interpret input via empirical information from the OU and also from Communications via other Commanders, other OU''s and the player as well. Avatar: The avatar is the physical representation of the player. The avatar is therefore a potential target of opposing armed forces. So, now that some terminology is out of the way, here''s how I''d like things to work. The trick is managing large groups of units is identifying how orders are given both strategically and tactically. At a very high and abstract level, an CG can be ordered to do something like, "Drive through the Ruhr Valley and capture the munitions factory and all roads, bridges leading to it". Obviously this has a lot of subjectivity and openness left to it. So what are the basics of ordering around large groups of units? 1) Composition: What CG''s do I attack with....what forces should I use? 2) Formations: what OU''s should be out front? Should I have them in line, column, attack columns, etc. 3) Aggressiveness: Is it an assault or is it a probing of the opposing forces defenses? Just a scouting foray? 4) Path: In what direction shall the CG''s attack or defend from? Then there are also the factors of military interaction. What I mean by this is the organic and internal capabilities of combined unit integration. Huh? Okay, let me see if I can explain this. A structured military fights in a certain style, and the various Organized Units are trained to fight with other Organized Units in a certain way. For example, some Control Groups have organically attached ARtillery batteries or Mortar units specifically for use by the Commander. In other words it does not have to be "requested" from a larger pool of support units. So youhave to be able to model the way that groups of units are able to interact with each other. 1) Chain of Command: How orders flow from Commander to sub-commanders affect how quickly decisions can be made. 2) Unit Cohesion: Some larger Control Groups in some militaries require the Organized Units to remain in close proximity. The ability to spread out your OU''s is an advantage. 3) Organic Support: Are support teams integral to the OU''s or CG''s? Or must the be requested from a seperate pool of resourcces? 4) Independence: in some militaries, the Commanders at the most smallest OU level have very little decision making capabilities, and instead are ordered through senior level commanders. IT is related to chain of command, but CofC deals more with communcations whereas Independence deals more with decision making capacity. So now, here''s the trick, how do you design the Control factors, the Integration, and the Leadership of commanders? The Control Factor is the actual User Interface that the player must deal with in issuing orders to the commanders. The Control Factor must also deal with the various levels of orders...from high level abstract strategical orders, to lower level tactical orders. The Leadership question deals with how the hierarchical nature of Commanders controls how orders flow from the top-level CG Commanders to the low-level OU Commanders. Also it deals with how Commanders must recieve input from the OU, from other Commanders, and from the player and then make decisions based on the various levels of orders. Commanders must take the the various levels of ORders from the player and work within their confines. Integration deals with the military "style" of a country. Most RTS games make sides unique by their units. I want a game that differs not just by units, but by how they are controlled and how their armed forces integrate holistically. Probably some of you are asking...."why the level of abstraction? Why not just order all the units directly?". I want to simulate how large groups are ordered in the real world. I know many people are sick of the click-fests that are RTS''s today. Simply dragging a square around a bunch of units and hitting the CTRL+1 key isn''t my idea of organization either. Armed forces are created holistically and act synergistically. In other words, you don''t just create a bunch of units and then randomly create a mob. Units are designed to work with other units, in a certain ratio usually and are led and organized in a certain manner. I think this is the only decent way to logically control large masses of troops in real time. My primary concerns are the Artifical intelligence capabilities of the Commanders, and how they interpret the orders of the player as well as making their own decisions. I''m also debating how to program the objects themselves...from the units, to the commanders to the OU''s to the CG''s. I don''t consider myself a programmer, but I think I know enough to do a pseudo UML mock up of what they would require. So if anyone has any suggestions on any of this, it would be appreciated. I''ll delve a little more on how I''d like the game to run later.
The world has achieved brilliance without wisdom, power without conscience. Ours is a world of nuclear giants and ethical infants. We know more about war than we know about peace, more about killing than we know about living. We have grasped the mystery of the atom and rejected the Sermon on the Mount." - General Omar Bradley
You and I tend to think along similar lines so often it is scary.

My own approach to unit control lies somewhere between realism and current systems.

Squadrons: Roughly analogous to your 'units'. These invariably contain similar types of unit, but not necessarily the same. e.g a tactical infantry squadron might contain four soldiers armed for light mid range and close combat, and one soldier armed for long range anti-tank purposes. Unlike your interpretation, you can control them directly, although this is probably not the most efficient solution unless you are demonic at micromanagement.

Platoons: Analogous to your 'OU's. When the player rubber bands/shift-clicks a one or more Squadrons, they are instantly formed into a platoon (which may or may not be hotkeyed). Thereafter single clicking any unit in that group selects the whole group. Units can be removed from a platoon either in groups or individually simply by adding them to a different platoon (ie by rubber banding or shift-clicking).
Orders can then be given to the Platoon as a whole.

Of course, the problem is getting the units to behave sensibly as a group, rather than a bunch of separate units. e.g:

Suppose I create a platoon of 8 tactical infantry units, 5 APC's, 4 heavy strike tanks, 6 artillery units and 9 dropships. I then give them an order to attack a small enemy base.

A fairly niaive interpretation of the orders might result in the following:

Artillery move within range and start firing. Tanks and infantry wander over to the enemy base and attack, along with the APC's and the dropships. Probable result? The unsupported artillery gets attacked by enemy response units as soon as it starts bombarding the enemy positions. The infantry and tank support arrives in dribs and drabs, giving the opponent plenty of time to muster defences and deal with the assault. Coupled with casualties from friendly fire (whatever is left of the artillery is still bombarding everything) the attack is a complete disaster.

What you might want it to do would be something more like this..

Five of the infantry units climb aboard the APCs. The APC's and tanks then roll on board the dropships. Meanwhile, the artillery rolls to the nearest hill within range of the enemy base and start bombarding. The remaining three infantry go with them as close range support.
The dropships unload just outside of radar range and move to safety. The APC's and tanks move into range, whereupon the infantry unload and open fire on the enemy base. The artillery is kept up to date with the troops positions and only attacks areas which are well away from friendly troops.

Now, to be honest, even if it were possible, I am not even sure that it would be desirable to implement a system that was capable of doing this - a player could just lump all his units together in one big cluster and click the attack enemy button and they would all go off and do their thing. It removes too much player interaction. But I think you should be able to perform the operation detailed above without using more than two platoons - one for the artillery support (including it's infantry support) and one for the strike force. Provided each unit has a rough idea of it's purpose in the grand scheme of things you could probably do this with AI scripts:

APC: Any command involving long distances, pick up infantry, slowest have priority. Unload close to enemy positions or when coming under heavy fire. Retreat to a safe distance when not transporting units, but be ready to move in and pick up units if another order (e.g a retreat order) is issued.

Dropship: As for APC, pick up any unit, slowest have priority. Unload if under heavy fire or entering enemy radar range.

Strike Tanks: Move into range of target, attack prioritising heavy armour or large groupings of units. Do not attack targets close to friendly units due to friendly fire problems. If enemy infantry get close, attempt to run them down.

Infantry: Maintain well covered positions, trying to keep out of heavy fire as much as possible. Defend self first, defend friendly units second (prioritised on ability of those units to defend themselves from a given threat) go on offensive last of all.

Artillery: Maintain high ground in order to maximise visibility and range. Attack armour/buildings/large groups of enemy units first. Do not attack a target if there is a risk of hitting friendly units.

General Platoon rules: Any group of units always moves at the pace of the slowest.

Edited by - Sandman on March 13, 2002 9:07:50 AM
Advertisement
As usual a great model for this is real life. Try Tom Clancy''s <u> Into the Storm: A Study in Command </u> Also just read some Clancy novels esp. <u> The Bear and The Dragon </u> which mentions "squad-leader in the sky" syndrome or the controlling of individual units by much higher-ranking officers and how it was possible in Vietnam (as well as in the story) but wasn''t a good idea. Sandman- I read the thread "of Lieutenants and Learning Agents." and I loved the idea of being able to teach your units your own tactics. I also think that it should be up to the player to determine the level of control he wants. If you want to just sit their and once in a while press 1 then R to retreat Group 1 then you should be able to remain competitive that way. But if you want to engage in a mad click-fest controlling each individual unit then you should be able to do that as well.
Great minds think alike eh Sandman? just kidding

I wanted the player to be able to customize alot of the Unit Control and Military Organization. Instead of having precanned militaries, I essentially want the player to be able to design the military from the ground up. Not just unit design, but how the hierarchy of command works, and the military style that the player wishes to control.

I may have a basic and advanced options...where Basic has preset military capabilities, but have an advanced version that is able to be modded fairly easily via scripts that change object member variables and function parameters. This will basically cover anon''s suggestion of having the player chose how he wants to control his forces, and is exactly what I intended when I said I wanted to be able to control the integration of a military.

I also think its a good idea to have units learn from your own style. If the commanders especially and units to a lesser degree are coded with Neural Nets, they should be able to learn on their own as to what works and what doesn''t over time. I think with Genetic Algorithms, they should be able to "learn" from the player''s own actions, and therefore develop a style similar to that of the player. I think it''s actually more interesting for a unit to learn on its own though, just to see what kinds of emergent behavior will come out through the units own actions.

The world has achieved brilliance without wisdom, power without conscience. Ours is a world of nuclear giants and ethical infants. We know more about war than we know about peace, more about killing than we know about living. We have grasped the mystery of the atom and rejected the Sermon on the Mount." - General Omar Bradley
Dauntless:

As a programmer, I have to ask -

What exactly constitutes successful learning of the player''s behaviour here? Or of "what works"? What kind of fitness do you assign to these tasks?

ld
No Excuses
Good question on the fitness test for the commanders. I suppose you''d have to set up "victory conditions" for each kind of order, because different orders have different goals. For example, if a commander was given an order (or decides itself) to do a reconnaissance mission, its goal is to avoid detection and gain information on the enemy. This is in direct contrast to a commander that was given an order for an assault, in which the overriding victory condition would be to destroy the enemy as quickly as possible with the least amount of damage inflicted on itself.

So determining fitness will be incredibly tricky. I also think that determining inputs (nodes I think they would be called in NN terminology) will be diffucult as well due to the variety of orders. So perhaps the first thing I should iron out is exactly how I want orders/control to be done, since it is foremost in the problem domain.
The world has achieved brilliance without wisdom, power without conscience. Ours is a world of nuclear giants and ethical infants. We know more about war than we know about peace, more about killing than we know about living. We have grasped the mystery of the atom and rejected the Sermon on the Mount." - General Omar Bradley
Advertisement
custom design

I think that''s the key motto, if you want to
a) take away control of individual units
b) increase ease of control of a large number of units

I think Sandman outlined it pretty good. Units should all have detailed AI settings, that can be further defined by individual players to their liking. But I think that players should also be able to set detailed army AI settings. Not just units should be able to act on their own, the entire army should. If a player plays a certain way, he should be able to set his army to a default mode that follows his tactics. During gameplay, the player is left to make adjustment according to the actions of his opponent.

I think a player should be able to design specific combat tactics beforehand. He should be able to tell the 8 infantry, 5 APC''s, 4 strike tanks, 6 artillery units and 9 dropships exactly what to do. " 5 Infantry climb aboard APCs; APCs board dropships; artillery approach enemy location, find hill and start firing at max range; 3 infantry support artillery; etc"

Of course, a player will not know beforehand what his enemy will throw at him. Therefore skilled players will have many pre-designed tactics at hand, to be used against many different opponents'' tactics.

If the player is able to choose from different sets of tactics, instead of what''s currently going on in RTS games, the battle itself might play out like a game of chess, in which each side makes calculated moves, monitoring the battle and choosing their actions carefully.

Actually, it''ll perhaps be more like a game of football, where the player is the coach (commander), telling his players which plays (tactics) to run during play (battle).
You either believe that within your society more individuals are good than evil, and that by protecting the freedom of individuals within that society you will end up with a society that is as fair as possible, or you believe that within your society more individuals are evil than good, and that by limiting the freedom of individuals within that society you will end up with a society that is as fair as possible.
I think customization is vital. That's why I coined generic and abstract terms like OU and CG. What the player will be allowed to do is define their own OU....not just what units make up the OU but also its size. Ditto for the CG, as different groupings of OU's and CG's will be the building blocks.

I am doing this also because in the design of a game engine you need to make things fairly generic so the specifics of the game can replace certain terms. For example, platoon might conjure up an image of a modern or near-future setting, but wouldn't be applicable to ancient or fantasy settings.

So a player could for example create create an OU he calls a Century, and combine several of these into a CG called a Cohort (or is it the other way around? I forgot now...). As I mentioned before, every game I know of in the RTS market makes sides unique solely on the types of units available. There is no differentiation whatsoever in how to control units, or the interoperability between units. I hope to change that with my game. I think games focus too much on the superficial differences between units...or providing units with wildly different capabilities, and not enough on the actual infrastructure and methodology of the armed forces itself.

I'm making things generic not just for the game engine, but also so that the player can customize his military to his hearts extent. I also want the very country he creates to be modifiable. For example, he could create a nation with very little natural resources but fanatical troop quality (perhaps they almost never have to take morale checks).

As to how to implement this customizable abilities, I imagine a scripting interface (via Python) where the player can configure many of the settings this way. It's actually a lot easier than it sounds. Python can use Tkinter as a gui interface to change variables within objects (if you want an idea of what scripting can do, download the Nebula engine). Obviously, this may put off beginner players, so I would also include prebuilt nations and military structures for them to use. However, for advanced users, I think this would be an interesting thing to play with. Now victory will go not just to judicious use of force, but how to best organize them as well.

I'm pondering how to prototype alot of my ideas. I was thinking of a simple 2d hex based game. I really need to learn more about AI to get more ideas on how to implement my ideas though. Has anyone used the OpenAI sdk?

[edited by - Dauntless on March 14, 2002 5:13:33 PM]
The world has achieved brilliance without wisdom, power without conscience. Ours is a world of nuclear giants and ethical infants. We know more about war than we know about peace, more about killing than we know about living. We have grasped the mystery of the atom and rejected the Sermon on the Mount." - General Omar Bradley
I was thinking about building preset tactics that could be employed by various levels of CG''s or OU''s. For example, you could issue an order, "right wheel pivot" which would cause your unit to swing like an arm on a pivot...usually used as a flanking maneuver.

The trick here is that different sized unit levels have different tactics to employ. It would also have to be set up contextually so that if you select a certain sized CG, the available options would be available in a drop down, or some other UI selection.

Actually, I haven''t really put much thought into the actual UI that the player would deal with to control units, so I''ll have to do some thinking on this. At it''s most basic, the avatar should have a list of Commanders. From here, he needs to attempt a Communication with that commander. If the communication function is succesful, a token that contains the order is passed to the commander. The reason I want it like this is because even if the Communication function is succesful, it is possible to intercept the token and change the contents or at least make it garbled, or simply be the "man in the middle" and examine the contents of the token.

Once the Commander is reached, a menu will be presented with various options...though I haven''t really thought about what it would look like or even all the options to be honest.

I think my game might be a bit hard to visualize from the way I explain it since it is very different. I''m going to see if I can make a flowchart of how I want things to work as well as mock-up rules for te tabletop version I''m coming out with. The huge difference with the table top version though is it will be turn based.

Anyone with lots of AI knowledge would be helpful here in terms of what inputs to look for as well as how to gauge fitness for NN''s (how do some nodes get strengthened while others weaken?).
The world has achieved brilliance without wisdom, power without conscience. Ours is a world of nuclear giants and ethical infants. We know more about war than we know about peace, more about killing than we know about living. We have grasped the mystery of the atom and rejected the Sermon on the Mount." - General Omar Bradley
silvermyst

the football analogy is pretty close on target. The major difference being that you have several different types of "Teams" to give plays to, and that instead of having a huddle to think of a plan, you do it in real time.

Actually I liked Shogun''s concept of having "Strategic time", where after a battle was played out, then you could look at the overall map of Japan and then consider your next moves (as well as deal with socio economic concerns).

So in a way, it is sort of like chess. The player that develops the best tactics to utilize his forces will be at an advantage. Even the different tactics themselves could be customized in the way that console gamers can create macros of their favorite moves.
The world has achieved brilliance without wisdom, power without conscience. Ours is a world of nuclear giants and ethical infants. We know more about war than we know about peace, more about killing than we know about living. We have grasped the mystery of the atom and rejected the Sermon on the Mount." - General Omar Bradley

This topic is closed to new replies.

Advertisement