Project:

Othello + Minimax

What is it?

The Japanese game Othello (Reversi) recreated in Java. The player interacts with the console to play against a minimax-powered computer opponent that uses alpha-beta pruning and a unique pointage system to choose the best move every time.

How the algorithm works

Something to clear up, this is an algorithm and not AI. AI needs to learn, and this rather computes. It works off a minimax algorithm in addition to a custom pointage system looking at two aspects of the game: The number of black pieces minus the number of white pieces and who holds important areas. For example, corners are really important and are worth three points in the pointage system each. Other important parts of the board are the 4 center pieces and all the edge pieces. The algorithm also takes advantage of alpha beta pruning to predict what branches of possibility not to analyze, making it more effecient. It is hence able to analyze 8 moves ahead.

Resaults

In the end, the algorithm could effortlssly beat me. It could also beat more simple algorithms that just look at the number of black pieces minus the number of white pieces up to a depth of 11+. It is hence very succesful as it is powerful yet very time effecient.

Stack Used

Java

Pictures