# Clipboard.

#### goreae

##### Ultimate Murderous Fiend
Humanoid flesh from evilcraft. It sometimes drops when a player dies. I died. That happened.

#### erindalc

##### Popular Member
Oh. That wasn't what I was expecting. That was definitely NSFW.

#### Someone Else 37

Each night, may name a player. If that player is a Werewolf, Vampire, or Zombie, that player dies and Slayer of the Wicked loses this ability.

Oh, the joys of being a GM in Werewolf.

japanese! \o/

#### goreae

##### Ultimate Murderous Fiend #### lenscas

##### Over-Achiever
nothing, like expected

#### eeffoc

##### New Member
I'm not sure if it is posible to see it, but it was 297000/10*7.

Edit: Nope not possible to see it.

#### Someone Else 37

If all the wolves team up they would probably kill him. Though there would probably be somebody watching.
If the probability that any given attacker would kill the Investigator on any given night is 50% and independent of the probability of anyone else doing the same thing, then the Investigator has a 0.5 * 0.5 * 0.5 = 12.5% chance of surviving three consecutive attacks. That drops to 6.25% if there is a wolfkill in addition to the three wolves' normal kills and it follows the same rules.

In reality, those numbers would be a little bit off, as the probabilities aren't really independent. Hmm... Of all permutations of n people, in how many of them does person #1 appear in front of people 2, 3, and 4? Well, there's n! permutations, to start off with. There are 3! permutations of the wolves and (n-4)! permutations of vanillagers. So n! / (3! (n-3)!) ways to arrange the people in the three groups if we don't care about the ordering within the groups- after all, it only takes one lucky wolf to kill the Investigator. We also don't care about the ordering of the people on either side of the Investigator... hm. I'm not sure I'm on the right track here.

There are (n-1)! ways to arrange everyone except the Investigator.

If the Investigator is in position 1, nobody is in front of him and so the probability of him being behind a wolf is zero.
If the investigator is in position 2, there's one person in front of him. There are n-1 ways to choose somebody to put there.
If the investigator is in position 3, there are two people in front of him. There are ((n-1) choose 2) ways to choose them.
...
If the investigator is position n, everyone else is in front of him. There is only one way to select them. That's ((n-1) choose (n-1)).
So, in all, there are ∑ k=1..(n-1) ((n-1) choose k) = 2^(n-1)-1 ways for people to be in front of the Investigator if we don't care about the order they're in.

But is that useful to this problem? I'm not sure. Hrmf.

Ok, so in probability terms, I want P(investigator dies) = P(at least one of three wolves is in front of the investigator in the lineup).
Define I(k) as the event that the Investigator is in position k (from k = 1..n), and W(k) as the event that there's a wolf before position k of the (n-1) non-Investigators.
So, by the total probability theorem, P(investigator dies) = P(W(1) | I(1))*P(I(1)) + P(W(2) | I(2))*P(I(2)) + ... + P(W(n) | I(n))*P(I(n)) = ∑ k=1..n P(W(k) | I(k))*P(I(k)).
Ok, so what are P(I(k)) and P(W(k))?
P(I(k)) is simple, assuming that everything is truly random. It's just 1/n.

P(W(1)) is the probability that there's a wolf before position 1. It's zero, since position 1 is the first position.
P(W(2)) is the probability that there's a wolf in position 1. That's just 3/(n-1), since there are three wolves and (n-1) non-Investigators.
P(W(3)) is the probability that there's a wolf in positions 1 or 2. That's (1 - the probability that all three wolves are located in positions 3..(n-1)).

Hmm.
Say there are five players total; one vanillager, one Investigator, and three wolves. The probability of the first wolf being in the last 2 of 4 non-Investigators is 2/4. For the second non-wolf, that'd be 1/3, since one of the slots was already taken. The last wolf has nowhere else to go- his probability is 0/2.

So, if there are (n-1) places where wolves could be, there are (n-3) ways for the first to be anywhere but the first two places. That's (n-3)/(n-1).
For the second wolf, that's (n-4)/(n-2); and for the third, (n-5)/(n-3).

All in all, P(W(3)) = 1 - (n-3)(n-4)(n-5)/(n-1)(n-2)(n-3).
Following that pattern, P(W(4)) = 1 - (n-4)(n-5)(n-6)/(n-1)(n-2)(n-3) = 1 - ((n-4)!/(n-7)!) / ((n-1)!/(n-3)!) = 1 - ((n-4)!(n-3)!) / ((n-1)!(n-7)!).

So, in general, it looks like P(W(k)) = 1 - ((n-k)!(n-3)!) / ((n-1)!(n-k-3)!).
Up until P(W(n-3)), at least, which is 1, because at that point there are less than three spaces for wolves after the Investigator.

Ok, we've got P(W(k)) and P(I(k)). Now, howzabout those conditional probabilities?
As it turns out, that's fairly simple. One definition of conditional probability is P(A|B) * P(B) = P(A AND B). We're really interested in the left hand side of that equation, since that's the thing being summed up. So, what we want is P(W(k) AND I(k)). Fortunately, these two events are independent, since W(k) deals with the distribution of wolves among the non-Investigators. So the probability of the intersection of these two events is just the product of the probabilities of the events themselves:
P(W(k) AND I(k)) = P(W(k)) * P(I(k)) = 1/n - ((n-k)!(n-3)!) / (n(n-1)!(n-k-3)!).

Thus, in a game of Chaos in Wolfville with n players, the probability of the Investigator dying on night 1 assuming that all three wolves attack him at once and disregarding any other players sniping the wolves (which I am NOT going to try to calculate) is equal to the sum
∑ k=1..n (1/n - ((n-k)!(n-3)!) / (n(n-1)!(n-k-3)!)).
According to WolframAlpha, this adds up to (7-n)/4, which is linear and definitely not constrained between 0 and 1, as any probability should be.

Fudge.

I'm guessing that the issue here is that the probability that the Investigator will be killed given his position in the lineup is bounded at 1, when he is near the very end. However, my ratio-of-products-of-factorials formula does not take this into account. I can fix this by omitting the last three terms and replacing them with 3 * 1/n.
This gives the revised sum

∑ k=1..(n-3) (1/n - ((n-k)!(n-3)!) / (n(n-1)!(n-k-3)!)) + 3/n
which gives exactly the same line.

Arrrrrrrrrgh.

Well, at any rate, the 1 - ((n-k)!(n-3)!) / ((n-1)!(n-k-3)!) formula for P(W(k)) seems to be almost correct. If I plot it for n = 10 players, say, it reduces to a cubic function that actually intersects P = 1 at k = 8, 9, and 10. Which makes perfect sense- when the Investigator is in the 8th position or beyond, there are less than three places left for the wolves to occupy, so one of them will certainly be in front.

However, according to it, the probability that the wolves will kill an Investigator in the very first position in the lineup is... negative. P(W(1)) = 4-n, in fact, according to that formula. Which is definitely wrong.

Maybe the error was in the translation from 1 - (n-4)(n-5)(n-6)/(n-1)(n-2)(n-3) to the format with the factorials. That'd make sense, really: this formula is a ratio of cubic polynomials, which ought to have a horizontal asymptote somewhere. Yet the factorial-ratio thing clearly does not.

Ok, time to look for another pattern.
P(W(1)) = 1 - (n-1)(n-2)(n-3)/(n-1)(n-2)(n-3)
P(W(2)) = 1 - (n-2)(n-3)(n-4)/(n-1)(n-2)(n-3)
P(W(3)) = 1 - (n-3)(n-4)(n-5)/(n-1)(n-2)(n-3)
P(W(k)) = 1 - (n-k)(n-k-1)(n-k-2)/(n-1)(n-2)(n-3)

This, finally, appears to be correct.

Righto, new sum:
∑ k=1..n (1/n - (n-k)(n-k-1)(n-k-2)/(n(n-1)(n-2)(n-3)))
which, according to WolframAlpha, is equal to 3/4. Just 3/4. No dependence on the actual size of the game at all.

That's (the complement of) exactly half the probability I calculated before. Based on the naïeve calculation, I'd have said that as the size of the game tends toward infinity, the probability of the Investigator becoming immune before getting hit was (1/2)^3 = 1/8. Yet, according to this, the actual probability is 1/4 regardless of the size of the game.

Well, it certainly makes sense when there are 4 players. Either the Investigator is first and he lives, or he's not and he dies.
With five players, it's a little more complex. You can determine all the possible orderings of {W, W, W, I, V} by taking the four orderings of {W, W, W, I} and inserting the V at each possible position. Where the villager is in the lineup only matters if he kills the wolf that would've killed the Investigator... and if we assume he would rather watch the Investigator get murdered to see who did it, that doesn't change the Investigator's survival chances at all.

Proof:
IWWW -> nIWWW InWWW IWnWW IWWnW IWWWn
WIWW -> nWIWW WnIWW WInWW WIWnW WIWWn
WWIW -> nWWIW WnWIW WWnIW WWInW WWIWn
WWWI -> nWWWI WnWWI WWnWI WWWnI WWWIn

With 4 players, the Investigator lives in 1/4 of the possible orderings.
With 5 players, he lives in 5/20 = 1/4 of the orderings.
And this pattern would continue indefinitely, after adding any number of villagers.

Huh.

Ok, so the Investigator's chances of surviving three simultaneous attacks are not 12.5%. They're double that: 25%. Add in a wolfkill at a random point in the night while other kills are going on, and that drops to 20%, not 6.25%.

---

Yay, probability!

#### lenscas

##### Over-Achiever
bloons freak says:
I was getting that same error but I didn't want to say anything because I thought my computer was out of date and everyone would laugh at me for having an out of date computer and then I would have to go live in exile until I ran across a pack of wolves and joined them, slowly raising to the leader of the pack and then I would lead a wolf revolution on society and then take over the world with my wolf army and then... What was I talking about?

found the comment funny, that is the only reason it is in my clipboard #### Someone Else 37

System.out.print(

#### lenscas

##### Over-Achiever
bloons freak says:
I was getting that same error but I didn't want to say anything because I thought my computer was out of date and everyone would laugh at me for having an out of date computer and then I would have to go live in exile until I ran across a pack of wolves and joined them, slowly raising to the leader of the pack and then I would lead a wolf revolution on society and then take over the world with my wolf army and then... What was I talking about?

still the same thing