COMBELINTORICS MAFIA -- DAY 1

VOTE: ash

1 Like

oh you too
jk she asked nicely

1 Like

VOTE: frost

I guess we’re locking in then.

Do you think Frost’s behavior is suspicious?

so even though i specced the other games i didn’t really get fully into it

we want to aim for 0/3 today realistically? i mean a 2/3 would be nice but i kinda doubt we can do that as easily as a 0/3

1 Like

Whats that vote going to do, jail me?

1 Like

no but he should be punished

2 Likes

crying

1 Like

Ideally, yes.

1 Like

3 Likes

I should break out the program.

i thought about going for 0/3 too! but I think keeping it simple is best not sure tho ill let the experts speak

1 Like
Nya
import math

#town = list(string.ascii_uppercase)[:9]
#masons = ["A", "B", "C"]

#town = list(range(8))
town = ["Quail", "Chomps", "LittleLee", "Ash", "Anonygoose", "Prisma101", "Magnus", "spookycat27", "pandora", "RedPandas", "FusionMoon314", "Badeline"]
masonGuesses = [["Chomps", "Anonygoose", "FusionMoon314"]]
masonResults = [1]

def getAllMasonPossibilities(town):
    finalArray = []
    for i in range(len(town)):
        for j in range(i + 1, len(town)):
            for k in range(j + 1, len(town)):
                finalArray.append([town[i], town[j], town[k]])
    return finalArray

def getAllMasonOptions(town, masonGuesses, masonResults):
    finalArray = []
    for i in range(len(town)):
        for j in range(i + 1, len(town)):
            for k in range(j + 1, len(town)):
                potentialMasons = [town[i], town[j], town[k]]
                fine = True
                for index in range(len(masonResults)):
                    if masonResults[index] != guess(potentialMasons, masonGuesses[index]):
                        fine = False
                if fine:
                    finalArray.append(potentialMasons)
    return finalArray

def guess(beam, masons):
    return sum([int(beamed in masons) for beamed in beam])

def convertArrayToKey(jailOption):
    return " - ".join(jailOption)

guessQualityDictionary = {}

masonPossibilities = getAllMasonPossibilities(town)

masonOptions = getAllMasonOptions(town, masonGuesses, masonResults)
numMasonOptions = len(masonOptions)

jailOptions = masonOptions + [[player, "None", "None"] for player in town] + [[town[i], town[j], "None"] for i in range(len(town) - 1) for j in range(i + 1, len(town))]

for option in jailOptions:
    results = [0] * 4
    attemptedGuesses = masonGuesses + [option]
    for potentialMasonSolution in masonOptions:
        results[guess(potentialMasonSolution, option)] += 1
    
    expectedInformationValue = 0
    for result in results:
        probability = result / numMasonOptions
        if probability > 0:
            expectedInformationValue += probability * math.log(1/probability, 2)
    
    guessQualityDictionary[convertArrayToKey(option)] = expectedInformationValue

guessQualityList = sorted(guessQualityDictionary.items(), key=lambda item: item[1], reverse=True)
guessQualityDictionary = dict(guessQualityList)

#print(guessQualityDictionary)

#print(guessQualityList)
for i in range(len(guessQualityList)):
    #print(guessQualityList[i][0])
    print("{0}, with {1} bits of information".format(guessQualityList[i][0], round(float(guessQualityList[i][1]), 4)))

Will update this with the actual playerlist when I am not playing HSR not doing important work.

girl what is THAT code sob

1 Like

I’m being guilt-tripped…

(Actual answer is that I stole this from past me. #plagarism)

:sob::sob::sob:

1 Like

I will cri if this is going to be D1 0/3 vote

def getAllMafia():
    finalArray = [3]
    list:names
    speed=fast
1 Like