Test chamber 1:
Two Protoss Photon cannons attacking each other, one on low ground, another on high ground. Powered by invulnerable pylons to avoid improper targeting, controlled by the AI. Cannon stats:
Now, this has taken awhile, fortunately, when windowed, SC doesn't need focus to run, so I was free to do other stuff. The results were predictable:
3760/8000 hp which means 4240 hits out of 8000 tries. The resulting percentage is actually so close to 53 (missrate is 46,999999999999999) that it made me totally sure that I just repeated a good experiment and got predictable results. After this, my mind is set on the 53/47 hit/miss chances.
But since I love precision, I decided to conduct another test with slightly different initial conditions.
Test chamber 2:
Instead of one pair of very FAT cannons, I made them 100 hp, but made 13 pairs (coincidence, just that many fit on the map =)). I made 3 rounds of testing and got these results (hp left out of 100):
56, 50, 53, 46, 48, 43, 51, 53, 46, 54, 61, 53, 51
averages at 51.15
50, 51, 46, 48, 50, 47, 67, 47, 50, 57, 45, 58, 55
averages at 51.62
50, 58, 55, 44, 48, 56, 56, 45, 51, 52, 43, 57, 48
averages at 51.0
Total average: 51,26
Cool. Not 53%, but 51%. Interesting already, but wait a minute! That's hp left! It means that the actual hitrate is less than 49%! Idk what made the system behave that way, but it's drastically different and actually below 50.
It was hard to believe such results, even though they look pretty reliable, so I remade the test with 1000 hp cannons.
526, 515, 540, 463, 511, 529, 525, 533, 526, 512, 549, 515, 512
averages at 519
So it's even 48% chance to hit with such experiment initial conditions.
Well, I don't know. I've already ruled out the global 1% missrate because it shouldn't affect averages when there's two of the same unit shooting each other. The thing we don't know is how global miss and highground miss chances stack, but that should be neglible. The thing that worries me is cooldown creep, that, depending on how it's implemented, might be actually visible regardless of sample size, so I'm redoing the over-time test atm.
But in general, the preliminary conclusions are quite funny - SC is non-ergodical in it's random numbers, meaning that averages over an ensemble differ from those over time. No idea why.
Maybe I've done something wrong with the mapping and just fail to see it. I would very much enjoy you to test them out:
DL should start automatically.