After a long time in development, I am proud to announce: TIC TAC TOE - AI Yep, I have coded an AI to play tic tac toe with me. Read Notes and Credits to see how it works. Tic Tac Toe Game: Tic-tac-toe or Xs and Os is a game for two players who take turns marking the spaces in a three-by-three grid with X or O. The player who succeeds in placing three of their marks horizontally, vertically, or diagonally is the winner. There are 500+ blocks in this game, 38 scripts and 7 sprites. Please report any bugs found. =^_^= =^_^= =^_^= =^_^= =^_^= =^_^= =^_^= =^_^=
I made all the code and art. This programme is actually really simple. I coded it to play as if you are playing with a human. All it does is it uses the minimax algorithm for the next move. Minimax is an algorithm used in artificial intelligence to predict the next move. The Program simply places X(the computer's mark) in every possible box and checks if it wins or loses. If so, it places an X on that spot. If not then it just plays a random move. I played 100 matches with the AI (It took 1hr) and here are the results: I won 18% of the times The computer won 45% of the times There was a tie 37% of the times Note: The results are true, I played the best I could. Any suggestions will be looked into. =^_^= =^_^= =^_^= =^_^= =^_^= =^_^= =^_^= =^_^=