у меня есть программа

import numpy as np
import pandas as pd
import matplotlib.pyplot as plt

Функция генерирования маски
def get_mask(secret_word, current_guess):
mask = ['-'] * len(secret_word)
secret_word_list = list(secret_word)
# Первый прогон для определения полного совпадения
for i in range(len(current_guess)):
if current_guess[i] == secret_word[i]:
mask[i] = '!'
# Второй прогон для определения присутствия
for i in range(len(current_guess)):
if mask[i] == '-' and current_guess[i] in secret_word_list:
mask[i] = '+'
return ''.join(mask)

words_array = np.loadtxt("rus5_.txt", dtype=str)

Боты загадывающих
setter_name = np.array(["Только первое слово", "Первые 6 слов"])
n_setter = setter_name.size

Только первое слово
def set_word_1(words_array):
return np.full(6, words_array[0])

Первые 6 слов
def set_word_2(words_array):
return words_array[:6]

Боты отгадывающих
guesser_name = np.array(["Только первое слово", "Случайные слова"])
n_guesser = guesser_name.size

Только первое слово
def guess_word_1(guessed_list, mask_list, words_array):
return words_array[0]

Случайные слова
def guess_word_2(guessed_list, mask_list, words_array):
return np.random.choice(words_array)

Турнир
words_array = np.loadtxt("rus5_.txt", dtype = str)
n_game = 6
n_attampt = 6
setter_points = np.zeros(n_setter)
guesser_points = np.zeros(n_guesser)
result = np.zeros((n_setter, n_guesser, 2))

for setter in range(n_setter):
for guesser in range(n_guesser):
secret_list = eval("set_word_" + str(setter + 1) + "(words_array)")
for game in range(n_game):
if secret_list[game] not in words_array:
result[setter][guesser][1] += 6
guesser_points[guesser] += 6
break
guessed_list = np.array([], dtype = str)
mask_list = np.array([], dtype = str)
flag = 0
for attempt in range(n_attampt):
current_guess = eval("guess_word_" + str(guesser + 1) + "(guessed_list, mask_list, words_array)")
if current_guess not in words_array:
result[setter][guesser][0] += 6
setter_points[setter] += 6
flag = 1
break
current_mask = get_mask(secret_list[game], current_guess)
if current_mask == '!!!!!':
result[setter][guesser][0] += attempt
setter_points[setter] += attempt
result[setter][guesser][1] += 6 - attempt
guesser_points[guesser] += 6 - attempt
flag = 1
break
else:
guessed_list = np.append(guessed_list, current_guess)
mask_list = np.append(mask_list, current_mask)
if flag == 0:
result[setter][guesser][0] += 6
setter_points[setter] += 6

ind_sort = np.argsort(-setter_points)
df = pd.DataFrame({'Стратегия загадывания': setter_name[ind_sort], 'Очков': setter_points[ind_sort]})
print(df)

ind_sort = np.argsort(-guesser_points)
df = pd.DataFrame({'Стратегия угадывания': guesser_name[ind_sort], 'Очков': guesser_points[ind_sort]})
print(df)

fig, ax = plt.subplots()
combined_values = np.empty((n_setter, n_guesser), dtype=object)
for i in range(n_setter):
for j in range(n_guesser):
combined_values[i, j] = f"{result[i, j, 0]}\n{result[i, j, 1]}"
cax = ax.matshow(np.zeros((n_setter, n_guesser)), cmap='viridis')
for (i, j), value in np.ndenumerate(combined_values):
ax.text(j, i, value, ha='center', va='center', color='white')
plt.xticks(range(len(guesser_name)), guesser_name)
plt.yticks(range(len(setter_name)), setter_name)
plt.show()

мне нужно придумать новые способы загадывания и угадывания что бы они были лучшими