3D Tic Tac Toe
Artificial Intelligence, is definitely one of my interests. Sure, it will take over the world one day, but it’s so much fun to play with.
My introduction to artificial intelligence was at university with a course on Data Structures and Algorithms. Our project was to write a 3d tic-tac-toe game playing program—ok, that seems kind of difficult—but there was a twist, have the computer act as the oponent—oi, wow!. The utterly perplexing part of having the computer act as the oponent was what got me hooked.
You can find my C implementation of the algorithm TicTacTocToeEngine on GitHub. The code is made to compile on any unix based system with a modern C++/C compiler.
The algorithm uses a board evaluation function and a simple search algorithm to find the “best” move. This type of algorithm is a primer for computer opponents in strategy games like checkers, chess and many others.
Example Usage:
Here is an example of the type of application that might use an algorithm like this one.
iTicTacTocToe an iOS App

Surprise! iTicTacTocToe uses code from the previously mentioned GitHub repository as the engine at the heart of it’s BRAIN!