NOC Why Is There A Gun In My Popcorn? 2: Old Country Boogaloo [GAME OVER Town Wins]

Hi everyone, I'm here. Does anyone remember how the last popcorn had good odds with pure randing?

I wrote up a couple programs to check if that's still the case.

calcWin calculates a pure village win. winWithDraw counts draws as wins.
Python:
def calcWin(village, mafia, vengeful):
    if (village <= 0): # village eliminated
        return 0
    elif (vengeful >= village): # village cannot avoid elimination
        return 0
    elif (village == 1 and (mafia + vengeful) > 1): # mafia wincondition
        return 0
    elif ((mafia + vengeful) <= 0): # mafia eliminated; town still alive
        return 1
    elif (village >= 1 and mafia == 1 and vengeful == 0): # village cannot lose
        return 1
    else:
        den = village + mafia + vengeful - 1
        if (den <= 0):    # something very wrong
            return 0
        x = calcWin(village - 1, mafia, vengeful) * (village - 1) / den # hit town, can't self-hit
        y = calcWin(village - 1, mafia, vengeful - 1) * vengeful / den # hit vengeful
        z = calcWin(village, mafia -1, vengeful) * mafia / den # hit regular mafia
        return (x + y + z)
Python:
def winWithDraw(village, mafia, vengeful):
    if (village <= 0): # village eliminated
        return 0
    elif (vengeful > village): # village cannot avoid elimination
        return 0
    elif (village == 1 and (mafia + vengeful) > 1): # mafia wincondition
        return 0
    elif (village == 1 and vengeful == 1): # counting draw as a win
        return 1
    elif ((mafia + vengeful) <= 0): # mafia eliminated; town still alive
        return 1
    elif (village >= 1 and mafia == 1 and vengeful == 0): # village cannot lose
        return 1
    else:
        den = village + mafia + vengeful - 1
        if (den <= 0):    # something very wrong
            return 0
        x = winWithDraw(village - 1, mafia, vengeful) * (village - 1) / den # hit town, can't self-hit
        y = winWithDraw(village - 1, mafia, vengeful - 1) * vengeful / den # hit vengeful
        z = winWithDraw(village, mafia -1, vengeful) * mafia / den # hit regular mafia
        return (x + y + z)
Python:
>>> calcWin(11,4,3)
0.5567612160248714
>>> winWithDraw(11,4,3)
0.6873275508921516
>>> winWithDraw(11,4,3) - calcWin(11,4,3)
0.1305663348672802
>>> 1 - winWithDraw(11,4,3)
0.3126724491078484
31.3% lose, 55.7% chance of win, and 13.1% chance of tie (rounding; yes that's 100.1%)
DO WE LIKE THOSE ODDS? DOES ANYONE DISAGREE WITH MY CALCULATIONS?

I suggest we just shoot according to random.org and hope. Odds are still in our favor if we miss the first time.
 

CaffeineBoost

Puzzle Hunt Champion
Hi everyone, I'm here. Does anyone remember how the last popcorn had good odds with pure randing?

I wrote up a couple programs to check if that's still the case.

calcWin calculates a pure village win. winWithDraw counts draws as wins.
Python:
def calcWin(village, mafia, vengeful):
    if (village <= 0): # village eliminated
        return 0
    elif (vengeful >= village): # village cannot avoid elimination
        return 0
    elif (village == 1 and (mafia + vengeful) > 1): # mafia wincondition
        return 0
    elif ((mafia + vengeful) <= 0): # mafia eliminated; town still alive
        return 1
    elif (village >= 1 and mafia == 1 and vengeful == 0): # village cannot lose
        return 1
    else:
        den = village + mafia + vengeful - 1
        if (den <= 0):    # something very wrong
            return 0
        x = calcWin(village - 1, mafia, vengeful) * (village - 1) / den # hit town, can't self-hit
        y = calcWin(village - 1, mafia, vengeful - 1) * vengeful / den # hit vengeful
        z = calcWin(village, mafia -1, vengeful) * mafia / den # hit regular mafia
        return (x + y + z)
Python:
def winWithDraw(village, mafia, vengeful):
    if (village <= 0): # village eliminated
        return 0
    elif (vengeful > village): # village cannot avoid elimination
        return 0
    elif (village == 1 and (mafia + vengeful) > 1): # mafia wincondition
        return 0
    elif (village == 1 and vengeful == 1): # counting draw as a win
        return 1
    elif ((mafia + vengeful) <= 0): # mafia eliminated; town still alive
        return 1
    elif (village >= 1 and mafia == 1 and vengeful == 0): # village cannot lose
        return 1
    else:
        den = village + mafia + vengeful - 1
        if (den <= 0):    # something very wrong
            return 0
        x = winWithDraw(village - 1, mafia, vengeful) * (village - 1) / den # hit town, can't self-hit
        y = winWithDraw(village - 1, mafia, vengeful - 1) * vengeful / den # hit vengeful
        z = winWithDraw(village, mafia -1, vengeful) * mafia / den # hit regular mafia
        return (x + y + z)
Python:
>>> calcWin(11,4,3)
0.5567612160248714
>>> winWithDraw(11,4,3)
0.6873275508921516
>>> winWithDraw(11,4,3) - calcWin(11,4,3)
0.1305663348672802
>>> 1 - winWithDraw(11,4,3)
0.3126724491078484
31.3% lose, 55.7% chance of win, and 13.1% chance of tie (rounding; yes that's 100.1%)
DO WE LIKE THOSE ODDS? DOES ANYONE DISAGREE WITH MY CALCULATIONS?

I suggest we just shoot according to random.org and hope. Odds are still in our favor if we miss the first time.
Man you put in an awful lot of work to say absolutely nothing lmao, I like your style.
 
Just to clarify: I am seriously suggesting that we consider random shots. Random shots are immune to tunneling and bussing. They are immune to WIFOM. They give us a passable winrate, and better than the mafia has.

And, because of the game format, it's immune to the scum not voting randomly or inserting bad targets.
 
Just to clarify: I am seriously suggesting that we consider random shots. Random shots are immune to tunneling and bussing. They are immune to WIFOM. They give us a passable winrate, and better than the mafia has.

And, because of the game format, it's immune to the scum not voting randomly or inserting bad targets.
boring as fuck but I like it
 
Just to clarify: I am seriously suggesting that we consider random shots. Random shots are immune to tunneling and bussing. They are immune to WIFOM. They give us a passable winrate, and better than the mafia has.

And, because of the game format, it's immune to the scum not voting randomly or inserting bad targets.
Fair enough, I agree with this. Plus, isn't the win rate higher than projected since it doesn't account for people who have had the gun being cleared? (if you did account for that, my bad, I didn't look too closely, reading code is harder than coding code, at least for me)
 
of course, that isn't a "truly random" method of shooting since it avoids confirmed town, but in that case you just use RNG again
or maybe just take the list of living players and randomly sort it before starting to go down it and shooting the first person who's not confirmed town, that means you only have to do it once
 
I did; that's the -1 in assigning
den = village + mafia + vengeful - 1
as well as
* (village - 1) / den # hit town, can't self-hit

But there can only be one conftown at a time, unfortunately.
 
To be clear, M2H: Is two posts ago a claim that you believe 55.7% vs 31.3% is insufficient compared to the normal strategy?

same, Caffeine's image was vile and that post was horrible

but is it scum? I'm trying to think why would he open in such a manner
I agree that I don't really like what Caffeine's done, though I'd extend it to most of his posts, not just that one.
 

Users Who Are Viewing This Thread (Users: 1, Guests: 1)

Top