[OLD] The Numbers Thread

This forum is for discussion of individual Open Setups, including theoretical balance.
User avatar
mith
mith
Godfather
User avatar
User avatar
mith
Godfather
Godfather
Posts: 9267
Joined: March 27, 2002
Location: McKinney, TX
Contact:

[OLD] The Numbers Thread

Post Post #0 (ISO) » Thu Mar 05, 2009 1:56 pm

Post by mith »

This is a thread for calculating EVs (expectation values - how often each side is expected to win given random play) for various (simple, Open and maybe Semi-Open) setups.

Placeholderish for now, but if there's a setup you are particularly interested in let me know, and if you want to run your own numbers feel free. At the moment, I've got a spreadsheet for Vanilla, and can easily modify it for several no-power-role variants (Nightless, Treestump, Lovers, Nightless Lovers, Treestump Lovers, etc.), so I'd like to get that up in a viewable form first.

Spreadsheet for Vanilla Variants
Last edited by mith on Thu Mar 12, 2009 11:22 am, edited 1 time in total.
User avatar
Andycyca
Andycyca
Gets To Kill All Spammers
User avatar
User avatar
Andycyca
Gets To Kill All Spammers
Gets To Kill All Spammers
Posts: 778
Joined: July 31, 2007
Location: The Tesseract
Contact:

Post Post #1 (ISO) » Thu Mar 05, 2009 4:08 pm

Post by Andycyca »

To calculate anything, are we supposing random lynches?
Planning: Katamari Damacy Mafia - Less than 50% done!

BTRAF 6 coming to a Mafia Forum near you. Now with 50% less chlorine! Bring your tin foil hat
User avatar
Adel
Adel
Crystalline Logick
User avatar
User avatar
Adel
Crystalline Logick
Crystalline Logick
Posts: 6743
Joined: May 23, 2007
Location: Central Oregon / High Desert

Post Post #2 (ISO) » Thu Mar 05, 2009 4:39 pm

Post by Adel »

Is it a good idea to alter the % chance of a day 1 lynch of a scum member to reflect reality? Isn't the assumption that each player is equally to get lynched day 1, regardless of alignment, clearly false?
User avatar
mith
mith
Godfather
User avatar
User avatar
mith
Godfather
Godfather
Posts: 9267
Joined: March 27, 2002
Location: McKinney, TX
Contact:

Post Post #3 (ISO) » Thu Mar 05, 2009 5:07 pm

Post by mith »

It's not really something we could effectively model, and I'm not sure we would want to. The scum can play so that the chances of a day 1 scum lynch are lower, but in doing so they risk linking themselves and giving the town better odds on later days; on they other hand, they could bus/distance more than they should, and up their day 1 lynch odds while improving their chances on later days. I would think it would all come out about evenly.

Anyway, the EV is calculated for some theoretical "optimal play" by both sides. If there *were* a clear advantage to be gained by the scum in playing a certain way, the town can always counter it by lynching in a truly random manner (by "random" here I mean "lynch independent of argumentation", not "lynch any living player with equal odds", since clearly there will be some situations where we want power roles to out themselves before being lynched, or we want to lynch from a subset of the living players, or whatever). And the assumption that the scum are playing optimally ensures that the town can never do better than random, either.

In practice, it doesn't actually work out this way; but that's because players don't play optimally. In other words, balance = EV, deviation from EV = skill.

So, yes, random lynches and NKs (depending on optimal strategies which depend only on the information that we the outside observers have, and not on in-game tells and so forth), justified by the above hand-wavy pseudo-math.
User avatar
Andycyca
Andycyca
Gets To Kill All Spammers
User avatar
User avatar
Andycyca
Gets To Kill All Spammers
Gets To Kill All Spammers
Posts: 778
Joined: July 31, 2007
Location: The Tesseract
Contact:

Post Post #4 (ISO) » Thu Mar 05, 2009 5:14 pm

Post by Andycyca »

Will run some for Newbie setups
Planning: Katamari Damacy Mafia - Less than 50% done!

BTRAF 6 coming to a Mafia Forum near you. Now with 50% less chlorine! Bring your tin foil hat
User avatar
mith
mith
Godfather
User avatar
User avatar
mith
Godfather
Godfather
Posts: 9267
Joined: March 27, 2002
Location: McKinney, TX
Contact:

Post Post #5 (ISO) » Thu Mar 05, 2009 5:24 pm

Post by mith »

Yeah, I want to go through my original-newbie numbers again sometime. The breaking strategy of the Cop coming out D1 is explored in the wiki article linked on my page, but I can't remember if I ever ran the numbers on scum countering that claim (and if I did, I don't have it anywhere).

It's still a broken setup in some sense (and unsuitable for Newbie games), but I'm now wondering if the following setup is more balanced EV-wise:

1 Mafia Goon
1 Devil (Mafia Goon, but see below)
1 Angel (Cop - Angel was the original name for this role)
1 Doctor
3 Townies

Day Start, at the beginning of the game, the mod reveals who the Angel and Devil are, but not which is which.

Basically, it's the original newbie setup in which the Cop and one of the scum have both claimed Cop.
User avatar
mykonian
mykonian
Frisian Shoulder-Demon
User avatar
User avatar
mykonian
Frisian Shoulder-Demon
Frisian Shoulder-Demon
Posts: 11963
Joined: August 27, 2008

Post Post #6 (ISO) » Fri Mar 06, 2009 1:22 am

Post by mykonian »

ok, 50/50 that the cop gets lynched, or the mafia. I think it is useless to lynch someone else, but have not calculated it.

in case the mafia get lynched(50%), there is one mafia left, that has only one option to win. N1, kill the doctor, don't get investigated, D2, don't get lynched, N3 kill the cop (100%), D3 lylo.

*0,25(doc killed)
*0,8 (not getting investigated)
*2/3 (not getting lynched)(2 confirmed)
*50%(lylo)(1 confirmed)

=3+1/3 % (in 50% of the cases)

if the cop gets lynched, things look better for the mafia. Not for my calculation... I already see I forgot something.
User avatar
mykonian
mykonian
Frisian Shoulder-Demon
User avatar
User avatar
mykonian
Frisian Shoulder-Demon
Frisian Shoulder-Demon
Posts: 11963
Joined: August 27, 2008

Post Post #7 (ISO) » Fri Mar 06, 2009 1:54 am

Post by mykonian »

in case the doc gets killed N1 (25%), then the chances for town to win are (2/5*1/3)=0,1333

if the doc doesn't get killed (75%), and doesn't save (0,8) N1, he has two options:

-claim: making D2 50% (even with cc), D3 1/3= 0,1666
-wait with claim till D3: D2 2/5, N2 2/3, 1/2 (even with save)=0,1333

so the doc claims if he doesn't save: 16,67 % win in this case.



If doc saves, he has the same option: again it is 16,67% win for town in case he claims (two confirmed players).

If he doesn't claim, he still has the option of saving another, and gaining a lynch, on the risk of getting nk'ed.

so, there are two options, if he doesn't claim: another save, or not.

if not (1/5(N1)*3/4(N2)) of the times: 2/6 (D2) (0,5*3/4 (not nk'ed) + 1/3*1/4 (nk'ed))=0,152778 (expected, slightly worse by running the risk on N2)

if he succeeds too on N2 (1/5*1/4 of the times):

2/6(mafia lynched D2)*1/3 (mafia lynched after claim D3) +
4/6(mislynch)*1/2 (should be 2/3 after docclaim, but mafia cc (optimum), making it 50%)*1/2 +
2/6(mafia lynched D2)*2/3(mislynch)*1/2

=0,3889.

Now, we got everything. if doc doesn't claim after save, his towns expected value in case of a save N1 becomes: 0,25*0,3889+0,75*0,1528=0,2118 (bigger then the 0,1667 if claims).

In 1/5 of the cases this strategy works, otherwise the doc has to claim after N1.

0,2*0,2118+0,8*0,1667=0,1757.

This is if the doc doesn't get nk'ed N1:

0,75*0,1757+0,25*0,1333=0,1651.

Now only the 50/50 from the start still has to be calculated, and in the case the mafia got lynched, we calculated mafia win chances: 1-mafia chances=town chances.

0,5*0,1651+0,5*(1-0,0333)=0,5659.

town wins in 56% of the times.

(I tend to make small mistakes in my calculations, I would appreciate if someone checked it.)
Surrender, imagine and of course wear something nice.
User avatar
mykonian
mykonian
Frisian Shoulder-Demon
User avatar
User avatar
mykonian
Frisian Shoulder-Demon
Frisian Shoulder-Demon
Posts: 11963
Joined: August 27, 2008

Post Post #8 (ISO) » Fri Mar 06, 2009 2:32 am

Post by mykonian »

already spotted a mistake, doc doesn't always have the choice if he wants to claim day 2, sometimes he is likely lynched, and has to claim.

This makes that the strategy is only applied 1/5*5/6 of the times, (that's 5/30=1/6)

so in stead of the last lines, this would have to be there:

1/6*0,2118+5/6*0,1667=0,1742.

0,75*0,1742+0,25*0,1333=0,1640.

0,5*0,1651+0,5*(1-0,0333)=0,5653.

town wins 56,5% of the games played.
User avatar
mith
mith
Godfather
User avatar
User avatar
mith
Godfather
Godfather
Posts: 9267
Joined: March 27, 2002
Location: McKinney, TX
Contact:

Post Post #9 (ISO) » Fri Mar 06, 2009 3:40 am

Post by mith »

I think it is useless to lynch someone else, but have not calculated it.
When I was discussing the Death Miller variation a few days ago, I was actually operating under the assumption that the town
shouldn't
lynch one of the Cop claims, because I had a feeling that I had analyzed both branches before and that one was better. But I may be remembering wrong. Either way, need to do the numbers on both to have a full grasp on the setup... unfortunately, the other strategy is
much
more complicated. :)

Anyway...

Case 1 (Devil lynched D1) isn't entirely correct... you aren't taking into account that the Cop could investigate the Doc (in which case there is no extra confirmed player). I think you're correct that the scum must kill the Doc, though (D2 Doc claims, scum can't counter, and now Cop can investigate one of the other two players after the lynch to be sure he knows who the scum is D3).

So... 1/4 (Doc killed) * [3/5 (Townie Investigated) * 2/3 (Townie Lynched) * 1/2 (Townie Lynched) + 1/5 (Doc Investigated) * 3/4 (Townie Lynched) * 2/3 (Townie Lynched)] = 3/40 = 7.5%.

Case 2 is definitely off. If the Cop is lynched D1, the town knows the Devil is scum. Best case for the scum, it's a 1 Mafia, 2 Townie endgame (2/3 scum win), worst case the Doc survives, everyone claims, and it's a 50-50. I think those cases are equal probability (2 shots at the Doc, 4 possibilities), so the overall probability for Case 2 is 7/12 for the scum, 5/12 for the town.

Total EV for the Town would then be 5/24 + 37/80 = 161/240 = 67%.

So scum are better off not countering in original newbie. I may have just been remembering wrong regarding the optimal strategy in case of a claim, but I'd like to verify the other way later anyway.
User avatar
mykonian
mykonian
Frisian Shoulder-Demon
User avatar
User avatar
mykonian
Frisian Shoulder-Demon
Frisian Shoulder-Demon
Posts: 11963
Joined: August 27, 2008

Post Post #10 (ISO) » Fri Mar 06, 2009 6:06 am

Post by mykonian »

wow. Horribly done by me...

Followed your maths, and you are correct.
Surrender, imagine and of course wear something nice.
User avatar
mith
mith
Godfather
User avatar
User avatar
mith
Godfather
Godfather
Posts: 9267
Joined: March 27, 2002
Location: McKinney, TX
Contact:

Post Post #11 (ISO) » Fri Mar 06, 2009 6:08 am

Post by mith »

Heh, I forgot about the Double Day variant (just caught it going through setups in the certification thread). That makes 9 Vanilla variants total that I want to run numbers on (including Double Day Treestump Lovers!).
User avatar
mith
mith
Godfather
User avatar
User avatar
mith
Godfather
Godfather
Posts: 9267
Joined: March 27, 2002
Location: McKinney, TX
Contact:

Post Post #12 (ISO) » Fri Mar 06, 2009 6:09 am

Post by mith »

Not to mention the so-called "Multiball" variants (which are a bit more complicated, but possibly simpler than any setup with a Cop).
User avatar
xelada
xelada
Townie
User avatar
User avatar
xelada
Townie
Townie
Posts: 4
Joined: August 16, 2008
Location: The bonny lands of the scots

Post Post #13 (ISO) » Fri Mar 06, 2009 7:11 am

Post by xelada »

can someone run the number on this:
1 Cop
1 Doc
1 Miller
1 Mafia

1 Seer
1 Sorceror
1 Furry
1 Werewolf

1 Man In Black
1 Intergalactic Doctor
1 Good Alien
1 Alien

1 IQ tester
1 Bruise Preventer
1 Dumb Townie
1 Troll

1 Fire Prevention Unit
1 Fire-fighter
1 Pyromaniac
1 Arsonist

1 Cuisine Expert
1 Vegetarian
1 Unlucky Diner
1 Cannibal Chef
The first can one can see if the target is the SK/scum (or miller) in the group of four (gets a: is scum/whatever or: not scum/whatever).
The second is a doc that protects from SK/scum the in the group of four.
The third is a miller that shows up as guilty to the cop in the group of four.
And finally the third is a SK (or seperate scum group) able to cross kill.
User avatar
mith
mith
Godfather
User avatar
User avatar
mith
Godfather
Godfather
Posts: 9267
Joined: March 27, 2002
Location: McKinney, TX
Contact:

Post Post #14 (ISO) » Fri Mar 06, 2009 7:24 am

Post by mith »

I should perhaps make it clear that it's only feasible to run the numbers on very simplistic setups. Things get messy fast, even with just a Cop and a Doc. I could probably come up with an EV for an 8 player version of that setup (with just two sets of four), after some careful thinking wrt claims and what not.

Were I to actually find myself in that setup, however, I would take my chances on a massclaim. You're guaranteed at least 12 confirmed innocents (maybe more, if the scum happen to claim the same role, which is definitely possible, though I suspect mostly they would claim the miller-of-their-set). The scum would need to mostly shoot confirmeds at first, though there would be the temptation to shoot at non-confirmeds in hopes of getting a jump on the other scum, and it would be impossible for them to coordinate their kills to guarantee they get the full spread of kills. And even if the scum were successful in reducing the town's numbers quickly, then you've got some Prisoner's Dilemma fun.

I'd be mildly interested in a reduced version being run in scumchat just to see what happened, but it's not really Mafia - there's no groups at all, too many named roles, and would end up being either broken or a mostly random shootout.
User avatar
xelada
xelada
Townie
User avatar
User avatar
xelada
Townie
Townie
Posts: 4
Joined: August 16, 2008
Location: The bonny lands of the scots

Post Post #15 (ISO) » Fri Mar 06, 2009 9:02 am

Post by xelada »

I'd like that, for you to work out the win chances of the 2 SKs and the town
User avatar
Xylthixlm
Xylthixlm
!xmafia win
User avatar
User avatar
Xylthixlm
!xmafia win
!xmafia win
Posts: 5414
Joined: July 12, 2006

Post Post #16 (ISO) » Fri Mar 06, 2009 9:50 am

Post by Xylthixlm »

If I have time I'll write a monte carlo simulator. I've already done simple ones for a few setups.
#mafia@irc.globalgamers.net

"Xyl was completely berserk" -dramonic
"Xyl's ruthless policy lynching won the game." -Vi
User avatar
shaft.ed
shaft.ed
dem.agogue
User avatar
User avatar
shaft.ed
dem.agogue
dem.agogue
Posts: 4998
Joined: August 15, 2007
Location: St. Louis

Post Post #17 (ISO) » Fri Mar 06, 2009 10:34 am

Post by shaft.ed »

Xylthixlm wrote:If I have time I'll write a monte carlo simulator. I've already done simple ones for a few setups.
You can write a Kelly Chen bot too!?
User avatar
Max
Max
Mafia Scum
User avatar
User avatar
Max
Mafia Scum
Mafia Scum
Posts: 2280
Joined: April 11, 2006

Post Post #18 (ISO) » Fri Mar 06, 2009 11:51 am

Post by Max »

xelada wrote:can someone run the number on this:
1 Cop
1 Doc
1 Miller
1 Mafia

1 Seer
1 Sorceror
1 Furry
1 Werewolf

1 Man In Black
1 Intergalactic Doctor
1 Good Alien
1 Alien

1 IQ tester
1 Bruise Preventer
1 Dumb Townie
1 Troll

1 Fire Prevention Unit
1 Fire-fighter
1 Pyromaniac
1 Arsonist

1 Cuisine Expert
1 Vegetarian
1 Unlucky Diner
1 Cannibal Chef
The first can one can see if the target is the SK/scum (or miller) in the group of four (gets a: is scum/whatever or: not scum/whatever).
The second is a doc that protects from SK/scum the in the group of four.
The third is a miller that shows up as guilty to the cop in the group of four.
And finally the third is a SK (or seperate scum group) able to cross kill.
What thread did you get that from I remember reading it but can't find it
User avatar
Yosarian2
Yosarian2
(shrug)
User avatar
User avatar
Yosarian2
(shrug)
(shrug)
Posts: 16394
Joined: March 28, 2005
Location: New Jersey

Post Post #19 (ISO) » Fri Mar 06, 2009 11:55 am

Post by Yosarian2 »

One interesting problem would be to see what the odds are for setups in the style of:

1 Cult Recruiter
3 Mafia
X townies

I actually suspect that at some point adding more townies actually improves the cult recruiter's odds, but I'm not really sure. I might try to figure this out at some point.
I want us to win just for Yos' inevitable rant alone. -CrashTextDummie
User avatar
Xylthixlm
Xylthixlm
!xmafia win
User avatar
User avatar
Xylthixlm
!xmafia win
!xmafia win
Posts: 5414
Joined: July 12, 2006

Post Post #20 (ISO) » Fri Mar 06, 2009 12:24 pm

Post by Xylthixlm »

Yosarian2 wrote:One interesting problem would be to see what the odds are for setups in the style of:

1 Cult Recruiter
3 Mafia
X townies

I actually suspect that at some point adding more townies actually improves the cult recruiter's odds, but I'm not really sure. I might try to figure this out at some point.
Adding more townies appears to improve the cult recruiter's odds at every point, or at least not reduce them significantly:

--- 3 townies ---
Town 1, Mafia 7412, Cult 2587
Average length 3.20, std dev 1.27
--- 4 townies ---
Town 24, Mafia 7363, Cult 2613
Average length 3.53, std dev 1.39
--- 5 townies ---
Town 132, Mafia 7174, Cult 2694
Average length 4.14, std dev 1.20
--- 6 townies ---
Town 97, Mafia 7109, Cult 2794
Average length 4.53, std dev 1.32
--- 7 townies ---
Town 282, Mafia 6867, Cult 2851
Average length 5.13, std dev 1.15
--- 8 townies ---
Town 194, Mafia 6894, Cult 2912
Average length 5.52, std dev 1.25
--- 9 townies ---
Town 424, Mafia 6620, Cult 2956
Average length 6.12, std dev 1.11
--- 10 townies ---
Town 312, Mafia 6607, Cult 3081
Average length 6.50, std dev 1.24
--- 11 townies ---
Town 520, Mafia 6376, Cult 3104
Average length 7.09, std dev 1.12
--- 12 townies ---
Town 425, Mafia 6410, Cult 3165
Average length 7.47, std dev 1.23
--- 13 townies ---
Town 601, Mafia 6174, Cult 3225
Average length 8.06, std dev 1.15
--- 14 townies ---
Town 471, Mafia 6249, Cult 3280
Average length 8.46, std dev 1.26
--- 15 townies ---
Town 657, Mafia 5933, Cult 3410
Average length 9.05, std dev 1.18
#mafia@irc.globalgamers.net

"Xyl was completely berserk" -dramonic
"Xyl's ruthless policy lynching won the game." -Vi
User avatar
Xylthixlm
Xylthixlm
!xmafia win
User avatar
User avatar
Xylthixlm
!xmafia win
!xmafia win
Posts: 5414
Joined: July 12, 2006

Post Post #21 (ISO) » Fri Mar 06, 2009 12:31 pm

Post by Xylthixlm »

The first time I tried that, the cult recruiter was recruiting mafiosos too. Oops.

The good news is that a setup of cult recruiter vs 3 mason-vigilantes and X townies is moderately balanced for any X >= 5. :)
#mafia@irc.globalgamers.net

"Xyl was completely berserk" -dramonic
"Xyl's ruthless policy lynching won the game." -Vi
User avatar
shaft.ed
shaft.ed
dem.agogue
User avatar
User avatar
shaft.ed
dem.agogue
dem.agogue
Posts: 4998
Joined: August 15, 2007
Location: St. Louis

Post Post #22 (ISO) » Fri Mar 06, 2009 12:37 pm

Post by shaft.ed »

Xylthixlm wrote:The first time I tried that, the cult recruiter was recruiting mafiosos too. Oops.

The good news is that a setup of cult recruiter vs 3 mason-vigilantes and X townies is moderately balanced for any X >= 5. :)
That would be an interesting set up.

1 cult recruites
3 mason vigilante death millers
5 townies
User avatar
shaft.ed
shaft.ed
dem.agogue
User avatar
User avatar
shaft.ed
dem.agogue
dem.agogue
Posts: 4998
Joined: August 15, 2007
Location: St. Louis

Post Post #23 (ISO) » Fri Mar 06, 2009 12:44 pm

Post by shaft.ed »

I'll start with an easy one.

Lovers Mafia:

4 townies vs. 2 lover scum Nightless

D1:
33% scum lynch = town win
67% town lynch = D2:

D2:
40% scum lynch = town win
60% town lynch =scum win

Town EV
= 33% + (40*.67)=
60%

Scum EV
= (60*.67)=
40%
User avatar
Trumpet of Doom
Trumpet of Doom
Mafia Scum
User avatar
User avatar
Trumpet of Doom
Mafia Scum
Mafia Scum
Posts: 1029
Joined: December 22, 2008
Location: Baker! Hell yeah!

Post Post #24 (ISO) » Fri Mar 06, 2009 6:18 pm

Post by Trumpet of Doom »

Now that I've got this finished (because I'm playing it), I'll post it here.

Rebels in the Palace (setup described here for those that don't know it)

Rebels win: 66%
Guards+king win: 26%
Happily ever after (i.e. only remaining players are king and one rebel): 9%

Full possibility chart posted here. My calculations assumed that when the rebels were even with the guards and king, they couldn't lynch the king that day, but they could still lynch guards even after they found the king.
Post Reply

Return to “Open Setup Discussion”