Skip to content

Instantly share code, notes, and snippets.

from agent import Agent
from tictactoe import TicTacToe
def play(agent):
game = TicTacToe()
while True:
action = agent.qlearner.get_best_action(game.get_state())
winner = game.play(*action)
if winner: