예제 #1
0
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)
예제 #2
0
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()
예제 #3
0
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()
예제 #4
0
def mc_vs_alpha_random():
    p1 = PlayerMC(PLAYER_X, 'M1')
    p2 = PlayerAlphaRandom(PLAYER_O, 'Random')
    game = GameOrganizer(p1, p2)
    game.progress()
예제 #5
0
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()
예제 #6
0
def random_vs_alpha_random():
    p1 = PlayerRandom(PLAYER_X)
    p2 = PlayerAlphaRandom(PLAYER_O)
    game = GameOrganizer(p1, p2)
    game.progress()
예제 #7
0
def human_vs_mc():
    p1 = PlayerHuman(PLAYER_X)
    p2 = PlayerMC(PLAYER_O, 'M2')
    game = GameOrganizer(p1, p2)
    game.progress()
예제 #8
0
def human_vs_random():
    p1 = PlayerHuman(PLAYER_X)
    p2 = PlayerRandom(PLAYER_O)
    game = GameOrganizer(p1, p2)
    game.progress()
예제 #9
0
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()