tic tac toe

This is a discussion on tic tac toe within the A Brief History of Cprogramming.com forums, part of the Community Boards category; I was just wondering, have any of you seen a tic tac toe algorithm that you haven't been able to ...

  1. #1
    Banned
    Join Date
    Mar 2004
    Posts
    37

    tic tac toe

    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?

  2. #2
    Even death may die... Dante Shamest's Avatar
    Join Date
    Apr 2003
    Location
    Malaysia
    Posts
    970
    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.

  3. #3
    Toaster Zach L.'s Avatar
    Join Date
    Aug 2001
    Posts
    2,686
    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.

  4. #4
    Even death may die... Dante Shamest's Avatar
    Join Date
    Apr 2003
    Location
    Malaysia
    Posts
    970
    but I'd assume that is essentially what Dante used for his program.
    Dante actually used something that worked for the general case, not just for centers and corners.

  5. #5
    Registered User axon's Avatar
    Join Date
    Feb 2003
    Posts
    2,572
    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"...

    some entropy with that sink? entropysink.com

    there are two cardinal sins from which all others spring: Impatience and Laziness. - franz kafka

  6. #6
    Toaster Zach L.'s Avatar
    Join Date
    Aug 2001
    Posts
    2,686
    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.
    Last edited by Zach L.; 05-08-2004 at 08:37 PM.

  7. #7
    carry on JaWiB's Avatar
    Join Date
    Feb 2003
    Location
    Seattle, WA
    Posts
    1,972
    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
    "Think not but that I know these things; or think
    I know them not: not therefore am I short
    Of knowing what I ought."
    -John Milton, Paradise Regained (1671)

    "Work hard and it might happen."
    -XSquared

  8. #8
    Administrator webmaster's Avatar
    Join Date
    Aug 2001
    Posts
    973
    Quote Originally Posted by JaWiB
    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.

  9. #9
    carry on JaWiB's Avatar
    Join Date
    Feb 2003
    Location
    Seattle, WA
    Posts
    1,972
    Or maybe it was more like this:
    http://home.earthlink.net/~cmalumphy/3d.html

    4 boards and 4 in a row to win instead...
    "Think not but that I know these things; or think
    I know them not: not therefore am I short
    Of knowing what I ought."
    -John Milton, Paradise Regained (1671)

    "Work hard and it might happen."
    -XSquared

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Help me with my simple Tic tac toe prog
    By maybnxtseasn in forum C Programming
    Replies: 2
    Last Post: 04-04-2009, 06:25 PM
  2. Help with Tic Tac Toe game
    By snef73 in forum C++ Programming
    Replies: 1
    Last Post: 04-25-2003, 08:33 AM
  3. tic tac toe game
    By Leeman_s in forum Game Programming
    Replies: 9
    Last Post: 04-24-2002, 03:24 AM
  4. my tic tac toe game, please try it
    By Leeman_s in forum C++ Programming
    Replies: 2
    Last Post: 04-14-2002, 05:16 PM
  5. Tic Tac Toe Help
    By aresashura in forum C++ Programming
    Replies: 1
    Last Post: 11-21-2001, 11:52 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21