Start a new topic
Implemented

New Dice Algorithm / True dice rolls

Game does not use true dice roll probabilities. Many, many times I've had 97-99% chance to win and dont.


HOW TO VOTE FOR THIS FEATURE? Tap the 'Do you like this idea?' below


91 people like this idea

Thank you very much, Micheal, actually we are currently preparing the next version which comes with a ton of bugfixes and memory consumption polishing.

Most new features, tweakes and changes are actually implemented because of ideas from the community, coming in via here, email, Facebook messenger e.t.c. (and someone even found out my phone number, I am impressed).

And we are reading here and checking the the findings versus our own knowledge of the code and our own simulations. Actually, the current dice roll implementation has in our tests versus real dice simulations AND Riskodds website calculations never shown a difference beyond 0.X %.

But we are curious and more than happy to discuss, because we believe we are as close to the real thing as possible. Always willing to improve, though.

Best,

Ivan @ SMG

Aitch, I personally think SMG are doing a great job, over all the app is great (better than many out there) it just needs a little refinement but that's the way it goes in development, debugging takes most of the time, and everything can be improved. Furthermore, many "feature" requests are subjective at best and not every idea should be listened to, because it can break other things, etc. And in my experience they respond in a timely manner.

 

Wow, man you have no business on this forum being so negative. If you don't like the game, don't play it. Simple. I've seen nothing but positive comments here in the forums (until yours) and people usually make good points.

 

Why should they be responding to the forums anyways? If you have a bug or feature request, put in a ticket. The forums are for discussions and has little to do with reporting to SMG, getting feedback, or etc. I'm just going to chalk your comment up to to you not knowing how the website works. For future reference, again if you have a gripe, issue or bug to report, submit a ticket. Don't be a dick.

Dudes, the most important question is this... 


Does anybody think SMG (Shockingly Mediocre Games!) gives a damn, and will try to fix the problems?


SMG can't even be bothered to reply to posters here ffs!


(Yet they have plenty of time to post nonsense on their facebook/twitter feed lol!)


All we can do is hope Hasbro dumps these losers, and gives the game to a professional company who know what they are doing... Amen!

I noticed the same thing back in the day. With my simulations I could see that true dice are slower when doing one million large battles. But in game you do one battle at a time so it should be ok. Of course seeing it tested on the actual app would be better.

Would love to see if you can. Back 2 years ago, if you did blitz with a large army against a somewhat large army, my device would freeze for about a second before the result came in. I ended up getting a more powerful tablet and it was better for still noticeable. My phone was the only device where it would not really do that. And then they changed the code to where it's not noticeable at all.

I'm willing to bet that doing a million dice rolls didn't take long.  There's no reason that true dice rolls should impact performance on any mobile device built in the last 20 years.  I don't have the old code to look at, but I'm guessing their implementation was broken.  Moving away from "true dice rolls" for performance reasons doesn't make sense.


I don't have time to mess around with the code right now but I'm 99% sure that I could modify the code to use true rolls for both normal and blitz attacks and the performance delta would be undetectable to a human.



So I have now written a true dice roll simulator and did a few basic comparisons to the algorithm Ryan described. From a relatively small dataset it looks like SMG’s way of doing things favors the smaller army and or the defender more than a true dice approach does. As examples I have examined 20v30 30v30 40v30 battles with both algorithms with a million simulations each. For 20 v 30 with true dice: attacker won 12.2% defender 87.8%. With game dice attacker won 15.2% defender 84.7%. For 30 v 30 with true dice attacker won 71.3% defender 28.7% with game dice attacker won 58% defender 42%. For 40v30 with true dice the attacker won 97.8% and lost 2.2%. With game dice the attacker won 89.1% and the defender won 10.9%
The outliers are interesting though. In one million 40 v 25 there is at least one scenario where where the attacker losses none and at least one where the defender losses only five. In one million 60 v 30 I came across at least one scenario where the attacker lost only one and at least one where the defender lost only 15. Those kind of these do happen apperantly.
Attacking a one or two you will lose twice as much as the defender has on average. That ratio gets better as the defending army gets bigger as long as your army is large enough to be reasonably assured of capturing the territory. Eventually the attacker can expect to lose less 1 than troop for every defending troop defeated. At first look the situations where a guaranteed victory army losses and so it just losses a random number of troops appear to happen very rarely mostly with lower numbers.

Briand, I agree and it shouldn't be too hard to run the raw numbers and then compare that to a simple simulator ran over a few million outcomes. Not sure if I'll get to it right away but it's something I'd also be curious about.. to even see if our complaining is even valid LOL. But I suspect it is.

I'd love to know the difference of true odds vs their algorithm for these larger armies, mostly concerning average troops lost. How much worse does it look for the attacker as more and more troops exist? 


1 person likes this

Thanks SectaOne and Briand, I think the primary problem is described in Ryans post "If you were unlucky on the probability roll, the game forces a win and you lose a random number of troops." I might play around with the source, thanks for the link. That's good information to have. P.S. Briand, the way the game works has forced me to be somewhat of a conservative player as well.

I used the probabilities Ryan discovered to make a battle simulator. I’ll post more details later but for now I’ll say that the 2.8 times greater attacking force rule is much less troubling in the very large attacks than the small ones. My program runs a million simulations of a battle of given size and reports who won each time, the best outcome for the attacker, best outcome for the defender, and average size of the surviving force. I found that for each of the 6v1 10v2 12v3 14v4 17v5 and 19v6 where Ryan indicated SMG gives guarantees victory for the attacker the defender actually has a roughly 0.5-4.5 chance of victory if you apply their roll odds. In fact it with one million simulations I saw that the worst case scenario where the attacker losses everything and the defender nothing is possible in each of those battles and in the lower reach of the 2.8 rule cases. However once the battles get really big you should always win with even a much smaller (compared with 2.8) multiple of the defender’s force. Again my simulator uses SMG’s roll odds that Ryan described so that I can use it while playing. I may make a true dice rolls version later.

Ryan's link was only a few posts ago. Here it is: https://www.reddit.com/r/Risk/comments/8rbgsy/deconstructed_the_official_android_version_how/

It doesn't give the actual code for legal reasons but has a very nice explanation of what he found.


I've played over 2500 games. I've seen plenty of less than 1% chance of happening happen. But being a conservative player, I don't often take the risk on it unless necessary, so it's not "often." But I see a lot of dumb wins to attacker or defender all the time, and don't question the code for those. Heavy weighted armies in blitz attacks are where I get most disgusted with this code. The giant attacking army can't lose, as in it literally has 0% chance of losing, but it could have a catastrophic loss on one attack. Some of those unlucky losses could seem normal though as it's random as to how many troops are lost. I don't like it.

Watch the phrase "it'll never happen", lol. You can't really tell me to do it if you don't do it yourself? Right!

 

I figured a reason such an algorithm would have been created, such as it is, would be to improve performance. Would you have link a breakdown of the code that "Ryan" posted? I'm relatively new to the forum and online game. I am a developer though. I do love the game, but obviously there's something wrong with the algorithm and it could be improved.. without costing tons of performance.


I can run the statistics, some of the things I've seen have less than a 1% chance of happening. 

Login or Signup to post a comment