Skip to content

Created a driver to play Tic Tac Toe and challenged an opponent who placed randomly. Used the random opponent to record what a good player, me, would do. Used this data set to train a Decision Tree Classifier, and then challenged this new model to play. The model fell back on randomness when the small data set fell short. Done using pandas and s…

GregHilston/tic-tac-toe-modeling

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tic Tac Toe Model

A coworker asked if anyone was interested in attempting to train a model to play tic tac toe. It sounded fun, so this project was my quick (~four hour) attempt.

My plan was

  1. Create a training set by playing many games of tic tac toe against an opponent whose technique was pure randomness
  2. Use this training set to train a model, we specifically used a Decision Tree Classifier here
  3. Have the model play against me, post training

The majority of my time was setting up the code to perform the game, handle the rules of tic tac toe and write back the games for a training set. It was a fun project and I'm happy I did it

About

Created a driver to play Tic Tac Toe and challenged an opponent who placed randomly. Used the random opponent to record what a good player, me, would do. Used this data set to train a Decision Tree Classifier, and then challenged this new model to play. The model fell back on randomness when the small data set fell short. Done using pandas and s…

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published