Netrunner Probability Puzzle Thread

I thought it might be fun to have a weekly Netrunner Math Puzzle thread! I’ve wrote a few of these and if people are interested I can put a couple up each week or so for us to discuss. People can also post their own problems here, either for curiosity or practical reasons.

Problem #1: The runner has 5 cards including 2 I’ve Had Worse in hand. None of their other cards are relevant and they have no more I’ve had Worse in their deck. They run a Snare! and the Corp rezzes 3 Dedicated Response Teams. What is the probability that the runner is killed?

Problem #2: Your 40-card Chaos Theory deck has 3 Magnum Opus, 3 Self-Modifying Code, and 3 Test Run. You mulligan any hand that has none of these cards and keep any hand that has at least one. What is the probability you will start the game with one of these cards in your hand? (BONUS: If you end up with none of these, but have a Diesel, what is the probability that the Diesel will draw you at least one of them?)

EDIT/DISCLAIMER: Don’t scroll down unless you want Spoilers!

11 Likes

First one has 3 case off the snare:
Hit 0 (3/52/4=6/20)
Hit 2 (2/5
1/4=2/20)
Hit 1 (1-8/20=12/20)

Case 0/2 are both guaranteed survival (1st dedicated hits both I’ve had worse in case 0).

So in case 1 you have 5 cards in hand with 1 I’ve had worse.
You only did if the I’ve ha worse it the last card in hand, which is 1/5.

So you die in 12/20*1/5=12/100.

I took a couple explanatory shortcuts but I think this is right.

Edited for basic mistake. Also, fun thread enjoy it.

1 Like

First problem (can’t figure out spoiler tags on my phone so my apologies):
If the snare hits 0 or 2 IHW, runner survives: 0 hit means their hand is left with 2 IHW only. First DRT hits both, leaving 6 cards, which is enough to survive the remaining 2 DRT. 2 hits mean the runner is left with 8 total cards after snare, enough to survive 3 DRT hits.

If snare hits 1 IHW, runner is left with 4 junk cards + 1 IHW. In order to die, IHW must be the last card remaining after the first two DRT hit.

Computing the above joint probability P(Snare hits 1 IHW ^ first two DRT miss IHW) = ((3 choose 2)*(2 choose 1)/(5 choose 3)) * 20% = 12%

Edit: can’t figure out spoiler tags while phone posting

Edit2: clarification: When snare hits, total possibilities are the binomial coefficient (5 choose 3). Outcomes where we hit one IHW can be counted by picking 2 cards out of 3, then 1 card out of 2. Thus we hit 1 IHW with probability (3 choose 2)*(2 choose 1)/(5 choose 3).

2 Likes

Problem 1. There are 10 possibilities for the cards not hit by the snare. (AB, AC, AD, AE, BC, BD, BE, CD, CE, DE). Let’s say arbitrarily that IHW are A and B. If neither or both are hit by the snare (AB, CD, CE, DE), you’re guaranteed to survive. So there is a 60% chance of only hitting one, which leaves you with 5 cards in hand. Now two meat damage is applied three separate times, and only if the first two iterations miss the IHW do you die. 1/5 chance of that happening, so 1/5* 6/10 = 6/50 = 12% chance of dying.

Problem 2: There are 9 cards you want. Odds of whiffing on a hand are (3130292827)/(4039383736), or approximately 25.8%. Odds of whiffing twice are .258^2, or 6.6%. Edit: 6.6% is the chance of NOT starting with one of the desired cards. So the chance of starting with the desired cards is approximately 93.4%. With a 45 card deck, that probability drops down to ~90.5%.

Bonus: There are now 35 cards in the deck, and you are seeing three of those. 26 of them are cards you don’t want to see. (262524)/(353433) = 39.7% chance of whiffing, or a 60.3% chance of seeing what you want off the Diesel.

Edit: spoiler tag

2 Likes

DOUBLE BONUS: Suppose your Chaos Theory deck also has 3 Diesel. Using the same mulligan strategy as above, what is the probability that you either start with Opus/SMC/Test Run or draw into at least one of them with a first-click Diesel?

DOUBLE BONUS

P(Mull,Mull,Diesel,Hit)

P(no opus/tutor in first hand) = .256

  • P(no opus/tutor in second hand) = .256
  • P(diesel in that hand, given no opus/tutors) = 1 - (2827262524)/(3130292827) = 0.422
  • P(Hit opus/tutor off click 1 diesel given no opus/tutors in hand) = 1 - (262524)/(353433) = .603
    =
    .017

P(either hit opus/tutor in opener or draw into at least one of them with a first-click Diesel)

P(you hit opus/tutor in opener) = .934

  • P(Mull,Mull,Diesel,Hit) = .017
    =
    .951

Probably losing a lot of precision to using rounded numbers off other people’s work but w/e numbers schmumbers

1 Like

Just FYI, your Hit 0 and Hit 2 probabilities are reversed.

Hit 0 = 3/5 * 2/4 * 1/3 = 6/60 = 10%
Hit 2 = 2/5 * 1/4 * 3/3 * 3 (because order of picking doesn’t matter) = 18 / 60 = 30%.

The rest of your math is correct :smile:

CT problem:

Odds of having at least one Opus, SMC, or Test Run:

1 - (31/40 * 30/39 * 29/38 * 28/37 * 27/36) = 0.741779 so about 74%

Bonus:

1 - (26/35 * 25/34 * 34/33) = 0.60275 so about 60%

1 Like

BTW we should exclude Test Run with no Scavenge because that play is actually just shit and you should never win a game where your turn one is Test Run-Opus.

1 Like

Actually the uncertainty in your final value is plus or minus .004 (Which is about 0.4% of the final value fyi) and it’s entirely dominated by the uncertainity in the deltaP(you hit your opus/tutor in opener) [uncertainity in that value]

Edit:I dun goofed (been a while since I’ve done uncertainity calcs) should 0.0003 for deltaP(wanted card in opener) and .0008 for deltaP(draw opus with diesel after not getting opening). Paking the final uncertainity plus or minus 0.001. So the actual values lies between .950 and .952.

1 Like

I tend to agree. So…

TRIPLE BONUS: Turns out that our wildly creative Chaos Theory deck also packs 3 Scavenges. Let’s consider SMC and the Test Run/Scavenge combo as “tutors,” and assume that we keep a hand if and only if it contains Magnum Opus or a tutor. What is the probability that we start with an Opus or tutor after a potential first-click Diesel?

My own answer below.

P(no opus/smc/tr in first hand) = (3130292827) / (4039383736) = .25822
P(tr but no opus/smc/scavenge in first hand) = 5 * (330292827) / (4039383736) = .12495
P(no opus/tutor in first hand) = .25822 + .12495 = .38317
[/spoiler]
P(no diesel in second hand) = (3736353433) / (4039383736) = .66245
P(no opus/smc/tr given no diesel) = (2827262524) / (3736353433) = .22547
P(tr but no opus/smc/scavenge given no diesel) = 5 * (327262524) / (3736353433) = .12079
P(no opus/tutor/diesel in second hand) = .66245(.22547 + .12079) = .22938

P(diesel in second hand) = 1 - .66245 = .33755
P(no opus/smc/tr after diesel) = (30292827262524) / (39383736353433) = .13236
P(tr but no opus/smc/scavenge after diesel) = 7 * (3292827262524) / (39383736353433) = .09265
P(have diesel in second hand and fail to find opus/tutor) = .33755(.13236 + .09265) = .07595

P(no opus/tutor in second hand) = .22938 + .07595 = .30533
[spoiler]
P(find opus/tutor with mulligan/diesel) = 1 - (.38317 * .30533) = .88301 = 88.3%

1 Like

It’s also pretty annoying to click up to 7c if you only have SMC.

So… QUADRUPLE BONUS: The CT deck is also packing 3 Sure Gambles to boost the SMC route to Opus. So consider Test Run/Scavenge as a tutor and SMC/Gamble as another. Hell, let’s throw in 3x Stimhack too, so SMC/Stimhack becomes a tutor combo as well. But that’s not all…you can also Test Run an SMC and then Stimhack it into an Opus, so let’s also consider Test Run/Stimhack a tutor combo. Assuming you keep any combo and settle for a lone SMC (because it could be worse, or a lot worse), what’re the odds of getting something after a potential first-click diesel:

  1. a premium starting hand (with a Opus or a tutor combo)
  2. a mediocre starting hand with SMC only
  3. a poor starting hand with Test Run only
  4. a huge dissapointment with no way to get Opus out

I’m not even going to try this myself, but when I ran this type of deck it seemed pretty consistent in getting Opus out 1st turn. I didn’t even have 3x Opus in it, actually…

I feel like I walked into a bar full of robots, and they’re all making absurdly racist human jokes in binary

5 Likes

oh I’m sure Maxx will love this thread

Nerd boner, meet nerd baseball

1 Like

I think there is something here.
(330292827) / (4039383736) can’t be replicated 5 times to cover the position where the first test run shows up in my opinion. Since you are using 3/X here to represent the test run slot, then if test run shows up as the second card, the chance this first card being anything outside the selective set will need to be modified and no longer just the (current deck size -9 )/size, should be -12 instead.

This means we need to calculate this probability separately by either the position of the first TR or by how many TR in this unwanted first hand. :blush:

Another way and my answer would be
P(tr but no opus/smc/scavenge in first hand) =( (31 choose 5) - (28 choose 5) ) /( (40 choose 5)) = 0.10886

2 Likes

I was pretty sure I made a mistake somewhere! :grinning: I think you’re right. Using combinations in that way is brilliant - it’s a way easier way of thinking about the problem.

Good news for Chaos Theory. Assuming the rest of my methodology is correct, I get: 89.43%

1 Like

Sometimes it is what has to be done. Opus econs’ benefit is that you don’t need other econ cards in your deck. If that’s the case, you’re pretty screwed without it. Generally spending your money, then drawing the Opus is exceptionally painful. If you’re using Opus, your deck likely needs it, so the cards aren’t really the types that you can just throw down with 5 credits, and click for credit.

Personal workshop decks are an exception. It is OK to delay getting the Opus out if you don’t have easy access in your starting hand if you have a workshop. You can just start throwing things on it with only a single credit up-front.

Bonus probability calculation: Modded is Opus’ best friend. It is an econ card that doesn’t degrade in utility once you have an Opus out. Test run into Modded opus is exactly as efficient as using an SMC to get Opus. Lets include this in the calculation! A simple way to state this is what is the probability you’ll end with at least 10 credits at the end of turn two (without clicks for credits)?

Yeah, except you end up one card behind if you Test Run + Modded. It’s still okay, I guess.

I’m not saying its great, I’m saying it isn’t god-awful-never-do-that ;-). For that matter, I’ve test-run Opus out for horrible inefficiency, and not been set (relatively) that far behind. I think it really depends on the rest of the deck, and how much you can recover from a slow start.

1 Like

Here are the next problems! I tried to make the 2nd really hard since that you guys really went Ham on the last ones.

3 a. The Corp is Making News with 20 Credits. With optimal tracing math by the corp, what is the fewest credits the runner can have and survive an encounter with an unbroken Shinobi? The runner starts with 5 cards, 0 link, and no damage protection.

b. Same as part a, except now Surveillance Sweep is active.

EDIT: Things also probably get weird if the runner has fewer than 5 cards. Those cases might be interesting to look at.