PDA

View Full Version : tic tac toe



holden
05-08-2004, 05:13 PM
I was just wondering, have any of you seen a tic tac toe algorithm that you haven't been able to beat, ever, on this board?

Mostly there is like one set of moves that will trip it up, but did anyone make a truly impossible to beat algorithm for tic tac toe?

Dante Shamest
05-08-2004, 05:39 PM
have any of you seen a tic tac toe algorithm that you haven't been able to beat, ever, on this board?


I wrote a Tic Tac Toe program that does just that. (http://www.abdn.ac.uk/~u02cll2/)

Zach L.
05-08-2004, 06:15 PM
Well, the second player can always force a draw if he plays correctly (assuming the first player is also playing correctly), so that really would be that hard to right. Simply put, the first player plays in the center, and the second on a corner, and then they continually block each other until a stalemate is reached. I didn't go to the link, but I'd assume that is essentially what Dante used for his program.

Dante Shamest
05-08-2004, 06:21 PM
but I'd assume that is essentially what Dante used for his program.

Dante actually used something that worked for the general case (http://en.wikipedia.org/wiki/Minimax), not just for centers and corners.

axon
05-08-2004, 07:32 PM
dude..its really simple...tic tac toe is a game of no winners, if both are at least somewhat competent. There is only a few sets of moves that one can follow - therefore it is very trivial to write tic tac toe "AI"...

Zach L.
05-08-2004, 08:34 PM
Okay... I really underestimated your program there. Nicely done.

I used minimax for a little chess program a while back. It wasn't terribly good, though. It really needed an opening database to improve the performance. Because of its limited depth, its openings were really quite atrocious. There were presumably a few other reasons why it was quite atrocious, but I'll pin it on the limited depth. :D

JaWiB
05-08-2004, 09:41 PM
I liked a 3d tic tac toe game I used to have...It was fun because it had basically 3 games stacked on top of each other. You could win the normal way or you could win across the three boards. Kinda hard to explain, but it was cool

webmaster
05-09-2004, 09:18 AM
I liked a 3d tic tac toe game I used to have...It was fun because it had basically 3 games stacked on top of each other. You could win the normal way or you could win across the three boards. Kinda hard to explain, but it was cool
I had one of those a long time ago. I'm pretty sure that if player one goes to the middle board and plays in the center, it's a forced win. Then again, you could always add a rule that prevents this being the first move. I didn't have a rule book, but I assume that that's how people would play it.

JaWiB
05-09-2004, 09:59 AM
Or maybe it was more like this:
http://home.earthlink.net/~cmalumphy/3d.html

4 boards and 4 in a row to win instead...