예제 #1
0
from time import time
from ChessGame import ChessGame
from ChessBoard import ChessBoard
import matplotlib.pyplot as plt

chessGame = ChessGame()

delays = []
for depth in range(1, 11):
    t = time()
    board = chessGame.start(ChessBoard(), depth, False)
    t = time() - t
    #board.printBoard()
    print t
    delays.append(t)

plt.plot(delays)
plt.ylabel('Game time')
plt.xlabel('Maximum depth')
plt.savefig('delays.png')
plt.show()