def test_H_A(): ''' Game between human player and alphabeta player ''' hg = hexgame.Hexgame(5) p1 = game.Human_hex_player(hg.clone()) p1.set_color(-1) p2 = game.Alphabeta_player(hg.clone(), hexgame.hexgame_eval) p2.set_color(+1) game.play(hg, p1, p2, verbose=1)
def test_2(): ''' Game between human player and minmax player ''' hg = hexgame.Hexgame(5) ph1 = game.Human_player(hg.clone()) ph1.set_color(-1) ph2 = game.Minmax_player(hg.clone(), hexgame.hexgame_eval) ph2.set_color(+1) game.play(hg, ph1, ph2, verbose=1)
def test_H_H(): ''' Game between two human players ''' hg = hexgame.Hexgame(11) p1 = game.Human_hex_player(hg.clone()) p1.set_color(-1) p2 = game.Human_hex_player(hg.clone()) p2.set_color(+1) hg.print_player_turn() game.play(hg, p1, p2, verbose=1)
def test_1(): ''' Game between two human players ''' hg = hexgame.Hexgame(3) ph1 = game.Human_player(hg.clone()) ph1.set_color(-1) ph2 = game.Human_player(hg.clone()) ph2.set_color(+1) hg.print_player_turn() game.play(hg, ph1, ph2, verbose=1)
def test_debug(): ''' debug Game between human player and minmax player ''' hg = hexgame.Hexgame(3) hg.set_board([1, 0, 0, -1, 1, -1, 0, 0, -1]) p1 = game.Human_hex_player(hg.clone()) p1.set_color(-1) p2 = game.Minmax_player(hg.clone(), hexgame.hexgame_eval) p2.set_color(+1) game.play(hg, p1, p2, verbose=1)