Computer Science Canada Tic-Tac-Toe(UNBEATABLE COMPUTER IF YOU WIN TELL ME!) |
Author: | Keerigan [ Tue Jun 21, 2005 10:51 am ] | ||
Post subject: | Tic-Tac-Toe(UNBEATABLE COMPUTER IF YOU WIN TELL ME!) | ||
For Images use your own pictures
Martin says: I just added [code] tags. Nothing to see here. Move along. |
Author: | Spitfyre [ Thu Jan 05, 2006 12:32 pm ] |
Post subject: | |
how the hell do i play |
Author: | DIIST [ Thu Jan 05, 2006 2:28 pm ] |
Post subject: | |
U sure made my life hard not providing the pictures . PS: I won and i captured the moment via PrintScreen. I ll PM you the image! |
Author: | md [ Thu Jan 05, 2006 6:38 pm ] |
Post subject: | |
1. USE CODE TAGS! Please! It makes it soooo much easier for the rest of us! 2. Tick-tack-toe is a fairly simple game to make unbeatable, though it is indeed cool... now only if it were in a language I could run... |
Author: | Spitfyre [ Thu Jan 05, 2006 11:08 pm ] |
Post subject: | |
i still dont know how to play after all i am just newbcake |
Author: | MysticVegeta [ Sat Jan 07, 2006 12:04 pm ] |
Post subject: | |
Cornflake wrote: 1. USE CODE TAGS! Please! It makes it soooo much easier for the rest of us!
2. Tick-tack-toe is a fairly simple game to make unbeatable, though it is indeed cool... now only if it were in a language I could run... 3. Provide Images 4. 1 simple implementation of minMax algorithm could make the computer unbeatable. |
Author: | Spitfyre [ Sat Jan 07, 2006 4:35 pm ] |
Post subject: | |
Whateva!! |
Author: | sylvester-27 [ Wed Jan 11, 2006 10:44 am ] |
Post subject: | |
yo the program doesn't work. it doesn't recognize the mouse click is there suppossed to be a special button u press or arrow keys or something?? nvm i just figured out that i have to make my own pics. im kinda slow that way. but still if you went through all the effort to provide such a long and tedious code, you could atleast provide the pictures |
Author: | theguru [ Thu Jan 12, 2006 5:48 pm ] |
Post subject: | |
Quote: 4. 1 simple implementation of minMax algorithm could make the computer unbeatable. lol, is that really possible... in my experiences of tictacto you can always stop the other person if you play it smart and do the 'correct' moves, which depend on the current scenario. i'd like to see an unbeatable computer. then i can learn from it and become unbeatable <insert evil laugh here> |
Author: | chrispminis [ Thu Jan 12, 2006 6:44 pm ] |
Post subject: | |
By Unbeatable i think he means, that it won't lose, it will win if your carelss but it won't lose, which isn't hard to do. |
Author: | Clayton [ Sat Jan 14, 2006 9:18 pm ] |
Post subject: | |
chrispminis wrote: By Unbeatable i think he means, that it won't lose, it will win if your carelss but it won't lose, which isn't hard to do.
i think that that is true because i couldnt beat it but i ended up in a cats game quite a few times |
Author: | MysticVegeta [ Sun Jan 15, 2006 4:06 pm ] |
Post subject: | |
What I meant was if it couldn't beat you, it wont lose to you, it will draw it, but there will never be a scenario where you would win. Since minMax algorithm will sort out every single possible way the game could end and will choose the one where its winning. Since there are less possible combination (for a computer) to perform, it should have no difficulty in sorting it out. Example: ... .X. ... | \ \ 0.. .0. ..0 .... and so on... .X. .X. .X. ... ... ... | 0X. .X. ... and so on. The tree will perform a depth search and choose the path where the computer will win. If no such scenario exists since the player made excellent moves, computer will draw it (notice how I didnt say "try to draw it"). |
Author: | Rasta Fella [ Sun Jan 15, 2006 5:33 pm ] |
Post subject: | |
Well, saying it is "UNBEATABLE" is true but all that happens to me is a "tie game". Making it unbeatable is simple..but can you make it so the computer also tries to go for wins sometimes???....I doubt possible..to many rand:int and stuff. |
Author: | cool dude [ Sun Jan 15, 2006 7:21 pm ] |
Post subject: | |
Rasta Fella wrote: Well, saying it is "UNBEATABLE" is true but all that happens to me is a "tie game". Making it unbeatable is simple..but can you make it so the computer also tries to go for wins sometimes???....I doubt possible..to many rand:int and stuff.
r u joking u use no randint at all!!! u use algoritithms which will calculate the best move to make for the computer. and its actually not hard at all to make the computer to try to go for wins. if it wasn't for exams coming up i might've made a really good tic tac toe to show u that u can make the computer go for wins, and impossible to beat it just to draw it or lose to the computer. |
Author: | iker [ Sun Jan 15, 2006 8:21 pm ] |
Post subject: | |
I played this game when it was first posted and didn't bother replying because I couldn't beat it. But, what if the computer took the first move instead of the 'user'? I would like to see the computer beat me... |
Author: | [Gandalf] [ Sun Jan 15, 2006 8:53 pm ] |
Post subject: | |
People, do you realize that tic-tac-toe is such a shallow game that if the two players are not idiots and are moderately careful it will always be a tie game? Although it is a good place to start learning searching algorithms like min-max, it's not the place to be arguing about who can beat who. |
Author: | MysticVegeta [ Mon Jan 16, 2006 12:26 pm ] |
Post subject: | |
I dont think you would need alpha beta pruning to cut off some nodes from the search trees because the possible outcomes is less. I think a search depth of 2 would be enough in the first 2-4 moves. Then we have really less left over moves taht the comp could calculate in 2 seconds, even with turing no more than 3 seconds. I second Gandalf's idea. |
Author: | Keerigan [ Sun Jul 30, 2006 4:21 pm ] |
Post subject: | Sorry |
I am very sorry that this code is not to what most of u are used to seeing on this site. But i was only doing this for a grade 10 final project and wanted to but it on this site so that when the computers at my school were erased i could easily come to this site and get it back(i did not have the internet at this time so i could not send it to myself). At the same time as being able to get it back i could also see if in fact i had made the ai unbeatable. I did not think that there would be this much camotion. I did read some of ur posts so here are a few answers u may be looking for. I do not know what those "user tags" are. I am new to this site and did not see how to attach pic(but it is very easy to do). as i said earlier i was doing this for a final project and i was told to make the pc unbeatalbe. i have already made it possible to have eaither player go first(u can too just change to coding) and as far as i kno u still will not be able to beat it. the ai does go for the win, it just does not set out to do so, it just makes sure that u don't win after checking that if it can win. again i am cery sorry about the inconvineance(can't really spell) but again plz tell me the way that u have beatten the ai if u have done so(lol i made a beat with a friend) |
Author: | Clayton [ Sun Jul 30, 2006 9:15 pm ] |
Post subject: | |
as said in many of the before posts, its not hard to make an "unbeatable" computer, just a simple implementation of the min-max algorithm would fix you right up (as stated before), however, posting in a nearly 9 month old topic is something that is generally frowned upon here, but seeing as it is your own topic it might not be so bad for you, but if you do it in someonwe elses topic mods might not be so forgiving consider this a warning (CMON AUTO-LOCK!) |
Author: | ag23 [ Tue Jan 09, 2007 5:56 pm ] |
Post subject: | Re: Tic-Tac-Toe(UNBEATABLE COMPUTER IF YOU WIN TELL ME!) |
hey....uhhhh am kind of a noob at this turing stuff, and i was jsut wondering how do i get the images to apper on the game? and everytime i run it and click on the game it stops...thanks in advance!!!!!!!!!!! |