def ql_vs_alpha_random(): p1 = PlayerQL(PLAYER_X, 'Q1') p2 = PlayerAlphaRandom(PLAYER_O) game = GameOrganizer(p1, p2, 1000000, False, False, 10000) game.progress() with open('dump/ql_vs_alpha_random_%s.pkl' % sdate(), mode='wb') as f: pickle.dump(p1, f)
def human_vs_dumped(): p1 = PlayerHuman(PLAYER_O) with open('dump/ql_vs_alpha_random_2017_05_19_17_42_46.pkl', mode='rb') as f: p2 = pickle.load(f) p2.e = 0 game = GameOrganizer(p1, p2) game.progress()
def mc_vs_dumped(): p1 = PlayerMC(PLAYER_O, 'M1') # with open('dump/ql_vs_alpha_random_2017_05_19_17_42_46.pkl', mode='rb') as f: with open('dump/ql_vs_ql_2017_05_19_18_35_32.pkl', mode='rb') as f: p2 = pickle.load(f) p2.e = 0 game = GameOrganizer(p1, p2, 10, False) game.progress()
def mc_vs_alpha_random(): p1 = PlayerMC(PLAYER_X, 'M1') p2 = PlayerAlphaRandom(PLAYER_O, 'Random') game = GameOrganizer(p1, p2) game.progress()
def mc_vs_mc(): p1 = PlayerMC(PLAYER_X, 'M1') p2 = PlayerMC(PLAYER_O, 'M2') game = GameOrganizer(p1, p2, 3, False) # game = GameOrganizer(p1, p2) game.progress()
def random_vs_alpha_random(): p1 = PlayerRandom(PLAYER_X) p2 = PlayerAlphaRandom(PLAYER_O) game = GameOrganizer(p1, p2) game.progress()
def human_vs_mc(): p1 = PlayerHuman(PLAYER_X) p2 = PlayerMC(PLAYER_O, 'M2') game = GameOrganizer(p1, p2) game.progress()
def human_vs_random(): p1 = PlayerHuman(PLAYER_X) p2 = PlayerRandom(PLAYER_O) game = GameOrganizer(p1, p2) game.progress()
def random_vs_random(): p1 = PlayerRandom(PLAYER_X, 'Random1') p2 = PlayerRandom(PLAYER_O, 'Random2') game = GameOrganizer(p1, p2) # game = GameOrganizer(p1, p2, 1000, False, False, 100) game.progress()
def play_game(): p1 = PlayerHuman() p2 = PlayerQL() game = GameOrganizer(p1, p2) game.progress()