2017 Grid Games - Brandon

’s turn.
Criss-cross
Stacked-up
In-a-row
Tic-tac-toe
Toe-tac-tic
Tic-tac-tro
Tro-tac-tic
Tic-tac-T
:
2
:
0 DRAW : 967
T double bingo wins.
(X)
vs.
(O)
TEMPO

6000
A lot of computer scientists have worked on tic-tac-toe.
... When you make bad moves it gets very exciting.
... It was a good learning experience for me,
writing my tic-tac-toe program.
—Donald Ervin Knuth in “Writing a tic-tac-toe program

Exercises

  1. Make this program set the tally values equal to zero when the Reset button is pressed.
  2. What is Death Bingo?
  3. Why do you think a tie in tic-tac-toe is sometimes called a “Cat's Game”?
  4. What is the historical significance of the word BINGO in this context?
  5. Implement Stacked-up, Criss-cross, Toe-tac-tic, Tic-tac-tro, and Tro-tac-tic. Create a unique symbol and color scheme for each game.
  6. This program can play against itself. It can also play against other compatible programs but not as quickly. What slows it down?
  7. This program isn't very smart. It usually (but not always) just guesses what move to play next.
    1. How could you make the program play tic-tac-toe like an expert?
    2. How could you make the program learn how to play a game.
    3. Improve the program so that it can play tic-tac-toe like an expert.
    4. Improve the program so that it can play any game like an expert.
    5. Improve the program so that it can learn how to play any game well.
  8. Tic-tac-T is a game designed for guessers. To win, a player’s last move must be the middle cell of the top row resulting in two simultaneous bingos; otherwise, the players tie.
    1. Why is tic-tac-T not a good game for non-guessers?
    2. Assuming any available move is equally likely to be a guesser’s next move:
      1. Which player is more likely to win—the guesser that guesses first or second?
      2. What is the probability that a guesser will win? Use math to prove your answer.
    3. Use this program to simulate two guessers playing tic-tac-T. Simulate playing about 100, 1000, and 10,000 games at least once. Describe the simulations you performed. On average, how many times did a player win after about 100, 1000, and 10,000 games were played?
    4. Is the program provided a good simulation of two guessers playing tic-tac-T? Why or why not?