TIC Instructions

This document is meant as a user's manual for the TIC program. TIC was written as a project by Carl Sable and Dave Evans for our AI Class project, and as such, it is not a commercial quality applet. There are still bugs, mostly apparent when you do strange things with pausing the game, reconfiguring the board, and undoing moves, although for the most part, these features work.

What is TIC?

TIC (whose full name is TIC-TAC-TOE, click the title in the applet for the reason why) is a Checkers game. We have implemented a computer player using a minimax Alpha-Beta search routine and a system to allow carbon-based life-forms to play as well. The main goal of the applet is to provide you with
  1. An understanding of the minimax alpha-beta search strategy and
  2. a good, challenging game of Checkers.

Starting a game

Before starting a game, you should see two main windows. The first, embedding the page of the browser or main applet viewer, is the Checkers board. This board is divided into three sections: An upper title area, a middle Checkers board, and a lower message area. The title area is just a simple space to put a title up on, while the message board has important game messages. The Checkers board can be resized to any size, even 10 inches, and does not have to be square. Sometimes, we might refer to locations on the boards using their row,col coordinates. The top left square is labeled 0,0, and the bottom right is 7,7. The first coordinate is row, while the second is the column.

Game Options

You should also see a new frame that contains a box with the game options on it. The two buttons on the top of the box, "Debug" and "Game Options" flip between the two modalities for this box. It is initially in the "Game Options" mode, which is all that the casual user should be interested in. The Game Options box has the following UI Items:
Red Player choice list.
This list determines the type of player the red player will be. The valid options are currently "Computer" and "Human".
Black Player choice list.
This list determines the type of player the black player will be. The valid options are currently "Computer" and "Human".
Play Game button
The Play Game button will initiate a game of Checkers, using the types of players that have been set in the Red and Black Player choice lists. Once this button has been pressed, do not press it again, unless you have reset the game using the Reset Button.
Reset button
This button will halt the current game, and reset the state of the board to the initial checkers positions. After pressing the Reset button you can choose different types players, and the may once again press the "Play Game" button to start a new game.
Undo Move button
While the game is in progress, you may undo any moves that have been done. Press the undo move button to take back a move that you already did. Once you have pressed this button, game play will not resume until you press the continue button. Please do not do strange things, like change the player types or pressing the Play Game button after you have pressed Undo Move. You should only press Continue after Undo Move. Undo Move is fairly buggy in those situations. Also, Undo Move does not like to always go back to the first move. Use Reset for that.
Continue button
The continue button will resume play after one or multiple moves have been undone. Do not press this button without pressing Undo Move. I don't know what that will do. (Well, I do know what it will do, and it will not be good.)
Get Hint button
You may press the Get Hint button to get a quick hint from the computer. It is not a very great hint, it is only a search to depth 4 of the game tree, but it is a hint. The hint will be printed in the message window as a list of coordinates on the board. The first coordinate (remember: row, column) is the location of the starting point, and the remaining points are additional clicks on the path the piece can take. The squares on the board should also be flashing in some obnoxious color. Take the hints with a grain of salt: as I said, they are not very GOOD hints. (We made the hint routine search only to depth 4 in order to get FAST hints, since humans are often impatient, especially the kind the request hints.)
Offer Draw
If you are playing the computer, on your turn you can elect to offer a draw to the computer. If the computer thinks that is a good idea, it will accept your draw. If not, it will reject your offer. There is no penalty for offering a draw, and in fact, if the draw is accepted, you may continue to play. If you offer a draw, you should wait to hear the computer's response before continuing play. It may take as long as 30 seconds, since the computer wants to be sure that it is a fair offer. You may continue to play, but any messages you see later about the draw will refer only to the state of the board when you clicked the Offer Draw button.

Human Players

When playing as a human, you must select each square that your piece will move on sequentially. We did not implement a drag and drop interface because it really isn't necessary, and we didn't want to have to deal with reconstructing the path of the piece through the board. When it is your turn, click on the piece that you would like to move initially. The background for that piece should turn purple. Please note that if the piece you clicked on can not move, you will see an "Invalid move" message in the message area. Once you have selected your initial piece, you must click on subsequent squares until you have completed the move for that piece. Intermediate squares should flash. If at any time your move is invalid, you will have to start over from the beginning, and the message "Invalid move" will displayed in the message area, shaming you until the line scrolls out of visibility. Once you have completed your move, it will be the other player's turn to move again. If you did not want to do the move you did, refer to the documentation on the "Undo Move" button - it is what you are looking for.

Computer Players

If a computer player has been selected to play the game, an options box for the computer player will appear at the start of the game. You can set the options for that computer player in the options box. There are two text fields, and one list selection field. You select if the computer should use a time limit or a depth limit in the search process using the list selection labeled "Search by". "Time" specifies to search by the number of given in the "Seconds to search" text input field, while "Depth" specifies the depth to search to in the "Depth to search" text field. You may change either of the values in the time or depth fields, and they will be used the next time the computer player does a search on a state. This means that you can change the values throughout the game, and the computer players will always use those values shown in the options box.

There is some minimal error checking done on the time and depth fields. If the text in the field is not an integer, the text will be silently changed to the default integer value for that field when the computer next searches a state. Similarly, if the values are less than the minimum we have chosen, or greater than the maximum, they will be set silently to our choice of minimum and maximum values. The minimum and maximum value ranges are such that you can see the computer play an incredibly stupid strategy, or you can let the computer compute for likely many hours. Feel free to explore, and if you have the source, check out TICConstants.java to give yourself even more freedom to wait longer on the computer.

Debug Options (or Cheating!)

If you click the button labeled "Debug" on the Game Options panel, the options panel will change to the debugging interface. We created this interface to help us test out various routines and whatnot, but have left it in for the obvious use of: Cheating!

Enabling Debug Mode

To enable debug mode, your must change the input mode from "Normal Mode" to "Debug Mode". When in "Normal Mode" (the default), all clicks on squares on the board are sent to any human player agents registered to listen to the board. That means that the debugging agent does not get a chance to hear clicks, and so does nothing. By clicking on the button marked "Normal Mode" you toggle it to "Debug Mode" and now the human agents will not hear clicks on the board while the debugging agent will. This allows you to place additional pieces on the board. (However, if you try to play with more than 12 pieces of a single color, crashes will occur, as we use arrays that assume a max of 12.) In the upper portion of the debugging interface, one of 9 options should be selected. When you click on a square, it's state will be set to reflect whichever option is set. Here is a list of the options:
Red King
Places a red king on the square.
Black King
Places a black king on the square.
Highlighted
Kind of useless. Makes the square yellow, like it already is if the pointer is over it. Which it must be.
Possible Destination
Very useless. Makes the square flash.
Red piece
Places a red piece on the square
Black piece
Places a black piece on the square.
Selected
Makes the background of the square purple. Also, don't do this and start playing again if you are a human: it will think strange things.
Moveable Piece
As useless as Possible Destination. Makes the background flash. Movable is even spelled wrong.
Clear
The most useful. Sets everything (flashing and all) to normal. Deletes pieces from the board too.
The buttons that are available are:
legal moves
Prints a list of the legal moves on the board to System.out
Choose Move
Prints the move that would be chosen by the computer player to System.out. Maybe. We haven't used this one for a while.
Pause
This is useful. If you want to do some cheating, you should click this button to pause the game, so it does not keep playing on you. Then click it again to un-pause it. Please note that Pause is very buggy if you do strange stuff with the game while paused. If you click Pause, it will turn into a button marked Resume. Click it again to resume the game, changing the button back to pause.
Resume
You must have clicked pause. Press it again to resume game play. Note the caveats above with Pause.
Now Red or Now Black
This button lists whose turn it currently is. Press it to change from one players turn to another.
Normal Mode or Debug Mode
See above. This toggles from a user mode and a debugger mode.
This concludes the users manual for TIC. Have fun with it!

Click here to return to main TIC page.


Send comments or suggestions to sable@cs.columbia.edu or devans@cs.columbia.edu.