from othello import * from minmaxObjet import * from time import perf_counter print("***************** Avec heuristique 1 *****************") othello = Othello() print(othello) PROF = 6 algo = MinMax(PROF, heuristique_1) for i in range(20): solution = algo.executer(othello) coups = solution[0] coup_noir = coups[0] print(coup_noir) if coup_noir is None: othello.changer_joueur() else: othello.jouer_coup(coup_noir[0], coup_noir[1]) coup_blanc = coups[1] print(coup_blanc) if coup_blanc is None: othello.changer_joueur() else: othello.jouer_coup(coup_blanc[0], coup_blanc[1]) print(othello) print(heuristique_1(othello, "noir")) print("***************** Avec heuristique 2 *****************") othello = Othello() algo = MinMax(PROF, heuristique_2) for i in range(20): solution = algo.executer(othello) coups = solution[0] coup_noir = coups[0] print(coup_noir) if coup_noir is None: othello.changer_joueur() else: othello.jouer_coup(coup_noir[0], coup_noir[1]) coup_blanc = coups[1] print(coup_blanc) if coup_blanc is None: othello.changer_joueur() else: othello.jouer_coup(coup_blanc[0], coup_blanc[1]) print(othello) print(heuristique_1(othello, "noir"))