The RNG of Mordheim V1.1.4.13

General discussion with other Mordheim: City of the Damned players.
User avatar
MasterN
Posts: 82
Joined: 16 January 2016, 10:49

The RNG of Mordheim V1.1.4.13

Postby MasterN » 22 March 2016, 00:11

Hi there people...

Good news everybody!

Figured out what's wrong with the present RNG.

But first:

Big Thanks to the following people:

- melkathi
- Stercus
- RedwoodElf
- Stymie Jackson
- Frankie
- Greybush
- Leadpaintchips


Without your numerous logs this would've taken much much longer...




Most of the data used in here are the logs posted in this thread: viewtopic.php?f=65&t=2167
They should be enough for reference. If not I'll be happy to upload the compilation of all logs.
The results are based on 34 logs with 6692 rolls in total (all numbers will be at the end of the post).


The 4 following links go to 4 graphs, I suggest opening them in new tabs in order. I'll be referencing them throughout.

1.: Total Rolls, Total Player Rolls, Total AI Rolls
http://postimg.org/image/67db53803/

2.: Player CtH, Player CHC, AI CtH, AI CHC
http://postimg.org/image/obgbpq5oj/

3.: Dodge+Parry Player/AI, Stun Resists Player/AI
http://postimg.org/image/69x6rxbnn/

4.: Total minus All above mentioned (on both sides) basically stuff like jumps, spells and so on
http://postimg.org/image/nohf078sj/



The first thing one notices in the 1st image of the total distribution of rolls is that there is a huge spike on the '1's...
Yeah... some people have been talking about that for a while.

It is the same for the player and the AI (relative by magnitude).

The following 3 images show where it comes from.
In image 2 both spikes occur solely on the CtH rolls. The CHC and the results of the 3rd and 4th image are 'normal'.

So far so unsurprising as Kes and Sultan (apparantly) mentioned something was off.

Now why is that?

After confirming that most of the 1-rolls occur on the CtH, I read my logs during play and noticed 1 crucial thing:
They are most common on CtH rolls after a miss (be it melee or ranged attacks). Check the logs for that!


The final hypothesis is the following:

There is a chance between ~21% and ~31% to hit a '1' after a miss.


I came up with that for the following reasons:
a) One can roll several misses in a row (so you don't get a '1' after each miss)
b) Simply rolling lower after a miss would not yield such a high amount of '1's
c) One can roll high and hit even after a miss

With the given statistics (and not knowing the average CtH for all contributing players) I assume the following:
Assuming that the player has an average of 85% CtH (227/1596 misses) and approximately 48 '1's too much (amount - average (approximation!)) = 48/227 ~ 21%
Assuming that the player has an average of 90% CtH (157/1596 misses) and approximately 48 '1's too much (amount - average (approximation!)) = 48/157 ~ 31%


Another interesting part: Why does this happen?

My personal opinion comes down to this:
This happened because there is an overwhelming number of people out there not knowing how probability works. Yes, you can have a bad streak... even a long one. Complaining without any sort of statistic is entirely useless. Aside from a tweak (this is faaaaaaaaar too specific to be a bug!) for you lot, that went wrong for some reason, everything is fine. Not too many highs or lows... it's all fine. (sort of....)

There is only one constellation where this hits a serious issue: High melee resistance.
If you have units especially traind on melee resistance, the enemy will miss more often and as such get a higher chance (relative to the magnitude) to roll '1's against you.

Example for effective CtHs after a miss(for the 31% option, this can be done because a '1' is a perfect hit (and please mind dodge/parry)):
95% CtH -> 96.5%
80% CtH -> 86%
40% CtH -> 58%
1% CtH -> 29.7%

(There is so far no way to check whether the chance (the 21-31%) is related to the actual CtH. There just weren't enough logs to come to a conclusion.)


To the players:
1st: Check your biases...
2nd: I've uploaded the source for my program viewtopic.php?f=65&t=2172. Learn how to compile it, perhaps even learn how programing works.
3rd: Most definitely learn how RNGs on computers work and what the field of statistics is!

To the DEVs:

1st: Please correct this. It can be exploited as it is now!
2nd: Please teach instead of obeying. Better for you, better for them.


After this issue is fixed (and when I got the time) I will extend the functionality of my program to be even more specific and I hope for even broader participation in the survey to check the RNGs functionality.


Thank you for your attention.


The numbers:
148,74,68,55,65,67,64,74,76,78,71,77,56,68,69,68,55,56,78,59,58,48,63,66,61,66,76,71,60,62,75,62,82,62,65,78,63,74,71,63,53,62,60,67,68,60,64,64,64,67,60,70,67,75,74,68,63,73,61,72,73,73,64,59,62,64,57,58,72,65,75,88,57,64,61,71,72,73,69,58,69,64,57,57,61,56,72,77,72,64,66,78,64,60,69,60,63,46,68,70, - Total_Distribution
95,55,46,42,42,45,50,53,57,43,43,51,35,47,46,50,41,40,46,42,41,35,37,41,46,44,47,45,36,41,56,37,45,40,44,53,40,45,42,44,41,40,39,39,42,38,38,47,45,41,38,45,45,42,47,50,43,52,46,46,50,45,41,33,44,48,35,43,35,40,50,64,37,43,44,39,50,47,48,34,43,43,41,38,37,32,49,53,43,44,42,56,46,43,49,40,44,33,48,51, - Player_Distribution
53,19,22,13,23,22,14,21,19,35,28,26,21,21,23,18,14,16,32,17,17,13,26,25,15,22,29,26,24,21,19,25,37,22,21,25,23,29,29,19,12,22,21,28,26,22,26,17,19,26,22,25,22,33,27,18,20,21,15,26,23,28,23,26,18,16,22,15,37,25,25,24,20,21,17,32,22,26,21,24,26,21,16,19,24,24,23,24,29,20,24,22,18,17,20,20,19,13,20,19, - AI_Distribution
64,15,17,13,13,15,18,21,23,21,14,21,15,13,12,18,12,12,16,15,14,12,17,21,13,11,22,17,15,19,23,16,22,15,12,12,16,17,14,16,15,18,16,12,15,15,10,17,14,16,11,23,21,15,17,21,15,23,13,14,18,14,12,12,20,21,14,14,14,9,16,30,10,13,11,17,17,11,18,14,14,17,10,10,13,9,15,20,13,16,15,18,13,14,13,12,15,8,18,15, - Player_Chance_To_Hit
17,22,19,13,15,18,14,21,19,17,17,19,12,14,16,21,15,14,13,15,15,10,11,9,20,19,11,14,13,14,15,13,13,10,14,16,13,13,15,14,13,11,10,12,12,14,16,11,14,12,15,9,15,19,19,13,16,14,12,21,14,15,11,10,8,16,8,17,14,22,18,17,11,18,13,8,20,17,14,12,14,12,15,12,16,13,17,19,14,14,10,15,16,9,17,13,16,13,19,21, - Player_Crit_Chance
0,3,1,3,2,1,3,0,2,1,0,1,1,0,1,1,1,1,4,2,1,4,2,1,1,1,1,1,2,1,3,0,1,0,3,3,0,2,2,1,4,2,1,5,0,1,0,1,1,2,2,2,2,2,2,0,0,2,2,0,4,0,3,2,2,2,1,1,0,0,0,4,3,1,2,1,0,1,3,3,0,1,2,0,1,0,3,3,1,1,2,4,1,1,1,1,3,6,2,1, - Player_Dodge+Parry
1,3,0,3,0,2,2,2,1,0,0,2,0,7,2,1,0,1,4,0,3,1,3,2,0,2,2,3,1,0,3,0,1,3,1,0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2,0,0,0,1,0,0,1,0,2,1,3,0,0,1,2,1,0,1,2,1,0,1,2,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,3,1,0,1,1,1,0,0,1,0,0,2,2,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,1,2,1,0, - AI_Stun_Resists
0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,0,1,0,0,1,0,0,0,1,0,1,1,0,1,0,0,0,0,1,0,0,0,0,0,0,2,0,0,0,1,0,0,1,0,0,0,0,0,0,0,3,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,1,0,1,0,0,0,1,0,1,0,0,0,0, - AI_All_Alone_Checks
34,6692,1458584364, - Total_Number_of_Compiled_Games, Total_Number_of_Registered_Rolls, Last_Access_Time

User avatar
Drildgen
Posts: 564
Joined: 07 November 2014, 15:32

Re: The RNG of Mordheim V1.1.4.13

Postby Drildgen » 22 March 2016, 13:51

Great post and very thorough analysis MasterN :) Good job!

When you first came to me with your observations, I immediately notified our coders so they could investigate... I can assure you that this is indeed a bug.

Here's what we have found: it seems that through the addition of the bonus to rolls after failing an athletic action, the same code sneaked into the attack rolls which was absolutely unintended.

This would explain the increased amount of 1's you reported through your research because any base rolls of 21 and under would result to a 1 in the combat logs.

This issue will be fixed next patch as we separated the two random systems so they will now be independent of each other.

Best regards,
Good hunting in the streets of Mordheim!

-Drildgen

User avatar
MasterN
Posts: 82
Joined: 16 January 2016, 10:49

Re: The RNG of Mordheim V1.1.4.13

Postby MasterN » 22 March 2016, 18:33

Thank you.

I had hoped it would appear in the sneak preview before I posted it.

Effectively it doesn't matter where it came from as long as it's fixed.

Arganan
Posts: 54
Joined: 14 February 2015, 13:38

Re: The RNG of Mordheim V1.1.4.13

Postby Arganan » 23 March 2016, 06:14

great work MasterN!

I had some melee resist tanks(1 layer) with 105% MR full buffed in my sister warband and they coudn't perform like dodge or parry tanks(2-layer) because they were hitted to much. So I focused more on 2-layer tanking, because i trusted in the random-good :)

When I'm able to play again. I try to provide some logs as well. keep on!

User avatar
MasterN
Posts: 82
Joined: 16 January 2016, 10:49

Re: The RNG of Mordheim V1.1.4.13

Postby MasterN » 23 March 2016, 08:37

Here's what we have found: it seems that through the addition of the bonus to rolls after failing an athletic action, the same code sneaked into the attack rolls which was absolutely unintended.

This would explain the increased amount of 1's you reported through your research because any base rolls of 21 and under would result to a 1 in the combat logs.
Sorry... took me a night to get it.

What the hell have they been doing to the RNG?
I've done a fair bit of programming (C is most recent, which is why it doesn't look that good) and I sometimes really don't get how bugs like that can even exist. So you're saying, that there are several different incarnations of the RNG, used for different purposes?


Sorry scrap that... I don't want to waste your time.

Guest

Re: The RNG of Mordheim V1.1.4.13

Postby Guest » 20 April 2016, 17:00

RNG in this game: it's a shame !!! The worst @#{[#! (BIP) in all games i played !

90% to succeed an attack or a dodge ? you can roll 91+ four times when AI can crush all your troops with 30% to hit....

Welcome to the Bin : Mordheim

Arganan
Posts: 54
Joined: 14 February 2015, 13:38

Re: The RNG of Mordheim V1.1.4.13

Postby Arganan » 22 April 2016, 11:56

Well as stated there is a bug in the rng, but you will face the bug only on extreem situations (chance <21%)
There are different layer in a combat where rnd applies, so even 90% hit doesn't mean to hurt the other one, He can also dodge with 95% each of your attack, if skilled well.
On the other hand it is rnd and not a guarantie. Ever heard about the montecarlo phänomen? 25 red result in a row. A lot of people lost money that time.

Managing and optimise chances are the key in this game

User avatar
Drildgen
Posts: 564
Joined: 07 November 2014, 15:32

Re: The RNG of Mordheim V1.1.4.13

Postby Drildgen » 22 April 2016, 13:40

https://www.wikiwand.com/en/Gambler's_fallacy

...interesting read :) I think we all need a little bit more of RNG in our life!
Good hunting in the streets of Mordheim!

-Drildgen

User avatar
MasterN
Posts: 82
Joined: 16 January 2016, 10:49

Re: The RNG of Mordheim V1.1.4.13

Postby MasterN » 24 April 2016, 21:01

May I assume that the issue is still present?
The most recent patch notes don't mention anything about the rng...

User avatar
Drildgen
Posts: 564
Joined: 07 November 2014, 15:32

Re: The RNG of Mordheim V1.1.4.13

Postby Drildgen » 25 April 2016, 13:18

Hi there!

Unfortunately, two more corrections eluded the patch notes and I have updated them accordingly! One of them includes the fix for the issue you have pointed out, MasterN (Thanks again to everyone who helped us find this bug with all the data that was compiled!).

Best regards,
Good hunting in the streets of Mordheim!

-Drildgen


Return to “General Discussion”

Who is online

Users browsing this forum: No registered users and 3 guests

cron