A Java implementation of the classic Reversi (Othello) board game with AI opponent using minimax algorithm.
- Command line interface
- AI opponent with 3 difficulty levels:
- Novice
- Medium
- Expert
- Sophisticated AI evaluation including:
- Corner control
- Mobility analysis
- Frontier discs strategy
- Stable discs counting
- Center control weighting
- Wedge patterns detection
- Move validation and dynamic board updates
- Java 11 or higher
- Maven 3.6 or higher
src/main/java/com/aueb/
├── Board.java # Game board and evaluation logic
├── Move.java # Move representation
├── Player.java # AI player implementation
└── Main.java # Game entry point and UI
mvn clean installmvn exec:java -Dexec.mainClass="com.aueb.Main"- Choose your color (B for Black or W for White)
- Select difficulty level (1-3)
- On your turn:
- View available moves
- Enter the number of your chosen move
- Watch the board update
Game ends when:
- No valid moves remain
- Board is full
- All pieces are one color
The AI uses:
- Minimax algorithm with varying depths based on difficulty
- Complex position evaluation including:
- Corner ownership
- Edge stability
- Disc mobility
- Center control
- Frontier minimization
Naya Fytali, Sara Mourelatou, Sofia Vergi
This project is available under the MIT License.