I created an unbeatable tic tac toe game too. Except it uses picture boxes instead of buttons. There for I was able to make it so that a line is drawn over the winning row.
I also added a score board. There was a button that would simply start a new game without clearing the score board as well as a button that restarted the program, thus clearing the score board and the game board.
I didn't have an option to choose who went 1st though. I'll try adding it.
At college I wrote a tic-tac-toe game that could "learn". At first, it just had a list of winning combinations, and would randomly choose a square when it was the computer's turn. When the computer lost, it would store the losing move, and never lose in that scenario again. You could leave it to play itself, and after a few 1000 games, it was unbeatable. The nice thing was once it had played a couple of hundred games, it was good, and looked to make mistakes, so at least you could win.
Trying to do this right now, I've gotten pretty far, but need some advice, look at English Wikipedia article about Tic Tac Toe, they have a section called strategy. One of the steps are : "If the opponent has a corner, play the opposite corner". Do they mean vertical, horizontal or diagonal opposite?
If Button1.Enabled = False And Button2.Enabled = False And Button4.Enabled = False And Button5.Enabled = False And Button6.Enabled = False And Button7.Enabled = False And Button8.Enabled = False And Button9.Enabled = False Then MsgBox("Draw!!", MsgBoxStyle.Exclamation, "Draw!!")
you say that the game is impossible to win, but at 1:08 - 1:10 it was your turn and you had the winning move but you hit Play Again instead of winning the game.
@cadman6735 no, actually, if you look closely at the third column, after I move at 1:08, the computer fills that column, thereby winning. (I didn't lose on purpose, I was just demonstrating the concept again, lol)
can i have the code plz! i would really like it if you did i kinda need it thanks a lot all you have to do is pm the code to me and i would be much appreciative
That's awesome. I was like thinking if the button had a value you disabled it from clicking but it didnt look disabled(the color would be more grayish)
The game is impossible to win because the computer is not programmed to make mistakes. The best one could do is get a cat's game. Obviously we lost a few times just so you could see what would happen.
I don't know how to add music to my videos, but I have never really tried...I'm sure its not too hard. thanks for the advice; I never would have known otherwise.
Its AI - notice how I am unable to beat it...(at least in the video)
To add music if you use vista/XP then you should have movie maker where you drag the video into the editor thing and then drag a mp3/wma/ whatever else it plays and boom you have music with your video
with a mac there is another program that you use but you do the same thing as far as I know
Nice game
despotovski01 4 months ago
I created an unbeatable tic tac toe game too. Except it uses picture boxes instead of buttons. There for I was able to make it so that a line is drawn over the winning row.
I also added a score board. There was a button that would simply start a new game without clearing the score board as well as a button that restarted the program, thus clearing the score board and the game board.
I didn't have an option to choose who went 1st though. I'll try adding it.
Microsoftultimatefan 5 months ago
can i get a copy of the code? its for my com sci project and my teacher is getting annoyed with my bombarding of questions for help. thnks!
cuddlecutefairy 8 months ago
This has been flagged as spam show
i have a source code for the pacman game in my channel pls check it out. =)
MrCybergasm 10 months ago
how did you do it against the cpu?
pivitman101 1 year ago
At college I wrote a tic-tac-toe game that could "learn". At first, it just had a list of winning combinations, and would randomly choose a square when it was the computer's turn. When the computer lost, it would store the losing move, and never lose in that scenario again. You could leave it to play itself, and after a few 1000 games, it was unbeatable. The nice thing was once it had played a couple of hundred games, it was good, and looked to make mistakes, so at least you could win.
fronkenpoop 1 year ago
Trying to do this right now, I've gotten pretty far, but need some advice, look at English Wikipedia article about Tic Tac Toe, they have a section called strategy. One of the steps are : "If the opponent has a corner, play the opposite corner". Do they mean vertical, horizontal or diagonal opposite?
theonlinegamers 1 year ago
i can probably win it if i get download link..
4lyfepk3r 1 year ago
thats stupid...make it winnable
airsoftbuddies50 1 year ago
i made that game with more graphics and other stuff like time pause stop play names and cpu and you made the pc moves i know how
popoka96 1 year ago
fucking setting
haywire090 1 year ago
Code please,
EvoProduct 1 year ago
you should make one that can play itself, like on wargames lol
megachrisb 1 year ago
Hey Nice !!! But how did you program the strategy ? Please tell I will be grateful.
nawazsucks 1 year ago
What is the code :o i want it for my os :D
EvoProduct 1 year ago
umm. i am working on a tic tac toe the only thing i need is some code for a cats game. could anyone help with that. ty
Technoob7 1 year ago
@Technoob7
If Button1.Enabled = False And Button2.Enabled = False And Button4.Enabled = False And Button5.Enabled = False And Button6.Enabled = False And Button7.Enabled = False And Button8.Enabled = False And Button9.Enabled = False Then MsgBox("Draw!!", MsgBoxStyle.Exclamation, "Draw!!")
TAZERMVW23 1 year ago
Pach
you say that the game is impossible to win, but at 1:08 - 1:10 it was your turn and you had the winning move but you hit Play Again instead of winning the game.
Did I miss something?
cadman6735 1 year ago
@cadman6735 no, actually, if you look closely at the third column, after I move at 1:08, the computer fills that column, thereby winning. (I didn't lose on purpose, I was just demonstrating the concept again, lol)
PachesatsutEnulaitsu 1 year ago
can i have the code plz! i would really like it if you did i kinda need it thanks a lot all you have to do is pm the code to me and i would be much appreciative
adampostjr 1 year ago
Can I Get That Code?
UltimateSoftwareCode 2 years ago
well this is actually a VERY great way to get better to TicTacToe.. because etc. you learn from the computer (:
TeamNiBiC 2 years ago
@TeamNiBiC like every vb video i go to i see you! haha
adampostjr 1 year ago
watch mine, i got more than just tic tac toe:) but niceeee
zzxcrozzy 2 years ago
The only winning move is not to play
HepheistoBD 2 years ago 10
@HepheistoBD : War Games. Nice quote there. :P
mariusbrabus 1 year ago
FREAKING NICE!!!!!!!!!
the12221 2 years ago
what happens if you click on an already Xd or Od square? Run error?
ILCAC3 2 years ago
It just won't let you. All you have to do is create something that checks if it already has a value every time one is clicked.
PachesatsutEnulaitsu 2 years ago
That's awesome. I was like thinking if the button had a value you disabled it from clicking but it didnt look disabled(the color would be more grayish)
ILCAC3 2 years ago
@PachesatsutEnulaitsu It disables the button....
nawazsucks 1 year ago
@ILCAC3 If you don't program it so it won't let you, it will just overwrite the cell.
Microsoftultimatefan 5 months ago
Nice work, a little simple but a good result !
TheCaspel 2 years ago
Ay, Bro. Hook me up with the code. :)
TheyCaLLMeMrGoD 2 years ago
The game is impossible to win because the computer is not programmed to make mistakes. The best one could do is get a cat's game. Obviously we lost a few times just so you could see what would happen.
PachesatsutEnulaitsu 2 years ago
Add a score and you cant win...
TheKlumzy 2 years ago
does the pc play randomly or can it think of the best move to do?
Panikdemet 2 years ago
This has been flagged as spam show
Try a multiplayer version:
w w w . s e n d s p a c e . c o m /file/uzjp72
Play online with a friend too, its much simpler.
TheKrossfire666 2 years ago
Watch mine Tutorials, Or watch mine tutorial how to make a Tricky Timer, Fun to piss off your friends with! It takes 10 Sec to make!
VB60T 2 years ago
How Did you do It??
warpze747 2 years ago
he had a chance and he reseted noob
Necro6662 2 years ago
It's because he already lost on the right, there were three O's
TheKlumzy 2 years ago
you suck at tik tac toe!
tiesykiller 2 years ago
lol nice
LithiumHackers 3 years ago 3
err...u cant win?
theonlinegamers 3 years ago
Good Job!
DeepGlue555 3 years ago
Add &fmt=22 at the end of this video
raccoon121 3 years ago
Wrong! Failed! That's for high definition. &fmt=18 is the code for high quality.
chrisybwell 3 years ago
hmmmm..........................
I don't know how to add music to my videos, but I have never really tried...I'm sure its not too hard. thanks for the advice; I never would have known otherwise.
Its AI - notice how I am unable to beat it...(at least in the video)
PachesatsutEnulaitsu 3 years ago
can you teach me
kavinsky111 2 years ago
To add music if you use vista/XP then you should have movie maker where you drag the video into the editor thing and then drag a mp3/wma/ whatever else it plays and boom you have music with your video
with a mac there is another program that you use but you do the same thing as far as I know
lee155912000 2 years ago
lols is it AI or random? btw, can u add some music to ur vids? :) I'm a subber XD
rsmod123 3 years ago