Jump to content

Is the AI already playing the game in Real-Time in CM1?


SteveP

Recommended Posts

It's possible that this question has already been answered in the CM2 forum and I missed it. The reason I am asking is that I seem to have stumbled on behavior that suggests very strongly to me that the AI is allowed to play the game in RT now. Here is why I think this:

In another thread (referring to a stupid AI trick), I and a few other posters discussed that fact that the AI automatically starts all units in Hide mode when on defense (I've now confirmed this in a wide variety of tests). In that thread, I said I thought this gave the AI's performance a significant handicap, since it slowed down its reaction to enemy units when they first moved out of cover.

I now think it's more complicated than that. Consider a scenario in which the attacker's setup zone is within the LOS of the defense, but at some range (400-500m, say), and that the setup zone is basically open terrain. To keep things simple, assume that the attacker gives no orders to his units -- they just stay where they are and either get fired on or not.

Let's say further that the composition of the forces is such that the defender (if human) is going to open fire on those visible attackers right away -- there's no tactical reason to withhold fire. However, if the human player controlling the defense gives a Hide order to all of his units at the start of turn one (which is what the AI does), none of his units will fire during that turn. Ever. They will stay hidden until the player unHides them, or until the close approach of enemy units gets too threatening and the individual units "decide" to unHide themselves and start firing.

However, this is not what happens when the AI is playing defense in this situation. The AI units are immediately put into Hide mode at the beginning of the turn, but there is a probability (which appears to vary considerably based on considerations that I am still puzzling about -- but it is definitely not always 100% and sometimes much less than 100%) that the AI's units will come out of hiding and open fire during that turn (usually right away if the scenario is like what I described above).

Now, how would you do this if you were in command of those defending units? You can't. If you give your units a Hide order at the start of turn one, you don't get the opportunity two seconds into the turn to stop everything, tell them to unHide and start firing. The only way you could do that would be in an RT game, in which you can pause at any time and give a new order. To me, it appears that this is exactly what the AI is doing.

The TacAI operates in Real-Time, of course, but my assumption has always been that the functions and functioning of the TacAI is the same for both humans and the computer. I am also assuming that the Hide order works the same for humans and the computer, and that the TacAI wouldn't be any more likely to override a Hide order given by the computer than by a human.

Anybody want to take a stab at an alternative explanation?

Link to comment
Share on other sites

Looking over my posting, I realize that there is another explanation which would account for the specific behavior I described above: that is, the AI gives a Hide order to all of its units, but sometimes also gives a targeting order for some of them.

However, I am not convinced that it is so simple. Many of the tests I ran involved units emerging from cover at some distance from the defender (more than 300m, say), and getting shot at in the middle of the turn by AI units that started the turn in Hide mode. I don't think it's possible that this was the TacAI reacting to a "threat".

[ February 20, 2006, 12:56 PM: Message edited by: SteveP ]

Link to comment
Share on other sites

No, more likely what you are observing is the built-in delay that accounts for the amount of time it would take for a real-life unit to spot an enemy and bring it under fire.

Note that this is not the same as the command delay, though it might be effected by a commander's combat rating, etc.

Michael

[ February 20, 2006, 11:04 PM: Message edited by: Michael Emrys ]

Link to comment
Share on other sites

Originally posted by Michael Emrys:

No, more likely what you are observing is the built-in delay that accounts for the amount of time it would take for a real-life unit to spot an enemy and bring it under fire.

Note that this is not the same as the command delay, though it might be effected by a commander's combat rating, etc.

Michael

I don't think so. Consider that if I am commanding the defense and give my units Hide orders, they do not fire at range. Ever. Yet, when the AI is giving its units Hide orders, they do fire -- sometimes. So far, I have only two explanations for this in my mind:

1. The TacAI works differently for the computer than it does for us. That is, the TacAI for the computer is reacting to something (don't know what-- but certainly not from feeling endangered) and overruling the Hide order in the same way it would if the unit saw it was about to be overrun.

2. The computer is able to interrupt the flow of play and change its orders to the unit(s) just as if it were playing in RT.

Link to comment
Share on other sites

Originally posted by Mudhugger:

Perhaps the AI is using covered arcs with the hide command. Setting up ambushes, and when they have their shot they unhide. Sly sob's.

I am about 99% sure the AI never uses covered arcs, just as it never gives area fire orders to onmap units or indirect fire for onmap mortars (I also, despite what I said previously, don't think the computer gives direct fire orders the way we do -- I think it just decides to Hide or unHide and lets the TacAI module decide whether or not to fire and who to fire at).

I have specifically tested to see if there was any evidence of covered arcs. I described one example of this in the other thread, in which I literally ran green squads across open terrain into a trench containing a crack MG (which had been given the Hide order by the AI), without it opening fire. I think the AI simply hides units and then unhides them when it sees units out in the open. The only question is whether it is able to do this in the middle of a turn.

When people think that the AI has staged some sort of clever ambush, what they are really experiencing is the side-effect of this behavior of the AI -- to give everyone a Hide order. As a result the AI seems to open fire at "unexpected" times. It's not being clever. It's mostly a stupid AI trick, except for this peculiar behavior that I am describing in this thread.

[ February 21, 2006, 09:59 AM: Message edited by: SteveP ]

Link to comment
Share on other sites

For anyone who really wants to get deep into my conspiracy theory :D , I have some more "evidence" to offer that the computer is playing in RT.

In the thread that discussed how the AI doesn't have any command delay, I mentioned a couple of things that I think relate to this question. The most telling of these was that I noted how most of the AI's units moved immediately at the start of a turn, but some started movements in the middle of a turn. Since I do not think the AI gives units pauses as part of an overall movement order, I think the best explanation for this is that the computer has "stopped" play at that point and given these units new move orders -- and since they have no command delay they start moving immediately at that point.

The other point has to do with the zig-zagging movement of some of the AI's units. Most of its units seemed follow a reasonably coherent movement plan, generally aimed toward getting the unit into a covered approach to the flag. But some units did odd little zig-zagging dances, often out in the open. I mentioned at the time that I thought this was evidence of lots of waypoints. But the movement plan involved doesn't make any sense. An alternative explanation is that the AI is changing it's mind in the middle of a turn, about where it wants those units to go, and gives them new orders -- which they obey immediately without any command delay. And it may change its mind about that unit's orders more than once in a turn.

It's possible that the only reason (if there is a good reason) that the AI is exempt from command delay is because most of time its units are out of command radius and it is therefore handicapped.

Link to comment
Share on other sites

Um, it would be silly if the AI was leaving its units of our command radius, though I never play it so I wouldn't know.

What I do know is that there's a perfectly good reason to have the AI be able to do whatever the heck it likes, which is that may be the best way for the computer to give you a decent fight!!

Unless you're expecting the programmers to reverse engineer a human, and put that model on the other side of the table from you, what on earth is the point of thinking that the AI is constrained in the way that the human player is?

GaJ

Link to comment
Share on other sites

It could be that the AI gives all its units hide orders at the beginning of turn 1 but that if one of the AI's units can see one of your units while it's plotting its turn 1 orders, it will unhide the units that can fire on your unit.

It may also be that borg spotting works differently for the AI. Spotting one of your units mid-turn may alert all of the AI's units, allowing those within range who have a reasonable chance of doing damage to open fire.

Maybe this discussion should also examine the preliminary bombardment behavior of the AI. Most experienced players know that putting useless units within sight of the AI during setup can prompt it to waste its artillery in a turn 1 barrage. Sometimes, however, the AI fires a turn 1 barrage when it can't see any of my units. It typically targets some patch of cover. I have no idea what determines this behavior.

Link to comment
Share on other sites

More evidence -

Today, I was playing CMAK. One of my flamethrower teams was captured by the A.I. enemy. In the middle of the turn, same turn it was captured, the FT team starts to move back towards the enemy's rear. The A.I. captured it, took control, gave it a move order with no command delay and the team executed the order, all in one turn. I can't think of another explanation.

Link to comment
Share on other sites

Originally posted by GreenAsJade:

...what on earth is the point of thinking that the AI is constrained in the way that the human player is?

Ahhh, repeated statements by BFC that such is the case? Maybe Charles put something in that he forgot to tell Steve about, but I'm not prepared to take that up just now.

Michael

Link to comment
Share on other sites

Originally posted by juan_gigante:

More evidence -

Today, I was playing CMAK. One of my flamethrower teams was captured by the A.I. enemy. In the middle of the turn, same turn it was captured, the FT team starts to move back towards the enemy's rear. The A.I. captured it, took control, gave it a move order with no command delay and the team executed the order, all in one turn. I can't think of another explanation.

A captured unit that comes under fire (i.e. someone fires at another unit which is in the same area as the captured unit) will run/move out of the way - the captured unit in this case might have moved towards the enemy's rear.
Link to comment
Share on other sites

Originally posted by SteveP:

The TacAI operates in Real-Time, of course

Real time? You might want to put that in other words. All of the combat calculations are done after you hit that Go button, after that all you see is a recording of the action. So the TacAI is not real time. Also, the computer player does it's planning before turn processing, not during.
Link to comment
Share on other sites

The TacAI is real time in the sense that it has up-to-the-second information to decide what to do next. That's it job, duh! It does it for the forces on both sides...

The question being posed here is whether the AI has the opportunity to change orders for troops during the calculation pass that humans don't have.

The other question is why would you care? ;)

GaJ

Link to comment
Share on other sites

I feel you dismiss the covered arc to easily, granted the AI doesn't use them as effectively as a human, but I've seen evidence that they are used especially in the first turn of an AI defense.

Take a flat, open desert with two infantry platoons facing off at 400 M. Yours is dug in sitting on a flag. Turn 1 you give no orders at all, no one is hiding. Your men will open up almost immediately as soon as the enemy moves from its hidden positions. And they will move. Switch sides and you are the attacker. You have to move forward turn 1. The AI will let you walk or run to 275 or 250 M before opening up. Why? Because firepower, range, cover, and who knows what else equals AI covered arc. Human has choice and descision to set arc's long or short or not at all and by the way can unhide in the middle of a turn with an arc, so it's all fair.

And I agree with GreenAsJade. Trying to crack the AI of any solitaire game really doesn't make the game more fun.

Link to comment
Share on other sites

It's like asking "does the AI in an FPS game cheat with aiming". The question hardly even has a real meaning ... the AI is not the same as a person, so it hardly can work in the same way.

I know that BFC have said that the AI is constrained to work with mostly the same information that humans have... but I'll tell you this: I don't think this is done through some strange idea of "fairness" or cheating". It's done for realism. If the AI had access to too much knowledge, it would behave in unrealistic ways. That will be the only real reason why they would limit the information it bases its decisions on.

As to whether it makes "orders" style decisions during turn calculation: I really doubt it, simply because that would be a massive new bit of functionality that is no use whatsoever in the 2 player game. Hard to see why they would go to that trouble...

GaJ

Link to comment
Share on other sites

Let's see how much of this I can cover:

Green: I did not start this thread to complain about the AI "cheating." I know there have been lots of threads about that in the past, but that's not the motive here. I only posted this because I observed behavior that was inconsistent with what I understood to be the way the game operated and it made me curious (more than curious, actually -- I really thought there was something wrong with my software, and I ended up reinstalling CMBB and other system software, and so on. Crazy, but how was I to know??). And I know others are curious about the mechanics of the game, so I thought I would share what I had discovered and my interpretation of it. It would be great if BFC would comment, but I doubt that they will, since I don't think the CM1 games are what they are thinking about right now.

Dook: I don't think you are correct in your guess that the AI is giving the units Hide orders (which is what I am directly observing) and then immediately giving them unHide orders (which I do not directly observe) before the computer starts calculating the results of the turn. In the thread about the stupid AI trick, I described my technique for doing this observation (a modification of a suggestion by another poster, Sgt. Kelley). If the first action you take is to surrender, and then you observe the AI's units, you see that they are in unHide mode (assuming the scenario designer didn't Hide them). This is because the AI never got the chance to give them any orders. However, if you run the first turn, then quit, open that turn using Autosave and surrender at the very beginning of the repeat, you will see that the units are hidden. What is clear is that the AI's orders are preserved by Autosave. There's no reason I can think of why the Autosave would preserve the Hide order but not some immediately subsequent unHide order.

As for spotting -- not an explanation. The AI's units which are hidden are nevertheless spotting the attacking units instantly -- I can tell that by playing the same scenario Hot Seat. The AI's units are not firing because they are hidden -- as they would if you were playing them -- unless they do fire. Which they shouldn't be doing unless the AI was able to give them an unHide order in the middle of the turn.

Michael: You may be interested to know that this behavior -- namely the AI giving automatic Hide orders, and also what I am choosing to call RT decision-making -- goes back to CMBO. The exemption from command delay started with CMBB, however -- suggesting perhaps that it really was about dealing with the new command delay model. Given that a lot of the complaining about the AI "cheating" involved things like spotting and tank-killing, I wouldn't be too surprised if Steve simply forgot that there were in fact some things the AI could do that we couldn't.

Sergei: You are simply asserting that I am wrong, without explaining the behavior I'm seeing. As Green points out, the TacAI is making decisions and executing them during the time that the computer is doing "combat calculations." Much of this is purely reactive, of course (e.g., did the advancing unit cross the covered arc boundary). But some of it is not. For example, the TacAI is during a turn continually evaluating whether or not to open fire on a moving unit. It is not only figuring out whether the unit is in LOS/LOF, but also whether or not its fire has a reasonable probability of doing some damage. When it thinks it has that opportunity, it effectively "stops" the "combat calculations" and gives the unit involved an order to fire. That is RT behavior. My understanding is that all of the functions of the TacAI are the same for the player and for the computer. If not, I would find that interesting to know about -- not to complain, just to know.

Mudhugger: I only said that the AI does not use covered arcs, though I admit there is no way to prove it. However, I have done a number of tests very specifically designed to detect covered arcs and have never see it. You seem to be making an assumption that the AI has some behavior pattern which works sort of like a covered arc. If you ran some tests of the scenario you described, you would see something different from what you assume. Try running it ten times. My prediction is that anywhere from 7-9 times, the AI defender will not open up on your attackers during the first turn (and, it doesn't matter what orders to give them -- they can do a parade ground march and the result will be the same). As for the times that the AI does open up on you: if you start your attacking units in the open, the AI will "stop play" fairly early in the turn to unHide. If your attacking units start in cover, it's quite variable as to when the AI opens fire (which argues against a covered arc, since why would it vary?), but nevertheless, it has to be giving its units an unHide order at that point in time.

And concern about "fairness" is not a motivating factor behind my starting this thread.

Green, again: Since the same computer that's doing the calculations is the one that's doing the AI decision-making, it's quite possible for the AI to be playing in RT without requiring "massive" new functionality. Keep in mind that the AI has a much more limited command set to work with than we do (for example, no area firing, no indirect firing with mortars, and I believe no direct firing orders, no pauses in move orders, no covered arcs, etc. etc.). It was a more limited set in CMBO, and I doubt that it was given any of the new commands that we were given when CMBB came along (I doubt, for example, that it can use the MTC command). So, there are only a very few nonTacAI decisions that it could make during the course of a turn.

So, again, on why this interests me, one reason would be that this would help explain why making CM2 into a RT option game isn't such a big deal. They'd already licked half the problem in CM1. ;)

Link to comment
Share on other sites

Fair comment about natural curiosity: that one I'll pay, and share in it.

I can imagine that the reason the "unhide" might not be appear saved is that it hasn't happened yet. They are hiding and the first thing they will do is unhide, but no time passed, so they didn't get a chance? Just a thought.

Can spotting be revived as an explanation if you take into account Borg spotting? I'm not sure if this is really a good path to follow, because Borg Spotting is a phenomenon of the TacAI during turn run calculation ... if should apply to AI and human units equally, right? hmmm...

GaJ

Link to comment
Share on other sites

So that's why I get my tail kicked almost everytime I play!! But when I thought I saw what you have described about AI and real-time I closely watched one of my tanks respond very quickly to an emerging threat to its rear. It fired smoke at its first target and then began to engage the new threat while trying to escape at the same time. In the end it knocked out the enemy vehicle and began to engage a AT-gun the emerged to shoot at its side armour.

From this I concluded in my philisophical theories that the programmers gave the AI a "rules of engagement", meaning that the highest threat be engaed first to save itself from destruction(just like you'd do if you were in the same situation).

P.S. My tank became one with fire and earth.

Link to comment
Share on other sites

Green: I know how tempting it is to assume that this behavior is somehow related to spotting. It isn't. I think the simplest way to show this is with the example in which the attackers start in cover and move in the first turn across open terrain, at range (say 300m) toward a defender who should open fire on them (say infantry advancing toward an HMG). Now if you play this Hot Seat, you will see two things: (1) the advancing infantry are spotted the moment they leave cover (this is true even if the HMG is given a Hide order, by the way); and (2) the MG will open fire on the infantry a second or two later. And it will do this every time. Every Time!! (I'm assuming that you haven't set a covered arc or, imitating the AI's stupid trick, given the MG a Hide order.)

From this you can conclude that if the AI is controlling the MG, the MG is still spotting the infantry as soon as they emerge from cover, BUT the MG's pattern of firing doesn't match what happened when you played it Hot Seat. Most of the time the MG won't fire (OK, it's been hidden, but then it shouldn't ever fire. Ever!). But sometimes it does fire. And sometimes it fires after the infantry has moved some distance from cover (which never happens if you are playing Hot Seat). What accounts for this variability?

Again, my two alternatives: the computer is playing in RT (which means that the OpsAI module is continually evaluating whether or not to unHide and can execute that decision in the middle of a turn). Or the computer has a TacAI that is "enhanced" from the one that we have on our side (which only means that the computer is operating in an RT mode more than we are).

However, what if you take the above scenario and add another MG to the defense. If the AI is playing with an enhanced TacAI, the decision to unHide would be made for each of the MGs separately -- because that's the way the TacAI works, unit by unit. That would appear to increase the overall probably that at least one of the MGs would open fire during the turn. The tests I have run do not support that. What the tests appear to show is that the AI will unHide none or all of the units that have the ability to fire on the advancing units (that is, have LOF to the units). And the probability of the unHide command is the same no matter how many units have LOF. Any units which do not have LOF to the advancing units will stay hidden (and I've seen that).

As for the possibility that the computer is giving the units a Hide command (which I can observe) and, during the orders "phase," an unHide command to be executed later, my answer is: how would you do this? You could only give the unHide command at the start of the next turn. So why or how does the computer get to do this in the same orders phase?

kawiku: what you are describing is the TacAI at work. The TacAI is a whole system of reactions and some decision-making that are intended to simulate the behavior of units under threat or actual fire. This system "should" be the same for both us and the computer. I think it is, but whether that is true is partly the subject of this thread.

smile.gif

Link to comment
Share on other sites

SteveP: Your last example, with MG's, was much like mine in the desert. Only you and I differ on when the computer is playing it's "A" game shall we say. My thoughts are, Hot Seat is not vs. AI. The default actions, whatever they are called (TacAI, I don't know) when a human is in command is not the same as an AI game. It's up to the human player to make arcs, target descisions, advance orders, whatever and if he doesn't the default orders sometimes are not what you hoped for. In your AI example, the MG's not opening up till the enemy gets further into open ground may be on purpose; an arc, to get the squad in the open for a better kill ratio. Some may not fire to not give away their positions, etc. Of course, I don't know if this is true, but it has always seemed the default fire orders in many situations are pretty weak. I actually hope this to be true.

Just my opinion.

I sure hope this thread doesn't ruin my AI battles. Interesting.

Link to comment
Share on other sites

Mud: Maybe I should do my own RT "pause" and interrupt this thread for an explanation of how the AI works. This is based on what I've read in the manual, in this forum, my own tests/experience, and some theorizing.

First, about 90% (my number -- intended only to give some perspective) of the functionality of the AI is in the TacAI. The functionality works strictly on a unit by unit basis -- you could think of it as each unit having its own TacAI to control its actions. Those actions include deciding when to open fire and who to fire at, what reactions to have when getting fired at (e.g. going to alert, shaken, caution, pinned, etc), when to sneak or run away from fire, and in what direction, and so on. Basically everything that is involved in attempting to simulate the behavior of units in battle conditions. My understanding has always been that the TacAI has the same functionality and operates in the same way for each side in a battle, whether that side is being controlled by a player or by the computer.

The other 10% of the AI's functionality is contained in the OpsAI (presumably for Operational) and the StratAI (for Strategic). Of course, I don't know exactly what functionality is in each, but I can make some educated guesses. I think that the OpsAI is the component that issues commands to the units. The AI has a much more limited set of commands that it can use compared to a human player. I think these are limited to Hide (which it apparently issues automatically at the start of the game), unHide (which it apparently issues to units who have LOF to enemy targets), Move (which it issues to units in cover or to AFVs generally), and Run (which it issues to infantry units in the open, except for those which are slower moving). It may also issue fire orders for FOs, but that might be a StratAI function. I do not think it can use any other commands, with the possible exception of Advance which it may use when units first move out of cover. However, I don't think so. It may be able to issue Hunt orders to AFVs.

The function of the StratAI mostly consists of path-finding (seeking one or more covered routes to the flag(s) in the case of attacking, and orientation in the case of defense (i.e., which direction is the enemy coming from). The conclusions from these calculations are used by the OpsAI as the basis for orders.

I think that's pretty much it -- unless of course BFC should by chance resume reading posts in this forum and decide to weigh in with corrections. ;)

Now, the TacAI already operates in RT. It's also a common denominator between the player and the AI. However, our ability to perform the kind of functions that the OpsAI and the StratAI perform are limited to the orders phase of each turn. A player can't stop the turn in the middle of the calculations and change his mind about the orders he have given. In fact, he doesn't even know he wants to change his mind until he views the movie, and then it's obviously too late because all of the turn's calculations and results have been finalized. The only thing he can do is quit and use Autosave to try a different set of commands. Even then, he can't do what the computer can apparently do: give a Hide command to the units and an unHide command to be executed at a later time in the same turn. The only way this could be happening is that the whole AI (not just TacAI, but also OpsAI and StratAI) is playing the game in Real Time.

It's quite possible, if I'm right, that we could have had a RT option back when CMBO came out, except that (my guess) most computers didn't have the horsepower to run graphics (i.e., the "movie") at the same time as the calculations.

Now for a couple of specifics:

1. Hot Seat should produce the same results as playing against the AI, if you are giving the same orders as the AI (e.g, giving all of the units on defense an order to Hide at the beginning of the game). The fact that it doesn't produce the same results is why I started this thread and the other one on the stupid AI trick.

2. What you are calling the "default orders" could be either TacAI or OpsAI. I can't tell what specifics you are thinking of in your post. IMHO, the TacAI is a pretty sophisticated and complex system that most of the time makes better decisions than the player does or can (because the TacAI is operating in RT and the player can't). My sense is a lot of players want to micromanage their units and not let the TacAI do it's job. Overuse of covered arcs is an example of this. Constantly issuing direct fire orders is another. These things ought to be more the exception than the rule. Again, this is just my opinion, but it comes from playing the game both ways, and looking at the results using Hot Seat as well as playing against the AI. The best way to judge if the TacAI is making "weak" decisions is to leave the TacAI alone on your side of the battlefield and see what happens (even try the scenario both ways: letting the TacAI alone one time, and micromanaging the other. Better yet, does this playing Hot Seat).

If you are trying to evaluate this by looking at what the AI is doing on it's side of the battlefield, you may be misinterpreting who's making the "weak" decisions: the TacAI or the OpsAI. As I have said in a number of posts, I think this practice by the OpsAI of giving automatic Hide orders is a stupid AI trick, and a really unnecessary one. And one of the side-effects of this practice, is that it causes players such as yourself to think the TacAI doesn't know when to properly open fire. The fact is that the TacAI has been completely preempted by the Hide order.

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