Op fire weirdness and the "hot or cold" effect.

PC : Battle Academy is a turn based tactical WWII game with almost limitless modding opportnuities.

Moderators: Slitherine Core, BA Moderators

ssouthrey
Lance Corporal - SdKfz 222
Lance Corporal - SdKfz 222
Posts: 27
Joined: Fri Sep 10, 2010 3:47 am

Op fire weirdness and the "hot or cold" effect.

Post by ssouthrey »

First, a shout out to LOGAN5 for bringing up the "hot or cold" (HOC) effect.
Second, I copied the last few posts from the previous thread. I apologize if the method I used was not the correct one but I'm not a savvy thread guy. :)

In summary of the topics of this thread:

1.
The inconsistency of units op firing. We've been discussing whether units react properly and the inconsistent op firing that occurs. Sometimes, units will fire 6 to 8 times in one turn and other times, 5 units won't fire once to an enemy advancing on them.

2.
The HOC effect and how some games you appear to be "hot" and you never miss a shot, and other games "cold" and you always miss.
Last edited by ssouthrey on Mon Sep 20, 2010 9:00 pm, edited 1 time in total.
ssouthrey
Lance Corporal - SdKfz 222
Lance Corporal - SdKfz 222
Posts: 27
Joined: Fri Sep 10, 2010 3:47 am

Post by ssouthrey »

PirateJock wrote:I have games where my shooting has been hot - always feel sort of guilty as I don't seem to be able to miss - and also games where I have been sub-zero on hits. And also some games were it feels balanced.

Assuming all hit/penetration/kill calculations are in the BSF scripts ... has that been confirmed ? It looks like there are only 2 random elements involved in the process:
  • There is a random element [hitRoll = Rand(0,100)] for determining if your shot is successful where if hitRoll > Chance to Hit then Miss
  • There is a random element generation amount of damage from a shot - random number from the minimum - maximum damage range (APAttack[0] & APAttack[1] from squads.csv). And then I assume a kill is obtained if damage > target armour (modified)
As far as I can see the decision for opfire is not a random element (?) It's based on angle of attack. And whether an opfire event is successful is then governed by the Chance to Hit calculation etc.

Maybe as we don't see all of the opfire information it's difficult to see at what stage the opfire decision has stopped - e.g. your unit has reacted but then failed on the Chance to Hit part?

If the Rand is a true random number generator - is it as I don't know if it's working with a seed value - every fire event should be independant from the randomness aspect (there are other events in the calculations that are affected by what the units have done previously). But even if Rand was a pseudo generator would it really lead to a string of hits?

Has anybody else had a look through the scripts to see how firing/hits work? Do you think it's different to above?

Phil/Iain - would you be able to clarify what happens when figuring out if a shot hits and kills?
ssouthrey
Lance Corporal - SdKfz 222
Lance Corporal - SdKfz 222
Posts: 27
Joined: Fri Sep 10, 2010 3:47 am

Post by ssouthrey »

iainmcneil wrote:The % chance you see is the excact chance to kill after all calculations. The chance of missing a 90% shot 2 times in a row is 1 in 100. The chance of killing 3 25% chances in a row is is about 1 in 64. These things will happen on a regular basis - thats how probablity works and is as intended. There is no way to get the right sort of interaction between tanks without these probabilities.

Opportunioy fire always happens if the unit has ammo and detects the target. Detection chances vary by unit but all units have 100% detection in the forward 90 degree arc. Detection reduces to the sides particularly for closed top tanks without turrets. It reduces further to the rear - so much so that many tanks ahave a 0% detection chance to the rear.
ssouthrey
Lance Corporal - SdKfz 222
Lance Corporal - SdKfz 222
Posts: 27
Joined: Fri Sep 10, 2010 3:47 am

Post by ssouthrey »

LOGAN5 wrote:It seems the entire forum is now in agreement that these cold streaks happen... no way this is random.. I mean the odds that I am on a cold streak and the other side is on a hot streak? How can this possibly be, making frontal armor kills maybe 5% shots while you are missing 35+% the whole game. After so many times this happened you got to be a real idiot not to see the pattern, as soon as you start missing you can allready tell that you will miss all shots for the turn, if it is really 50% you would be wrong 50% of the time but you are not.
ssouthrey
Lance Corporal - SdKfz 222
Lance Corporal - SdKfz 222
Posts: 27
Joined: Fri Sep 10, 2010 3:47 am

Post by ssouthrey »

iainmcneil wrote:I've played a LOT of games and have just not seen this happen. There is really no way for the randomness to be skewed like this - its just logically impossible to return better values for one side or another. Random numbers dont know which side they are for. In addition the random numbers dont know if a low value or high value is good so even if they did want to biass things they wouldn't know how!

When people have complained and then given the details of a situation there have been logical reasons for the results. I've never seen this and feel it is all down to perception. If someone has a specific example please let me know and we'll investigate. We are looking at ways to address the perception issue as people don't seem to be taking acount of the %'s.

Feel free to video capture using something like Fraps to show what happens in a game and we can watch it back.
ssouthrey
Lance Corporal - SdKfz 222
Lance Corporal - SdKfz 222
Posts: 27
Joined: Fri Sep 10, 2010 3:47 am

Post by ssouthrey »

LOGAN5 wrote:on sept 8 and 9th there are 2 finished games Beta clash of armor, between me and shawnt63.. these are a perfect example.. I don't know if there is a way for you to watch the entire match replay and maybe you can see what all the fuss is about. I would record it for you but it only lets me play back the last turn
ssouthrey
Lance Corporal - SdKfz 222
Lance Corporal - SdKfz 222
Posts: 27
Joined: Fri Sep 10, 2010 3:47 am

Post by ssouthrey »

Roadkingbill wrote:I have seen a big change since the Tiger patch.The game has changed to the point I stopped playing, to frustrating.
ssouthrey
Lance Corporal - SdKfz 222
Lance Corporal - SdKfz 222
Posts: 27
Joined: Fri Sep 10, 2010 3:47 am

Post by ssouthrey »

PirateJock wrote:To be clear - I have had occasions where I don't seem to be able to miss and others where I can't hit a barn door but I have also had games where I hit as much as I miss. As there is a random element in the game I accept this ... that's the nature of randomness. I currently don't believe the hit/miss calculation is broken or skewed.

There may be improvements to made on the impact of the random element but that's another discussion :wink:
ssouthrey
Lance Corporal - SdKfz 222
Lance Corporal - SdKfz 222
Posts: 27
Joined: Fri Sep 10, 2010 3:47 am

Post by ssouthrey »

Hi Iain. I love the game. Great job! I'm definitely going to pick up Field Of Glory as well.

On the topic at hand, you mentioned the following:
[quote="iainmcneil]Opportunioy fire always happens if the unit has ammo and detects the target. Detection chances vary by unit but all units have 100% detection in the forward 90 degree arc.[/quote]

First, when you mention ammo, does that mean shots remaining from your active turn? Secondly, you specify that 100% detection in the forward arc. Does that mean they always fire if an enemy moves into their forward arc? If so, without a doubt, that is not happening. I've had enemy tanks move directly up to an anti-tank gun on the forward arc without a single op fire.
I had one instance, in "Holding The Line" where I had 3 Shermans, 1 M10, 1 M18, and a 57mm ATG behind a building and hedgerow facing the entrance of a bridge. A Stug crossed the bridge and was in line of sight of all units. I also had a Bazooka squad adjacent to the bridge so the unit was detected. Not one unit op fired. The Stug fired at my M18 and destroyed it. It then blew up my M10. I have no problem with the fact that the Stug blew up my vehicles. I was just disappointed that not one of my units op fired.

Also, does the % to kill include the % to hit? I thought they were separate random checks. If it's 50% to hit and 50% to kill you would have a 25% to kill a unit with each shot. Just want to confirm this mechanic.

By the way, I want to reiterate how great the game is and I'm just saying this to improve an already great game!
ssouthrey
Lance Corporal - SdKfz 222
Lance Corporal - SdKfz 222
Posts: 27
Joined: Fri Sep 10, 2010 3:47 am

Post by ssouthrey »

Acererak wrote:After completing the three campaigns and more than 50 MP games played, i don´t see anything broken either. Randomness is there, but trying to figure out a pattern out of it it´s probably heavily influenced by some unlucky personal experience, at least from my point of view. How many games you really need to play to figure out a pattern with all variables in this game taken into account? I am no math expert, but it seems to me that the number probably has a lot of digits.

I think all in all, everything behaves in a very rational way. There are quite a few variables (facing, moved, morale, skill of opponent) that really make me wonder how come is possible to figure out any pattern at all.

Of course i had games when i felt like some bored funny deity is playing with my destiny. But i also had a lot of days like that....
ssouthrey
Lance Corporal - SdKfz 222
Lance Corporal - SdKfz 222
Posts: 27
Joined: Fri Sep 10, 2010 3:47 am

Post by ssouthrey »

After playing more games, I would like to add that in terms of the HOC effect, I'm not so sure that the problem is one of a broken random number generator. For me, the HOC effect is directly related to the op fire issue. The games that I'm "hot" tend to be the games where my units are op firing consistently. The games I'm "cold" are definitely the games where my units chill out and have lunch.
LOGAN5
Staff Sergeant - StuG IIIF
Staff Sergeant - StuG IIIF
Posts: 263
Joined: Thu Aug 05, 2010 9:00 pm

Post by LOGAN5 »

I understand about math and probability and jumping to conclusions based on 1 or 2 unlucky games.. If you miss the first shot, I could almost bet that you will miss the 2nd shot with that same unit, how many times have any of you killed something after missing the first shot? Extremely rare.. you usually suppress them they turn around and not even a shot in the rear with another unit will kill them, this can't be random. btw i really hope this is all in our imagination, but i just know that it is not
Acererak
Staff Sergeant - Kavallerie
Staff Sergeant - Kavallerie
Posts: 327
Joined: Wed Aug 11, 2010 10:55 am

Post by Acererak »

Ok, here we go. Thanks to ssouthrey for following the advice and making this a new discussion. I think the topic deserves it´s own thread and the old one had a very bad start.

As i said, i am no math expert and maybe some of you can see things that i cant. But Ian made a very good point. How is it possible to tweak random numbers just for one side? Some of you said something about "seeds" being the reason. Anyone can explain a bit further what is that about?

I really feel that we can go forever with this discussion, and that Casinos are full of people losing a lot of money because they really believe those "hot and cold" patterns repeat themselves and can be detected.

I have always believed in chaos, and specially in randomness of life. If i have 20% chance of hitting something, that doesnt mean i will get 2 out of 10 if i throw my dices 10 times. I can get a 2 6 times in a row. Or i can get no 2s at all in those 10 rolls. Is there a pattern here? I dont think so. But that means my Panther missed those very easy shots 10 times in a row.

As i said, at least for me, the overall feeling of this game is that it works pretty well, and that if you use your units in a proper way, your tactics adapted to every map/opponent/situation, you can win more games that you will lose. I don´t see a "black" hand behind my dice throwing sending my tactics to oblivion. I just don´t feel it.
Merr
Captain - Heavy Cruiser
Captain - Heavy Cruiser
Posts: 903
Joined: Mon Aug 16, 2010 2:00 pm

Post by Merr »

Acererak wrote: Some of you said something about "seeds" being the reason. Anyone can explain a bit further what is that about?
This might help .... http://en.wikipedia.org/wiki/Random_Number_Generator

And a quote about "seeds" or "keys" ;
"True" random numbers vs. pseudorandom numbers

Main article: Pseudorandom number generator

There are two principal methods used to generate random numbers. One measures some physical phenomenon that is expected to be random and then compensates for possible biases in the measurement process. The other uses computational algorithms that produce long sequences of apparently random results, which are in fact completely determined by a shorter initial value, known as a seed or key. The latter type are often called pseudorandom number generators.

A "random number generator" based solely on deterministic computation cannot be regarded as a "true" random number generator, since its output is inherently predictable. How to distinguish a "true" random number from the output of a pseudo-random number generator is a very difficult problem. However, carefully chosen pseudo-random number generators can be used instead of true random numbers in many applications. Rigorous statistical analysis of the output is often needed to have confidence in the algorithm.
20 years ago when playing the online game AirWarrior a player once quoted the damage he received as "being reemed ... by the Reem-domizer".

What is BA using? Who knows.
LOGAN5
Staff Sergeant - StuG IIIF
Staff Sergeant - StuG IIIF
Posts: 263
Joined: Thu Aug 05, 2010 9:00 pm

Post by LOGAN5 »

I know there was a command in BASIC called "Randomize timer", that solved the seeding problem, i would have to think something similar is being used, I still think its a formula error, maybe a = instead of a >= or some type of absolute value.
ssouthrey
Lance Corporal - SdKfz 222
Lance Corporal - SdKfz 222
Posts: 27
Joined: Fri Sep 10, 2010 3:47 am

Post by ssouthrey »

I'm not fully convinced yet that there may be a problem with the random number generation. Plus, that's too easy of a problem for the Slitherine crew to not catch. Sometimes, people will seed only once; for example, in the beginning of each scenario. Other times people will seed with each generation of the number. Using time is the most common method: rand(time()). Regardless, even the single seed will give you a pretty good string of random numbers.

For me personally, my HOC is associated with my op fire. I really would love to understand how that mechanic works. I know Iain briefly explained it but I need clarification since I'm definitely not getting 100% op fires from the frontal arc.
LOGAN5
Staff Sergeant - StuG IIIF
Staff Sergeant - StuG IIIF
Posts: 263
Joined: Thu Aug 05, 2010 9:00 pm

Post by LOGAN5 »

could be that the numbers are coming up in the same sequence and if you happen to catch a nice set you will do good for the whole game, it should be randomizing each time or if your first few numbers don't make it you will continue to miss
adherbal
The Artistocrats
The Artistocrats
Posts: 3900
Joined: Fri Jun 24, 2005 6:42 pm
Location: Belgium

Post by adherbal »

While not entirely familiar with the mechanics behind random number generation, it actualy needs to be "predictable" if you want any kind of replays of game turns. For example when replaying the turn of your opponent in MP it must generate the exact same series of "random" values as in that player's original turn. It probably means seeding the generator at the beginning of a turn and saving it in the MP file.

I don't see how this could be the cause of any problems though. But I did see enemy units appearing in front of my units - often at point blank range - and not getting op fire. If Iain says op fire is 100% sure in front of a vehicles than there might be something wrong.
shawnt63
Administrative Corporal - SdKfz 251/1
Administrative Corporal - SdKfz  251/1
Posts: 127
Joined: Thu May 27, 2010 11:55 pm

Post by shawnt63 »

Interesting thread, I have chatted with LOGAN5 before about this issue and I just ran into it again with a game of dday +3. Don't know if it is just randomness or if there is really something amiss, but I was sitting in ambush good fields of fire and advanced warning, but the allies came in and destroyed all my armour in two turns and I got a big fat zero on the kills. It can be frustrating but I think if you play the same games over and over it's bound to happen - so maybe what is happening is more along the lines that we expect the same general results (or slightly better if we change our tactics) but the game has it's own randomization (is that a word?) factor and so does the opponent so that although some tactics are predictibly better than others it still doesn't always work and this is the effect of no Op fire or lack of kills in even a very high percentage shot.

I guess in the end for me, most games play how I think they should and if I use the right tactics at the right time then I should be about 90 percent successful, until I meet the enemy :)
Merr
Captain - Heavy Cruiser
Captain - Heavy Cruiser
Posts: 903
Joined: Mon Aug 16, 2010 2:00 pm

Post by Merr »

adherbal wrote: I don't see how this could be the cause of any problems though. But I did see enemy units appearing in front of my units - often at point blank range - and not getting op fire. If Iain says op fire is 100% sure in front of a vehicles than there might be something wrong.
Looking at the Fire_ap.bsf .... regarding reaction fire ... seems odd ... Two cases ;

1.

Code: Select all

			if( GetTileLOS(x,y,side) ==1 )
			{
				if( GetAttrib(me, "Shots") >= 2 )
				{
					openFire = 1 ;
				}
				
 			// one shot, but has been fired on?
				if( ( GetAttrib(me, "Shots") == 1 ) && ( GetAttrib(me, "Morale") < 80 ) )
				{
					openFire = 1 ;
				}
			}
This is telling me that if I have 1 Shot and my morale is >= 80 ... unit won't fire?



2. Assuming 100%, unmodified ;

Code: Select all

			if (Rand (0, 100) > reactionChance )
			{
				openFire = 0 ;
			}
This tells me that if you roll a 100, you won't fire .... should read (0,99)
Post Reply

Return to “Battle Academy”