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

My problem is not with the dice rolls themselves, they seem within margin or true random and give back the correct statistical probability. However, it doesn't appear that attack/defending positions play through each dice roll and exchange armies (such as defender wins ties and actually rolling 3:1 or 3:2 dice odds, rinse and repeat until end). I have the suspicion that the attack/defend algorithm is using a randomizer of it's own and not running through each turn scenario until it reaches the end case.. so in other words, it appears that there is a randomizer to determine enemy loses on each side rather than the "true" logic (and that's wrong because the actual result would be an exponential calculation) being played through in a loop until all army losses are calculated. In any case the statistics for attacking/defending armies is wrong. I've seen many occasions where someone with just about 6-7 men can attack someone with over 30 and win. This would never happen in the board game, it's frankly a statistical anomaly but recurs regularly enough to classify a flawed algorithm. I think the disconnect is that most posts in the forums I've read assume it has to do with the dice rolls itself, I don't think that's the case. Thanks.

 Watch it with the word "never." It definitely can and will sometimes happen.


After Ryan broke down the code I feel at ease with the roll-by-roll method. It's actually more accurate than real dice rolls because it takes the actual percentage odds of each scenario. people rolling dice isn't always random. The bad part about this code not using true dice rolls is your dice roll outcome is just a random scenario generated by the algorithm. That scenario where all dice are 1's is much more likely to happen because it's just a random pick from all possible combinations of an attacker losing. Not a big deal because the dice are just for show but why bother showing the dice at all if that's what you're going to do?


However, the blitz code is entirely different and needs to be changed. I don't think the concept of a formula where the attacker always wins if x% of troops above the defender. I'm sure they did this so that an attacker of 200 would never lose against a 2. Statistically speaking, it'll never happen but their code says literally it will never happen which is wrong in the real game. Instead, when you're in a dominant attack, it's a roll to be "unlucky" and when you're unlucky, a random amount of troops is lost. Random? That means it could be more risky running someone down with a super large army vs with a moderate army. This could explain why sometimes when I'm running the map, one battle obliterates my chances of finishing the run with massive and out of proportional troop loss. That CAN happen but the current blitz method is not based on the true game of Risk, it's engineered so that it will not tax the device running the game. Again, Risk was laggy before SMG rehashed the Blitz code about 2 years ago. And the complaints about it have been increasing ever since they changed the code.


The greatest concern about the breakdown of this code is that it's easily hackable. I could probably do it but as soon as I do it, I won't want to play anymore. I play to play not just to win. But knowing that others can easily modify it so that they don't lose so many troops as often ruins my ambition to try and play these "better" players. I think we need to just go to true dice rolls and add more server to how the results are generated.


I know SMG prefers that your individual device does the processing as I';m sure their servers are cheap and not capable of handling so many numbers but maybe they can give the expert players a premium option to pay for where all dice rolls are done via the server and we can care a lot more about who's winning matches. A higher bill for an expert premium option could also thwart cheaters if they had to pay per character instead of per google play account.

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. 

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.

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.

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.

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.

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.



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

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!

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.

Login or Signup to post a comment