12

TicTacToe

Doctorn
When programmers first tried to make computer programs that would play games Tic-Tac-Toe was high on their lists about games they wanted to tackle. The game even played a prominent role in the movie "War Games" where a hacker student got into a government computer and started playing war games on their computer. His hacking eventually led to the computer starting to play a war game for real and only later by tricking the computer into playing TicTacToe did the computer "learn" that it had no real "winner" that like "Thermonuclear War" we all lose in such a devastating game. The graphic shows how I might construct a TicTacToe board out of a hard cardboard or a piece of wood.

I like to use business or regular envelopes when I can as holders. You only need to cut off the flap section of the envelope and glue the envelope to the board. You would then make a set of index cards with "0"s and "X"s to go into the envelopes. This method of playing the game provides you with a more permanent way to play the game. You might want to have a large envelope glued to the back of the board to hold the index cards for storage.

The tictactoe blank graphic is an example of how this could also be a paper and pencil game, but in this case you could write each player's name at the top and could write their name in the box below the X or O. You might want to have them put a little superscript number to indicate the turn number so they could make an analysis of their play later.

I wrote most of a program to actually play this game in QBASIC (Quick BASIC) at one time. and also tried to do this in a presentation program. I got about 3/4 of the way through the process and although I found that I could do it by that point I was doing other project and never finished. The act of writing the program however taught me a lot of programming techniques and gave me a chance to think through the process of playing the game. I found it interesting that once a couple of moves were made a rotation of the matrix would make the matrix the same as previous attempts. In other words there were ways to simplify the programming process because of the way the matrix could be rotated.

Much later in my life I wrote a program that simulated a Jeopardy (TM) game and it was because of my earlier work with TicTacToe that I was pretty confident that I could accomplish the task. I used a slide show type of presentation using a 3 x 3 grid of questions and a ton of hyperlinks to other slides in the program. It was complicated, but it worked. The editing to make new questions remains a bit of a challenge however. The board design shown here can be modified into a whole range of other games.

Published by Doctorn

A science, computer, and guitar nerd with over 30 years in the field of education with experience teaching at the elementary through college levels.  View profile

To comment, please sign in to your Yahoo! account, or sign up for a new account.