[proposition] town:scum winrate calculator

This forum is for discussion related to the game.
User avatar
callforjudgement
callforjudgement
Microprocessor
User avatar
User avatar
callforjudgement
Microprocessor
Microprocessor
Posts: 3972
Joined: September 1, 2011

Post Post #50 (isolation #0) » Wed Jun 15, 2016 3:35 pm

Post by callforjudgement »

EV calculations for Open setups with power roles normally work like this: town decide in advance whether a power role claim will save the person being lynched, and which power roles will counterclaim (and what to do if you get a counterclaim). Then you break the game into probabilities depending on who gets forced to claim first (on the understanding that if the claim hasn't been agreed in advance to be something that saves the player making it, the player just gets lynched).

The thing is, even an apparently simple setup can be really complex in terms of EV calculation:

Town Vigilante
2 Vanilla Townies
Mafia Roleblocker (can both kill and act)
"must lynch", i.e. no-lynching is not allowed

Instead of running through this myself, I think it might be interesting to throw some of the questions it leads to into this thread. Here's the first: suppose the vig is the first player to be run up, and claims to avoid being lynched (it's easy to prove that the vig will clam if they're run up, as town would just lose otherwise). Should scum counterclaim?

(For what it's worth, this setup is simple enough that it's possible to account for every possibility, but there's still something of a combinatorial explosion…)
scum
· scam · seam · team · term · tern · torn ·
town
User avatar
callforjudgement
callforjudgement
Microprocessor
User avatar
User avatar
callforjudgement
Microprocessor
Microprocessor
Posts: 3972
Joined: September 1, 2011

Post Post #56 (isolation #1) » Wed Jun 15, 2016 6:06 pm

Post by callforjudgement »

In post 50, callforjudgement wrote:Town Vigilante
2 Vanilla Townies
Mafia Roleblocker (can both kill and act)
"must lynch", i.e. no-lynching is not allowed

Instead of running through this myself, I think it might be interesting to throw some of the questions it leads to into this thread. Here's the first: suppose the vig is the first player to be run up, and claims to avoid being lynched (it's easy to prove that the vig will clam if they're run up, as town would just lose otherwise). Should scum counterclaim?
Taking a shot at analyising the setup myself:

First, let's consider the counterclaim situation from town's point of view. If scum are run up and claim vig, do town counterclaim during the day, or with a bullet at night (only counterclaiming if run up)?

If town don't counterclaim during the day, then what happens depends on the next player to be run up. There's a 1/3 chance it's the vig, who claims, and then town have to lynch the correct player to win (EV here depends on whether the strategy involves lynching the first claimant, the second claimant, or both). There's a 2/3 chance it's a VT, who gets lynched, and then town has a 1/2 chance of winning at night (depending on whether scum blocks the vig or the other VT). Thus, depending on their strategy, town win rate here is somewhere between 1/3 and 2/3 (specifically, it's (1+
x
)/3, where
x
is the probability with which town lynch the first player who claims vig after being run up).

If town do counterclaim, then their win rate depends on whether they lynch the first (run up) or second (counterclaim) vig claim. Let's call the probability with which they lynch the first claim
y
.

Town's win rate when they pick the scum first is thus
a
*(1+
x
)/3 + (1-
a
)*
y
, where
a
is the probability with which the vig stays silent after a scum fakeclaim.

Now suppose town run up the vig first, who claims.

If scum don't counterclaim, then what happens again depends on the next player to be run up. There's a 1/3 chance it's the scum, who claims, and then town have to lynch the correct player to win. There's a 2/3 chance it's a VT, who gets lynched, and town just loses when scum block+kill the vig. Thus, town win rate is somewhere between 0 and 1/3; specifically, it's (1-
x
)/3. If scum counterclaim, then the town win rate is just 1-
y
. Thus, the town win rate in this situation is
b
*(1-
x
)/3 + (1-
b
)*(1-
y
), where
b
is the probability with which scum stays silent after a town vigclaim.

Scum have control of
b
here; town have control of
a
,
x
, and
y
. Town are trying to maximise
E
=
a
*(1+
x
)/3 + (1-
a
)*
y
+
b
*(1-
x
)/3 + (1-
b
)*(1-
y
), where
E
is the win rate in vig-run-up plus the win rate in scum-run-up (clearly claiming strategy is irrelevant in the VT-run-up case). For any given
a
,
x
, and
y
, scum will choose
b
to minimize the function in question. The minimum will either be at an endpoint of the range (
b
= 0 or
b
= 1), or at a critical point of
E
(i.e.
a
,
x
, and
y
have values such that changing
b
has no impact on the result); d
E
/d
b
is (1-
x
)/3-(1-
y
), or
y
-2/3-
x
/3, so the critical points for
b
happen when
y
-2/3-
x
/3 = 0, i.e.
y
*3 =
x
+2. We can apply the same reasoning to
a
,
x
, and
y
. In each case, the variable will be minimum, maximum, or at a critical point. This means that all four of these conditions hold:

a
= 0 or
a
= 1 or
y
*3 =
x
+1
b
= 0 or
b
= 1 or
y
*3 =
x
+2
x
= 0 or
x
= 1 or
a
=
b

y
= 0 or
y
= 1 or
a
=
b


Clearly, we can't have both
y
*3 =
x
+1 and
y
*3 =
x
+2. So either
a
or
b
(possibly both) is at an endpoint of the range. If
a
isn't 0 or 1, then we discover that either
x
or
y
isn't at an endpoint (there's no way to do
y
*3 =
x
+1 with integers), which means that
a
=
b
, and thus that
b
isn't 0 or 1 either, a contradiction. So we know that, at least,
a
must be 0 or 1; either the town vig never counterclaims or always counterclaims, there's never any benefit from randomizing. We can consider the two cases separately.

a
= 0 (town always counterclaims):

Here, we have
E
=
y
+
b
*(1-
x
)/3 + (1-
b
)*(1-
y
). It's fairly clear that in this situation,
x
will be 0 (which can be observed either mathematically, or by observing that if town always counterclaims, a vig claim under pressure must come from scum, as a genuine vig would have counterclaimed earlier). This gives
E
=
y
+
b
/3 + (1-
b
)*(1-
y
). Increasing
y
can only help town here, no matter what the value of
b
; town will institute a policy of always lynching the original claimer in the case of a counterclaim. So
E
= 1 +
b
/3. Scum will thus always counterclaim (setting
b
to 0), safe in the knowledge that they'll get the vig lynched. Our final
E
value is 1, and the scenario generally is one in which claims under pressure are ignored, meaning town always wins if they run up scum and never wins if they run up the vig.

a
= 1 (town never counterclaims):

In this case, we have
E
= (1+
x
)/3 +
b
*(1-
x
)/3 + (1-
b
)*(1-
y
).
y
is going to be minimized here; town never counterclaims, and thus a counterclaimer is always going to be lynched. Thus this simplifies to
E
= (1+
x
)/3 +
b
*(1-
x
)/3 + (1-
b
). Then we discover (unsurprisingly) that scum will never counterclaim (i.e. b = 1), as doing so would just help town lynch them, simplifying further to
E
= (1+
x
)/3 + (1-
x
)/3. Finaly,
x
turns out to be irrelevant (because nobody counterclaims, it's equally likely for the scum to be run up before the vig, or vice versa). The final
E
value is 2/3, worse than town could achieve in the other scenario.


So we've solved the setup: whenever there's a claim, it just gets counterclaimed and the original claimant gets lynched. In other words, there's no actual point to claiming in the first place. For anyone wondering about the EV, it's relatively easy to calculate due to the lack of claims and counterclaims: 1/4 from lynching the scum D1, plus 1/2 (VT lynch) * 1/2 (vig not blocked) * 1/2 (vig shoots scum) from vigging the scum N1, = 3/8 total overall.

I'm actually a little disappointed here; I was hoping for a mixed strategy (and tried to construct the example to obtain one, but I hadn't fully run through the analysis at the time). In fact, as soon as we wrote out the list of critical point conditions and observed that two of them contradicted each other, we could have skipped much of the analysis; this situation ruled out a mixed strategy, and the pure strategies can be mostly determined via common sense, with the only non-obvious factor being that town will never lynch a counterclaimer. (This is because town
always
counterclaim, and thus it gives them an advantage if scum decide not to counterclaim, while not hurting if scum always counterclaim because the situation is symmetrical.) Hopefully the logic above at least shows how mixed strategies are calculated, though, and thus what sort of work would have to go into this sort of tool (you couldn't really brute-force anything but the simplest setups as there's an exponential or even tower-of-exponentials explosion).
scum
· scam · seam · team · term · tern · torn ·
town
User avatar
callforjudgement
callforjudgement
Microprocessor
User avatar
User avatar
callforjudgement
Microprocessor
Microprocessor
Posts: 3972
Joined: September 1, 2011

Post Post #59 (isolation #2) » Wed Jun 15, 2016 8:46 pm

Post by callforjudgement »

Apparently, there are people who run Open games offsite in which a Cop needs multiple guilties in order to balance the game. As such, Cops don't claim their guilties immediately in the site meta in question, and VTs take steps to try to keep the cops hidden (fake-breadcrumbing results and the like).

The main reason cops claim immediately on mafiascum.net is that site meta tends to avoid powerful single roles, and as such a definite guilty is typically more valuable than any use you'd get out of your unrevealed role in future. (And even when it isn't, scum might incorrectly assume you're 1-shot and not kill you for fear of a doctor.)
scum
· scam · seam · team · term · tern · torn ·
town
User avatar
callforjudgement
callforjudgement
Microprocessor
User avatar
User avatar
callforjudgement
Microprocessor
Microprocessor
Posts: 3972
Joined: September 1, 2011

Post Post #68 (isolation #3) » Fri Jun 17, 2016 3:03 am

Post by callforjudgement »

If the Doctor blocks a kill, that's worth some proportion of an inno on the targeted player (depending on how much the Doctor believes they were responsible for the protect; after all, they can't know it wasn't another role). Cop results are much more black and white. As such, it's possible that Doctor's an even more complex role; in addition to defending your innos in thread (something a Cop also wants to do), you have to work out how reliable they are. (Not to mention that a Doctor benefits more than a Cop does from predicting the kill, which is another fairly complex skill.)
scum
· scam · seam · team · term · tern · torn ·
town

Return to “Mafia Discussion”