Jump to content

Crazed idea for AI improvement?


Recommended Posts

I have what is probably a crazy a crazy idea to improve the AI. If Charles could set up at least the beta testers computers to record a lot of information on the game state and the orders given by the player it might be possible to generate a probability based AI script that looked at what an actual human players had done in similar situations. It sounds completely off the wall at first but some newer autopilots have been built this way for instance. Maybe farm it out to some bright graduate student in need of a thesis. Steve did say that some of the bottlenecks for outside development were getting resolved

The fact that shock force doesn’t use completely random maps makes this much easier computationally by the way. The AI could be map specific the way the fixed plans are now.

Steve, ideas like this are what happens on the forum when there isn’t something new to discuss about the game. If you were to release the Brits module or at least a list of firm patch fixes we wouldn’t have to make up our own arguments. ;)

Link to comment
Share on other sites

Learning AIs are extremely difficult to do. People go get PhDs for such things and yet still don't churn out anything practical after years of burning through grant money. We have neither PhDs nor grant money :)

Seriously though, a simplistic learning AI is actually fairly easy in concept. It's actually not that big of a problem in terms of coding either if computing resources aren't an issue (i.e. use mega powerful computers and dumb down the graphics to free up CPU cycles). The problem, though, is that it would still take a long time to code and test something like this. In the past we've had a couple AI programmers (mostly in the defense industry) interested in doing this for their own research or projects, the results of which we could use. Unfortunately, they didn't want to work for free and they couldn't find grant money to cover the work. Pity, because it really could work.

Steve

Link to comment
Share on other sites

Biggest chance ever wasted on a tactical wargame was the fact that in "Close Combat: Battle of the Bulge" the AI was not coded to remember the deployment locations of the human player during the campaign, which would not even have been cheating if this memory was erased upon re-starting the campaign. On most maps, the German hordes could be stopped with a few well-placed AT guns and MGs. Had the AI been able to remember these locations and recon-by-fire them, then the US defenders would have had a very bad day.

CC4 is the game where I missed a "remembering" AI the most so far.

Best regards,

Thomm

Link to comment
Share on other sites

The problem is never remembering... it's figuring out what to do with the information that's the problem :D Complex algorithms have to be written and debugged to consolidate what are commonly called "leaves" (individual bits of information) so that patterns can emerge. Even more complex algorithms need to assess these patterns and "prune" the leaves that are outliers or are otherwise harmful to analysis. And that's the easy part! Then other code has to be written to interpret the patterns and determine what they mean in strategic terms that the system can understand. Then the really hard part comes in... the AI has to then match a strategy ("plan") to fit the specific pattern, its available resources, and its overall goals for that particular battle. Then must have the ability to carry out the chosen plan in a way which is consistent with the rules of the game itself.

And that's just my layman's over simplification of the whole thing :D

Again, this is a completely feasible thing to do. The problem is it so far has proven impractical because we don't have the time to do this sort of thing and so far none of the AI programmers who have approached us have been able to do it either. That's because good AI programmers all have full time, well paying jobs already. So unless they can somehow intersect work on CMx2 with their day jobs it isn't practical for them to do this sort of thing.

Steve

Link to comment
Share on other sites

Unfortunately, they didn't want to work for free and they couldn't find grant money to cover the work. Pity, because it really could work.

Steve

wouldn't that be an strong argument for releasing an AI-API so that everybody has the possibilty to code/improve the AI? I know, this would be some investment on your side.

But just have a look at Civilization 4: There, a community project actually was the basis for an updated AI in an expansion pack. Even small games like Defcon have released an API afterwards and are used in universities for AI research.

Link to comment
Share on other sites

Yes, but someone has to code and document an API for it to be released :D Unfortunately, all of this stuff takes time and time in our small shop means other things have to be pushed aside.

AI is important but every game developer since 1970s will tell you that AI doesn't sell games. Couple that with the extremely poor work to reward ratio (i.e. point of diminishing returns is really, really quick) and that's pretty much that. Which is why, on the relative scale of priorities, AI has always been, and will likely always be, quite a ways down. We've tried to break out from that by having a better than most AI out of the box, but of course we all want it to be better. Which is why we've tried to get creative with partnering. Hopefully someday it will happen.

Steve

Link to comment
Share on other sites

Is there any value in creating AI Immediate Action Drills for your own side?

What I basically mean is that you pre-order a vehicle for instance to carry out a certain action on contact with the enemy, say reverse and pop smoke or stay and engage?

Link to comment
Share on other sites

Yes, we definitely intend on increasing the menu of things the AI planner has at his disposal. Triggers have been on my list since 2004, so hopefully we'll get them in sooner rather than later :) Again, it comes down to development time and priorities.

Programming in SOPs for the AI to follow is, again, a function of development time and prioritization. Given time and resources we can pretty much do anything you guys can think up. But time is our enemy and resources are always at a premium thanks to this being a niche market. Creativity and caring are two factors which have never stood in the way of most wargame developers making better AIs.

Programming in SOPs for players to use for their own forces is even worse than for the AI because the creation/manipulation of them has to be done with UI compatible with game play. Editors offer us a much lower threshold for UI work and that means the UI is much easier to do. With the player needing ready access to it, in a way that doesn't interfere with gameplay, comes enormous design problems. Problems which I have consistently said for more than 10 years now we don't think we can successfully pull off given a practical amount of development time within the confines of development priorities.

Steve

Link to comment
Share on other sites

The problem is never remembering... it's figuring out what to do with the information that's the problem :D Complex algorithms have to be written and debugged to consolidate what are commonly called "leaves" (individual bits of information) so that patterns can emerge. Even more complex algorithms need to assess these patterns and "prune" the leaves that are outliers or are otherwise harmful to analysis. And that's the easy part! Then other code has to be written to interpret the patterns and determine what they mean in strategic terms that the system can understand. Then the really hard part comes in... the AI has to then match a strategy ("plan") to fit the specific pattern, its available resources, and its overall goals for that particular battle. Then must have the ability to carry out the chosen plan in a way which is consistent with the rules of the game itself.

And that's just my layman's over simplification of the whole thing :D

Again, this is a completely feasible thing to do. The problem is it so far has proven impractical because we don't have the time to do this sort of thing and so far none of the AI programmers who have approached us have been able to do it either. That's because good AI programmers all have full time, well paying jobs already. So unless they can somehow intersect work on CMx2 with their day jobs it isn't practical for them to do this sort of thing.

Steve

I did my MS thesis on AI using Neural Networks, and a lot of the stuff you discuss could be handled as a part of the emergent properties of the net (depending on which type), eg finding associations between input and output sets, which is half the point of using a neural network approach - the AI doesn't need to be 'engineered' to the same degree, the main work is involved in deciding what the appropriate input and output sets are and then teaching the net, or having the net learn, the associations, which it often does in novel ways that would not have been obvious with a more conventional approach. A neural net AI could even learn from and improve its performance against the player over time.

Link to comment
Share on other sites

I've worked eight years building industrial AIs (some of them emergent) for a variety of companies, and made frequent use of neural networks.

Building an AI around them is relatively easy. Getting it to behave, to not overtrain, etc., is very hard, especially when you don't have the option of pouring concrete on the "brain" and setting it in stone prior to shipping (per your suggestion about AI that improves itself against players). Even when you do great care must be taken. That goes beyond neural networks, too, and into most AI component systems.

Which gets back to Steve's point regarding research / testing / tweaking time. That's where the pain really is. It's best to keep AI simple, as the returns really do diminish. Believe me, it'd be great if that weren't the case (I'd be able to justify years of extra work on the projects I've done :) ), but if you want to build something reliable that's the best way to do it.

Link to comment
Share on other sites

I've worked eight years building industrial AIs (some of them emergent) for a variety of companies, and made frequent use of neural networks.

Building an AI around them is relatively easy. Getting it to behave, to not overtrain, etc., is very hard, especially when you don't have the option of pouring concrete on the "brain" and setting it in stone prior to shipping (per your suggestion about AI that improves itself against players). Even when you do great care must be taken. That goes beyond neural networks, too, and into most AI component systems.

Which gets back to Steve's point regarding research / testing / tweaking time. That's where the pain really is. It's best to keep AI simple, as the returns really do diminish. Believe me, it'd be great if that weren't the case (I'd be able to justify years of extra work on the projects I've done :) ), but if you want to build something reliable that's the best way to do it.

Yes I agree, overtrain the network and you start to get mush on the output end, and knowing when you have reached, or are about to reach that point, is a problem.

Like your analogy about pouring concrete on the brain haha

Link to comment
Share on other sites

Well my idea as such was to let the brain do its learning using only the beta testers so that it could be released to the public "frozen". I am fairly sure, and Steve mentioned as well, that it would take a highly modified version of the game to collect the data. I think steve mentioned using resources that are usually devoted too graphics. Also if wasn't a public release it could be a lot less polished overall.

Link to comment
Share on other sites

Yes I agree, overtrain the network and you start to get mush on the output end, and knowing when you have reached, or are about to reach that point, is a problem.

Like your analogy about pouring concrete on the brain haha

Heh, yeah, you have to joke about stuff like that or you go nuts. :) And yeah, overtraining is just one of the many pitfalls to an emergent architecture. Takes a lot of planning to make one work right.

Well my idea as such was to let the brain do its learning using only the beta testers so that it could be released to the public "frozen". I am fairly sure, and Steve mentioned as well, that it would take a highly modified version of the game to collect the data. I think steve mentioned using resources that are usually devoted too graphics. Also if wasn't a public release it could be a lot less polished overall.

It's not a bad idea. Just incredibly hard, frozen or unfrozen. Sample coverage, correctness, even performance would all need to be carefully monitored and planned for. Which is why, frozen or not, a simpler AI is a much better way to go for reliable results. It's a very exciting thought, and certainly possible (I've done it in some pretty complex domains), just very hard with limited (or otherwise occupied) resources.

Frankly, also, I think for a simulation with this many variables you'd need a TON of beta tester hours committed to using the special version just to get the data in place, let alone how much time it would take test once you froze the darned thing. I shudder to think.

Link to comment
Share on other sites

I've worked with systems with a lot of randomness in before and you end up making an engine to fix non-random paths simply so you can test the bugger.

I think BFC are doing OK. Currently we have things like units area firing where they get <?> reports, bug-out, area fire switching to aimed fire and back, changing facing when seeing enemies, moving around inside buildings, standing/kneeling/prone when needed, popping smoke etc.

If they keep tweaking what they've got so the units act in a tactically relevant way within a larger strategy, i.e. TacAI within a scenario, then I think you'd start to see emergent behaviour.

Armour and infantry covered arcs I think would help and I'm sure Steve and Charles are fizzing with their own ideas.

The hardest thing is thinking of things to do that will be the correct course of action 95% (more!) of the time. It would be easy to add something like a unit making a small move to get a shot at an enemy it can outmatch but in the greater scheme of things this could be the worst possible move - and WOULD be exploited. So even on a micro level it's not easy.

If anyone has any ideas of something on a unit scale that could be done that isn't being done, would be correct nearly all the time and wouldn't be exploitable then shout em out. Be fun to kick it around a bit.

Link to comment
Share on other sites

I've worked with systems with a lot of randomness in before and you end up making an engine to fix non-random paths simply so you can test the bugger.

Yes. In AI, this often breaks the model, or kills your data... everything needs to be done with care. Or you can go in with a hacksaw and see what comes out, but it's almost never pretty.

I think BFC are doing OK...

Again, yes. BFC has managed a simply amazing TacAI. I love to discuss AI improvements (mostly because it's amazing to see Charles make the few that need to get done!) but as it stands the TacAI is incredible.

Link to comment
Share on other sites

  • 5 months later...

A 'rules-based' approach, combined with some randomized behavior is probably the best solution if the AI-budget is limited. In WinSPMBT the original steel panthers AI was also visibly be enhaced by adding a new bunch of tactial rules and vastly adding (reasonalbe) randomized behaviour to confront the player with unexpected behaviour. Sure, sometimes the randomization creates suboptimal resulsts if compared to a pure rules-approach...but I think in the end it's better since it is not so static.

Still, I would love to see some form of API for the Combat Mission 2 Engine but I know Steve and Charles are busy men :-). Perhaps later, if they do not know what kind of module they shall develop next ;-), they could rethink abouth integrating Python etc. There are some nice C++/Python bridges available ...

Link to comment
Share on other sites

I didn't read the thread, but let me say this:

Steve, keep making the games I enjoy. In a weird way, you've been a part of my gaming entertainment since I was little, and Small World phenomenon has brought me here, through the desert and fire and lead to continue to play these games. While it's safe to say that I've had quite a few beers up to this point, I would also like to point out that I stand behind Battlefront 4 ever. I bought Shock Force when it first came out, even though I was deployed and couldn't play it for a few months, I just wanted to contribute to initial sales. I've purchased BO probably 5-6 times to replace lost/broken discs, I have 2 copies of BB and AK and I've even had to buy SF a 2nd time. There are very few developers that I can say have earned multiple purchases from me. Just keep it up, do what you do.

Link to comment
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
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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...