Combat Odds and RNG

The real question I have with the civ4 random number engine is how random it is. I will be running some tests on that this week and putting up some results.
I looked at the Civ4 RNG ... see the results.
 
I can't believe people are even having this discussion.
 
I have a game report somewhere (cannot find it at the moment) where I used the BUG logger to keep track of all of the battles (BUG logger records the probability of victory as well as the result). I extracted the information, grouped the battles into deciles (0% to 9.99% chance of victory as the first bucket) and then plotted victory percentages against these deciles. The line I got was pretty straight, running from around 5% up to about 95%.

Sure, that is only 1 games worth of data but it was (IIRC) an ALWAYS WAR game that I won.
Found it! The data is grouped by battle odds (10% range). The bars represent the number of battles (left axis) while the line represents the observed battle success rate (right axis). Where there is a reasonable number of battles, the observed odds are about where they should be.
 

Attachments

  • epic8-battle-results.jpg
    epic8-battle-results.jpg
    40.5 KB · Views: 114
This may or may not be relevant to the discussion of how a RNG works, and how much data you need to determine if it is flawed, but here it goes.

I was a longtime player of the game Everquest. No need to roll your eyes, I finally kicked the habit. :) In any case, I played a class which pretty much had the sole purpose of dealing melee combat damage. One of the things players who play such types of characters are interested in, therefore, is how much damage any given weapon will do. Added in to this were certain additional abilities a character could earn which would, typically, raise the average damage done *over time*.

Damage in Everquest was typically referred to as damage per second, or dps for short. When testing out new weapons and new abilities which altered damage, some players, myself being one of them, would run extensive combat 'parses' versus a test dummy to determine either the new weapons damage relevant to prior weapons, or new abilities added on top of older abilities. These parses would typically run for hours upon hours, and the standard rule of thumb we used was to generate a parse which had a minimum of 100k swings, and ideally 100k hits in order to smooth out the curves and get a good feel for the actual dps delivered, and any percent increases or decreases from other weapons, abilities, etc. I am not a statistician, but I believe the point was to lower the standard deviation to a point where differences shown were statistically significant, rather then being due to standard deviation.

And that's the point which is important here. In order to generate 100k combats in Civ 4, you would have to play for 6.944 days straight, averaging 10 combat resolutions per minute. While I am certain there are indeed players who have more then 100k combat resolutions in their Civ4 career, no single game can possibly meet these conditions.

-Sinc
 
How do you set up your combat parses v a test dummy in everquest?

You could a similar thing in Civ4 by WB'd in 100k warriors for you, 100k warriors for them, turn on stack attack and go at it. BUG could even record all of the battle results in the log.
 
How do you set up your combat parses v a test dummy in everquest?

You could a similar thing in Civ4 by WB'd in 100k warriors for you, 100k warriors for them, turn on stack attack and go at it. BUG could even record all of the battle results in the log.

EQ uses an autoattack system, where you just target the dummy, turn attack on, and it runs itself for you. You don't have to click for each swing, thank god.

The dummies where only available on the beta servers, so we had to cram all of our parsing in during the beta tests for each expansion.

-Sinc
 
PieceOfMind said:
...

If a person tosses a coin 20 times in a row, which of the following results is the most likely?

A) HTHTHTHTHTHTHTHTHTHT
B) HHHHHHHHHHTTTTTTTTTT
C) HHHHHHHHHHHHHHHHHHHH
D) none of the above

;)

...

Impossible question to answer with the current data set.
You would need to flip the coin until every possible sequence of 20 outcomes has been observed.
Then, you would need to compare the relative distributions of A, B, and C.
If A, B, and C occur at differing scales (magnitudes),
you may want to check for:
... Human interference
... Atypical coin center of mass
... Atmospheric interference
... etc.

:p
 
From another thread...
PieceOfMind said:
<You know the RNG hates you when...>
7) You make sure to enable "new random seed on reload" but no matter how many times you reload the RNG spits the same result at you.
This is because of how the RNG works.
Even with "new random seed" on, it wont actually be completely new, as it uses the same matrix. So while you might not get the same exact outcome, they will be very similar (until the RNG refreshes).
I don't think that's true, but can you elaborate or be more specific? I would have assumed that with new random seed it would mean that on starting up (or loading up) a game a seed value is generated based on something like the physical time of day.
Do you mean to say that it sort of just "skips" a value from the RNG and continues from there?
 
Impossible question to answer with the current data set.
You would need to flip the coin until every possible sequence of 20 outcomes has been observed.
Then, you would need to compare the relative distributions of A, B, and C.
If A, B, and C occur at differing scales (magnitudes),
you may want to check for:
... Human interference
... Atypical coin center of mass
... Atmospheric interference
... etc.

:p

Coin flipping is a funny thing. The question didn't even make sure to say the coin had H and T...answer C is incredibly probably for those coins with 2 heads :p.

But a coin with an awkward center of gravity or a skilled flipper might influence it, too. In a lot of ways the RNG in civ is superior to coins for random outcomes.

One thing I wish the RNG showed but doesn't (even advanced combat odds doesn't seem to show it) is the average damage inflicted upon the defender, or perhaps even more convenient the average result of a stack attack (the latter would probably be impossible without raping computer resources).
 
Coin flipping is a funny thing. The question didn't even make sure to say the coin had H and T...answer C is incredibly probably for those coins with 2 heads :p.

But a coin with an awkward center of gravity or a skilled flipper might influence it, too. In a lot of ways the RNG in civ is superior to coins for random outcomes.

One thing I wish the RNG showed but doesn't (even advanced combat odds doesn't seem to show it) is the average damage inflicted upon the defender, or perhaps even more convenient the average result of a stack attack (the latter would probably be impossible without raping computer resources).

Average damage to defender and attacker are both statistics that are available in ACO. However, be careful to note that the number of hitpoints that appear beside the the Victory and Defeat odds are the average hitpoints after battle conditioned on that particular outcome (i.e. victory or defeat).

If you have ACO set to show you the separate line that shows average hitpoints after battle, those averages are across all possible battle outcomes.

As a quick and dirty example, suppose a defender needs only 1 hit from the attacker to be killed. Then its average hitpoints after battle conditioned on it it winning will simply be the number of hitpoints it currently has so it's not exactly useful information for the player. However the average hitpoints after battle (that isn't conditioned on a particular outcome) will be the probability of it winning battle multiplied by the number of hitpoints it currently has.

Spoiler :
attachment.php



In this image, the average defender hitpoints are 34.7HP. But if you are only interested in its hitpoints in the event it survives, then its average hitpoints are 48.7. I would imagine that for most players the latter figure is more relevant, which is why it's given priority in the odds display in ACO.


The only thing is, to work out the average damage inflicted on the defender you would always need to subtract the average hitpoints after battle from the defender's current hitpoints. This is trivial if the defender is full health but not necessarily able to be done with a glance if the defender is injured.

By the way, a minor nitpick (because it's important to the topic and OP of this thread): You are asking for something the odds calculator should do - not something the RNG should do.
 
So OK, the game's RNG is everything a game's RNG needs to be. But I have a sneaky feeling that lurking somewhere in the code there is a mechanism (probably with its own RNG) which occasionally overrides the RNG's output to the detriment of the human player.
No, I'm not paranoid. The world really is against me.
 
Back
Top Bottom