Welcome to Othello, a strategy game in Java developed with JavaFX. This project includes multiple game modes, a modern graphical interface, as well as an artificial intelligence capable of playing with different strategies: Minimax, Minimax with alpha-beta pruning, and Monte Carlo.
- Java 17 or higher
- JavaFX SDK 23.0.2 (or compatible version)
- IDE (such as IntelliJ IDEA or VSCode) or command line
Important: The path to JavaFX is specific to each machine. Adapt the --module-path in the commands below.
The easiest way to run the game is to download the pre-built Othello.jar from the GitHub Releases page.
Once downloaded, run the following command:
java --module-path /path/to/javafx-sdk-23.0.2/lib --add-modules javafx.controls,javafx.fxml -jar Othello.jarReplace /path/to/javafx-sdk-23.0.2/lib with the actual path to your JavaFX SDK lib folder.
-
Download JavaFX and extract it on your machine.
-
In IntelliJ:
- Go to File > Project Structure > Libraries.
- Click on the + button > Java.
- Select the
libfolder of the downloaded JavaFX SDK (e.g./path/to/javafx-sdk-23.0.2/lib)
-
Then, go to Run > Edit Configurations, and in VM options, add:
--module-path /path/to/javafx-sdk-23.0.2/lib --add-modules javafx.controls,javafx.fxml -
Launch the MainIG.java class
When you launch the program, you will have 3 options:
| Option | Description |
|---|---|
| Human vs Human | Two human players compete locally. |
| Human vs AI | Choose the AI strategy (Minimax, Pruning, Monte Carlo) and its parameter. |
| AI vs AI | Choose the strategies of both AIs for an automated simulation. |
- Each player places a piece (black or white) on the board.
- A valid move must flank one or more opponent pieces in a straight line (horizontal, vertical, or diagonal).
- The captured opponent pieces are flipped.
- The player with the most pieces at the end wins.
- The game is played on an 8x8 board.
- Players take turns, the black player always starts.
- A move is valid if it allows flanking one or more opponent pieces between the placed piece and another piece of the same color.
- The flanked pieces are flipped to the active player's color.
- If a player cannot make any valid move, they pass their turn.
- If neither player can play, the game is over.
- The player with the most pieces of their color on the board wins the game.
| Strategy | Description |
|---|---|
| Minimax | Seeks to maximize its gain at a given depth. |
| Minimax Pruning | Variant of Minimax with alpha-beta optimization. |
| Monte Carlo | Simulates many random games to evaluate a move. |
- DELLOUFI Ayoub
- TECCHIO Alban



