Othello AI

Othello (a variant of the traditional game Reversi) is a two-player strategy board game played on an 8×8 square field, where each player takes turns placing black or white pieces and capturing the other player’s pieces.

Figure 1. Othello board game.

The Othello AI program is the second board game AI that I have written in junior high school (the first is the Tic-Tac-Toe AI). Just like the programming strategy for the tic-tac-toe AI, I used the logic thinking experiences that I had learned while playing this game, and hard-coded some summarized strategies into this program.

Compared with the tic-tac-toe AI, which has a game-tree complexity of 9! = 362880, Othello is much more complex, yielding a stunning complexity of approximately 1058. This makes the game still mathematically unsolved up to this very day. Therefore, instead of calculating the definite winning strategy, this Othello AI rather tries to find relative advantageous points (e.g. the corners), and moves that will temporarily maximize the number of pieces which it occupies by the coded algorithm, making it a beginner ~ intermediate level AI.

Here is a demonstration of using the Othello AI program:

[Download Othello AI program]

[Source code for the Othello AI program (Visual Basic 6.0 form file)]

Gomoku AI

Although entering a department different from Computer Science (CS), I still had a majority of acquainted people in NTU-CS. One day, a friend of mine who was studying in CS challenged me of making an AI of some board game. The two of us would make AIs of that game and try to win the other one using the AI. Thinking it might be some challenging but interesting subject, I started to make this Gomoku AI.

Figure 1. Game playing demonstration of the Gomoku AI program.

Being a board game with so many possible states (more than the Othello AI I had made when I was in junior high school, which only has a 8×8 grid) , it is considered overly time wasting for the AI to traverse all the possible combinations, even just within 10 moves! Game tree graphs, graph traversal algorithms (e.g. DFS, BFS) and optimal searching algorithms (e.g. Alpha–beta pruning, A*) are usually implemented for decreasing computational time and achieving the best strategy. In this project, I only used the depth-first search (DFS) algorithm, along with some hard coded optimization decisions to create this program. Although being able to place a few initial pieces successfully, the program suffers from a large amount of computational time being spent. Most of the time after a few moves, the program will just run for a few hours (or days) before taking the next move, which is obviously very a serious problem for the AI.

Nevertheless, the environment and rules of the Gomoku game engine was successfully constructed, which allowed two players to play against each other. Nowadays, these board game AI are usually designed using deep neural networks, such as AlphaGomoku, an Alpha-Go-based Gomoku AI. Constructing these AIs would be a possible future work for optimizing this game agent.