Esempio n. 1
0
import time
from io import StringIO
import sys

cptAI = 0
cptRand = 0
cptEgal = 0
cptIM = 0

debut = time.time()  #

for i in range(0, 5):
    b = Reversi.Board(10)

    players = []
    player1 = myPlayerMiniMax.myPlayer()
    player1.newGame(b._BLACK)
    players.append(player1)
    player2 = myPlayerAlphaBeta.myPlayer()
    player2.newGame(b._WHITE)
    players.append(player2)

    totalTime = [0, 0]  # total real time for each player
    nextplayer = 0
    nextplayercolor = b._BLACK
    nbmoves = 1

    outputs = ["", ""]
    sysstdout = sys.stdout
    stringio = StringIO()
Esempio n. 2
0
cptAI = 0
cptRand = 0
cptEgal = 0
cptIM = 0

debut = time.time()  #

for i in range(0, 5):
    b = Reversi.Board(10)

    players = []
    player1 = myPlayerAlphaBeta.myPlayer()
    player1.newGame(b._BLACK)
    players.append(player1)
    player2 = myPlayerMiniMax.myPlayer()
    player2.newGame(b._WHITE)
    players.append(player2)

    totalTime = [0, 0]  # total real time for each player
    nextplayer = 0
    nextplayercolor = b._BLACK
    nbmoves = 1

    outputs = ["", ""]
    sysstdout = sys.stdout
    stringio = StringIO()

    totalmoves = 0  #

    beforetime = 0