I am rebuilding my incredibly old tictactoe program (on my other calc, before it was ruined) and it is to be on the graph screen, for 1 or two players.

So far, I think the AI is unbeatable, for all parts I have programmed. It will win over blocking you (old version did whichever it hit first in the program), and it knows the best second move for all but going on the "edges" (not on the diagonals), which I haven't programmed yet.

I spent about an hour debugging it this afternoon, and will finish the second moves tonight.

If you are interested, tell me.

I hope people like it!
psh, "Unbeatable" AI? Yeah, I've heard that way too many times to believe it Razz (not to mention that is an impossible concept - for what would happen if you pit two "unbeatable" AIs against each other?)
in tic tac toe you can ALWAYS force a tie.
This is true, but that also means that it won in keeping you from winning. Laughing
What kind of AI did you create in your tic-tac-toe program? Is it a bunch of conditionals or is it something different? Whenever I hear somebody say an AI is unbeatable that makes me think it is hardcoded with conditionals.
burr wrote:
What kind of AI did you create in your tic-tac-toe program? Is it a bunch of conditionals or is it something different? Whenever I hear somebody say an AI is unbeatable that makes me think it is hardcoded with conditionals.
That's exactly how my TicTacToe version works; unfortunately, that many conditionals, when optimized for size, are really slow./
Mine is written with conditional statements, but it is written in such a way that it takes about 1 second for the computer to make a move, but I found several huge bugs, so I won't be giving out he beta tests until I fix those (showed it to my dad...).

The program is really big Sad , however, because I fixed the error found in my other version that would make it block you over winning, so part of the code has to be written twice. I think it is about 3700 bytes now (including the two player part), and the final version will probably end up being around 5000 bytes Sad

I am proud of coming up with a nice way of moving the thing that shows which square you are on Very Happy
It draws a box inside the box, and after the line command, there is a not(theta) (theta is getkey), but it doesn't change the variables until AFTER it draws the line, so I only need one command to both draw and erase lines!! Smile
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement