from othello import * from alphabetaObjet import * from time import perf_counter othello = Othello() print(othello) PROF_NOIR = 6 PROF_BLANC = 6 algo_noir = AlphaBeta(PROF_NOIR, heuristique_2) algo_blanc = AlphaBeta(PROF_BLANC, heuristique_1) nb_coups_restant = 60 while nb_coups_restant > 0: if othello.joueur_courant == "noir": solution = algo_noir.executer(othello) else: solution = algo_blanc.executer(othello) 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"))