Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # There are 85 town roles (counting Judas and 1-shot townie)
- # There is 1 alien sympathizer (alien if there are aliens)
- # There are 8 alien roles
- # There are 145 - 85 - 1 - 8 = 51 other scum roles, excluding wild card
- players = 13
- bins = [85, 1, 8, 51]
- num_scum = [0] * (players // 2)
- def make_role_list(picked, multiplier):
- symp = 0
- if picked[2]:
- symp = 1
- scum = sum(picked[2:]) + symp
- if scum > 6:
- return
- if sum(picked) == players:
- if scum == 0:
- return
- num_scum[scum-1] += multiplier
- return
- unpicked = [a - b for a, b in zip(bins, picked)]
- for i, alignment in enumerate(unpicked):
- if not alignment:
- continue
- picked[i] += 1
- make_role_list(picked, multiplier * alignment)
- picked[i] -= 1
- make_role_list([0] * 4, 1)
- total = sum(num_scum)
- print([e / total for e in num_scum])
- # [0.010570822660374658, 0.04394145890194956, 0.11441840993186787,
- # 0.21186328591767783, 0.29689402004896487, 0.3223120025391652]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement