Reversi

Reversi, also known as Othello, is a board game where you try to capture as many tiles on the board as possible.  To capture tiles, you place your pieces on unoccupied squares next to an opponent’s tile such that you have a direct horizontal, vertical, or diagonal path to another of your pieces.  All of your opponents pieces along that line are then captured and become yours.  Check out the Wikipedia page for the complete rules.

Implementation

You can check out the full implementation here – contributions are welcome.  The game and AI are implemented using TypeScript and transpiled to JavaScript for the web.  It is currently built using TypeScript v1.6.  In the AI folder you can check out a couple of example AI’s.  To build your own, extend the BasePlayer class and implement your own MakeMove method.

License

The code is released under the MIT License.