Example #1
0
 def teachAgent(self):
     iteration = 0
     while iteration < self.numOfEpisodes:
         game = Game(self.agent)
         game.start(training=True)
         iteration += 1
         if iteration % 10000 == 0:
             print("Training round: " + str(iteration))
     plot_agent_reward(self.agent.rewards)
Example #2
0
 def userPlayAgent(self):
     while True:
         game = Game(self.agent)
         game.start()
         playAgain = input("Would you like to play again? ('y', 'n'): ")
         if playAgain == 'n':
             print("See you later!")
             break
         print()
         print("Okay lets play again!")
         print()