ShallowBrain: Alpha-Beta Pruning

About ShallowBrain

ShallowBrain is a simple AI for the game of reversi. It was created for an AI reversi tournament at Southern University of Illinois: Edwardsville in 2016. The AI placed Second in the competition 🥈. I found this code on an old harddrive and wanted to frakenstien it back to life. ShallowBrain uses an Algorythim called Alpha-Beta Pruning to find the best move. Shallow Brain 1 is the origninal Ai used in the competition and is slow and bad. Shallow Brain 2 is a new and improved version of the Ai that is faster and better.

What is Alpha-Beta Pruning?

Alpha-beta pruning is a technique used to make game-playing algorithms more efficient. It works by assigning board states a score and playing out multiple games each turn. It creates a search tree out of these games states. It then eliminates branches of the search tree that don't need to be explored, allowing the algorithm to search deeper in less time.

Alpha-Beta Pruning Diagram

Alpha-Beta Pruning Diagram (Source: Wikipedia)

This optimization help game engines like ShallowBrain make (sometimes) better decisions by considering more possible moves without drastically increasing computation time.