Training an agent to learn play Tic-Tac-Toe using Q-Learning
- torch -'1.5.0+cu101'
- numpy -1.19.0
- matplotlib-3.1.1
- tqdm
python main.py
This results in 2 QTables namely QLearningAgent_0_QTable and QLearningAgent_X_QTable being saved in the root directory.
tensorboard --logdir <summary_directory_path> --port=<port_number>
or
tensorboard --logdir summary
because we have set the summary_directory_path as "summary" in config.py
NOTE: The default port for tensorboard is 6006
python play.py
This essentially uses the QTables which were saved as a result of running main.py
But you do not necessarily need to run main.py for playing the game against the QLearningAgent because I have already put the QTables in this repository.
Reward plots for both the QLearningAgents over the course of 100,000 episodes.