Posibilidad de NO tener X palo por dos manos seguidas
Escenario
Jugador A agarra sus piedras, en dicha mano le falta el palo X. ¿Cuántas posibilidades hay de que le pase también en la siguiente mano o en las dos siguientes manos?
Resultados
Luego de 168 simulaciones este es el resumen:
2 veces consecutivas: 2 veces (1,19%)
3 veces consecutivas 1 vez (0,59%)
¿Crees que ocurre más seguido?
Aquí te dejo el código utilizado por si acaso le quieres dar una mirada
missing_palo_streaks = {num: {length: 0 for length in range(1, 4)} for num in range(7)}
all_p1_missing_palo_states = {num: [] for num in range(7)}
# Populate all_p1_missing_palo_states
for target_num in range(7):
for simulation_hands in all_simulations_player_hands:
p1_hand = simulation_hands[0] # Player One's hand
# Check if Player One's hand completely lacks the target_num
p1_lacks_palo_X = (count_number_in_hand(p1_hand, target_num) == 0)
all_p1_missing_palo_states[target_num].append(p1_lacks_palo_X)
# Analyze consecutive streaks for each number
for target_num, states_list in all_p1_missing_palo_states.items():
current_consecutive_count = 0
for state in states_list:
if state is True:
current_consecutive_count += 1
else:
# If the streak is broken, record counts for all relevant streak lengths found
for length in range(1, 4): # Checking for lengths 1, 2, 3
if current_consecutive_count >= length:
missing_palo_streaks[target_num][length] += 1
current_consecutive_count = 0
# After the loop, check for any pending consecutive streak at the end of the list
for length in range(1, 4):
if current_consecutive_count >= length:
missing_palo_streaks[target_num][length] += 1
print("Análisis de rachas consecutivas donde al Jugador Uno le faltaba completamente el 'palo X':")
for num, counts_by_length in missing_palo_streaks.items():
print(f" Número {num}:")
for length, count in counts_by_length.items():
print(f" Longitud {length}: {count} veces")
Comments
Post a Comment