I am trying to simulate a dice game. All players roll a 1d6 and the highest number wins. (if multiple people win, they win.) I am getting proper odds for one player by redoing the game 10000x and taking the median for one player. Every one puts in 1 coin each round and the winner takes it all. For 5 players the odds of winning are ~29%
However, say that we have 5 players, and 3 of them work together and pool their money. So if any of them wins, they all win.
How does one calculate the odds of that? What if the other two work together? Below is my script for seeing the odds for 1 player without people working together.
players = 5
n = 10000
odds = np.zeros([players,n])
for i in range(n):
roll = np.zeros(players)
for j in range(players):
roll[j] = np.random.randint(1,7)
winner = np.zeros(players)
winner[np.where(roll == np.max(roll))] = 1
odds[:,i] = winner
print(np.mean(odds, axis=1))