Jump to content

View more

Image of the Day

Adding some finishing touches...
Follow us for more
#screenshotsaturday #indiedev... by #MakeGoodGames https://t.co/Otbwywbm3a
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.

Sign up now


4: Adsense

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
24 replies to this topic

#21 Palidine   Members   


Posted 06 July 2005 - 07:17 AM

Original post by Anonymous Poster
I'll make a comment on the C&C Generals AI though.

So the C&C generals AI is 100% scripted. That's why the opening attack is always the same. It's almost completely deterministic and thus really crappy. You can actually look at the AI if you open up the Libraries/ folder and open one of the .map files in the Worldbuilder tool. You have to remember though that it's ~5yrs old so hardly represents the pinnacle of RTS AI. (Incedentally the AI for generals was completely new for that iteration of the franchise. It had really good reviews when it was released, it just looks crappy now b/c our expectations are higher.)

At any rate, more modern RTS AIs are a lot less deterministic and the best don't actually cheat at all. The way they are challenging is by exploiting the things that a computer can do better than a player. More or less that is soley micro-management. A human is always going to be better at tactical planning and long-range thinking so you can't win by just making an amazing tactical planner.

Humans however are serial thinkers. We can only think directly about one thing at a time and to multi-task we have to keep switching our attention to different parts of the map. Even the best players can typically manage no more than 3 or so parts of the map. Any more than that and the effectiveness of the forces at those locations is lowered because the player cannot micro-manage them effectively.

IMHO the key then to making a challenging AI opponent then is to keep the player frantic by waging a war on many fronts. Whereas the player has to move the camera around all the time (thus losing focus on local battles) the AI does not and can operate everything simultaneously.

I think that a potentially great strategy for RTS AI is to attack on at least 3 fronts at all times so that the player is forced to keep switching attention between the attacks. I find that it works really well in terms of distracting the player. Basically if you can constantly maintain 2-3 attacks, the player is either going to lose one battle due to lack of attention or they will forget to queue up units at their base and the AI will get a step ahead in production. Essentially you are exploiting the ability of the AI to never lose focus on what it is doing. You also exploit the general lack of low-level unit AI. In most RTS games units that are near other units that are being attacked will not move over to help their buddies out. It's done for game mechanic reasons (you don't want the player's units to run around aggroing on everything b/c it might destroyed some kind of bait tactic and annoy the player). If you can keep the player frantic then you can win.

I think it's also vital that the AI plays clearly towards the win conditions of that map. In most RTS games the win condition is "all enemy buildings destroyed". Thus the AI should only consider buildings to be targets. If the player takes his entire army to the side of the map, the AI should completely ignore them and just rush the base.

Anyway, whatever road you choose to go down the single most important thing for developing a challenging RTS AI is to watch as many replays of RTS battles between people who are the best in the world at the particular game. The most effective winning strategies actually have little to no actual strategy to them. Typically it boils down to rushing and attacking multiple fronts of the enemy. I think the danger in developing an RTS AI is to make up theories of how military battles actually unfold and to make your AI really good at military theory. It's certainly a more appealing and complicated problem to solve but actually has little to do with how people win at RTS games.


#22 Luckless   Members   


Posted 06 July 2005 - 12:02 PM

C&C:G is from 2003, so unless someone has changed how the math works, thats not 5 years :P

But as for the AI going on multiple fronts and that, it should be limited to mimic what a human can do. Whats the fun in playing against a computer that can keep pumping out troops, and slowly carve your army to bits from every side, when you have no chance to use such an attack style.

Also the part about "How people actually win an RTS", thats just how they win that style. Take a look at Lords of the RealmII (Actually mixed time, turn based empire manament, realtime army battles) The gameplay styles are fairly different, because the game is simply played differently. So if the game play is set up differently for a different and better AI, the players will adapt.

#23 d000hg   Members   


Posted 06 July 2005 - 08:33 PM

http://www.neoseeker.com/Companies/profiles/Westwood_Studios/ Maybe he meant the original C&C?

The best way to defeat an AI who just sends units at you is probably to do the same. An AI using tactics would require tactics to beat. I don't like the idea of an AI who can fight 8 battles at once - frantically switching camera is not fun to me. Being able to have decent group AI for your units would let them fight multiple fronts by themselves though, leaving you to coordinate which divisions fight where.

#24 Daniel Miller   Members   


Posted 07 July 2005 - 03:03 AM

The most effective winning strategies actually have little to no actual strategy to them.

What games did you watch, and what do you mean by "strategy"?

#25 spencerholmes   Members   


Posted 12 July 2005 - 08:43 AM

Hello. Trust me there are alot of resources out there for anyone who wants to learn about Game AI. My main university project was on Game AI and i had quite a interesting time researching.

I will tell you what i know...

RTS game usually use AI techniques such as:

1. A* Pathfinding for movement of units and other game entities.
2. Scripting.
3. Influence maps to determine how popular a certain region is on the map,
attack points, choke points, item location and weak spots.
4. Heirarchical finite-state machines which are you to apply behvaiour to npc'

Here are a couple of links i used:

www.gamasutra.com //very useful

or you could use a torrent search and look for game AI ebooks!

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.