AI Demo


A simple AI player for the game Reversi. The program offers local matches or against an AI player. This was done as a side project for fun.
My role in this project was implementing the core gameplay system and creating the AI player.
Main Contributions
- Minimax Algorithm for AI logic
- Game Logic + Architecture
Minimax Algorithm
[CODE]
The AI uses minimax algorithm to recursively check all possible board states and picks scores that gives it the best chance of winning
The algorithm also uses alpha beta pruning in order to minimize the amount of board states it evaluates
Game Features
[CODE]
The board is represented internally as an int8_t in order to optimize how much space the board takes up
In order to flip each piece, the game will check every direction to see if a placement is valid
Game supports both local player versus player or AI