In this Artificial Intelligence assignment we had to implement the game known as Reversi (read about the game by clicking here), a game board for it and an AI that uses the MiniMax algorithm in order to predict the next best possible move and play the game against a human player. The user can choose if they want to go first (in which case they'll play using the black pawns) or second (white pawns). The user can also choose the depth the algorithm searches at, in order to increase the difficulty of the game. More specifically:
- depth = 2 is easy mode
- depth = 4 is medium mode
- depth = 6 is hard mode
Any other depth might cause long waiting times as the AI searches further deep into the tree in order to find the best possible move.
- Create a new folder containing all of the java files.
- Compile and run Main.java
- Enter the desired depth.
- Choose if you want to play first or not.
- Win, if you can...
