3D Tic-Tac-Toe
|
Intro
In and around the beginning of March 2005 I started to develop a
3D Tic-Tac-Toe game using C and OpenGL. I wanted to refine my OpenGL
skills and work on some simple "AI" for the game. Please
note that this game only works correctly in 24 or 32 bit colour due
to the back buffer "picking" method
used.
This is a win32 exe of the game 3DTTT.zip.
Just unzip read the README.txt and run the file 3dttt.exe.
I would like to expand the game to a 4 by 4 by 4 board with 4 in
a row wins. This should make the game less trivial.
|

|
Interface
The interface is a 3 by 3 by 3 grid of Cubes which rotates giving
a full view. Picking was done using the backbuffer to render the objects
colour coded and reading the pixel colour under the cursor location.
Alpha blending was used to allow for better viewing of the entire
board.
AI
AI was done using a game tree.
Payoffs where given as follows:
- 1*depthFactor for Win(depthFactor lowers while going deeper into
game tree)
- -1*depthFactor for Win(depthFactor lowers while going deeper into
game tree)
- cut off at maxDepth to limit the amount of time the AI "thinks"
Originaly no limit was set so the entire game tree was processe and
this would have taken hours or days to compute the entire game tree
with the 27! or 10888869450418352160768000000 possible moves.
|