from othello import * from alphabeta import * from time import perf_counter othello = Othello() print(othello) PROF_NOIR = 6 PROF_BLANC = 6 nb_coups_restant = 60 while nb_coups_restant > 0: if othello.joueur_courant == "noir": solution = alpha_beta(othello, othello.joueur_courant, 1, PROF_NOIR, heuristique_2,-1000, 1000) else: solution = alpha_beta(othello, othello.joueur_courant, 1, PROF_BLANC, heuristique_1,-1000, 1000) coups = solution[0] premier_coup = coups[0] if premier_coup is None: # le joueur courant ne pouvait pas jouer print("Le joueur passe") othello.changer_joueur() else: print(premier_coup) othello.jouer_coup(premier_coup[0], premier_coup[1]) nb_coups_restant -= 1 print(othello) print(heuristique_1(othello, "noir"))