Aqua Phoenix
     >>  Software >>  3D Tic Tac Toe  
 

Navigator
   
 
       
    3D Tic Tac Toe was developed as a homework for the course Artificial Intelligence (W4701) at the School of Engineering and Applied Science, Columbia University.

Computer plays against user. User starts first game; loser starts every game thereafter.

This version of 3D Tic Tac Toe has been implemented with a general "present state" algorithm. That is to say that the computer will pick moves depending on the present state of the board, without looking ahead more than one step. The reason for this is as follows: For a 2D 3*3 Tic Tac Toe, it may be adventageous to look ahead more than one step, but in 4x4x4 Tic Tac Toe, the board offers a much larger variety on winning moves, so that looking ahead too far may not prove to help at all. However; observing the current state of the board proves to be a good technique on preventing the user from winning.

The techniques used are as follows: All possible winning moves are hard-coded in an array of 304 positions. This implies that there is a total of 76 distinct winning rows for 4x4x4 Tic Tac Toe. Depending on the moves of the user and the computer, rows start filling up. These moves are stored in several arrays that control the board. For every move that the computer undertakes, weights are computed for every square on the board. The weight is assigned in terms of how many pegs have been placed in a way that may win a particular row. If a row carries both red and black pegs, that row will receive the lowest weight, and is no longer considered.

Figure 1.1: 3D Tic Tac Toe Main Window
Click image to enlarge, or click here to open
The Viewport switches between 3 distinct views of the boards: Left, Front, and Right. A view can be changed by clicking on one of the three arrows.

Figure 1.2: Viewport
The computer's move is marked by a blinking black peg.

Figure 1.3: Blinking Peg (newly placed peg)