This project is from Claflin University's CSCI 404 - Machine Intelligence taught by Dr. Karina Liles. I stumbled on the question and thought it would be a fun project to work on. I'm working with C# because I just picked up the langauge and I'm trying to get my feet wet.
Write a program that creates a tic tac toe game with two players. Each round the game prints the board using _
for an empty space, X
for Player 1, and O
for Player 2. The game should ask Player 1 to enter two integers to represent the coordinates to place X
. The computer will be player O and will automatically play after Player 1.
Develop an intelligent agent that will beat Player 1.
Note: Use a multi-dimensional array to store the game board.
Sample board after round 1:
After each round, your game must:
- Print the board
- Check for a winner
A player wins if they have 3 in a row (vertically, horizonatally, or diagonally).
You will be graded on your agent's ability to win the game.
0 points | 1 point | 2 points | 3 points | 4 points | |
---|---|---|---|---|---|
Intelligent Agent | 0 wins | 1 win | 2 wins | 3 wins | 4 wins |