[proposition] town:scum winrate calculator

This forum is for discussion related to the game.
User avatar
zMuffinMan
zMuffinMan
Survivor
User avatar
User avatar
zMuffinMan
Survivor
Survivor
Posts: 20915
Joined: March 10, 2011

Post Post #45 (isolation #0) » 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
zMuffinMan
zMuffinMan
Survivor
User avatar
User avatar
zMuffinMan
Survivor
Survivor
Posts: 20915
Joined: March 10, 2011

Post Post #47 (isolation #1) » 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
zMuffinMan
zMuffinMan
Survivor
User avatar
User avatar
zMuffinMan
Survivor
Survivor
Posts: 20915
Joined: March 10, 2011

Post Post #51 (isolation #2) » Wed Jun 15, 2016 3:45 pm

Post by zMuffinMan »

i am aware definitions (assumptions) need to be made, and although it may have been missed in the long-winded rambling, the point i was trying to make is that those assumptions don't necessarily reflect reality (e.g. even if you say this *should* happen, because it's ideal, it assumes that enough people play in an ideal way that it really is going to be the case a majority of the time)

to put it more simply, if, say, 70% of people who roll cop don't play the way you say they should play as a cop, why is that even an assumption you're making?

like, yes, if you know all the variables in play, and make assumptions, you can say, "with these assumptions, EV = X..." but so what if that has little to no bearing on how a game plays out in reality?

ftr, i've thought about writing a program similar to what you're suggesting, making certain assumptions about certain roles and how they will play, but i realised it'd be all for moot if my assumptions are wrong AND it requires me to think of every possible interaction and every possible factor in a game that can affect different actions and decisions AND while EV is important, the amount of swing in a setup is equally (if not more) important unless the setup is being played a lot of times (and even then, meh)
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
zMuffinMan
zMuffinMan
Survivor
User avatar
User avatar
zMuffinMan
Survivor
Survivor
Posts: 20915
Joined: March 10, 2011

Post Post #52 (isolation #3) » Wed Jun 15, 2016 3:55 pm

Post by zMuffinMan »

In post 50, callforjudgement wrote:Should scum counterclaim?
my initial thought was "no", because realistically scum should only counter-claim if it increases their odds of winning, which it wouldn't unless i'm misunderstanding something

but upon reflecting, potentially "yes", because of the above. lol
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
zMuffinMan
zMuffinMan
Survivor
User avatar
User avatar
zMuffinMan
Survivor
Survivor
Posts: 20915
Joined: March 10, 2011

Post Post #54 (isolation #4) » Wed Jun 15, 2016 4:19 pm

Post by zMuffinMan »

i dunno. you should probably just assume the very worst of players and make assumptions based on that, because outside of how common it is for a player to shoot its own faction in the foot, as you put it... as an example, ideal play for a cop who has a guilty n1 is to not claim and not make it super-obvious they're a cop, while getting their guilty lynched. how often does that even happen? i think that's a rare enough occurrence that making an assumption like that doesn't serve much purpose, despite it being optimal
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
zMuffinMan
zMuffinMan
Survivor
User avatar
User avatar
zMuffinMan
Survivor
Survivor
Posts: 20915
Joined: March 10, 2011

Post Post #58 (isolation #5) » Wed Jun 15, 2016 7:45 pm

Post by zMuffinMan »

In post 55, Smithereens wrote:how town and scum would play if they were playing perfectly
i would be surprised if this has ever happened in the history of mafia

but that still misses the point

we're not talking about playing optimally here, necessarily. for example, it's optimal for a cop not to claim if they can push their lynch without making it obvious they're a cop, but it's silly to assume that the player who rolls cop both thinks this and is able to pull it off. you're suggesting we assume a cop will claim if they have a guilty, which also isn't the case in a lot of games. little things like this might seem silly, but they determine the difference between scum team shooting at random and cop getting a different result and scum team killing cop so no more results

*shrug*
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
zMuffinMan
zMuffinMan
Survivor
User avatar
User avatar
zMuffinMan
Survivor
Survivor
Posts: 20915
Joined: March 10, 2011

Post Post #61 (isolation #6) » Thu Jun 16, 2016 1:40 am

Post by zMuffinMan »

In post 60, Smithereens wrote:Perfect play by mafia would be that they identify that the push is caused by information not normally accessible to town, ergo investigative role.
uh... this isn't necessarily the case if it's done right, which is the whole point. i'm not talking about coming out at the start of a day and going "hey guys, i have a hunch X is scum..."

you can work your way around to it, write a proper case, etc, and regardless of whether they're "perfect" scum, unless there's literally no holes in their play, you can push a lynch on them in a standard way without outing yourself as a cop.

i'm harping on about this example in particular, but that's because cops are the most basic of basic roles in a setup and how to treat them in terms of working out EV isn't even obvious (at least imo)
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
zMuffinMan
zMuffinMan
Survivor
User avatar
User avatar
zMuffinMan
Survivor
Survivor
Posts: 20915
Joined: March 10, 2011

Post Post #64 (isolation #7) » Thu Jun 16, 2016 2:36 am

Post by zMuffinMan »

no, i'm saying the differences in opinion on how you "should" play a role make it borderline impossible to reasonably predict actions

for example, i personally would never claim a guilty as a cop unless i felt it absolutely necessary to get my lynch or it was at the point of the game where it didn't matter, and the odds that i would feel it necessary to do that to push a lynch are pretty low (this may differ for others, so *shrug*)
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
zMuffinMan
zMuffinMan
Survivor
User avatar
User avatar
zMuffinMan
Survivor
Survivor
Posts: 20915
Joined: March 10, 2011

Post Post #66 (isolation #8) » Thu Jun 16, 2016 4:00 pm

Post by zMuffinMan »

that logic is flawed but that's not really important

with regard to figuring out optimal play in the long run, not claiming cop and pushing your lynch is going to produce higher EV for town than claiming a guilty, no? so theoretically, if we're saying "base it on optimal play", we should be assuming that any time a cop gets a guilty, he gets the guilty lynched the next day without outing himself, right?

im harping on about this one example because a cop is the most basic of basic roles when it comes to decision-making, since results are binary, and i don't think it's even that easy to determine how a program should treat it when determining balance. with roles where there are a lot more options in how to play them, this becomes even more of an issue (especially if you don't even know how to optimally play a role - eg if you're assuming a role will do X if Y happens but it's many times better to do Z, then all your calculations are going to be off...)

like I've said from the beginning, the issue isn't writing the program, it's determining what rules to use. and what rules you use can significantly affect the odds...
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
zMuffinMan
zMuffinMan
Survivor
User avatar
User avatar
zMuffinMan
Survivor
Survivor
Posts: 20915
Joined: March 10, 2011

Post Post #69 (isolation #9) » Fri Jun 17, 2016 3:48 am

Post by zMuffinMan »

In post 67, Smithereens wrote:Optimal play for the cop would to get a guilty lynched and then not die, but optimal play for mafia would be to kill a cop that lynches a mafia.
... look, you're argument seems to be that scum will know who the cop is anyway if he doesn't out himself to get a lynch on scum to happen, but that's not the case, because people push lynches hard all the time and they can't all be cops... so realistically optimal play for a cop is to not claim and push their lynch and there's no optimal play for scum here, unless they somehow
know
the push is coming as the result of a guilty... like you keep coming back to "well scum will know," but know, they won't... sure, they might shoot someone who's on the wagon of their lynched scum buddy (which, now that i think about it, is another factor you'd have to weigh into any program you make to simulate real games), but they're not going to know they were pushed because of a guilty unless the cop isn't playing optimally...

but this single example isn't so important, so i don't really care enough to keep arguing this. cop
is
a simple role because there's no nuances in when/where to claim, what your result might mean, etc that you have with others roles... and that isn't even a simple black-and-white thing. the more complex a game gets, the more factors that come into play, the harder it is to write any sort of rule (or "definition") for standard behaviour. and i'm not even talking about one role (although there are a lot of complexities with a single role) - i'm talking about how a role interacts with other roles. e.g. what do you do when a tracker gets redirected to a roleblocker who blocked the person who ended up getting killed that night? who claims? who does scum decide to kill as a result of it?

sure, it's theoretically
possible
to work out a set of rules for an enormous amount of potential interactions (if you had the time and will to do it...) but you'd need to know that you've covered everything (or at least enough that anything you haven't covered won't greatly affect the EV) and you'd need to know that these rules are actually
good rules
(because, at the very least, your idea about what constitutes a good rule seems vastly different to mine, so who's the arbiter in the end?)
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

Return to “Mafia Discussion”