Reversi

In my Artifical Intelligence class, we were asked to create two multiplayer games using the MiniMax algorithm. This algorithm has a computer player choose intelligent moves to play based off the current game state. The games we made weren't very fun and highly unusual, so I decided to implement the classic game of Reversi to test out the algorithm. The game has 3 modes: Easy, Medium, and Hard. Each difficulty is determined by how many moves ahead the computer looks (4, 6, and 8 respectively). The more moves ahead it looks, the longer it takes to pick a move. It was very easy to migrate my solution for school and use it in this project, since I made the algorithm independent of the specific game being played.

It was programmed using the Processing library made for Java.

You are the white player and the computer is the black player. You go first. The game shows you the available moves for you to pick. After your move, press any key on the keyboard for the computer to make its move. This keeps going until there are no more moves left, and the winner is the player with the most pieces. To change the difficulty, hover over the top left corner and select one. A new game will be started.

Your screen resolution is too small to display this program

I have uploaded the source code for your reference. You can download it here.