Play Reversi Online (requires YoYoGames plugin)
Download Reversi (executable)
| Platform(s): | Windows (GameMaker) |
|---|---|
| Release date: | May 2008 |
| Price: | free |
| Players: | 1-2 |
| Style: | 2d turn-based board game |
| Source code: | Closed (may provide snippets on request) |
This game was created in the space of a few days as a personal project, with some additional artwork kindly provided by Tommy Kraft of Project[N]ReSource. It can be played in 2 player mode, or against the computer at 3 difficulty levels. Novice players tend to find the AI quite challenging, but it's actually really easy to beat when you figure out a decent strategy!
Artificial Intelligence
The AI is implemented using a combination of techniques. It starts with a pre-defined set of 'weights' for each square of the board, each weight being the general desirability of that square under most circumstances. These were determine manually from playing the game myself, and also by consulting strategy guides on the Internet, but it generally marks the four corner squares as extremely desirable, squares adjacent to the corner squares as undesirable, and everything else is given a weight which favours the squares closer to the middle. (It is wise to avoid spreading your counters too far out early on in the game... try this strategy yourself and you'll probably beat the AI easily).
Next, the game looks at every possible move it could make, and identifies which would grant the highest score for the AI, and the lowest score for the human player (essentially a single-depth minimax algorithm). The potential score is then combined with the weights to determine the final desirability of each square. The different difficulty settings handle the information in their own way:
- Easy - picks any legal move at random
- Medium - uses a roulette-wheel selection method of random selection based on desirability (basically, it's more likely to choose stronger moves, but there's a chance it won't)
- Hard - same as medium, but omits the weaker moves from the selection (so there's almost no chance it will pick a weak move unless there is nothing else to do)
![[screenshot of reversi game]](/joomla/images/articles/games/reversi-screenshot-1-tn.jpg)
![[another screenshot of reversi game]](/joomla/images/articles/games/reversi-screenshot-2-tn.jpg)