Artificial Intelligence: Modeling with Tic-Tac-Toe
CSEF · 2011 Mathematics & Software
Overview
Objectives/Goals 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 didn#t take the advantage to trap its opponent.
Summary statement
I programmed my computer to play Tic-Tac-Toe against a human player.
Help received
Uncle taught me computer programming.
Competition history
- CSEF 2011
Resources
Related projects
CSEF · 2012
Artificial Intelligence: Teaching a Computer to Play Tic-Tac-Toe
CSEF · 2003
Creating a Tic Tac Toe Computer Program
ISEF · 2023
A.I. Tic-Tac-Toe
CSEF · 2011
Unbeatable PONG through Artificial Intelligence
CSEF · 2012
Computer vs. Human: Exploring AI in the Game Blokus
CSEF · 2009
Choice Based on Past Knowledge using Multi-Layered Neural Networks in Tic-Tac-Toe
CSEF · 2010
A. I. Connect-Four
CSEF · 2005
Can a Computer Predict a Human's Decisions?
Closest projects by meaning, across every fair and year in the corpus.
Browse more like this
Source: California Science & Engineering Fair public projects