Play by running tic_tac_toe.rb via:
ruby tic_tac_toe.rb
The computer AI has 3 difficulty settings
- easy
- intermediate
- hard
On easy the AI will randomly select from open spaces, and on hard it will use a priority queue to choose the move that is most optimal. Intermediate randomly chooses between making a smart move or a random move.
Winning is done by getting N cells in a row, with N being the length of the grid. (ie in a 3x3 grid N =3)