Winning with dice

How can you win often with fair dice?
ABCD
That is not that difficult if you use dice with special numbers (or pips). The trick is to let your opponent pick out a die. You then choose another die that is "better". Below are four dice that you can use well. The dice have the following numbers on them:
Die A: 5, 5, 5, 5, 1, 1
Die B: 4, 4, 4, 4, 4, 4
Die C: 3, 3, 3, 3, 7, 7
Die D: 2, 2, 2, 6, 6, 6
Each player rolls the chosen die. The one who throws the highest number wins.
You can easily see for yourself that die A wins in 2 out of 3 throws against die B. Dice B wins in 2 out of 3 throws of die C, C wins in 2 out of 3 throws of D and ... D wins in 2 of the 3 throws of A. You can therefore always choose a die that gives a 2 in 3 chance of winning. You can safely decide to choose different dice after a few games. As long as you let your opponent start you can keep winning. You can calculate this fairly easily mathematically, but I chose to make a simulation. This simulation uses JavaScript. If you want to make a simulation yourself with, for example, other numbers on the die, you can modify the Python program below.

Choose the number of games:



" Python program to simulate throwing dice "

from random import choice, seed
seed()

A = 5, 5, 5, 5, 1, 1
B = 4, 4, 4, 4, 4, 4
C = 3, 3, 3, 3, 7, 7
D = 2, 2, 2, 6, 6, 6

NumberOfSimulations = 1000000
Awins = 0
Bwins = 0
for i in range(NumberOfSimulations):
    DieOfA = choice([A, B, C, D]) # Player A chooses a random die
    if DieOfA == A:               # Player B chooses a better die
        DieOfB = D
    elif DieOfA == B:
        DieOfB = A
    elif DieOfA == C:
        DieOfB = B
    else:
        DieOfB = C
    if choice(DieOfA) > choice(DieOfB): 
        Awins += 1 # Player A has won, increase the counter
    else:
        Bwins += 1 # Player B has won, increase the counter
        
print('Player A wins', round(100 * Awins/NumberOfSimulations, 1), '% of the games')
print('Player B wins', round(100 * Bwins/NumberOfSimulations, 1), '% of the games')