An Exact Formula for RISK* Combat

  Рет қаралды 19,750

Jack Hanke

Jack Hanke

Күн бұрын

In this video I introduce the first ever exact formula for RISK* combat.
*This formula assumes that you roll the maximum number of dice you are allowed to for every turn.
If you are interested in a full treatment of RISK, Data Genetics has an excellent blog post about it here: datagenetics.com/blog/november... . Notice in this blog post that their table is shifted by 1 for attackers.
Something I forgot to mention in the "actual formula" section is that all component t functions are taken to be zero if either a or b is less than 0.
This video is dedicated to everyone I have played a game of RISK with.

Пікірлер: 133
@elietheprof5678
@elietheprof5678 11 ай бұрын
Graph the function (z=f(x,y)) and color the areas where the attacker has advantage (red) v defender has advantage (green)
@jwrm22
@jwrm22 Жыл бұрын
Thanks for the research. What is missing for me in the video is a list of calculated probabilities for all realistic scenarios. Maybe a small lesson in tactics would help as well. I never knew to have one big army, and the rest of the lands with one, or to divide them across the lands instead.
@NameTheUnnamed12
@NameTheUnnamed12 Жыл бұрын
If you lookup win probabilities for risk there's a few available
@ClashBluelight
@ClashBluelight 11 ай бұрын
Generally, I keep most of my troops on my continental borders, with an army of about three in the areas connected to them. This keeps people from breaking my hold on a continent, and also lets me take back the border on the very next turn after I lose it.
@readjordan2257
@readjordan2257 Жыл бұрын
This is the kind of KZbin content i crave the most. I call it "investigative" mathematics. Using an array of mathematical understanding to tackle an issue and dissect it, or figure something out about it.
@readjordan2257
@readjordan2257 Жыл бұрын
Thus, i susbcribed hoping to he able to see more content like this over time
@chaotickreg7024
@chaotickreg7024 11 ай бұрын
That's just science for problems we invented
@readjordan2257
@readjordan2257 11 ай бұрын
@@chaotickreg7024 we arent gods though. Whenever you "invent" something, your left hand is you, but the right hand is mother nature.
@chaotickreg7024
@chaotickreg7024 11 ай бұрын
@@readjordan2257 Depends on how you look at it. Is Tetris a man made problem? Or is it an extension of nature? Maybe both, like you said. It's sort of just a combinatorics puzzle I think, but the Tetris spin system has rules that aren't exactly "physically possible" and could be seen as arbitrary physical rules. But then again, maybe that's still just nature?
@jffrysith4365
@jffrysith4365 9 ай бұрын
@@chaotickreg7024 it's mathematical nature under it's own "universe". often mathematicians make up puzzles and try to understand the universe (is it a monoid, is it a group etc. etc.)
@perfectionbox
@perfectionbox 11 ай бұрын
"What happens if a large army attacks a tiny army but the tiny army rolls lots of fives and sixes?" "Then the friendship ends."
@ebentually
@ebentually 11 ай бұрын
rule-question (never played risk so it might be obvious): after losing a battle (or more precisely after the 1 interaction consisting of the first and second battle) the attcker can chose to but doesn't have to attack again, correct?
@perfectionbox
@perfectionbox 11 ай бұрын
@@ebentually That's correct, the attacker can stop anytime. But people often think "no one can be that lucky repeatedly" or they succumb to the sunk costs and so they keep going.
@maartenvs01
@maartenvs01 Жыл бұрын
It would be nice to have a table with all the winning probabilities in. The rows could be the number of attackers and the columns the number of defenders.
@markmarketing7365
@markmarketing7365 Жыл бұрын
That, or a heuristic to memorise for in game use :)))
@turun_ambartanen
@turun_ambartanen Жыл бұрын
The blog post linked in the description contains nice graphs and a table for exactly this.
@Bigbuckgaming
@Bigbuckgaming 11 ай бұрын
Phenomenal video my dude! I love risk. I found your channel because of your other video a few minutes ago, And I'm a huge fan please keep making quality content like this
@jeffhanke1662
@jeffhanke1662 Жыл бұрын
Amazing work Jack!
@jackhanke343
@jackhanke343 Жыл бұрын
Thanks Dad!
@froggymine5003
@froggymine5003 Жыл бұрын
You're honestly one of my new favourite channels. Higher level math and game related math don't often seem to collide, as far as I have seen, so it's nice to see an intersection.
@nathanielnotbandy991
@nathanielnotbandy991 11 ай бұрын
game theory is a whole branch of mathematics that covers similar scenarios, worth looking into if you enjoyed this
@user-px2yi5ir4g
@user-px2yi5ir4g Жыл бұрын
Very interesting channel, glad I found it
@NicholasGledhill
@NicholasGledhill 11 ай бұрын
This great work. Thank you. I look forward to breaking it down... or maybe trying to program something to spit out a value... and working through the steps in between that you skipped over. Very impressed by the work here. :-)
@Kimberly_Ma
@Kimberly_Ma Жыл бұрын
Never knew how to play risk until now. I always just lined up the pieces aesthetically 😂
@keen5336
@keen5336 11 ай бұрын
Not to deflate the effort here, and perhaps the stats are different, but the latest Risk game on steam calculates the odds of your attack succeeding against another country and displays them for you before you attack. Note, the game has several types of "roll" styles, and the pure random is the same as normal dice rolls
@PowdergameFan18
@PowdergameFan18 11 ай бұрын
^ Would love a followup video
@SystemsMedicine
@SystemsMedicine 11 ай бұрын
Hi Jack. What a lovely, lovely video. Cheers.
@JackBlack-py4en
@JackBlack-py4en 11 ай бұрын
Bottom line if you have full attack (and defend) power is: 2890 against 2275 to see that attack is about 11.9% more probable over defense at full without considering neutral 1 loss each. The neutral 1 loss each to attacker and defender is the other 2611 totaling 7776 denominator. Overall it looks like under full power (units): 37% attacker wins 2, 33.5% neutral 1 loss each, 29% defender wins.
@jackhanke343
@jackhanke343 Жыл бұрын
For those interested I linked a blog post (not mine) in the description that discusses a lot of the prerequisite calculations. Here you can also find a table of exact values. My work can be seen as an addition to what is written in that blog post. Notice that the writer considers only who can attack, and so reports an attacking country with 2 troops as having 1 attacker, while I just report the number of troops. That just means my formula is shifted by 1 attacker.
@nahyanislam6742
@nahyanislam6742 Жыл бұрын
im your 200th subscriber congratulations
@Veilure
@Veilure Жыл бұрын
This is a wonderful video! I am looking forward to the next thing you make. Would you mind creating a Demos of this for us to play around in?
@drenz1523
@drenz1523 11 ай бұрын
i don't think that much complexity is possible in desmos...
@AmirIskandar
@AmirIskandar 11 ай бұрын
would love to have seen a graph plotting x y winning probabilities. subscribe cause I'm rooting for you to improve. look forward to your future videos
@sanderbos4243
@sanderbos4243 Жыл бұрын
Very cool!
@ernie5229
@ernie5229 Жыл бұрын
This would have been amazing if you would have demonstrated how to use the formula!
@userzero6555
@userzero6555 11 ай бұрын
You don't wanna use this formula
@goldenalt3166
@goldenalt3166 11 ай бұрын
What we really need is the expected number of survivors. Risk isn't about one battle but a series of them.
@peterpeterson4800
@peterpeterson4800 11 ай бұрын
That move with the leg is so genius. How did he even pull that one off?
@ant961Handle
@ant961Handle 11 ай бұрын
I appreciate the motivation for an exact mathematical formula and I think it's very useful work that you have done to solve this problem, but I think it may be more useful to get a very small neural network (2 input, 1 hidden layer of 2, 1 output, all sigmoid activation) and train it on the outputs from this recurrence relation to get an approximate formula that is still very accurate but small and simple enough to calculate with a pocket calculator and scales up to larger numbers of attackers and defenders effortlessly. Probably best to initialise the network so that the hidden layer neurons roughly correspond to the sum and difference of defenders and attackers and make the win probability estimate increase with the difference and decrease with the sum since it becomes less certain which side will win if there are more soldiers.
@andrewchang7194
@andrewchang7194 11 ай бұрын
I like the idea but this isn’t that practical either for the scale (or lack thereof) at which we need these values for. There’s realistically only tens, maybe hundreds of soldiers involved in a battle at a time. If the usability of the closed-form solution was an issue, then the best solution is to just tabulate appropriately large values of a, b into a lookup table. This is both accurate and fast. Especially given that, to train the model, you would have to compute a lot more of these values in the first place (the more values we tabulate and label, the better). Also, if your hidden layer is wide (lots of neurons), then this becomes a large matrix computation instead. This is hardly something that can be done in a pocket calculator, it practically requires a CAS with linear algebra functionality. If risk were played with thousands of attackers/defenders, then I would agree with the machine learning solution though. At large scales, space complexity of a lookup table is an issue and there is enough data for an ML solution to be both feasible and accurate after sufficient epochs of optimization.
@andrewchang7194
@andrewchang7194 11 ай бұрын
On a side note, as an ML engineer, your solution is 100% what I would’ve done from the get-go. I wouldn’t have even considered using the computed values of t(a, b), I would’ve just collected data from actually playing the game, and train the model on the outcome of each battle (could be categorical or numerical), and once I have the softmax or sigmoid value, just interpret that as the probability of winning given a certain value of attackers or defenders. Very easy if you are allowed to have tensorflow open while playing 😂
@ant961Handle
@ant961Handle 11 ай бұрын
@@andrewchang7194 I agree that a look-up table is the most practical solution for actually using the exact solution for in-game scenarios but it's not very mathematically satisfying and to me at least the point of working out the exact reduction formula was for gaining a better understanding of the mathematical system and finding a general solution beyond the original context. It was clearly going to be way too complicated to be useful from the start 😂. Training a small NN to the computed exact values like I suggested sacrifices a bit of accuracy but gives a more elegant and meaningful model. It's really just a simplified 9 parameter regression model, and simple enough to compute on a pocket calculator with the size of matrices I suggested. I think using the sigmoid activation will let it fit to the limiting behaviour well and the fact that there is no noise in the training data means you can extrapolate further than normal too so you wouldn't need to compute that much training data either. Those are just my initial thoughts with zero ML experience so it could all be wrong 😆 truth is I was just excited about the project idea and I have been looking for interesting data science projects to improve my skills on and learn how to train NN's in practice. It was similar to something I had in mind but simpler and more accessible.
@NStripleseven
@NStripleseven Жыл бұрын
It could be really interesting to see a 3d graph of this thing
@jackhanke343
@jackhanke343 11 ай бұрын
I had one but forgot to include it in the video! May be making a follow-up video to address all the feedback.
@AstronautaVerdadeiro_77
@AstronautaVerdadeiro_77 11 ай бұрын
I was looking for this comment, a 3d surface or a 2d heatmap would have been more intuitive than a block of marh.
@Moircuus
@Moircuus 11 ай бұрын
You did it, you cracked the code... Congratulations my friend, you won 👏
@MsJeffreyF
@MsJeffreyF 11 ай бұрын
Man why didn't you show us some probabilities? Maybe a 2D heatmap with Y being A (attacker) and X being B defender) for a bunch of values from 2-100
@UnbornHeretic
@UnbornHeretic 11 ай бұрын
I think it would be nice to make more general wider use probabilities that may not be exactly accurate, but "good enough" Like the last row It's about 37.3% you kill two 33.5% you go even 29.2% you lose two.
@15jorada
@15jorada 11 ай бұрын
You should have spent some time trying it out! It would have been cool to see
@alexfilmwriting
@alexfilmwriting 11 ай бұрын
This is atrocious. Well done. You've done the hard part, next step would be implementing a small mobile UI for a 'risk calc' app so you can do this in real-time and always be the most fun person at parties.
@joeemenaker
@joeemenaker 11 ай бұрын
It would be interesting to see this extended to some minimum number of surviving attackers. Frankly, if I'm attacking 5 armies with 10, I'm almost never going to attack until I'm down to 2 armies. I'll usually want to have at least, say 4, or I'll abort the attack. It would be useful to know the odds of successfully attacking while still having some number X to distribute between the two territories.
@SystemsMedicine
@SystemsMedicine 11 ай бұрын
Note that since some ‘war games’ simulations used by professionals involve quasi 2 dimensional or 3D maps of the Earth, and large probability tables for weapons’ effectiveness, defensive capabilities, and so forth… I wonder if war games theoreticians ever attempt to write (rather involved) closed form solutions for the outcomes of their (complex) games, in the manner in which you have done so for Risk? [This seems like a straight forward, if extremely difficult, process to attempt.]
@bennettpetrik4084
@bennettpetrik4084 10 ай бұрын
Cool project
@FrankNestel
@FrankNestel 11 ай бұрын
Interesting, just I remember, we used to play slightly but significant different rules for using dice: Every side, attacker and defender, could use up to 3 dice, exactly corresponding to their attackers defenders, i.e. no discount. And I do not remember the rule on draw roles any more. Sigh.
@edomeindertsma6669
@edomeindertsma6669 11 ай бұрын
Yeah, at least one version used threes dice on both sides. It was only available on some countries I think (most still sold the 3-2 dice version.)
@williamdukeofnormandy1403
@williamdukeofnormandy1403 Жыл бұрын
The Risk map was messed up. Ukraine, and Afghanistan, are too big.
@DGol2015
@DGol2015 11 ай бұрын
Oh, there's a lot more than that wrong with it. I'd agree those are the worst parts.
@sage5296
@sage5296 11 ай бұрын
Yo dawg I heard you like risk analysis, so I put some risk analysis in your Risk analysis so you can analyze risk while you analyze Risk
@axiomfiremind8431
@axiomfiremind8431 Жыл бұрын
Except that you never gave the probabilities. At least not in intuitive terms. Answers should be given in percent chance to win.
@readjordan2257
@readjordan2257 Жыл бұрын
I think all numbers and expressions want to be given life and... expressed. Yeah, its something of an expression. But it Is. I think thats clean in its own way.
@robertewalt7789
@robertewalt7789 11 ай бұрын
The exact odds of winning an attack needs to be tempered by the benefits of winning that country. Does it give you a continent? Break up the opponent’s continent? Lead to other strategic goals?
@user-wg6fe5uj8r
@user-wg6fe5uj8r 11 ай бұрын
Lets make it practical though. Could we make a heat map on the coordinate plane?
@morefiction3264
@morefiction3264 Жыл бұрын
IIRC, defense doesn't have to roll 2 die and can roll only one if they have more than one unit.
@jackhanke343
@jackhanke343 Жыл бұрын
Ah that may be the case. I guess then this is assuming optimal play, as defense would want to roll as many dice as they can.
@MarkMetEenC
@MarkMetEenC Жыл бұрын
No if the attacker rolls two sixes the defender would want to roll only one die
@jackhanke343
@jackhanke343 Жыл бұрын
@@MarkMetEenC I have played it so that defense always rolls first, and always rolls two dice if possible. There seems to be a lot of rule variations! This work was done to align with other work I have seen on the matter. May be an interesting question to explore further
@ctpred318
@ctpred318 Жыл бұрын
@@MarkMetEenC According to the official rules, both sides have to declare how many die they're rolling before either side rolls to avoid gamesmanship like that.
@NameTheUnnamed12
@NameTheUnnamed12 Жыл бұрын
​@@jackhanke343 EA acquired RISK and made a game out of it online, might be worth checking it out, especially to see all the official variations. They also have a separate mathematical formula for the dice outside of true randomness
@jacobwolf4343
@jacobwolf4343 Жыл бұрын
Kickass
@Gingerbreadley
@Gingerbreadley 11 ай бұрын
This definitely needs a graph follow video. Great job
@brandongillette6463
@brandongillette6463 Жыл бұрын
The risk set I had when I was a kid had a misprinted die. One of the red dice had a 7 opposite a 0 (instead of 6 and 1). I don't believe we were consistent in using it for attack vs defense (iirc the game came with 3 red and 3 white dice). My intuition is that the red dice would favor the attacker and be a disadvantage for the defender because of how the game handles ties. Can this intuition be confirmed or denied mathematically?
@samueldimmock694
@samueldimmock694 11 ай бұрын
Yes, it can. The mis-printed dice changes the sample space, so all we have to do is compare the new and old sample spaces. A 0 loses to any role, but a 1 rolled by a defender wins against a 1 rolled by an attacker (all other 1s lose). A 7 beats any role, but a 6 rolled by an attacker loses to a 6 rolled by a defender (all other 6s win). There are no other changes to the sample space, including changes in the likelihood of any outcome. So if the defender has the mis-printed dice, they are more likely to lose a role, and if the attacker has the mis-printed dice, they are more likely to win a role. Of course, if we want to figure out how much of a change this causes, we'd need to do all the calculations from this video for our new sample space, which is more effort than I'm willing to put in, but just looking at it, I don't think it's that much of a difference.
@darko714
@darko714 11 ай бұрын
How were the dots arranged on the '7' side of the misprinted die?
@brandongillette6463
@brandongillette6463 11 ай бұрын
@@darko714 It was in the shape of an H.
@darko714
@darko714 11 ай бұрын
@@brandongillette6463 That freaks me out. I wonder if it was intentional.
@goldenalt3166
@goldenalt3166 11 ай бұрын
​​@@darko714ounds like the die got flipped to six side when drilling the one or one side when drilling the six. Just a single point mistake.
@jec5476
@jec5476 11 ай бұрын
Please... it's "die" singular, not "dice" plural. That said, the rest of this was really interesting, especially the closed function version of the Fibonacci sequence. Is there some general way to construct generative functions from recurrence relationships? Is there a particular branch of mathematics this falls under?
@edomeindertsma6669
@edomeindertsma6669 11 ай бұрын
Can we correct the spelling& pronunciation too?
@jonas6090
@jonas6090 Жыл бұрын
And if you should explained it for a 4 years old person how has 10 soldiers attacking 10 defenders. Is that a good ide? Or should you want until you have more soldiers?
@jackhanke343
@jackhanke343 Жыл бұрын
Yes for n vs n, the probability that attack wins increases as n grows large. You have more than a 50% chance of winning after n=5.
@ConnorMcCormick
@ConnorMcCormick 11 ай бұрын
could you also plot the 3d graph of p(win| a, b)?
@MsJeffreyF
@MsJeffreyF 11 ай бұрын
Yes this would make the video sooooooo much more complete
@Norman_Fleming
@Norman_Fleming Жыл бұрын
Doesn't one or both have the option to role less if they choose. Been decades since I played but I seem to remember in some situations using a single dice when I could have used more.
@karlheinz4098
@karlheinz4098 11 ай бұрын
We play with the rule, that the defender can choose to just defend with just one die after the attacker has rolled. So if you see two times a six u are unlikely to win even one battle and choose to just loose one army instead of two. I really love this rule btw. but it's way harder to tackle this problem I guess
@05xpeter
@05xpeter 10 ай бұрын
This was my backburner problem when I was 13.
@enkvadrat_
@enkvadrat_ Жыл бұрын
Me and my friends play with different rules lol
@jackhanke343
@jackhanke343 Жыл бұрын
My friends do as well! When I first started this project I wrote the code the way my friends and I play, but when I decided to make it more serious I had to read Hasbro's rule book.
@SteveRowe
@SteveRowe 11 ай бұрын
Nice to solve it exactly. I just made a simulation and ran each number of attackers and defenders 1e6 times to get a stable probability.
@edomeindertsma6669
@edomeindertsma6669 11 ай бұрын
That sounds inefficient computationwise.
@SteveRowe
@SteveRowe 11 ай бұрын
@@edomeindertsma6669 It took some compute, but not that much. And you only need to solve it once to get the table of odds to use forever.
@SteveRowe
@SteveRowe 11 ай бұрын
@@edomeindertsma6669 4 seconds to compute all of 2 to 10 attackers vs 1 to 10 defenders.
@samueldimmock694
@samueldimmock694 11 ай бұрын
What if I don't just want to know if I will win, but how many troops will be left in the territory once I do so?
@jackhanke343
@jackhanke343 11 ай бұрын
Calculating the expected value of troops remaining is tricky, but I may put some time into figuring that one out. It is an interesting question!
@samueldimmock694
@samueldimmock694 11 ай бұрын
@@jackhanke343 Thanks.
@Miata822
@Miata822 Жыл бұрын
Fascinating. Have you ever taken a look at Roulette? That game can be much more complex that most people think.
@arandombard1197
@arandombard1197 Жыл бұрын
It really isn't. It's purely random.
@Miata822
@Miata822 Жыл бұрын
@@arandombard1197 Yes, each individual spin is random, but that's not the game. Every roll of the dice in Risk is also random, yet the odds of winning any battle are surprisingly complex. In Roulette there are many possible overlapping wagers besides choosing a number.
@jackhanke343
@jackhanke343 Жыл бұрын
I have not! I don't know much about the game, I should check it out.
@arandombard1197
@arandombard1197 Жыл бұрын
@@Miata822 Roulette is purely random. There is no overall strategy. You just put your bets down and there is a chance of you winning and a chance of you losing, with a payout based on those odds, which will always be negative value no matter what you do. At most, you find an old roulette wheel that has worn down and has uneven probabilities, that you can exploit. But that's not game strategy.
@NameTheUnnamed12
@NameTheUnnamed12 Жыл бұрын
​@@Miata822 EA acquired RISK, they have a leaderboard, many players have >70% of games won, and hundreds of battles. (Kinda just reinforcing your point)
@geckoman1011
@geckoman1011 11 ай бұрын
My shortcut: every province is defended by two, and I attack whenever I can roll 3 dice.
@MarkMetEenC
@MarkMetEenC Жыл бұрын
Can someone make a spreadsheet out of this?
@larrybird3729
@larrybird3729 11 ай бұрын
I think people have not done this because they want to keep the game fun lol!
@mqnc6275
@mqnc6275 10 ай бұрын
You just didn't included some beautiful plots because you knew that viewers would crave them so badly that they would even write complaining comments about it, thus feeding the algorithm. But I saw through your wicked game and one-upped you! And yet, here I comment...
@mqnc6275
@mqnc6275 10 ай бұрын
*include
@Kobe005
@Kobe005 11 ай бұрын
Did he say Risk of Rain? Amazing game
@PowdergameFan18
@PowdergameFan18 11 ай бұрын
Can you show more application and examples? You basically said “heres the formula”, then left
@gamegeek42
@gamegeek42 11 ай бұрын
Sorry, game design nerd here, you didn't correctly describe the rules for attacking or defending. You made it seem mandatory for an attacker or defender to roll more than one dice when eligible to do so. Not sure why you didn't just use the rules as stated - "You, the attacker, will roll 1, 2 or 3 red dice: You must have at least one more army in your territory than the number of dice you roll.". For defense the rule is "The defender will roll either 1 or 2 white dice: To roll 2 dice, he or she must have at least 2 armies on the territory under attack. Hint: The more dice the defender rolls, the higher his or her odds of winning, but the more armies he or she may lose." I'm not saying it is or is not optimal to do so, but players may roll fewer dice than eligble to rightly or wrongly mitigate the amount of exposure on a given roll.
@jackhanke343
@jackhanke343 11 ай бұрын
Yes, I have gotten some comments on that. It seems that I have been playing it so that you roll the maximum allowed, ie you have no choice. This allows for the linear recurrences in the table to be written. I will add a disclaimer that this is for a slightly different rule set than the official. I think I will probably devote some time to solving the official rule set as well.
@goldenalt3166
@goldenalt3166 11 ай бұрын
​@@jackhanke343Should be easy to prove that the maximum number is also the optimal number.
@user-ef4kv8bs6j
@user-ef4kv8bs6j 11 ай бұрын
We are loaded
@rrteppo
@rrteppo Жыл бұрын
Then what you do is at the end you get a truncated percent chance you win.
@coachhannah2403
@coachhannah2403 11 ай бұрын
Incorrect. Each may roll UP TO the number of dice you cited...
@Apeiron242
@Apeiron242 11 ай бұрын
Step 1: donate the game to Goodwill, and buy a good game.
@KeithBoehler
@KeithBoehler 11 ай бұрын
Just commenting to be an early viewer here
@gianlucazinarof8617
@gianlucazinarof8617 11 ай бұрын
Excellent video, too bad it has an unredeemable flaw... it ends
@ant961Handle
@ant961Handle 11 ай бұрын
I think reduction formula is a more accurate term than recurrence relation, recurrence relations imply an infinite sequence of values deterministically generated from the previous terms but in this case it's going down "reducing" to known base cases. They're both certainly computationally recursive though!
@michaelgallo6593
@michaelgallo6593 11 ай бұрын
If this is an academically written about subject that has never been solved, why wouldn’t you publish instead of making a KZbin video?
@Paulski25
@Paulski25 11 ай бұрын
As far as I know the rules for atacking are: the attacking player throws as many dice as he can, depending on the number of available armies. The defender then decides based upon the result how many armies are defending. So when the two highest attack dice are 6 and 6, it stands to reason to defend with only one army and when the higest dice are 1 and 1, you defend with as many dice as possible. The trick is to find the point where the defender loses more by defending with two armies then one.
@Nikioko
@Nikioko 11 ай бұрын
There is no formula. It is pure coincidence.
@elmerromero2481
@elmerromero2481 Жыл бұрын
Waste of time
@marianaldenhoevel7240
@marianaldenhoevel7240 11 ай бұрын
def t(a,b): if (a==0) and (b>=0): return 0 elif (a==1) and (b>=0): return 0 elif (a>=2) and (b==0): return 1 elif (a==2) and (b>=1): return (55/216)**(b-1) * (15/36) elif (a>=3) and (b==1): return 1 - (441/216)**(a-3) * (91/216) * (21/36) elif (a==3) and (b>=2): return (295/1296)*t(3, b-2) + (55/216)**(b-2) * (420/1296) * (15/36) elif (a>=4) and (b>=2): return (2800/7776)*t(a, b-2) + (2611/7776)*t(a-1, b-1) + (2275/7776) * t(a-2, b) else: raise ValueError(f"t({a},{b}) not defined") a = float(input("a=")) b = float(input("b=")) print(f"t({a},{b})={t(a,b)}")
@marianaldenhoevel7240
@marianaldenhoevel7240 11 ай бұрын
Python. Standard floating-point. No optimization. Pretty useless, but I could not resist putting your table into code. Thank you!
The Mosaic Problem - How and Why to do Math for Fun
17:51
Jack Hanke
Рет қаралды 57 М.
I Found a Weird Pattern in How People `UHMMM'
15:54
Not David
Рет қаралды 1,1 МЛН
Купили айфон для собачки #shorts #iribaby
00:31
UFC Vegas 93 : Алмабаев VS Джонсон
02:01
Setanta Sports UFC
Рет қаралды 184 М.
Climbing to 18M Subscribers 🎉
00:32
Matt Larose
Рет қаралды 26 МЛН
Китайка и Пчелка 10 серия😂😆
00:19
KITAYKA
Рет қаралды 2,1 МЛН
Minimal Inscribed Polyominos
18:22
Jack Hanke
Рет қаралды 1,3 М.
A problem so hard even Google relies on Random Chance
12:06
Breaking Taps
Рет қаралды 1,1 МЛН
The "Just One More" Paradox
9:13
Marcin Anforowicz
Рет қаралды 2,9 МЛН
I Made a Neural Network with just Redstone!
17:23
mattbatwings
Рет қаралды 571 М.
Portals to Non-Euclidean Geometries
8:32
ZenoRogue
Рет қаралды 1,3 МЛН
Oppenheimer's Apocalypse Math
5:32
Welch Labs
Рет қаралды 2,9 МЛН
The Boundary of Computation
12:59
Mutual Information
Рет қаралды 957 М.
Researchers thought this was a bug (Borwein integrals)
17:26
3Blue1Brown
Рет қаралды 3,4 МЛН
Купили айфон для собачки #shorts #iribaby
00:31