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

I completely agree this request for creating an actual dice roll algorithm.  The current faulty dice wreck games when people get positively screwed and then leave the game.


The faulty dice mechanics are especially damaging to Risk games with Fixed card trade in rather than Progressive due to recovery time.


1 person likes this
Something happened recently with the rolls to greatly favor the attacker. It's very frustrating. That's not how it really is in Risk.

1 person likes this

Do you play Powerball?  Nah I don't, either, I figure the odds are so stacked against me that it's a poor investment.  Why, in fact, I recently read a Time article that they are 1 in 292 million, That's what I thought, it just can't possibly happen, no one could win with those odds.  ;}


I'm disappointed that some of us have taken an opportunity to flame at the developers about all kinds of things unrelated to dice throw.  Somewhere I recall hearing they were working on new algorithms.  So why are they getting beat on after they've already agreed?


My extended family and I love the game.  We play weekly from 3 locations around the country with a phone conference on the side.  Keep up the good work developers!  I like what you have done with a game I loved back in highschool.  And all that for free.  Thank you.


1 person likes this
SMG, your loyal playerbase accept luck as a core mechanic of Risk and that streaks are inevitably part of that. Please don't do anything funky with the algorithm to placate those blaming "unfair" rolls...

1 person likes this
I want to bring up that blitz and manual dice rolls likely use the same algorithm. The difference being that blitz doesn't wait for user prompts. I also saw some talk about 6 vs 3 battles behaving differently then other cases. With all due respect to those who said that, based on my programming experience it doesn't seem very likely. I seriously doubt SMG would write a different method or block of code for every battle size. What seems more probable is that there is one block for each possible dice combination (3 vs 2, 2vs1 etc.). When battles happen the program probably loops through the appropriate block until the number of dice involved changes. So I think 6vs3 works the same as 9vs5. The crucial part of the entire algorithm is the PRNG it uses. I think that is better place for this discussion to be centered on.

1 person likes this

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.

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.

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 completely agree, the rng in this game is really bad. They need to make it less rng, and more about the number of troops you have. I've had a situation where I 15 and my opponent had 16 and He took my territory without taking a single hitpoint! This game having rankings is just kind of a joke at this point, there is way to much rng.

Did the recent soft-update change the dice back to its old method? I noticed some lag on big blitz battles. It used to do that years ago.

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.
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.
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%

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.



Hi Ivan thank you very much for all the hard work you and everyone at SMG puts into the game. I have some questions that I hope you’ll take the time to answer. First does SMG use the algorithm Ryan described on reddit to generate the battle outcomes? Second are outcomes generated by the client instead of the server? Third what specifically are you referring to when you say you are within 0.X percent? Is that win probability, troops remaining or something else? Thanks again for the hard work Risk is my favorite game and I appreciate all the hard work that goes into the app.
Login or Signup to post a comment