Jump to content

Integral Calculus and CM? What do these have in common?


Recommended Posts

Ok, I was wondering, for all those people out there who know what an intergral is, if CM models the trajectory of a tank round with some advanced math or just probabilities. For example if you calculate the arch length of one tank to the the target and take into account that that arc length is changing at a non-constant rate and that the height of a shell due to gravity will constantly fall at 9.8m/s^2 then you have one hell of a complicated math problem. I only bring this up because sometimes my tanks will fire and the round will be very crazy. Way to the left or way to the right or way to short, or somtimes the round just disappears. And unbelievably the round will sometimes land behind the tank that fired the shot. Whats going on here?

Link to comment
Share on other sites

I can't explain to you how the trajectories are calculated, but I remember seeing quite a few times that the misses you see are somewhat arbitrary in location.

The game calculates if the shot will hit or not, if it hits, it calculates the damage, if it misses, the game randomly places the miss.

This came up a lot when misses and shot bracketing came up. Bracketing does happen within the game, Meaning consecutive misses will keep having a higher chance of hitting the target, but the actual missed shots displayed are random, NOT being used for bracketing.

Hope this helps.

Link to comment
Share on other sites

Originally posted by Sir Augustus:

A question-

If that is true how can you use that to explain artillery?

I don't know the first thing about CM artillery patterns except I don't recall BF ever saying they were related.

I don't think the two are related in CM at all myself, but that's just my opinion. I don't see how they could be.

Link to comment
Share on other sites

I have been intrigued by this matter since playing the 2nd demo game (in a v.steep sided long valley) then watching some yank shelling of filthy arab holes in Afghanistan. My trigonometry is a bit rusty, and given the mizzle velocities of these projectiles at CM ranges<1km the only possible explanation I can posit for the time of flight is air-resistance. I have observational evidence for this in-game, but not for shell-drop. At <1kn the gun elevation on these monsters is 2-3degrees. {Their absolute range was 20-25km}. Would appreciate some help.

Link to comment
Share on other sites

You don't really need integrals for calculating flight of the projectile for practical purposes. At least that's how they taught as at the university. I can't pull the equation out of my head right now but in that equation all the forces are considered except air resistance.

Link to comment
Share on other sites

Quite right. If you assume certain things, such as no air resistance, you can find the position of the shell at any point of it's flight using simple equations. If air resistance is factored in, then you start to need a differential equation to calculate the current speed of the shell, as drag is dependant on shell speed.

The real strength of the computer is the ability to do simple calculations very quickly, which allows the problem of shell position to be solved iteratively.

This means that you work out the position and velocity at a point in time, then use these numbers in simple equations to work out the position and velocity at a short time (i.e. 0.001 seconds) later.

Basically the maths is not that complicated for drawing the arc of the shell (what you see on screen)

The actual arc followed is, AFAIK, determined by "fuzzy logic". I'm no Computer Scientist, so I can't be more specific, but I think that it works by introducing a random factor into normal logic operations, so very unusual things can happen. I wouldn't think that it cause a shell to land behind a tank that fired it though.

Hope this helps

Link to comment
Share on other sites

Originally posted by flamingknives:

[snips]

The actual arc followed is, AFAIK, determined by "fuzzy logic". I'm no Computer Scientist, so I can't be more specific, but I think that it works by introducing a random factor into normal logic operations, so very unusual things can happen. [snips]

Eh? What's fuzzy logic got to do with it? An old-fashioned random variate drawn from the appropriate probability distribution would do just fine.

All the best,

John.

Link to comment
Share on other sites

Originally posted by flamingknives:

You may be right John. Like I said, I'm no comp sci. That being said, I think that's what fuzzy logic is, unless someone more knowledgeable cares to correct me.

One of the most common "old fashioned random variates" would yield a uniform distribution. Roll a six-sided die 6,000 times and you would expect 1,000 1's, 1,000 2's, 1,000 3's, etc, plus or minus some small variation due to chance.

Each possible outcome is equally viable, with the same percentage chance of occurring, and "ignores" the surrounding world.

Un-fuzzy logic (shaved logic?) says that "Given facts A, B, and C, the outcome shall be D".

Fuzzy logic attempts to capture some of the real world variability that is thought to exist in the process being modeled. Something like "Given facts A, B, and C, the outcome is likely to be a value drawn from this particular distribution named P.

Tweak either A, B, or C, and you may well be drawing distribution Q, or distribution R, etc, depending on the theory behind the fuzzy logic model.

Link to comment
Share on other sites

IIRC, CM computes whether a hit occurs at the moment of firing, not at the end of the projectile flight path.

Occasionally the target motion during playback moves the target behind an obstacle, and your "wunder-shot" appears to pass through objects on its way to a target. C'est la vie. Hit determination is a bit more like lazer tag than real world ballistics.

A "hit" might be fairly easy to compute, depending on how many factors are taken into account.

A shot from your armor at mine hit. The next question might be "At impact, my facing was 17 degrees offset from front and his elevation difference brings the shell in from 12 degrees above horizontal. At this compound angle, the exposed facing of the vehicle totals X square feet. Which exposed face did it hit? (Weighted random selection by exposed surface area maybe?) Given the exposed surface hit, what was the incident angle of the shell? What is that face's armor characteristics versus the shell type? Did it penetrate?"

Hmm... I might just have to tinker with this one... *dusts off his Visual Studio CD's*

Link to comment
Share on other sites

Originally posted by Farslayer:

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

You may be right John. Like I said, I'm no comp sci. That being said, I think that's what fuzzy logic is, unless someone more knowledgeable cares to correct me.

One of the most common "old fashioned random variates" would yield a uniform distribution.

</font>

Link to comment
Share on other sites

Fuzzy logic is used for the AI in CM (both the TacAI and the computer opponent). It basically means that the programmer tells the computer to not only see black or white (which would be normal for a computer), but see shades of gray. For example, a unit's internal "threat state" would be either "I'm safe" or "I'm in danger" without fuzzy logic, but with fuzzy logic it could be everything between "Nice time for a picnic" and "I'm doomed". This obviously models the human way of thinking much better, and it's used because of that.

Dschugaschwili

Link to comment
Share on other sites

Originally posted by John D Salt:

... Although by tradition most pseudo-random number generators generate uniform reals on the interval 0.0 to 1.0, any half-decent simulation language or library will give you a selection of probability distributions to choose from, including as a bare minimum the normal and negative exponential distributions.

That 0.0 to 1.0 generator is usually hiding at the core of any library. It's what you do once you've got him that counts...

The opposite of "fuzzy" is "crisp".

I always wondered 'bout that one...

Nope.

... the correct answer...

Remind me to bonk the nog that explained that to me the other day...

Thanks for the better info.

Link to comment
Share on other sites

×
×
  • Create New...