RTS unit AI. Intelligence or Simplicity?

Started by
26 comments, last by vallentin 14 years ago
How intelligent should the AI of units in an RTS be? On the one hand, it's frustrating if units are incredibly "dumb". Like the infantry in some C&C games that would heroically their position until they got run over by a tank. Also with the whole "more realism" thing that seems so important for games people want to give more abstract orders ("Attack that position and flank it") instead of "microing" every single unit, since that obviously isn't what a real general does (telling every infantryman personally what to do...). On the other hand, units that are trying to be intelligent can also be extremly annoying. Either because they are not doing what you expected them to do, or because they insist on doing something "wrong" and you have to contantly give them explicit orders. When I set out on my current project I started with the idea of having a very high level command system where you would assign units to some sort of "strike groups" and then only give abstract orders like "take that position", "destroy that enemy group" etc. and wanted them even to request permission to retreat or artillery assistance... Since I am only a one guy team programming for fun I almost immediatly realised that I'd never get there since even moving around a single unit intelligently proved to be quite a challenge. I also switched the whole game to a space setting since that allows me to disregard most of the expected vehicle physics, wayfinding etc. Also, after having replayed some of my old RTS Games, I realised that I prefer having units that are predictable in their "stupidity" (meaning, they do exactly what you tell them to in a straightforward way) than ones that are unpredictable because of their AI. This can be something as simple as wayfinding. In starcraft when the way for a unit is blocked by another unit at a choke or similar they start to recalculate their path which generally makes them wander around aimlessly further screwing up the wayfinding of other units they cross (ever tried to defend a base against carriers with a lot of goliaths?...). I'd rather have them to just stop when their path is blocked and issue a "can't go there" message and move on as soon as the path is cleared again. So what are your thoughts? Do you want intelligent behavior and a highlevel command system or just dumb tell-me-exactly-what-to-do-units?
Advertisement
You are confusing the issues. Starcraft units are not intelligent. They just have bad pathfinding (fixed in Starcraft 2).

It depends totally on the design whether simple or complex commands fit better. Half or more of Starcraft is action and multitasking. It's also a spectator sport. Within those parameters dumb but snappy units are best. For a simulation feel, OTOH, the units must not be in your direct control.

I dig Starcraft, even though I'll never have mechanics good enough to play a serious match. But I would also like a hardcore infantry/armor/artillery RTS with semi-realistic command system where you have no hands-on control of anything. Possibly even so that you don't see any of the battlefield except your own LOS, but you get radio reports from your troops when they spot something.
"a hardcore infantry/armor/artillery RTS with semi-realistic command system"

Now, that's one of the things on my list; I wrote one many years ago, which you can't play because it's used for military training. So in the back of my mind has been a redevelopment for modern systems... I'm just umming and ahing about whether anyone would actually play a game where one of your jobs is to work out the prioritisation scheme for having the artillery tasker allocate resources to fire requests..

The problem is that you assert the question from the wrong perspective.

From a gameplay perspective, micro-management increases the user engagement (he actuall has stuff to do if he wants to win) but you have to make sure that these clicks are "fun" to do and "rewarding". You obviously don't want a game about boring clicks for little advantage. The reason they removed most of the workers micro-management from SC2 is because they felt it was more FUN to micro-manage military units on the offense than to assign probes to patches of mineral.

Now, a realistic system may play out well, but how engaged will be the user? Once he clicks on that area, what can he do to affect the outcome aside from looking at how well the AI is made? This system feels like the player would spectate the events rather than influencing them. Unless you have something to burden the player with, that is fun to do, and rewarding meanwhile, this mechanic sadly fails. I'm not saying it wouldn't work great, but alone? It wouldn't work. Maybe if your game is about a lot of base buiding, or massive amounts of units, then maybe the player will be burdened, but how will it be trully rewarding. In other words, what incentive to you give the player to be extremely active in-game to try and affect the outcome of the battle.

You obviously want to avoid Macro-control // landslide attack. It is a boring victory when you outnumber the opponent 100:1. Strategy implies you win through strategical choices. This is far more exciting than the short wow-factor of outnumbering the enemy.
The fact you were there before they invented the wheel doesn't make you any better than the wheel nor does it entitle you to claim property over the wheel. Being there at the right time just isn't enough, you need to take part into it.

I have a blog!
Quote:Original post by Stroppy Katamari
You are confusing the issues. Starcraft units are not intelligent. They just have bad pathfinding (fixed in Starcraft 2).


I'm aware of that, I was just using that as an example how units following a "nontrivial" pattern can annoy the player. After all Pathfinding is part of the units AI...
Also obviously, if there was a way to have "perfect" AI for a unit, it wouldn't be a problem. But since the AI will always have some flaws, the unit will at some point exhibit unwanted behavior (which can be as simple as your dragoons blindly walking into a siege tank line because they autoattack/follow some worker that walked by them).
I have considered ways to remove the micro-management from an RTS as well by trying to make units think for themselves a little better. Here are a few ideas that I've had:

Give the player the ability to assign units (or groups of units) certain types of behavior. For example, do you want your infantry to attack the strongest or weakest unit, or the unit with the least amount of health or most? One thing that drives me nuts on some AI's is that an enemy unit may be at <5% health, but no one kills it (automatically).
This could be simple:
AttackMode = WEAKEST_FIRST, STRONGEST_FIRST, MOST_HEALTH_FIRST, LEAST_HEALTH_FIRST, or NONE.

Same idea for their own health. You could tell your units how to act when near death:
NearDeathAction = RUN, FIGHT, SEEK_MEDICAL, or NONE. If its RUN or SEEK_MEDICAL, you would give them a threshold at which to do that. This would reduce some of the micro management in battles, where you have to keep telling your near death units to run away or go out of range. Doing this would need a decent pathfinding algo for all your units as well, so that units will move out of the way so a RUNing unit can get through.

These ideas look good on paper, but implementing them would be tough I think. To get a good system you would have to break the above modes apart even more (what if you want infantry to attack the strongest unit AND the one with the least amount of health?). Perhaps some games already do this behind the scenes?
Quote:Original post by geo2004
Give the player the ability to assign units (or groups of units) certain types of behavior. For example, do you want your infantry to attack the strongest or weakest unit, or the unit with the least amount of health or most? One thing that drives me nuts on some AI's is that an enemy unit may be at <5% health, but no one kills it (automatically).
This could be simple:
AttackMode = WEAKEST_FIRST, STRONGEST_FIRST, MOST_HEALTH_FIRST, LEAST_HEALTH_FIRST, or NONE.

Dragon Age uses a system like this, where you can set the behavior patterns for your characters. I haven't really been able to do this successfully (red rings of death killed my 360), but it's something I'd like to see ported to RTS games. It would allow strategy to start prior to the actual game. And, as in Dragon Age, the number of commands that can be pre-programmed this way could become another unit attribute. During gameplay, the player could take manual control to override the programming, and could also issue general commands that would apply to his entire army (attack using pre-program mode 1, defend using pre-program mode 2, etc.). The pre-program blueprints would likely be shared among players, similar to the deck builds of Magic the Gathering.
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 you will be alright with dumb Units. Most RTS Players like the Micromanagement.
Quote:Original post by hiigara
I think you will be alright with dumb Units. Most RTS Players like the Micromanagement.


That is like saying that you should be alright with large cars, because most people who drive 'like' large cars when there are very few options for small cars.

Personally I can't stand micromanagement. It isn't fun, it is annoying, and it too often turns into a click fest and who can remember what order to press hotkeys in.
Old Username: Talroth
If your signature on a web forum takes up more space than your average post, then you are doing things wrong.
Quote:Original post by Katie
"a hardcore infantry/armor/artillery RTS with semi-realistic command system"

Now, that's one of the things on my list; I wrote one many years ago, which you can't play because it's used for military training. So in the back of my mind has been a redevelopment for modern systems... I'm just umming and ahing about whether anyone would actually play a game where one of your jobs is to work out the prioritisation scheme for having the artillery tasker allocate resources to fire requests..

Whose role are you actually playing when doing that? A logistics officer at artillery battalion HQ? It doesn't sound terribly interesting even though I'm familiar with artillery.

The scope of what I'm thinking is a front-line company or battalion where you play the commander.

This topic is closed to new replies.

Advertisement