Commit b4a3ccb6 authored by DUFAIX Clement's avatar DUFAIX Clement
Browse files

add possibility to play with the agent at the end

parent 904a8808
......@@ -33,7 +33,13 @@ class Game:
self.gameManager()
self.joueur1.showEndingResult()
self.joueur2.showEndingResult()
input() # fin du jeu
#on met le joueur réelle à la place de l'agent random
self.joueur2 = RealPlayer()
self.nbPartieDEntrainement = 10
self.gameManager()
#input() # fin du jeu
def getBoardGame(self):
return self.boardGame
......@@ -282,7 +288,8 @@ class Agent(Player):
plt.title('eps for each Game')
plt.xlabel('number of game', fontsize=14)
plt.ylabel('eps', fontsize=14)
plt.show()
plt.show(block=False)
def endGame(self, playerWinning):
self.epsData.append(self.eps)
......@@ -388,6 +395,4 @@ class Window(QMainWindow):
if __name__ == "__main__":
app = QApplication(sys.argv)
agent = Agent()
Game(agent, RandomAgent())
Game(RealPlayer(), agent, 5)
Game(Agent(), RandomAgent())
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment