[proposition] town:scum winrate calculator

This forum is for discussion related to the game.
User avatar
Ircher
Ircher
He / Him / His
What A Grand Idea
User avatar
User avatar
Ircher
He / Him / His
What A Grand Idea
What A Grand Idea
Posts: 15190
Joined: November 9, 2015
Pronoun: He / Him / His
Location: CST/CDT

Post Post #25 (ISO) » Tue Jun 14, 2016 1:31 pm

Post by Ircher »

The amount of information one has ACTUALLY CHANGES the probabilities.
Links: User Page | GTKAS
Do you have questions, ideas, or feedback for the Scummies? Please pm me!
Hosting: The Grand Neighborhood [Ongoing]
User avatar
zoraster
zoraster
He/Him
Disorganized Crime
User avatar
User avatar
zoraster
He/Him
Disorganized Crime
Disorganized Crime
Posts: 21680
Joined: June 10, 2008
Pronoun: He/Him
Location: Belmont, CA

Post Post #26 (ISO) » Tue Jun 14, 2016 1:32 pm

Post by zoraster »

what does that mean?
.
User avatar
FakeGod
FakeGod
Seven-Colored Puppeteer
User avatar
User avatar
FakeGod
Seven-Colored Puppeteer
Seven-Colored Puppeteer
Posts: 9610
Joined: March 17, 2010
Location: Bad Player Jail
Contact:

Post Post #27 (ISO) » Tue Jun 14, 2016 1:35 pm

Post by FakeGod »

My favorite site mod is Zor Tester.
I have Brandi's autograph! I bet you're jealous.
User avatar
Smithereens
Smithereens
Mafia Scum
User avatar
User avatar
Smithereens
Mafia Scum
Mafia Scum
Posts: 1028
Joined: May 12, 2014
Location: Melbourne

Post Post #28 (ISO) » Tue Jun 14, 2016 1:40 pm

Post by Smithereens »

wow did you sit down and calculate all these EV's?? jesus

Also, what formulas did you use for various role utility? The mathematical significance of some of these roles appears hard to ascertain.
User avatar
Ircher
Ircher
He / Him / His
What A Grand Idea
User avatar
User avatar
Ircher
He / Him / His
What A Grand Idea
What A Grand Idea
Posts: 15190
Joined: November 9, 2015
Pronoun: He / Him / His
Location: CST/CDT

Post Post #29 (ISO) » Tue Jun 14, 2016 1:43 pm

Post by Ircher »

X,Y,Z are town; A,B are scum.

Code: Select all

X lynched --> 0 / 1
Y lynched --> 0 / 1 (0 / 2)
Z lynched --> 0 / 1 (0 / 3)

A lynched: 3 / 9 (3 / 12)
  X Nk'd: 1 / 3 (1 / 6)
    Y lynched --> 0 / 1 (0 / 4)
    Z lynched --> 0 / 1 (0 / 5)
    B lynched --> 1 / 1 (1 / 6)

  Y NK'd: 1 / 3 (2 / 9)
    X lynched --> 0 / 1 (1 / 7)
    Z lynched --> 0 / 1 (1 / 8)
    B lynched --> 1 / 1 (2 / 9)

  Z NK'd: 1 / 3 (3 / 12)
    X lynched --> 0 / 1 (2 / 10)
    Y lynched --> 0 / 1 (2 / 11)
    B lynched --> 1 / 1 (3 / 12)

B lynched: 3 / 9 (6 / 21)
  X Nk'd: 1 / 3 (4 / 15)
    Y lynched --> 0 / 1 (3 / 13)
    Z lynched --> 0 / 1 (3 / 14)
    A lynched --> 1 / 1 (4 / 15)

  Y NK'd: 1 / 3 (5 / 18)
    X lynched --> 0 / 1 (4 / 16)
    Z lynched --> 0 / 1 (4 / 17)
    A lynched --> 1 / 1 (5 / 18)

  Z NK'd: 1 / 3 (6 / 21)
    X lynched --> 0 / 1 (5 / 19)
    Y lynched --> 0 / 1 (5 / 20)
    A lynched --> 1 / 1 (5 / 21)


The above represents ALL the different ways the game can end. The first number reprsent the town wins in that tree and the second is the total number of combinations in that tree. In parenthesis is the running total.
Links: User Page | GTKAS
Do you have questions, ideas, or feedback for the Scummies? Please pm me!
Hosting: The Grand Neighborhood [Ongoing]
User avatar
zoraster
zoraster
He/Him
Disorganized Crime
User avatar
User avatar
zoraster
He/Him
Disorganized Crime
Disorganized Crime
Posts: 21680
Joined: June 10, 2008
Pronoun: He/Him
Location: Belmont, CA

Post Post #30 (ISO) » Tue Jun 14, 2016 2:01 pm

Post by zoraster »

You keep treating possible outcomes as having the same probability when they do not. Consider that you're treating X being lynched Day 1 as EQUALLY as probable as the following scenario: A is lynched Day 1, X is lynched Day 2. When in reality the first has a 20% chance of occurring and the latter a 6.6% chance of happening.
.
User avatar
Thestatusquo
Thestatusquo
He/Him
Shea

User avatar
User avatar
Thestatusquo
He/Him
Shea

Shea

Posts: 14370
Joined: July 27, 2006
Pronoun: He/Him
Location: Chicago!

Post Post #31 (ISO) » Tue Jun 14, 2016 8:04 pm

Post by Thestatusquo »

OH MY GOD HOW IS THIS SO HARD TO UNDERSTAND. THE NUMBER OF POSSIBLE OUTCOMES DOES NOT MATTER FOR EXPECTED VALUE. THE ONLY THING THAT MATTERS IS HOW LIKELY THOSE OUTCOMES ARE.
tout comprendre c'est tout pardonner
User avatar
Thestatusquo
Thestatusquo
He/Him
Shea

User avatar
User avatar
Thestatusquo
He/Him
Shea

Shea

Posts: 14370
Joined: July 27, 2006
Pronoun: He/Him
Location: Chicago!

Post Post #32 (ISO) » Tue Jun 14, 2016 8:06 pm

Post by Thestatusquo »

sorry, but this is really tedious.

if you have 100 possible outcomes, and outcome one happens 99% of the time and outcome 2-100 happen a combined less than 1% of the time, then it REALLY DOESN'T MATTER if the number is 100 or 50 in terms of the relative probability of any given outcome happening.
tout comprendre c'est tout pardonner
User avatar
Smithereens
Smithereens
Mafia Scum
User avatar
User avatar
Smithereens
Mafia Scum
Mafia Scum
Posts: 1028
Joined: May 12, 2014
Location: Melbourne

Post Post #33 (ISO) » Tue Jun 14, 2016 8:20 pm

Post by Smithereens »

He's only 16, be nice :)

I didn't know much about discrete random variables when I was 16 either.
User avatar
Randomnamechange
Randomnamechange
Jack of All Trades
User avatar
User avatar
Randomnamechange
Jack of All Trades
Jack of All Trades
Posts: 6075
Joined: February 8, 2014

Post Post #34 (ISO) » Wed Jun 15, 2016 12:22 am

Post by Randomnamechange »

To make this work considering players you would need a RNG scumminess scale, assign players a value on that, and make players with higher scumminess more likely to be lynched. Run the program multiple times and you should get a decent indicator of win rate. Gets more complicated if you add in roles (for instance if a doctor randomly protects one of the three least scummy players and mafia shoots one of them) but then it still doesn't account for people's personal reads. Could potentially randomly generate player's reads by assigning a random value within a certain position of their value on the scumminess scale?
To make it more complicated people's positions could change, randomly or based on factors like not being on scum wagons. Then you have roles like alignment cops which makes it even more complicated based on randomly deciding when they choose to reveal.
User avatar
Smithereens
Smithereens
Mafia Scum
User avatar
User avatar
Smithereens
Mafia Scum
Mafia Scum
Posts: 1028
Joined: May 12, 2014
Location: Melbourne

Post Post #35 (ISO) » Wed Jun 15, 2016 1:31 am

Post by Smithereens »

In post 34, Randomnamechange wrote:To make this work considering players you would need a RNG scumminess scale, assign players a value on that, and make players with higher scumminess more likely to be lynched. Run the program multiple times and you should get a decent indicator of win rate. Gets more complicated if you add in roles (for instance if a doctor randomly protects one of the three least scummy players and mafia shoots one of them) but then it still doesn't account for people's personal reads. Could potentially randomly generate player's reads by assigning a random value within a certain position of their value on the scumminess scale?
To make it more complicated people's positions could change, randomly or based on factors like not being on scum wagons. Then you have roles like alignment cops which makes it even more complicated based on randomly deciding when they choose to reveal.
why would I want to assign arbitrary numbers to players and then claim that this makes a predictable outcome? I'm not sure what you're suggesting here.
User avatar
Ircher
Ircher
He / Him / His
What A Grand Idea
User avatar
User avatar
Ircher
He / Him / His
What A Grand Idea
What A Grand Idea
Posts: 15190
Joined: November 9, 2015
Pronoun: He / Him / His
Location: CST/CDT

Post Post #36 (ISO) » Wed Jun 15, 2016 1:48 am

Post by Ircher »

It took a while, I get it now.
Links: User Page | GTKAS
Do you have questions, ideas, or feedback for the Scummies? Please pm me!
Hosting: The Grand Neighborhood [Ongoing]
User avatar
Smithereens
Smithereens
Mafia Scum
User avatar
User avatar
Smithereens
Mafia Scum
Mafia Scum
Posts: 1028
Joined: May 12, 2014
Location: Melbourne

Post Post #37 (ISO) » Wed Jun 15, 2016 1:56 am

Post by Smithereens »

In post 36, Ircher wrote:It took a while, I get it now.
It's a rare thing to see people concede points in arguments imo. Your presence is welcome in this discussion.
User avatar
Randomnamechange
Randomnamechange
Jack of All Trades
User avatar
User avatar
Randomnamechange
Jack of All Trades
Jack of All Trades
Posts: 6075
Joined: February 8, 2014

Post Post #38 (ISO) » Wed Jun 15, 2016 2:46 am

Post by Randomnamechange »

In post 35, Smithereens wrote:
In post 34, Randomnamechange wrote:To make this work considering players you would need a RNG scumminess scale, assign players a value on that, and make players with higher scumminess more likely to be lynched. Run the program multiple times and you should get a decent indicator of win rate. Gets more complicated if you add in roles (for instance if a doctor randomly protects one of the three least scummy players and mafia shoots one of them) but then it still doesn't account for people's personal reads. Could potentially randomly generate player's reads by assigning a random value within a certain position of their value on the scumminess scale?
To make it more complicated people's positions could change, randomly or based on factors like not being on scum wagons. Then you have roles like alignment cops which makes it even more complicated based on randomly deciding when they choose to reveal.
why would I want to assign arbitrary numbers to players and then claim that this makes a predictable outcome? I'm not sure what you're suggesting here.
There is an effectively random playerlist. It basically allows for PR actions to be made predictable rather than random (doc protects townie players, cop investigates scummy players, scum shoot townie players) and also the way this interacts with lynches.
User avatar
Smithereens
Smithereens
Mafia Scum
User avatar
User avatar
Smithereens
Mafia Scum
Mafia Scum
Posts: 1028
Joined: May 12, 2014
Location: Melbourne

Post Post #39 (ISO) » Wed Jun 15, 2016 4:13 am

Post by Smithereens »

In post 38, Randomnamechange wrote:
In post 35, Smithereens wrote:
In post 34, Randomnamechange wrote:To make this work considering players you would need a RNG scumminess scale, assign players a value on that, and make players with higher scumminess more likely to be lynched. Run the program multiple times and you should get a decent indicator of win rate. Gets more complicated if you add in roles (for instance if a doctor randomly protects one of the three least scummy players and mafia shoots one of them) but then it still doesn't account for people's personal reads. Could potentially randomly generate player's reads by assigning a random value within a certain position of their value on the scumminess scale?
To make it more complicated people's positions could change, randomly or based on factors like not being on scum wagons. Then you have roles like alignment cops which makes it even more complicated based on randomly deciding when they choose to reveal.
why would I want to assign arbitrary numbers to players and then claim that this makes a predictable outcome? I'm not sure what you're suggesting here.
There is an effectively random playerlist. It basically allows for PR actions to be made predictable rather than random (doc protects townie players, cop investigates scummy players, scum shoot townie players) and also the way this interacts with lynches.
Generally we cancel out this by assuming scum is also playing perfectly. This means the best town can do is to lynch correctly in proportion to the number of scum there are, ie completely at random.PR actions are random when both sides play ideally, given that mafia will attract the doc as often as their proportion would suggest. I still don't know what you mean by saying we should assign values to players. What is the justification for this action?
User avatar
Thestatusquo
Thestatusquo
He/Him
Shea

User avatar
User avatar
Thestatusquo
He/Him
Shea

Shea

Posts: 14370
Joined: July 27, 2006
Pronoun: He/Him
Location: Chicago!

Post Post #40 (ISO) » Wed Jun 15, 2016 6:32 am

Post by Thestatusquo »

I wasn't trying to be not nice but zora had explained it roughly 30 times already.
tout comprendre c'est tout pardonner
User avatar
BROseidon
BROseidon
Expert Marxman
User avatar
User avatar
BROseidon
Expert Marxman
Expert Marxman
Posts: 8242
Joined: April 18, 2013

Post Post #41 (ISO) » Wed Jun 15, 2016 6:44 am

Post by BROseidon »

This is literally the same concept as the Monty Hall problem >.>
User avatar
zoraster
zoraster
He/Him
Disorganized Crime
User avatar
User avatar
zoraster
He/Him
Disorganized Crime
Disorganized Crime
Posts: 21680
Joined: June 10, 2008
Pronoun: He/Him
Location: Belmont, CA

Post Post #42 (ISO) » Wed Jun 15, 2016 6:51 am

Post by zoraster »

How so? The Monty Hall problem's insight is that you should switch because suddenly you've consolidated a 1/3 or 1/3 choice into a 2/3 choice. Here, there's no such mechanic is there?
.
User avatar
BROseidon
BROseidon
Expert Marxman
User avatar
User avatar
BROseidon
Expert Marxman
Expert Marxman
Posts: 8242
Joined: April 18, 2013

Post Post #43 (ISO) » Wed Jun 15, 2016 7:26 am

Post by BROseidon »

It's that not all outcomes are equally likely because of the context
User avatar
Ircher
Ircher
He / Him / His
What A Grand Idea
User avatar
User avatar
Ircher
He / Him / His
What A Grand Idea
What A Grand Idea
Posts: 15190
Joined: November 9, 2015
Pronoun: He / Him / His
Location: CST/CDT

Post Post #44 (ISO) » Wed Jun 15, 2016 8:22 am

Post by Ircher »

In post 43, BROseidon wrote:It's that not all outcomes are equally likely because of the context
Not related.

I thought about that, and that's where the nk thing and info thing came in that I mentioned.
Links: User Page | GTKAS
Do you have questions, ideas, or feedback for the Scummies? Please pm me!
Hosting: The Grand Neighborhood [Ongoing]
User avatar
zMuffinMan
zMuffinMan
Survivor
User avatar
User avatar
zMuffinMan
Survivor
Survivor
Posts: 20915
Joined: March 10, 2011

Post Post #45 (ISO) » Wed Jun 15, 2016 1:02 pm

Post by zMuffinMan »

the hard part isn't so much calculating the probabilities in a setup... this is relatively easy to do, especially for smaller games where probability trees don't grow too large

the hard part is expected behaviour

for example, let's take a simple open setup where the only power role is a vigilante - you can easily write a program that calculates the odds if, say, the vig shoots every night (maybe with an exception for it being odd numbers near lylo), and we can call this behaviour "expected behaviour" or "optimal behaviour" and
most
(though perhaps not all) will agree that a vig should play like that

but let's also say that "expected/optimal behaviour" for scum is to kill the vig as soon as they know who it is (perhaps not the case in a different setup, but for the purposes of an open setup where the vig is confirmed to be town, this is optimal play). what if, for example, the vig is run up d1 and forced to claim? is it expected that a vig will always truthfully claim their role in a setup like that? how do we calculate the odds of the vig claiming by day X? i suppose you can write in something that says "expect A claims to happen per day (based on B players alive) and a mass claim to happen by day C (based on total amount of players D)" and, with the assumption a vig will always claim truthfully, factor that in to calculations, but the point here is that it's a little more complex

let's suppose a slightly more complex scenario. let's say we're playing a thirteen player game with a cop in it and let's say town mislynches d1 and that cop gets a guilty n1 - does he claim the next day? some might. others would try and push the guilty really hard and make it obvious they have one even if they don't explicitly claim it. and others might be a little more subtle about it and push it in a non-obvious way. others still might try to be "really subtle" and make it not-at-all obvious that they even have a guilty (i would say this is utterly stupid, but i've seen certain players do this before, as baffling as it is). we can make calculations based around optimal play and assume that scum cannot guess who the cop is based on their day play (giving the cop more opportunities to get results), but that won't necessarily reflect the odds of something happening in a real game (because optimal play is so very rare in mafia)

this gets more and more complex the more variables you add in and assumes you're not missing things (e.g. maybe optimal behaviour is something you're not even considering...)

and to top it all off, even if you somehow manage to calculate the odds based on a number of expected behaviours with definite numbers, none of that necessarily matters. for example, if your game has a single town power role in it (say, a cop) and that power role dies n1... you're now in a mountainous setup and, odds are, it just became heavily scum-sided. if that cop lives to, say, d3/d4, then perhaps it becomes extremely town-sided. while the game might be balanced if played 100,000,000 times, for a single instance of the setup (which is going to be the case for most setups), the swing factor is far more important than the overall balance (which is why a lot of mods try to split power among a lot of less powerful roles rather than a lot of power in just one or two roles, so that no single role dying/not dying will change the EV of a game in a really massive way)

was rambling a bit here (i don't have much work to do this morning, so *shrug*) but the tl;dr of this is that it's not easy to write a program that determines probabilities of non-mountainous setups

i actually wrote a program a while back to calculate mountainous odds and posted the output here, but i think i deleted the code shortly after i wrote it
spiffeh spiffeh spiffeh spiffeh spiffeh spiffeh spiffeh spiffeh spiffeh spiffeh spiffeh spiffeh spiffeh spiffeh spiffeh spiffeh spiffeh spiffeh spiffeh spiffeh spiffeh spiffeh spiffeh spiffeh spiffeh spiffeh spiffeh spiffeh spiffeh spiffeh spiffeh spiffeh spiffeh spiffeh spiffeh spiffeh spiffeh spiffeh spiffeh spiffeh spiffeh spiffeh spiffeh spiffeh spiffeh spiffeh spiffeh spiffeh spiffeh spiffeh
User avatar
Smithereens
Smithereens
Mafia Scum
User avatar
User avatar
Smithereens
Mafia Scum
Mafia Scum
Posts: 1028
Joined: May 12, 2014
Location: Melbourne

Post Post #46 (ISO) » Wed Jun 15, 2016 2:33 pm

Post by Smithereens »

Muffinman the answer to everything is randomness.

The chances of the vig being run up Dp1 is 1/n where n is the living player pool. So there is a 1/n chance that any player will be lynched on any given day, no matter what their role is. Unless of course we're talking double voters or innocent children. In the absence of those kinda roles, all calculations assume that the lynch will hit a random player every day.

For roles with night utility, we average out their statistical effects across each day that they are alive. If a cop strikes mafia, let's assume that the cop will always out himself to lynch said mafia. In this case, the probability of lynching scum has increased from #scum/n to 1. However there's also the chance that the cop will never hit mafia due to early death. With this in mind, the formula for probability increase is (m+1)/n where m is the number of mafia. This formula claims that each day, the chance of lynching scum is 1 person higher due to the fact that 1 person is investigated each night. It also equates to a game with no cop where there is an extra mafia player and town lynch randomly.

So long as we can assume randomness, we can always derive formulas to describe the effects of different roles on the chance of town lynching correctly.
User avatar
zMuffinMan
zMuffinMan
Survivor
User avatar
User avatar
zMuffinMan
Survivor
Survivor
Posts: 20915
Joined: March 10, 2011

Post Post #47 (ISO) » Wed Jun 15, 2016 2:56 pm

Post by zMuffinMan »

um... it's very rare for a single claim to happen each game day (even more so in more complex setups), so it's not 1/n... edit: by "run up" i mean forced to claim but not lynched, which affects who scum is going to shoot at night, so scum's shot isn't random

also assuming cops will always out themselves to lynch a guilty seems like a very faulty assumption, but you're missing the point... the effects of a cop/vig are binary and there are still a lot of intricacies there with regards to how a role should be played and how it will affect the balance of a game... the more complex your roles get, the more things there are to consider. e.g. a not-even-really-complex scenario where a tracker tracks x non-scum power-role to a night kill... does tracker claim that day? does other power role get lynched that day? does it depend on the role? etc etc, and this isn't even taking into account some incredibly complex interactions that can happen the more roles you introduce

it's not as simple as "assume X" (when X may or may not even be accurate in the first place)

you *can* write a program that says "if X, then Y" assuming you can figure out every possible interaction and how each interaction should resolve... which is certainly possible in smaller games, where there aren't going to be many complex interactions... but those assumptions about how people will play a certain role may not necessarily be correct in the first place
spiffeh spiffeh spiffeh spiffeh spiffeh spiffeh spiffeh spiffeh spiffeh spiffeh spiffeh spiffeh spiffeh spiffeh spiffeh spiffeh spiffeh spiffeh spiffeh spiffeh spiffeh spiffeh spiffeh spiffeh spiffeh spiffeh spiffeh spiffeh spiffeh spiffeh spiffeh spiffeh spiffeh spiffeh spiffeh spiffeh spiffeh spiffeh spiffeh spiffeh spiffeh spiffeh spiffeh spiffeh spiffeh spiffeh spiffeh spiffeh spiffeh spiffeh
User avatar
Ircher
Ircher
He / Him / His
What A Grand Idea
User avatar
User avatar
Ircher
He / Him / His
What A Grand Idea
What A Grand Idea
Posts: 15190
Joined: November 9, 2015
Pronoun: He / Him / His
Location: CST/CDT

Post Post #48 (ISO) » Wed Jun 15, 2016 3:10 pm

Post by Ircher »

And that, my friend, is why mafia is interesting.

A program cannot account for every possibility, but if you make some assumptions, you can calculate some things in a reasonable manner. I actually think the more important Q to be asking here is how to calculate the way two roles work together (like Cop+Doc which is a breaking strategy). Also, the EV is an expected win rate; it is by no means perfect.
Links: User Page | GTKAS
Do you have questions, ideas, or feedback for the Scummies? Please pm me!
Hosting: The Grand Neighborhood [Ongoing]
User avatar
Smithereens
Smithereens
Mafia Scum
User avatar
User avatar
Smithereens
Mafia Scum
Mafia Scum
Posts: 1028
Joined: May 12, 2014
Location: Melbourne

Post Post #49 (ISO) » Wed Jun 15, 2016 3:17 pm

Post by Smithereens »

This is where definitions are needed lol.
>We define the ideal play of a cop as outing themselves to kill a scum, but not to save a townie.
>We define the ideal play of a tracker to out themselves only if they trace another player to the NK.
In relation to the fact that multiple claims are outed each day, that's alright. We simply need to define the mean rate of role outings for the type of game we're talking about. In mountainous, let's say we get 3 on Day 1. Assuming X power roles and N living players, the chance of a NK against a PR on night 1 is (#PR+3/n)/(n-m).

Yes you're completely correct in thinking that it can't be as simple as this. However most aspects of mafia gameplay can be reduced to probability formulas regardless.
Post Reply

Return to “Mafia Discussion”