Jump to content

As requested: New Thread on adding scripting to scenarios and SOP's in the editor


Recommended Posts

Zarquon posted

P.S. : it's been said before : what we really need is the possibility to add scripting to scenarios. It would not help QB gaming vs. the Artificial Incompetence, but imagine pre-made scenarios where the designer could mark different paths for an AI attacker, set movement modes (cautious, overwatch

yes/no, sneak, rush...), designate reserves and their trigger conditions etc.). Even simple scripting options would vastly improve solo gaming.

If anyone is interested, please open a new thread."

Jörg

OK that sounds good to me.....

That would happen in the editor and not be "open source" code.

I think this suggestion is (perhaps :confused: ) a workable way (in CMII) for scenario designers to get the most out of the AI by scripting some opening moves. Maybe SOP's could be added. I have heard alot about SOP's in Aiborne Assault (I have not played this game but other's here have raved about the SOP's in that game) maybe SOP's plus scripting in the editor could provide tools (in CMII) that would give scenario designers what they need to enhance the AI and the Single Player experience so it could be more fun and more challengeing??

Just a thought.

-tom w

[ November 06, 2002, 12:07 PM: Message edited by: aka_tom_w ]

Link to comment
Share on other sites

Originally posted by Panzer Leader:

I was under the impression that scripting is considered 'the easy way out' of game AI. I want the damn computers to think better, not have standardized responses. Isn't that the whole premise of 'fuzzy logic'?

Well, 'fuzzy logic' is the idea that there can be more than one equally "true" answer. I'm with you on wanting the 'thinking' of the AI to improve.

However, I would not be adverse to the scenario designer being able to provide hints and/or give some motivation to the AI besides juts victory points.

For instance, I don't think saying "advance down this path" would be so great, even if you allow the AI to choose from multiple such paths, because it locks in a particular behavior. Instead, I think it would be much cooler to say "Advance with Best Cover" or "Advance with Best Speed" and allow the AI to make choices of what terrain to use, what movement modes, etc.

I would also be in favor of being able to provide a hint like "Delaying Withdrawal" and then further back "Hold". I think that would leave the AI open to forming its own plans but with some directed goals.

You could place the hints much like you do reinforcement flags, thus allowing them to influence the AI's behavior without scripting specific actions.

Link to comment
Share on other sites

Originally posted by Panzer Leader:

I was under the impression that scripting is considered 'the easy way out' of game AI. I want the damn computers to think better, not have standardized responses. Isn't that the whole premise of 'fuzzy logic'?

Fuzzy logic has nothing whatsoever to do with better finding better solutions to tactical challenges.
Link to comment
Share on other sites

Originally posted by aka_tom_w:

</font><blockquote>quote:</font><hr />Originally posted by redwolf:

For more food for thought check out TacOps, which has SOPs and (sadfully only) a scripted AI.

"sadfully only) a scripted AI"

is that a good thing?

I mean I really don't know

-tom w</font>

Link to comment
Share on other sites

Originally posted by redwolf:

</font><blockquote>quote:</font><hr />Originally posted by aka_tom_w:

</font><blockquote>quote:</font><hr />Originally posted by redwolf:

For more food for thought check out TacOps, which has SOPs and (sadfully only) a scripted AI.

"sadfully only) a scripted AI"

is that a good thing?

I mean I really don't know

-tom w</font>

Link to comment
Share on other sites

Ahhhh...

Now, my last try at hobby game programming was a kind of VG-Ambush!-like game done in BASIC (10 GIs fighting 20-20 Germans). Long time ago. For every map I had to create a special map 'overlay', where specific points were marked with numbers. Each AI controlled German attacker was given a number corresponding to those, say, "3" as well as a target coordinate (could be a victory location or some other strategically important location). When it was his turn moving, he tried to move from "3" to "3". Whenever multiple "3"s were visible to him, he chose one at random as his short-term goal. He could "see" only those "3"s in a radius equivalent to 2 turns of movement. You still follow me?

That made it possible to make up attack groups that, for example, followed the road for the first 3 turns, then moved into a forest, spreading out (randomly). At the forest's edge, they regrouped into two groups (of random composition), as all possible paths of "3"s in the forest lead to only 2 paths of "3"s leading toward the final target, but on different routes. Patrols were easily set up this way, but it was possible to create patrol paths that allowed for patrolling units to randomly "go and check out that house over there". So the actual movement of units was not predictable, but it was possible to set a plan for the attacker, something the AI currently lacks. Of course it took some time to set all those "potential waypoints", but the system was simple and worked (for me). It allowed for the attacker to use covered routes much better. It didn't require a Cray to calculate all possible moves. I think it could easily be implemented and improved upon. Replayablity could be quite good, because you could set up a lot of those "waypoint groups", chosen more or less randomly. And the scenario designer would not be obliged to use them. He could mix units with specific "plans" with those having none, being moved by the current AI.

The TacAI would still be in control of firing, holding platoons together etc. This is only about pre-planned, semi-randomly movement paths.

Add sets of behaviour for each unit, like "advance" (carefully, prefer cover), "assault" (get wasted), "defend" (flexible), "hold" (stubborn, don't move). I had no algorithm for coordinating actions, as this proved to be exceptionally difficult. Maybe Cm has, it's hard to say. However, my gamey AI bastards nearly always won, even on the attack (having 2:1 numerical advantage). Of course, CM is not man-to-man combat and there are many things that can not be covered by such scripts/waypoints. Unit coordination will still be, well, you know.

But I would prefer that to opponents rushing the nearest flag head-on.

Remember, I'm not talking about Operation Flashpoint-like scripting here where nearly every detail can (and sometimes must) be taken care of. It is amazing what can be done with this but it is a totally different genre and the purpose of many scripting options is to immerse the player in a movie.

All I suggest is a simple way to suggest movement paths to the AI.

Jörg

P.S. : And I *demand* rail guns. On board. Fix or do sf.

[ November 05, 2002, 11:30 PM: Message edited by: Zarquon ]

Link to comment
Share on other sites

Agree 100 %

The scripting should not augment but rather complement the current AI.

The bigger moves, coordination, assess terrain and the like are the problem of the AI. Here scripting could aid tremendously. Of course only games vs. AI would gain something. New type of battles would be possible, more historic accurate battles would be possible and most important a challenging Computer driven attack would be possible. A rather small investment for huge gains when compared to other requirements.

Greets

Daniel

Link to comment
Share on other sites

Originally posted by TSword:

Agree 100 %

The scripting should not augment but rather complement the current AI.

The bigger moves, coordination, assess terrain and the like are the problem of the AI. Here scripting could aid tremendously. Of course only games vs. AI would gain something. New type of battles would be possible, more historic accurate battles would be possible and most important a challenging Computer driven attack would be possible. A rather small investment for huge gains when compared to other requirements.

Greets

Daniel

Thanks Dan!

That's what I (we smile.gif ) meant:

"The scripting should not augment but rather complement the current AI."

If some of these "complementary" tools were available in the editor the scenario designer could "hint" the AI in one direction or another perhaps, with scripts and SOP's and things like flags that are not in fact flags but short term battlefield goals or objectives, to help the AI along during the battle.

smile.gif

Thanks

-tom w

[ November 06, 2002, 11:21 AM: Message edited by: aka_tom_w ]

Link to comment
Share on other sites

Invisible AI "flags" would be great.

I'd like a variety of AI "InvisiFlags".

1. Standard flag

2. Infantry only flag (AI tries to hold with infantry)

3. Armor only flag

4. Anti-Flag (ai stays away)

5. Temporal Flag (flag is only in effect for a range of turns)

I'd also like the strategic AI be more willing to abandon a flag, particularly small VL flags.

Scripting would be very interesting also.

Link to comment
Share on other sites

Interesting thoughts.

Seems to be a good idea in general to give scenario designers the opportunity to give additional tactical help to the AI.

Some additional thoughts:

1) special markers or areas, not to be hold, but to tell the AI to concentrate firepower on (tank, AT, inf, arty fire + amount of unitpoints to concentrate on these areas). Say a bridge that has to be taken by the player and the AI waits till the player's tanks reach the end of the bridge.

2) (should work quite well in conjunction with 1) ), the AI keeps hidden till a certain amount of points/or specified units come close to this area

3) a general advice from which directions the firepower areas should be observed would also be quite helpful for the AI

Link to comment
Share on other sites

Dan: agreed. Whatever scripting option it is, it should supplement, not change the AI. Or else we might never see it realized. Scripting options are for pre-made scenarios only and shouldn't be enforced on anyone.

xerxes: It's a great idea to allow the scenario designer to give different priorities to flags. Alas, we don't know if there isn't an algorithm in the code that does this. If there is, it will not be replaced unless absolutely necessary.

What I like most id the idea of 'Anti-flags'. It would be the most simple way of avoiding those tank graveyards that result from the AI parking all his vehicles on a coverless hill in the middle of the map. Easy to understand for designers, hopefully not to complicated to implement in the code. The best thing is, it does not require other, more complex options to be implemented as well.

What about different Tank and Infantry NoGo-Flags?

Invisible, temporal AI flags should be regarded as waypoints, not to be held.

Pre-planned scripted artillery should be easy as well. The realism question is already answered because CMBB allows for those.

P.S: : there's a post from 2001 about improving the AI:

http://www.battlefront.com/cgi-bin/bbs/ultimatebb.cgi?ubb=get_topic;f=16;t=017386

It's a discussion about implementing different SOPs (in the TacAI) and/or adding user-scripted SOPs as plug-ins. Both are pitfalls, for different reasons.

Jörg

Link to comment
Share on other sites

Originally posted by redwolf:

Some of your ideas are cool, but keep in mind that the computer should be able to come up with different solutions each time. This will add work for the designer to code several approches.

I think we all agree that scripting must be purely optional.

And when you set the scenario to Random AI Setup, the current StratAI would have to take over anyway because a fine-tuned plan/script needs to include the attacker's starting positions.

Several approaches are possible with the system I outlined in my first post. Imagine two groups, 1 and 2, attacking their objectives. Each AI controlled unit can 'see' those invisible waypoints that are in a range of two squares, have a number corresponding to their group number and lie in the general direction of their objective. They move from waypoint to waypoint and when reaching one they select the next one from a small group of valid points at random (of course, platoons or even companies have to be kept together, depending on battle size).

corel018.jpg

This would lead to group 1 having 3 different approaches to the target and it would be impossible to tell which platoon chose which approach. Some paths are 'fuzzy' to avoid the units goose-marching behind each other.

Group 2 could be made up of 2a and 2b. They all follow the path of "2"s until splitting. No fuzzy paths for the first part (imagine them following a road under cover). The target would then be attacked from two sides.

The scenario designer can set an many points as he wishes, thereby allowing for e.g. a tank platoon to exactly follow a path that maximizes cover from terrain elevations or an infantry company spreading out for an attack.

This is a very simple sketch, but I hope it illustrates the point.

Link to comment
Share on other sites

Before I forget-

I have an idea that would dramatically increase the replayability of scenarios vs AI, and this thread seems like a reasonable spot so...

Simply, if it were possible for the AI to *repurchase* the AI's forces, in scenarios where it is possible to ask the AI to place them intelligently, it would, as I say, increase the replayability.

If the AI went through and bought stuff in the same manner as we do in QBs- roll the dice, pick some here, pick some there... We'd know *about* what we were up against, but never *exactly*, as it is now on the second time around. Yeah?

Eden

Link to comment
Share on other sites

Repurchasing would be neat as long as it's possible to mark certain units that must be included in the new force, e.g. the Big Cat or an engineer platoon. Not suitable to historical scenarios, of course.

BTW, what about semi-randomized setup locations for the human player and the AI a an additional option? You could designate different zones for each and the Program would choose one.

Link to comment
Share on other sites

Originally posted by Zarquon:

Repurchasing would be neat as long as it's possible to mark certain units that must be included in the new force, e.g. the Big Cat or an engineer platoon. Not suitable to historical scenarios, of course.

BTW, what about semi-randomized setup locations for the human player and the AI a an additional option? You could designate different zones for each and the Program would choose one.

That is an interesting idea but my focus is not really replayability. Once to have played a new blind scenario against the AI you know the map and playing it again with the expectation that it will provide a new challenge does yourself and the game a dis-service (?).

The original point was to suggest that BFC in CMII provide some more tools and functions and commands in the editor so that any scenario designer could help out the AI or "hint" it this way or that way, in order to provide the solo player (against the AI) with an interesting and challegeing game the first time they play the scenario blind, any subsquent attempts at that scenario should ideally "just" be considered for practice only as the human player (haveing played the scenario once) now has a an overwhelming advantage over the AI because of their memory of the battle. This goes double for scenarios as they are now,... IMHO they are really only challengeing or FUN when you play them against the AI blind for the first time, there after they always loose some of their charm (Chance Encounter not withstanding because almost everyone has played it so many times in CMBO and now in its CMBB format smile.gif )

-tom w

[ November 09, 2002, 12:00 PM: Message edited by: aka_tom_w ]

Link to comment
Share on other sites

Originally posted by xerxes:

Invisible AI "flags" would be great.

I'd like a variety of AI "InvisiFlags".

1. Standard flag

2. Infantry only flag (AI tries to hold with infantry)

3. Armor only flag

4. Anti-Flag (ai stays away)

5. Temporal Flag (flag is only in effect for a range of turns)

I'd also like the strategic AI be more willing to abandon a flag, particularly small VL flags.

Scripting would be very interesting also.

as it is now, it really appears to me that the ai gets very confused over multiple flags. i've not researched this heavily but have seen scenarios where there are about 15 large flags in one spot, then single small flags there and about, and masses of ai reinforcements will group around one or more of those small flags, ignorign the mass of large flags across the way.

another thing i've seen is that the ai will move out of really good defensive positions... just the other day i saw it move several 76mm artillery pieces, out of their ambush foxholes and into the open just a few meters away. and there was a small flag placed in the area in an attempt to get them to never move in the first place!... but as i mentioned the behavior of the ai with regard to large and small flags seems indecipherable... but as it is, usually suboptimal at best... for example... in the same scenario i cease-fired after about 25 of 30 turns and also found sharpshooters and machineguns milling about in the open, out of their foxholes, and a company commander which was way out in the open!... and every ai position had been marked with at least a small flag before the battle had started!

anyway, if nothing else, what i would like to see is a flag system where the scenario designer programs the value of the flags. there would not be large and small, but a single, victory-points-programmable flag type.

secondly, i would like to be able to tell the ai's troops -- "don't move!" ...

on another thread someone mentioned that for the time being, making the scenarios shorter gives the ai less time to make mistakes. as a rule it seems - even on defense - that the more time you give the ai the more it will unravel its own positions...

finally, i've seen scenarios where the ai is given say 50 or 100 vehicles... i've seen masses of ai vehicles converge on a single point on the map, facing every which way once they got "there."

i don't know if this particular behavior was modified since cmbo but if not, it's got to be fixed so that the ai doesn't "scrunch" its vehicles all together... there has to be some space... and they should all be facing in a reasonable direction...

having said that, it is still possible to get the current ai to give a good fight... it just takes a little bit of work...

Link to comment
Share on other sites

Originally posted by manchildstein II:

as it is now, it really appears to me that the ai gets very confused over multiple flags. i've not researched this heavily but have seen scenarios where there are about 15 large flags in one spot, then single small flags there and about, and masses of ai reinforcements will group around one or more of those small flags, ignorign the mass of large flags across the way.

another thing i've seen is that the ai will move out of really good defensive positions...

anyway, if nothing else, what i would like to see is a flag system where the scenario designer programs the value of the flags. there would not be large and small, but a single, victory-points-programmable flag type.

secondly, i would like to be able to tell the ai's troops -- "don't move!" ...

on another thread someone mentioned that for the time being, making the scenarios shorter gives the ai less time to make mistakes. as a rule it seems - even on defense - that the more time you give the ai the more it will unravel its own positions...

finally, i've seen scenarios where the ai is given say 50 or 100 vehicles... i've seen masses of ai vehicles converge on a single point on the map, facing every which way once they got "there."

having said that, it is still possible to get the current ai to give a good fight... it just takes a little bit of work...[/QB]

Twisting a scenario so that the AI plays a better game is not unlike helping a mentally retarded man to play basketball by chaining him to the basket. He probably will not win, but at least he can't leave the field and run away.

At the moment the AI seems to handle all it's units the same way, for maximum flexibility, perhaps.

It would be nice to hear if BTS plans on adding new editor functions in the rewrite.

Link to comment
Share on other sites

×
×
  • Create New...