Science Models
1000sciencefairprojects
Science Fair Projects

Published on Sep 28, 2024

Abstract

The objective:

This science experiment is to determine if a computer can outplay a human player in a game of Tic-Tac-Toe after it has been programed to play. My hypothesis is: if a computer is taught some basic Tic-Tac-Toe algorithms, it will win at a higher rate against a human player. I used this hypothesis because it is assumed that a computer will play better. If it has been programed correctly, then it will always refer back to those algorithms and perform them exactly as they were supposed to be used.

Methods/Materials

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.

Results


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.

Conclusions/Discussion

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