Skip to content

Uses a minimax module to calculate the value for a given board position and move accordingly.

Notifications You must be signed in to change notification settings

allenwest24/Othello-AI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

Othello-AI

This AI contains a minimax module for the board game Othello, also known as Reversi. The main module calculates the value for a given board position.

The rules of Othello are as follows:

  • The two player colors are white and black. The white player goes first.
  • You capture an opponent’s pieces when they lie in a straight line between a piece you already had on the board and a piece you just played. (A straight line is left-right, up-down, or a 45 degree diagonal.)
  • You can only play a piece that would capture at least one piece. If you have no legal moves, the turn is passed.
  • The game is over when neither player has any legal moves left. Whoever controls the most pieces on the board at that point wins.

Something that is slightly unusual about Othello for minimax is the fact that a turn might be skipped if a player has no legal plays. The minimax calculations take this into account.

The AI is always presumed to be white for this implementation; if you try the demo mode, you as the human will be playing black.

About

Uses a minimax module to calculate the value for a given board position and move accordingly.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published