Jump to content

Crazed idea for AI improvement?


Recommended Posts

Not to insult anyone here, but if you really were a GOOD AI programmer, you'd already have programmed an AI to do your day job for you, thus freeing up your time to work for BF.C. Ipso facto, anyone actually WORKING as an AI programmer really can't be all that good. :)

Ken

Link to comment
Share on other sites

Not to insult anyone here, but if you really were a GOOD AI programmer, you'd already have programmed an AI to do your day job for you, thus freeing up your time to work for BF.C. Ipso facto, anyone actually WORKING as an AI programmer really can't be all that good. :)

Ken

I cannot counter this, Ken :D

Actually, I also do not think that the AI in CM:SF is bad...it

is good concerning the complexity. It's just that good things can always get even better :).

Link to comment
Share on other sites

At the risk of making my skill level at the CM series game obvious to the community, I always thought that the AI (speaking mainly of the CM1 series here) was fine with one exception: It rarely reacted to what I was doing.

I'm not the type of player who tries to figure out how the AI works and use that to my advantage, so perhaps the AI is better for me than those who do, but it is noticeable when it keeps sending vehicles into an area where its already lost a bunch of vehicles. I wouldn't say the AI is clever by any means (it isn't that difficult for me to trick it, especially when it is on the attack and I'm on defense), but my only real complaint is that it doesn't hardly seem to change its mind.

Link to comment
Share on other sites

It rarely reacted to what I was doing.

That's actually the issue with most game AI's, I would say. Probably most AIs use final state engines, rules and randomize it a little. The behaviour is than pretty stable but the drawback is that the AI is not adaptive.

As already discussed in this thread, learning algorithms like Neural Networks and Evolutionary algorithms http://en.wikipedia.org/wiki/Evolutionary_algorithm could address this. For games with 'simple' rules and environments like Backgammon this works very well, but the environment of CM2 would be a real challenge.

Wouldn't that be a challenge for a student to write his bachelor/master thesis on that matter :) ? I know that for the game Defcon a thesis was written, which outcome signficantly improved the AI of that game.

Link to comment
Share on other sites

The one and only thing we need in CMSF to make AI behavior more responsive to the player's actions is trigger conditions and zones. 'Back in the days' I used to play a little OFP and it's amazing how much variety one could bring to the gameplay by adding a few triggers. A clever mission designer could create the atmosphere of a highly responsive AI.

Triggers would add a whole new dimension to CMSF gameplay. Just imagine all the posibilities. One could time the arrival of enemy or friendly reinforcements to the ammo/casualties condition of one or both sides. One could setup proper ambushes and counter attacks. In general one could adjust the enemy's actions according to the player's position, moves and condition. Triggers are a must have for the CM-series and my number one wish for 2010!

Link to comment
Share on other sites

Goodaye,

Without triggers or some kind of conditional variables there isn't any ability to provide an AI that 'reacts'.

CMSF is a great game and a superb effort by a small development team. The game shines in so many areas.

Except the AI. The individual 'micro-scale' AI stuff is excellent, eg. run for cover, pop smoke etc. But the inability of the scenario designer to provide an OPFOR that can react - even in a simplistic manner - to the actions of the player is the elephant in the room.

Sure you can make an AI plan that attacks up the left flank. But it'll do that everytime, robotically, irregardless of what the player does.

Reading a few previous comments by Steve in this thread it appears that the development priorities don't include triggers for the forseeable future. Obviously the man is running a business here and has a better handle on what's viable and what isn't.

But I'd suggest that - going forward with Normandy etc. - leaving the robotic AI in place may be more of a hindrance than a help.

No matter how good the graphics, the ballistic simulation, the new terrain, the new units, etc., your average player is going to lose interest pretty fast once they figure out that the AI is unable to react to anything he does.

While it's not easy to find a directly comparable product to CM:SF it's also pretty obvious that triggers are a standard inclusion for any tactically orientated game that comes with an editor these days.

It's also worth keeping in mind that 'triggers' are purely a means of letting a scenario designer give some basic intelligence to the AI forces. It's not about building a sophisticated dynamic nueral pathway to allows the AI to react on the fly and maintain a coherent battle plan. Nope, triggers are pretty basic, simple stuff which are highlighted here only by their absence.

Jump back to my example above of an AI robotically advancing up the left flank ten minutes into the game. Every time. Imagine the difference if there was a trigger in place so that the AI only advance up the left flank if enemy units came within 500m of a target building.

Straight away you've got some basic reactive ability. Now what about if there was a second trigger on another building that detected the presence of enemy units. If this kicks in first then the AI might decide NOT to advance up the left flank at all as the player is doing something different. Instead the AI might choose to pull the left flank back to a secondary position.

Ah huh! With two simple triggers in place the AI now has a range of behaviours that is allowing it to REACT in a basic manner to what the player does. Contrast that to the current situation where there are no triggers, the AI has no ability to determine what the player is doing and in fact is rigidly following a predetermined plan come hell or high water.

So in summary my wish is for the inclusion of triggers in CM: Normandy and, hopefully, the retrofitting of the same into CM:SF.

Wishful thinking maybe, but hey, it's Xmas.

Cheers,

Plugger

Link to comment
Share on other sites

Goodaye,

Without triggers or some kind of conditional variables there isn't any ability to provide an AI that 'reacts'.

...

It's also worth keeping in mind that 'triggers' are purely a means of letting a scenario designer give some basic intelligence to the AI forces. It's not about building a sophisticated dynamic nueral pathway to allows the AI to react on the fly and maintain a coherent battle plan. Nope, triggers are pretty basic, simple stuff which are highlighted here only by their absence.

Jump back to my example above of an AI robotically advancing up the left flank ten minutes into the game. Every time. Imagine the difference if there was a trigger in place so that the AI only advance up the left flank if enemy units came within 500m of a target building.

Straight away you've got some basic reactive ability. Now what about if there was a second trigger on another building that detected the presence of enemy units. If this kicks in first then the AI might decide NOT to advance up the left flank at all as the player is doing something different. Instead the AI might choose to pull the left flank back to a secondary position.

Ah huh! With two simple triggers in place the AI now has a range of behaviours that is allowing it to REACT in a basic manner to what the player does. Contrast that to the current situation where there are no triggers, the AI has no ability to determine what the player is doing and in fact is rigidly following a predetermined plan come hell or high water.

So in summary my wish is for the inclusion of triggers in CM: Normandy and, hopefully, the retrofitting of the same into CM:SF.

Wishful thinking maybe, but hey, it's Xmas.

Cheers,

Plugger

..but it gets complex fast. For example, giving choices to the AI is one thing, getting it to make the right choice is a little more difficult.

For your example above, what does the AI do if both triggers occur and it finds itself wanting to counter both threats? - it now has to have an algorithm to assess the relative threat (the player has an intelligence brief of sorts to base their decisions on), then institute two counters - and allocate resources in such a way as to make the exercise worthwhile. It might well be best to do nothing and remain static: so there's a third choice. I'm not sure binary deals with trinary terribly well.

At some point its a case of - "The plan is this, lets go." but between then and the final minute a little thing like a well concealed ATGM can happen - and all the AI's armour moves through the same point and gets taken out, or the AI has to figure that another type of trigger has occurred and the assessment process has to begin again. For the player the trigger might be a previously unknown trench system - the AI has to recognise that this means a need to change tactics.

The micro AI is the way to go - build up the sets of basic behaviours in units (reaction to stimuli at the organic level), then try to develop a methodology for understanding how all the data fits together and how it might best lead the AI to a better chance of survival (reaction at an intellectual level). You can then start talking about AI as capable of outperforming a human in a complex environment.

(2 cents worth there I think)

Link to comment
Share on other sites

Goodaye,

.but it gets complex fast. For example, giving choices to the AI is one thing, getting it to make the right choice is a little more difficult.

O.K, my fault for not being clear enough in the first place. To much Xmas cheer imbided.

My example - and the thrust of my post above - refers to simple triggers put in place by the scenario designer. There is no actual Artificial Intelligence involved. Nada. Zip.

Referring to the example I've given I'm thinking something along the lines of a trigger placed on a specific point on the map (in this case a certain building.) It has a radius from here, think of a circle drawn on the map of say a 200m radius centered on the point chosen.

The trigger has a condition, say...

"If BLUFOR enter then.." which is associated with part of the OPFOR troops. They are given a preset move order.

Essentially it is identical to a so-called 'AI plan' that you are currently able to knock up in the editor. All that is different is that it's conditional on the trigger being activated.

With the couple of triggers I've given in the previous example there are simply two conditional moves. One of them activates first and in doing so perhaps sets a flag so that the other one is nullified. Something along those lines.

Straightforward stuff that is bog-standard in most tactically orientated games with editors. You aren't providing Artificial Intelligence, all you are doing is giving the bloke who makes the scenario a few easy means to make the enemy REACT in some measure to what the player does.

I'd stress that what I'm pushing here is ground level trigger implementation. The WalMart of Triggers. It wouldn't magically provide a wonderfully intelligent enemy picking on your weak spots. But it would be light years ahead of the current situation of an OPFOR that essentially goes into battle deaf dumb and blind to what the other side is doing.

Imagine being a company commander in a current combat zone. You are told to attack or defend a certain place. No problems Major, Sir! The kicker is that you have to make a detailed plan the day before and then robotically carry it out on the day of the battle no matter what.

That's what the OPFOR in CM:SF does at present. Not a recipe for military greatness.

I'd better stress at the end of this long epistle that I'm keen for Triggers but that I'm doing my best to ask nicely while still trying to make my point. I like CM:SF and am happy to keep supporting it, triggers or not.

Cheers and best wishes,

Plugger

Link to comment
Share on other sites

Well, my understanding (at least of the CMx1 games) was the that AI got a peak at the forces of the human player before the game started so that it could make a plan.

If this is true (and I have no idea if it still holds for the CMx2 series), then why does it seem like the AI doesn't re-plan when it starts making contact and losing units?

Also to add: I agree with the logic of not spending much time on the StratAI because players can play against other humans. However, if the expectation is that we will mostly play against other players, then I'd really like to be able to issue more complex orders so that we the humans can make our little digital troops behave better without spending a lot of resources on the TacAI. One thing that I think would help is to give the units a "mode" (for lack of a better word) that indicates to them what they are doing.

I think this would help refine their behavior. For example, if you tell soldiers to move, this could mean "march from one safe location to another" or it could mean "move to contact and engage" or it could mean "advance under fire and take that position". BFC has responded by adding "assault" and "advance", but I think it would be better to give the units a mode that governs what their behavior should be as they move from point A to point B.

Link to comment
Share on other sites

Goodaye,

Well, my understanding (at least of the CMx1 games) was the that AI got a peak at the forces of the human player before the game started so that it could make a plan.
Nope. Can't vouch for the previous incarnation but the way it works in CM:SF is that the person who makes the scenario knocks up a pre-determined plan for the OPFOR to follow.

Eg. At exactly T+12 minutes the tank platoon moves to there.

So once battle is joined the tank platoon will ALWAYS move to there at exactly T+12. The plan is totally independent of what you the player do. Essentially the AI doesn't care about you. It's been told to move the tanks there at T+12 and come hell or high water that's what it'll do.

The refinement on offer is that the person making the scenario has the ability to make a number (up to five from memory) different plans for the AI to follow. So on any particular playthrough of the same scenario you may encounter different AI behaviour as they randomly follow a different plan.

Each plan is the same, however, in that it is made and carried out in total isolation to whatever you the player does.

Hence the request for Triggers which would at least enable the scenario designer to incorporate some dynamic behaviour and allow the OPFOR to react to what you the player does.

Feel free to put your hand up and join 'Triggers - R - Us'.

Cheers,

Plugger

Link to comment
Share on other sites

Also to add: I agree with the logic of not spending much time on the StratAI

because players can play against other humans.

I completely disagree here...Not all folks here have the time to regulary play against other players and I think I am not alone here, who wants to play a QB against a capable and interesting AI.

I'm currently reading a research paper of the university of maastricht:

www.personeel.unimaas.nl/M-Ponsen/

(2005: . Automatically Acquiring Adaptive Real-Time Strategy Game Opponents Using Evolutionary Learning)

They did a research on that matter and noted that players would be unhappy with current AIs; mentioned the reasons why developers are reluctant to use learning/adaptive algorithms and developed a prototype to prove that such algorithms can actually work.

Link to comment
Share on other sites

I disagree (and agree with Plugger) that trigger would be eventually require considerable AI (re-)programming.

What basically is needed:

1. A trigger with certain area (or not area at all!) with condition to get activated.

2. What it does when it gets activated.

3. Will it repeat it self or execute it self just once.

4. Possible timer which counts to zero and then trigger gets activated.

I've personally played around a lot with this kind triggers in games and those fill most needs. Main problem which is see arising is that does CMSF have somesort "open" scripting language which scenario makers can use? But then again CMSF shouldn't require very complete scripting language. Maybe it doesnt' need such at all as scenario maker doesn't need very complete control over the game... Like turning T-90 on it's roof, or wait that M1 looses it's track and then blow it up. No need for sophisticated victory or loosing conditions either, or ability to create cut-scenes. CMSF's trigger would just need to tell that something should start moving to somewhere when some condition gets fulfilled... [i'm having massive brain-surge here!] Maybe trigger might have just it's own AI plan which it adopts to desired group when it's condition gets fulfilled? Cant' get simpler than that! We have groups and we have plans, now we would need just trigger which works as locker for additional plans. My God I'm Genius!

I don't expect that this kind simple trigger structure would be made overnight, but in a week?

Link to comment
Share on other sites

Goodaye,

Nope. Can't vouch for the previous incarnation but the way it works in CM:SF is that the person who makes the scenario knocks up a pre-determined plan for the OPFOR to follow.

Eg. At exactly T+12 minutes the tank platoon moves to there.

So once battle is joined the tank platoon will ALWAYS move to there at exactly T+12. The plan is totally independent of what you the player do. Essentially the AI doesn't care about you. It's been told to move the tanks there at T+12 and come hell or high water that's what it'll do.

The refinement on offer is that the person making the scenario has the ability to make a number (up to five from memory) different plans for the AI to follow. So on any particular playthrough of the same scenario you may encounter different AI behaviour as they randomly follow a different plan.

Each plan is the same, however, in that it is made and carried out in total isolation to whatever you the player does.

Hence the request for Triggers which would at least enable the scenario designer to incorporate some dynamic behaviour and allow the OPFOR to react to what you the player does.

Feel free to put your hand up and join 'Triggers - R - Us'.

Cheers,

Plugger

I can buy that explanation, but I was speaking of the CMx1 series, which, presumably, could be replicated in CMSF (depending on which system is superior.)

From your description, I agree that triggers would be necessary to make the AI have _some_ reaction to the player if the "AI" is simply executing a script.

Hey, there's an idea. Why not open up the AI for scripting with a basic language (i.e., one that would naturally contain branching and iteration logic) and then turn the community lose.

Not that it would necessarily get us a much better AI (as many have mentioned, writing a good AI isn't trivial), but it would at least give the community the tools to solve the problem to the extent it can practically be solved.

Link to comment
Share on other sites

I completely disagree here...Not all folks here have the time to regulary play against other players and I think I am not alone here, who wants to play a QB against a capable and interesting AI.

I'm currently reading a research paper of the university of maastricht:

www.personeel.unimaas.nl/M-Ponsen/

(2005: . Automatically Acquiring Adaptive Real-Time Strategy Game Opponents Using Evolutionary Learning)

They did a research on that matter and noted that players would be unhappy with current AIs; mentioned the reasons why developers are reluctant to use learning/adaptive algorithms and developed a prototype to prove that such algorithms can actually work.

I would generally prefer to play against the AI, as well, but that's mostly because I prefer to sit down and play either half or a whole scenario at a sitting and for multiplayer I usually end up playing maybe a few turns per week, so an entire game takes quite awhile. I actually think playing against another player (talking PBEM here) takes up a lot less of my time than playing against the computer. Anyway, so count me among those who would like a good AI to play against.

However, I was speaking more from the standpoint of practicality: From the business perspective of BFC, they are probably correct that spending a lot of resources trying to get a marginally better AI is not resources well-spent.

However, I would suggest they create an API for the community to tinker with the AI through a simple scripting engine. This is similar to what I previously proposed for letting the community write a campaign system for the game.

I understand this is low on their list of priorities, but they should consider the investment this way: Spend a little resources up front and you get some coders who will work for free.

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...