Jump to content

Attack AI improved in CMBB?


Recommended Posts

Chess is naturally a more tractable problem then a far more open ended problem - like combat mission. The difference in complexity means a crunching/processing approach won't work in CM the way it can in Chess. The problem has to be approached very differently. I've developed bayesian techniques for diagnosing faults in networks with uncertain "readings" and it's non-trivial. It also doesn't look anything like rule-based a.i..

What does CM use for it's a.i. anyways?

Link to comment
Share on other sites

  • Replies 55
  • Created
  • Last Reply

Top Posters In This Topic

Things become a lot more rational to discuss if you stop using that stupid "artificial intelligence" term, it means different things for most people, except for people actually working with what the others call AI. The German term "kuenstliche Intelligenz" is also a correct translation and is used for the same thing, but the different meaning of the word "intelligence/z" make it even harder when a German and an English-speaking person meet.

Anyway, the question here is, when will be see a programmed opponent which can do a decent terrain and opponent force analysis and can constrain its actions with a set of "don't try that at home" rules which still leave enough room to come out with something the machine can execute (instead of throwing up with "no solution"). This programming involves guesses and judgement (that is what makes a FOW-game like CM different from chess) and there is lots of opportunity to screw up. As we probably all know from our own play experience (ok, not swamp). But the human player learns and adapts within the game, and that is very hard to do in a program. Because you might try to implement this, but chances are big it comes out with behaviour as stupid as before, except you lost momentum/foxholes and changed plans (another one of the "don't try that at home" things).

[ July 24, 2002, 07:25 PM: Message edited by: redwolf ]

Link to comment
Share on other sites

OK first let me clear a couple of things up.

I am not disatisfied with the CM AI, I think they have done a great job and have not once complained about it. What I have a problem with is the industry complacency in general. "You can't make a decent AI so lets not spend much time on it. A human opponent is always better anyway". I suspect a large part of the problem is that it is difficult to market AI, its much easier to market pretty graphics.

Now to answer some specific responses.

Can you name a game that really had the AI you talk of?

No and that is exactly my point. However I have been quite impressed by the AI in AA (I have only played the demo though)

I've been a gamer for a long time and have yet to see any AI give me the challenge that a competent human opponent can give me.

Neither have I, that is my point again.

If getting this AI that can "generalize and improvise" is as easy as you say, why haven't AI game programmers not done so?

I didn't say it was easy, a game developer would have to invest quite a bit in R&D, however after the initial effort was made the resultant AI would be much easier to tweak or even alter completely for the next game. I'm not sure why they haven't done so, perhaps its the initial R&D investment, perhaps its a shortage of good AI developers, but I think a large part of it is customer complacency, which is what I am complaining about.

If you are really in the know, perhaps you can let Charles know how such an AI can be easily programmed.

I am sure Charles keeps up to date with current AI research. But as I said its not easy and I'm sure there are valid reasons for the CM AI being the way it is.

When I beat the computer I just beat a machine, a bunch of mathematical formulas. It's not the same as crushing the hopes and dreams of a human player (game-wise speaking).

You would be surprised how human like a good AI can be, one of the keys to making a good AI is giving it "hopes and dreams". As for the "bunch of mathematical formulas" do you really think you brain is anything more than a biological machine?

always predictable

AI need not be predictable, rule based AI often is but rule-based AI is not the way to go.

I'm also more than convinced that a lot of "bad" AI behaviour in the attack role could be atleast partially be overcome by more options for the Scenario Designer (Avenues of Attack, triggers and the like..).

This would be available for a predictable price, while investing in improved "AI" is a very risky and expensive business with only minor results

Investing in AI may be risky from a game developers POV but the results need not be minor.

So BTS will no option be left, then to improve control for Scenario Designers.

I do not believe that is the best option although a lot of people who depend on Scenario/Level design for an income would probably disagree with me.

Pathfinding, like AI development, has it's own development. Programmers can, depending on the project, spend a lot of time developing a new algorithm; some time tweaking an existing algorithm; or simply transplant one that has already been developed somewhere else. They can require a wealth of mathematical knowledge and insight and can be VERY time-consuming.

Pathfinding is not currently an AI issue but I believe (and my PhD relies on it) that an AI approach to pathfinding would be significantly less CPU intensive than a number crunching approach.

I'm not trying to cut anybody down, but hopefully to increase the appreciation that all of you already have for all the hard work these guys do to bring you good games to play and how gifted they are

I agree whole-heartedly

You say you're an AI researcher. Does that mean you do code? If so, how far is AI coding these days? To what extent are neural networks used and is there anything else out there these days?

Yes I code, but that is not the major part of any research. My research is in the Machine Learning field and NNs are used extensively though usually in combination with other techniques like reinforcement learning. NNs have a bad name because of the backpropagation algorithm, a large part of the industry are only familiar with this technique which is very slow and CPU intensive. I would never suggest using a multi-layer backprop network for a computer game, especially a real-time one. Reinforcement learning is probably most appliciable to computer gaming, do a search for "temporal difference learning". Tesauro wrote a very good backgammon AI using TD-learning. A word of caution though, writing AI code isn't as simple as choosing an algorithm. If it was that simple then every game would have perfect pathfinding.

Yes, but look at how long it took, and how much computing power was used, to create a rule-based AI that could beat a human in chess.

Yes this is the problem, AI programmers look at the best chess AI, they note that it is rule-based, then they note how long it took to develope. From this they conclude that rule-based AI is best and that they can't possibly hope to develop something that competent for a game as complex as CM (for example).

Just in case you have forgotten the beginning of this post, I am not having a go at the AI in CM and applaud the CM AI team for the job they have done. I do not want them to become complacent however and ask all game developers to keep an open mind concerning AI alternatives.

[Edited just to say that I am sorry for hijacking this thread and I will try and find a way off this soap box ASAP]

[ July 24, 2002, 10:40 PM: Message edited by: Bruce70 ]

Link to comment
Share on other sites

It took me so long to write the last post that I missed a couple of new posts.

bayesian techniques

These are not easy to develop and even harder to debug. They are an improvement over just plain, straight rules but I personally put them in the rule-based category. I may be asking other people to have an open mind, but that doesn't mean I have to smile.gif

that stupid "artificial intelligence" term

"machine learning" better describes my area of expertise but English speaking people are more familiar with AI.

Anyway, the question here is, when will be see a programmed opponent which can do a decent terrain and opponent force analysis and can constrain its actions with a set of "don't try that at home" rules which still leave enough room to come out with something the machine can execute (instead of throwing up with "no solution").

Yes rules are important, miltary officers follow rules (SOPs) as well as use their own initiative. IMO the answer to your question is yes and this would best be done by a hybrid of ML techniques and rule-base.

and there is lots of opportunity to screw up

Yes there is and we shouldn't be too hard on AI when it does, that is human. The goal is not to develop an unbeatable AI in my opinion.

But the human player learns and adapts within the game, and that is very hard to do in a program.

Not really, the hard part is, as you stated earlier, analysing the terrain etc. And the hardest part of that is deciding what information is relevant, often we can't even describe why we ourselves have made a certain decision but giving irrevelant info to the AI is almost always counter-productive.

Another rant, oh well.

Link to comment
Share on other sites

Originally posted by Bruce70:

[Edited just to say that I am sorry for hijacking this thread and I will try and find a way off this soap box ASAP]

Hey, no worries. It is a public forum after all. I've enjoyed reading your comments. I enjoyed the A.I. I took in college but one course was hardly enough to scratch the surface. Perhaps when I go for my masters I'll look into it more. I'm still trying to figure out where I want to focus for my future. So many interesting possibilities out there.
Link to comment
Share on other sites

Sometimes I have wondered if what AI needs is its Einstein. That is, somebody who can successfully redefine the problem in such a way as to permit a whole new and productive way of thinking about it. I don't know diddly about AI myself, but I have studied scientific and other intellectual revolutions, and that seems to be the way they most often happen.

Michael

Link to comment
Share on other sites

Bruce70,

Nice set of posts about AI (er, ML, whatever). I agree wholeheartedly that both consumers and developers should not give up.

I think the problem does very much revolve around the fact that pretty graphics are very obvious and you can't sell without them, whereas a great AI isn't always obvious from the box shots or other marketing.

There is progress. A couple of years ago it seems that developers were hiring an AI dude for the last few months of the project (to stick one in). Now at least they get one right from the start.

I agree that the CM AI is pretty good. Not great, but pretty good. I am involved (peripherally perhaps) in trying to develop one for a different game, and it is tough stuff tongue.gif

Hunter

Link to comment
Share on other sites

I think that a learning AI with memory is the futuritic way to go.

It will be crappy initially, like all newbies, but take notice about what works and what doesn't.

A couple of games later it will be much better, and playing the same human repeatedly will make it an expert opponent for that human...

Cheers

Olle

Link to comment
Share on other sites

While far from perfect, CM's AI is pretty good, and certainly the best that I've seen in any game. From (what I understand from) earlier BTS posts on this topic, part of the AI's shortcoming in CM is not due to problems with the AI program itself, but is based on other engine limitations that limit the amount of information used by the AI, leading to "dumber" results.

For example, AI controlled tanks "forget about" units that are no longer in their LOS, which leads to predictably bad results such as the AI's tank getting nailed by the Tiger behind the hill that no human would have ignored. Fixing the forgetting problem would automatically make the AI smarter.

Similarly, some other AI problems could be ameliorated by coding to make troops stay in closer C&C and not lead off attacks with the HQ. I don't mean to suggest that this kind of coding is non-trivial, but it doesn't require nobel prize level improvements in AI theory, either. (Although if there were a nobel prize for gaming, Charles would be a very strong candidate).

At the strat AI level, it would be nice if there were some sort of simplified scripting language for scenario designers where you could, say, select an element of a force and give it general directions like: "Cautious advance"; "aggressive advance"; "delay 5 turns, then cautious advance"; "delay 20 turns, then flag rush", etc.

Maybe with route markers, too.

Link to comment
Share on other sites

I could see where the attack AI in CMBB would be better at simulating human wave attacks. I mean, prep a position on turn 1 with an arty barrage. On turn 2 let loose the dogs of war. Keep your more valuable assets in reserve to open up on whatever the human wave uncovers. Then exploit whatever hole is created.

That can't be too difficult for the AI smile.gif Any other kind of attack and I think we're back to where we are today.

Link to comment
Share on other sites

I had an idea a long time ago about adding an orders and map viewing API to CM. Once that was in place then us players could code our own AI's for the game, but no one even replied to my post. Of course, BFC would have to actually make the API and related docs, but I think it's one way to get better AI for less money.

[ July 25, 2002, 12:35 PM: Message edited by: StellarRat ]

Link to comment
Share on other sites

Originally posted by Scipio:

The CM AI is okay, it's good to train the basics, and it can even beat you. But a human opponent is the only real challenge.

I totally agree.

I had played against the computer, until i was better than the AI.

Then i became member of a ladder and the fun playing CM was once again increased tremendously.

Playing against the (compared to all other programs very good) AI, is a good training - not more, not less.

If you beat the computer in most cases, just go for the next challenge, play against humans and you will see, that the AI of CM is only a small part of this WONDERFUL game.

Maybe it would be possible to create a very good AI also for CM, but there would be all the knowledge about neuronal-networks necessary and if we take the enormous numbers of variables into account, the calculating of a turn would take at least 1 day even with the fastest CPUs today.

Why should Battlefront invest (ten)thousands of manhours into an improved AI, that would be afterwards even slower than playing against a human?

Why should they do that, if the biggest fun with the game is reached, when playing against human?

Not everybody likes PBEM, i know.

When i started my first PBEM games, i just couldn't wait for the next turn.

But after the first battles (and if you're playing on a ladder [i.e. ,]www.theblitz.org], you can play as many simultaneous games you can handle) you'll see, it's not that bad.

PBEM has a big psychological side effect: it will help to learn that patience is a great and necessary virtue - especially in our fast age.

[ July 25, 2002, 01:11 PM: Message edited by: Schoerner ]

Link to comment
Share on other sites

Originally posted by Andrew Hedges:

While far from perfect, CM's AI is pretty good, and certainly the best that I've seen in any game.

You should check out TacOps' programmed opponent.

The comparision is partly unfair, though, since it is directed by scenario-specific instructions (several variants chosen randomly).

But even considering that it is pretty good when it actually performs the plan, e.g. how it reacts to counterattacks.

[ July 25, 2002, 01:14 PM: Message edited by: redwolf ]

Link to comment
Share on other sites

Originally posted by StellarRat:

I had an idea a long time ago about adding an orders and map viewing API to CM. Once that was in place then us players could code our own AI's for the game, but no one even replied to my post. Of course, BFC would have to actually make the API and related docs, but I think it's one way to get better AI for less money.

I have been munching on various wargame developers to open their games to export the programmed opponent via a shared library. Like every stupid Quake clone has, BTW.

No success so far, because your (user-written) module need complete access to the composition of terrain, the way visiblity works, a database of terrain variables (speed, visibility), the unit and weapon database and a bunch of other information that is considered classified by most developers.

In addition, I would like to make the source for my PO available, so a strict NDA wouldn't be comfortable for me (but doable, of course).

Link to comment
Share on other sites

Why should Battlefront invest (ten)thousands of manhours into an improved AI, that would be afterwards even slower than playing against a human?

I think this comment is the best reason to provide an AI API to users. The graphics API is open, and look at what a great job the user community has done with Mods and Mod Managers (and how many thousands of hours have been invested in them!?). The Scenario design API is open and look at all the wonderful scenarios are out there and still be produced. I think the same thing would happen if an AI API were made available. I imagine that there are quite a few skilled programmers reading these boards who would love an opportunity to try and tweak the AI -- I'm one of them.

One thing I think would be cool is if you could somehow make access to the AI routines available to players. E.g. someone could finally write that "convoy command" that people keep asking for, or the "deploy by companies and platoons" setup command.

I'm not saying I expect this for CMBB, I don't. I'm sure it would be a major rewrite to make a simple API available. I just think that if a future CM game had it available it would benefit the game as much as the graphics and scenarios APIs have.

-Andy

Link to comment
Share on other sites

Ahhh... but then you get into the realm of "cheating" and "gaminess". Graphical mods don't change the way the game plays for one person as opposed to another. But if you let the game behave differently, then you may have problems.

For instance, you're playing a TCP/IP game against someone using enhanced A.I. Say you have an orders phase of 30 seconds. Your opponent could use his "A.I. enhancements" to effectively make many more moves/decisions in the same amount of time, thereby entering the realm of "cheating".

I just don't see it working out well in the long run, and frankly I don't think it's necessary. All I asked here was for a few tweaks. I'm not saying they would necessarily be "easy" though. Things are rarely easy with programming. I'm not asking for a complete AI rewrite, nor a MAJOR effort like "thousands" of manhours. Let's keep things in perspective here.

BeWary

Link to comment
Share on other sites

BeWary I think you misunderstood me smile.gif I know my english is poor and it happens me a lot of times. So my apologies, it wasn´t my disire...

I was refering more to the general public, and in any way I wanted to atack noone (personally or not), it was just an expression "you musn´t know a lot about computer to see that ..." (rephrasing)

However returning to the original thread. Yep I tried that map against AI playing as germans, and I really saw the AI to act in a very stupid manner smile.gif I think is one of the few scenarios I´ve seen the AI to be so passive, even that they atacked with the infantry passing the forest in the mountain in front of the town but they were rejected by my direct artillery fire assets easy. My 88 managed to destroy apair of tanks that were trying to flank the mountain and and before it was killed by enemy barrage my tanks managed to hold them in the other side of the river (first bridge). I played it long time ago so I don´t remember very well it, but that was what the AI did if I don´t remember very bad.

Edited: I said BeWare insted of BeWary :D

[ July 25, 2002, 04:06 PM: Message edited by: KNac ]

Link to comment
Share on other sites

Originally posted by BeWary:

Ahhh... but then you get into the realm of "cheating" and "gaminess". Graphical mods don't change the way the game plays for one person as opposed to another. But if you let the game behave differently, then you may have problems.BeWary

I'm not asking for different behavior, I just wanted to able to tie a program into the orders, map, unit info, and spotting array so that it can issue orders like a human, based on what IT thinks is reasonable. The API wouldn't allow the computer to do anything a human couldn't. If you are worried about cheating because the computer can think faster than BFC could code the API routines to send a "API in use" message to your opponents whenever something came in on the API interface.
Link to comment
Share on other sites

Originally posted by StellarRat:

I'm not asking for different behavior, I just wanted to able to tie a program into the orders, map, unit info, and spotting array so that it can issue orders like a human, based on what IT thinks is reasonable. The API wouldn't allow the computer to do anything a human couldn't. If you are worried about cheating because the computer can think faster than BFC could code the API routines to send a "API in use" message to your opponents whenever something came in on the API interface.

My bad. For some reason I thought you were talking about letting players program in their own commands and associated A.I. (like the convoy thing you mentioned). I didn't realize you meant it to be for the computer A.I. only.
Link to comment
Share on other sites

As other have said, scripting and predefined routines would be a a good way to go, off course this would be added to the alrrady code base. So its usage would be optional.

This way SOPs could be scrited and atack routes and so. This wouldn´t be usefull for random generated battles (QB) but it would be ok for scenarios and operations.

What do you think about it?

Link to comment
Share on other sites

FWIW, the AI in Xcom-Apocalypse was supposedly learning from your behavior. I don't know how well it did work in practice, but it DOES keep you on your toes right until the end.

Of course, the game environment is closed quarters and the scale is squad-level, so it's not the same. Also, the designers made evil tweaks to the AI, such as giving target priority to fallen comrades. (no loot!)

Link to comment
Share on other sites

Maybe it would be possible to create a very good AI also for CM, but there would be all the knowledge about neuronal-networks necessary and if we take the enormous numbers of variables into account, the calculating of a turn would take at least 1 day even with the fastest CPUs today.

I don't know what you are basing this on but it would take an enormous NN to chew up one days worth of CPU time. To train a single backprop NN for CM would take a VERY long time but actually running it wouldn't be that bad. Also as I said backprop is not the only NN algorithm and you wouldn't use a single NN any more than you would tell a battalion commander to give orders to every squad under his command. You break each part of the task up into very small pieces, no part of the AI should be dealing with "enormous numbers of variables".

[ July 25, 2002, 07:52 PM: Message edited by: Bruce70 ]

Link to comment
Share on other sites

Originally posted by Bruce70:

Maybe it would be possible to create a very good AI also for CM, but there would be all the knowledge about neuronal-networks necessary and if we take the enormous numbers of variables into account, the calculating of a turn would take at least 1 day even with the fastest CPUs today.

I don't know what you are basing this on but it would take an enormous NN to chew up one days worth of CPU time. To train a single backprop NN for CM would take a VERY long time but actually running it wouldn't be that bad. Also as I said backprop is not the only NN algorithm and you wouldn't use a single NN any more than you would tell a battalion commander to give orders to every squad under his command. You break each part of the task up into very small pieces, no part of the AI should be dealing with "enormous numbers of variables".

Thanks for all your insight and posts Bruce.

Very welcome and refreshing!

I have enjoyed reading about your knowledge and experience in this area smile.gif

thanks

-tom w

Link to comment
Share on other sites


×
×
  • Create New...