Skip to main content
Games Othello new

Othello

Classic strategy game against AI — minimax with alpha-beta pruning

Black 2
White 2
Black's turn
Minimax with Alpha-Beta Pruning

The AI evaluates positions using a minimax algorithm — it simulates all possible moves several turns ahead, assuming both players play optimally. Alpha-beta pruning eliminates branches that can’t improve the result, making deeper searches feasible.

Evaluation Function

The board evaluation combines four factors:

  • Corner control — corners can never be flipped, making them the most valuable squares
  • Positional weights — each square has a strategic value (edges good, X-squares near corners dangerous)
  • Mobility — having more available moves means more strategic options
  • Piece parity — disc count matters increasingly towards endgame
Difficulty Levels
  • Easy — random legal move
  • Medium — picks the move with the best immediate evaluation (1-ply)
  • Hard — minimax search 6 moves deep with alpha-beta pruning
  • Expert — iterative deepening up to 8 moves deep, with endgame solving when few squares remain
© 2013 - 2026 Cylian