Tic Tac Toe

I stayed home because I’m sick with the flue today so i got bored and made a tic tac toe game just because I felt like it :stuck_out_tongue:

You play against a bot that checks if there is anyway to block your moves or win on you, it also learns from your moves so :wink:

I have 13 ties with it.

I’d like some feedback!

also please not that the Gui design isn’t so hot I am not good with stuff like dat.

The Gui tweens are a little laggy. That’s all done locally, right? Odd…

Anyhow, fun :stuck_out_tongue:
Perhaps if you get bored again, you can move it to a surface Gui and allow multiplayer matches. Maybe make it like an arcade machine.

Unfortunately the AI didn’t feel Human enough. I found a technique where he will only place it down in one of two places once you begin, from there I can make a second move to make it impossible for the AI to win. It needs to learn from its mistakes, or appear to. I think it looks like it’s judging the best move based upon some sort of rating system, but it is only predicting one turn ahead, maybe it needs to go two ahead.

What a lot of AI’s I have experienced do is look at all possible moves ahead and have a certain number of “iterations” allowed which is usually linked to difficulty, since if an AI can see every single move possible then they will never lose since they don’t have a margin for error, however if you lower their maximum iterations they are constricted as to how much they can search through.

Just keep this in mind :smiley:

I have discovered what I believe to be a fail-safe way of winning if I get the first pick.

Could you add a mode where the computer gets the first pick?

EDIT: Your bot isn’t half bad. I fail to beat it almost half the time.

Here is a guide on how to play Tic Tac Toe perfectly on xkcd.

I wonder how your AI does against the guide.

I beat the bot 7 times before it figured out how to tie with me.