Computer Science Canada Tic Tac Toe |
Author: | kalin [ Sun Jan 04, 2004 8:15 pm ] |
Post subject: | Tic Tac Toe |
Hey, I'm having trouble with the AI for it, could someone please help me?? I've restarted like twenty times and I could use some help... My msn is mynameisamber@hotmail.com feel free to add me!!!! and please help!! |
Author: | DanShadow [ Sun Jan 04, 2004 9:24 pm ] | ||
Post subject: | |||
You could make an unbeatable AI that checks moves ahead. Like a bunch of if values:
This of course isnt completely unbeatable, but you can make it unbeatable if you know a lot of tic tac toe combo moves, lik hitting a bunch of certain ones, so you automatically will get a line if you pick 1 of 2 squares to complete a line. Thats one way you could make AI in tic tac toe. |
Author: | Tony [ Sun Jan 04, 2004 10:32 pm ] |
Post subject: | |
the best AI is to make completely random moves otherwise the simpliest AI would be: DEFEND - block if user has two in a row ATTACK - move so that AI has 2/3 in a row RANDOM - if you're not defending or attacking |
Author: | AsianSensation [ Sun Jan 04, 2004 11:30 pm ] |
Post subject: | |
Bugz made his turing 4x4x4 tictactoe unbeatable AI and coded it in c++ and exported to VB so it has the graphics...Im sure if you ask nicely enough, he would give you the code...........................or maybe not. |
Author: | kalin [ Mon Jan 05, 2004 7:14 am ] |
Post subject: | |
thanks! That should help! |
Author: | DanShadow [ Mon Jan 05, 2004 9:49 am ] |
Post subject: | |
Your welcome... and random moves AI wont win though, lol. |
Author: | icedesi [ Mon Jan 05, 2004 7:42 pm ] |
Post subject: | |
That is a good idea eh, never thought of that! 8) |
Author: | kalin [ Wed Jan 21, 2004 5:48 pm ] |
Post subject: | |
Well, either way, I gotta start from scratch!! Boohoo. Oh well. I'll suck it up. Anyone got any tips on making it so that a function says that places are taken?? If not its ok! |
Author: | recneps [ Wed Jan 21, 2004 6:58 pm ] |
Post subject: | |
look at my tic tac toe in source code... its not AI, but it shows how i made it so you can only click on sq's with nothing in em |
Author: | kalin [ Wed Jan 21, 2004 7:02 pm ] |
Post subject: | |
the one that has the tic tac toe and a couple other games in it?? AKA the zipped up one??? |
Author: | Tony [ Wed Jan 21, 2004 7:04 pm ] |
Post subject: | |
just search for "tic tac toe" and "recneps" as the post author in [turing source code] or [turing submissions]... depending on where it was posted and I'm sure you'll find it |
Author: | kalin [ Wed Jan 21, 2004 7:59 pm ] | ||
Post subject: | |||
Well, I kinda sorted out a problem I had, now I have a bigger problem . Can anyone help??
See the thing is, a) it wont load for me until I go to close it. And b) it refuses to have the 'x' show up. Can anyone help?? If this same problem has been posted, sorry,m I looked, but mustve missed, if its been asked. If it has, give me the link and I'll go there. Thx! |
Author: | Cervantes [ Thu Jan 22, 2004 7:03 pm ] |
Post subject: | |
you forgot to put in View.Update |
Author: | kalin [ Thu Jan 22, 2004 7:09 pm ] |
Post subject: | |
I know, I can't use that at school....older version bah. Hate that |
Author: | Cervantes [ Thu Jan 22, 2004 7:33 pm ] |
Post subject: | |
then petition your teacher to let you use 4.0.5 and if you can't use View.Update, take out the View.Set ("offscreenonly") that oughta do it |
Author: | kalin [ Fri Jan 23, 2004 6:13 am ] |
Post subject: | |
ok, thx! |
Author: | McKenzie [ Fri Jan 23, 2004 8:55 am ] |
Post subject: | |
have your teacher follow shorthair's link. I bet he/she can probably legally upgrade but may not realize. (Warning - some teachers don't want to install the new version because they have to update their knowledge |
Author: | DanShadow [ Fri Jan 23, 2004 9:56 am ] |
Post subject: | |
lol...thats true. Stupid lazy compsci teachers. (although there are some good ones....like mine isnt half bad...except for the fact th at im as smart as him pretty much now. In only 1 semester...I learned double what he tought, an d by the end of the year at ISU time, everyone cam to me for advice and assistance, muahaha ) |
Author: | kalin [ Fri Jan 23, 2004 3:22 pm ] |
Post subject: | |
too late now, the semester is over and its looking like I'm just going to scrape by........oh well..... |