Back to projects

Other · Software

Othello (Reversi)

Java implementation of Othello with a minimax computer opponent and full game-state review backed by a doubly linked list.

Status
August 2022 · Personal Project
Stack
Java · Eclipse IDE · Object-oriented programming · Data structures & algorithms

Overview

A Java implementation of my favorite board game, Othello (also known as Reversi), built to practice object-oriented design, data structures, and game-AI algorithms. Built in 2022, this is a pre-LLM project: every line was written and debugged by hand, before AI coding assistants existed.

What I did

Approach and key decisions

Minimax for the opponent. Othello has a manageable branching factor and a clear board-score heuristic, which makes it a natural fit for minimax, the computer evaluates the tree of possible future board states and picks the move that maximizes its position assuming optimal play from the opponent.

A doubly linked list for review. Letting players scrub backward and forward through the match is cleanly modeled by a doubly linked list of game states: each node holds a full board, and stepping is just following prev/next pointers, a good example of choosing the data structure to fit the interaction.

Figures

Othello game board mid-play, with black and white discs on the green grid and Quit / Main Menu / Undo Move / Forfeit controls. Gameplay, player-vs-player or vs. the minimax AI.

Othello board at the end of a game. Game over.

Reviewing a finished game by stepping through stored states. Review mode, step through every move via the stored game states.