TicTacToe Two Player Game

Hello everyone!

I have been working on this TicTacToe game. Please find in the attachment.

I will appreciate suggestions on how to make my medium mode more intelligent.

I intend to add hard mode as well.

General suggestion on how to modularise the code and how to reduce the length of the code are welcomed.

Play TicTacToe - Exclusive.ipynb (18.0 KB)

Click here to view the jupyter notebook file in a new tab

5 Likes

Nice job, this looks like fun! Unfortunately I do not have the time right now to “play around” with it…but I did notice something on my quick preliminary scan:

Making move level "medium"
---------
| _ _ _ |
| X _ _ |
| _ _ _ |
---------
Making move level "medium"
---------
| _ O _ |
| X _ _ |
| _ _ _ |
---------
Making move level "medium"
---------
| _ X _ |
| X _ _ |
| _ _ _ |
---------
Making move level "medium"
---------
| O X _ |
| X _ _ |
| _ _ _ |
---------

It looks like O stole an X position in step 2 --> step 3 above.

Thanks!!!

Will fix it.