Optimal defense in risk

Optimal defense in risk

i play a lot of risk

online, offline, 3rd party variants (conquerclub.com)

in some variants or game states of risk, we're not trying to attack but rather hold objectives

the math says this

3v1 - attacker advantage of 66% win rate
3v2 - attacker advantage of 37.2% 2-0 (for attacker), 33.6% 1-1, & 29.3% 0-2

this is also well reflected in monte carlo sims


i'll probably be able to wrap my head around it later with some more thought when i have some time, but i'm trying to figure out the ideal distribution of armies

obviously you want to have large stacks ready to go but...

let's say it's the end of your turn
you have unlimited reinforcement moves
you have enough cards for a game breaking move if you survive
your opponents do not have a trade available
so you just need to survive the next turn and they know this

how do we go about it, lets say we have 20 armies and 4 connected territories

what is the ideal distribution?

17-1-1-1 is the norm
but would 14-2-2-2 be better enough to be worth having a weaker main stack from which you begin the assault should you survive

i think 14-2-2-2 would be far better than 17-1-1-1 but i'm unsure to what extent, furthermore, while i think 5-5-5-5 is probably the best way to ensure as many of your rolls as possible are 3v2 rather than 3v1, that leaves us with a much worse position to counter attack in the event we do survive

other practical applications for this would be a situation where you hold australia and have started extending into asia having taken hong kong and mumbai

you would often see people play it with one big stack in either bangkok or jakarta and then 1s elsewhere, but that big stack is "trapped" and can't be used for offense anyway, so would it not be better to then layer the defense, which also keeps more of our armies at the borders ready to go on the assault?


i'm sure i'll re-read this after some coffee and think what i wrote is dumb, but it's helpful to put these thoughts to paper in order to better think it through

and in the meantime, it wouldn't surprise me in the slightest if one of you reading this already knew the optimal approach and could save me from needing to construct the sims myself, which will require a lot of moving pieces

also wouldn't mind general thoughts on risk

) 2 Views 2
12 December 2024 at 05:59 PM
Reply...

5 Replies



i love risk


Don't know if this thread still gets checked or what, but I just saw this a few days ago. I put some thought into problems like these many years ago and even wrote some code to support the way I was thinking about it. That code is lost now, but I'll show the math.

The main idea is, suppose you have a stack of N troops and you are defending. You can ask the question, if my opponent is going to attack with a big enough stack that his victory is a certainty, what is the expected number of troops he'll lose while taking me out? I think looking at this function is key to answering your question.

This math will likely look very easy if you've seen Markov chains before, but even if you haven't it should still be pretty easy to follow.

The way you compute this function E(n) is recursively; you start with E(1) and E(2) and then work from there.

E(1) is the easiest. When you roll to defend with 1, there are only 2 possible outcomes--you lose immediately and your opponent loses nothing; or your opponent loses 1 troop and repeats the attack. So using your probability numbers (not the Monte Carlo numbers, this problem doesn't need or want Monte Carlo sims) we have

E(1) = (.66)(0) + (.34)(1 + E(1))
E(1) = .34 + .34E(1)
.66E(1) = .34
E(1) = (.34)/(.66) which exactly equals 17/33, or .515151...

Now when you defend with 2 there are 3 outcomes--you lose immediately and your opponent loses nothing; or you each lose 1 and you're now defending with 1; or your opponent loses 2 and repeats the attack. So we have

E(2) = (.372)(0) + (.336)(1 + E(1)) + (.292)(2 + E(2))
E(2) = .336 + .584 + (.336)(17/33) + .292E(2)
.708E(2) ~~ 1.093
E(2) ~ 1.544

We see that adding an extra troop from 1 to 2 increases the attacker's expected loss by more than 1. But now let's go up to 3, where we have a very similar calculation but this time when the attacker wins 2, the attack still continues:

E(3) = (.372)(0 + E(1)) + (.336)(1 + E(2)) + (.292)(2 + E(3))
E(3) = (.372)(17/33) + .336 + (.336)(1.544) + .584 + (.292)E(3)
.708E(3) ~~ 1.63
E(3) ~ 2.303

If I recall correctly, as we go up more, it starts to smooth out because much more fighting is being done with 3v2 as opposed to quickly getting to 1 troop on the pile. You can extend the general formula by looking at how we did E(3):

E(n) = (.372)(0 + E(n-2)) + (.336)(1 + E(n-1)) + (.292)(2 + E(n))
.708E(n) = .372E(n-2) + .336E(n-1) + .336 + .584 = .372E(n-2) + .336E(n-1) + .920
E(n) = [.372E(n-2) + .336E(n-1) + .92]/(.708)

Using this formula makes it easy to work up:

E(1) = 17/33 ~ 0.516
E(2) ~ 1.544
E(3) ~ 2.303
E(4) ~ 3.204
E(5) ~ 4.03
E(6) ~ 4.895
E(7) ~ 5.74

So, stopping here, here's an example of how I'd use this:

Suppose I have 2 territories and I want to spread out 8 troops in defense. What's optimal? It's not what you think!

E(7) + E(1) ~ 6.256
E(6) + E(2) ~ 6.439
E(5) + E(3) ~ 6.333
E(4) + E(4) ~ 6.408

Since we're looking to bleed our opponent the most, this suggests the best split is 6-2! This seems to be because we get the biggest boost from going from 1 to 2, and then the smallest boost is going from 2 to 3, so we'd rather build up a bigger stack in one place than put a 3rd troop on a second spot.

You can write code (or do it by hand) to fill this chart in up to 17 and do your exact problem, but my guess based on this is that 14-2-2-2 is the optimal defense and will be clearly better than 5-5-5-5 but also better than 17-1-1-1.

Of course this is for defense only and not taking into account other in-game considerations.


wow vernon, thank you so much

markov is something i've been meaning to learn for some time but never added to my bag yet

thank you so much

do you play on conquerclub?


I used to play on CC but haven’t played in so long that it’s possible they deactivated my account. My online gaming time is almost entirely poker these days, with some occasional chess mixed in.


by CallMeVernon k

I used to play on CC but haven’t played in so long that it’s possible they deactivated my account. My online gaming time is almost entirely poker these days, with some occasional chess mixed in.

i've been hanging out with an old friend of mine and he got me playing again and dusted off my account i haven't used in over a decade and it was still there we play there every day both vs and as teams in doubles

i even bought premium membership for the first time last week 😀

if you feel like playing again shoot me a dm and i'll tell you my screenname there

Reply...