I need a program that runs Tic Tac Toe. It needs to be in Java. And the computer has to use perfect logic, so it never loses, only ties. I've been searching for a program for two days, if you've got one or know of one that you have the source code for, please let me know.
Archived topic from Anythingforums, old topic ID:3532, old post ID:65087
Tic Tac Toe
Tic Tac Toe
"Your neighbor was kind enough to let us rip him off and burn his furniture for no reason."-ATHF
"He said no, Err. With his foot." -ATHF
"Please, stop fueling my silent rage." -ATHF
"He said no, Err. With his foot." -ATHF
"Please, stop fueling my silent rage." -ATHF
Tic Tac Toe
I'm sure with tic tac toe, there are only a certain amount of opening moves that do not result in a loss, therefore it wouldn't be so much 'logic' but a random pattern in a cyclegoalguarder12 wrote: I need a program that runs Tic Tac Toe. It needs to be in Java. And the computer has to use perfect logic, so it never loses, only ties. I've been searching for a program for two days, if you've got one or know of one that you have the source code for, please let me know.
might help you out255,168 unique games of Tic Tac Toe to be played. Of these, 131,184 are won by the first player, 77,904 are won by the second player, and 46,080 are drawn.
http://www.jesperjuul.net/ludologist/?p=55
I have the file here, but no actual tree:
http://www.jesperjuul.net/tictactoe/allgamesoftictactoe.zip
Archived topic from Anythingforums, old topic ID:3532, old post ID:65129
Tic Tac Toe
Before my older brother died in 1975, he had programmed his high school's computer to play tic tac toe. The computer had to make the first move for the computer to always win or tie. At least that was the way my brother programmed it. If the other person makes the first move, then the computer could lose. My brother showed me the opening move, so I never lose if I'm playing and I start the game first.
Archived topic from Anythingforums, old topic ID:3532, old post ID:65180
Archived topic from Anythingforums, old topic ID:3532, old post ID:65180
Visit Harmony forum
- Red Squirrel
- Posts: 29209
- Joined: Wed Dec 18, 2002 12:14 am
- Location: Northern Ontario
- Contact:
Tic Tac Toe
I made a battleship game in C++ a while back. The AI was based on randomization and part probability. Like if you have this:
xax*
*x*x
****
****
(x already tried but no ship, a and * not hit)
Then you know its pointless to try hitting a since the smallest ship takes 2 tiles. If that ship was sunk then it knew the smallest ship is 3 and so on.
Archived topic from Anythingforums, old topic ID:3532, old post ID:65182
xax*
*x*x
****
****
(x already tried but no ship, a and * not hit)
Then you know its pointless to try hitting a since the smallest ship takes 2 tiles. If that ship was sunk then it knew the smallest ship is 3 and so on.
Archived topic from Anythingforums, old topic ID:3532, old post ID:65182
Honk if you love Jesus, text if you want to meet Him!