Back

Tic Tac Toe

This is a simple tic-tac-toe program. The reset button will reset the board but not the score, and the diffuculty settings are toggle buttons which can be pressed to change the difficulty of the A.I. The single player and two-player buttons are also toggleable to allow the user to play against another person or an A.I. The A.I is a simple set of logic gates which first try to win, then block, then use a strategy I found on wiki how to avoid losing every time. On the A.I's turn the hard difficulty will do what the algorithm determines is the "best" move every time (though it is still possible to beat). The medium and easy difficulty simply have a lower probability of using the determined "best" move.

Here is a download link for the .JAR file.
Here is a download link for the project file, including the source code