This is a modified copy of my main Tic Tac Toe AI. Play against the AI! Enter a number 1-9 to move, going left to right, up to down. You are X. DOES NOT have diagonals. Thanks to @Muffin-Tuffin for finding a bug!
I programmed the AI to defend against double cross. If you do beat it, tell me how! Turn off double cross to get the regular AI. 1163 blocks. The graphics and gameplay are bad, I was focused on the AI. Here's how AI works - 1st - If it can win, go there 2nd - If enemy can win, try to block it 3rd - NEW: Try to prevent enemy from double crossing. 4th - NEW: Try to double cross (It can't) 5th - Go for center 6th - Go for corners 7th - Try to get 2 in a row 8th - Go in a random spot