I used my Windows 7 laptop and notepad. I set up the game board with buttons representing the squares. I made a square to contain an X or O whenever it has been clicked and switch between X and O. I made the program alternate turns when someone clicked a square. I created a button that would start a new game when it was clicked. I added the artificial intelligence to the game. Three people each played 10 games against the computer. I recorded who won and lost, or if it was a tie and compared the overall ratios of wins to losses of each person.
I found that my hypothesis was rejected because the human players, overall, played better than the computer. For example, in matches 2 and 3, the ratios of the human players were 2:1 and 1:0, while the computer#s ratios were 1:2 and 0:1.
I concluded that the computer played poorly because of two very important weaknesses: first, it didn#t see a trap that could be used by the human player to win; and, second, it didnt take the advantage to trap its opponent.
This project programmed my computer to play Tic-Tac-Toe against a human player.
Science Fair Project done By Casey L. Schneider