
Hi,
my first game using libgdx is now ( finally ) released, you can find it here :
https://play.google.com/store/apps/details?id=com.mangecailloux.reversiReviews and comments are more than welcome

I wont advertise the game here, as it is already done on the Play Store page, but i will talk about it more in a developper perspective.
Why a Reversi ?I always want to add features and stuff when i develop something, I have another game in développement with a more original concept, but while designing it I realized that it would take me for ever to finish it.
So for my first game on android I decided to make a game already known, so I won't be temped to add to much stuff in it.
Plus it would good to have a code base for future games.
Yeah, but there are already billions or reversi on the market.Right, so I needed an edge. I've downloaded the three or four most downloaded reversi on the market and played with it a while.
Even tough the AI is often pretty good, the graphisms tend to be between ok and horrible : first "breakthrough" :
But it's not enough.
Earlier this year I've played a board game called Roll It ( at least in France ), which is basically a reversi with balls instead of discs, and you can play with 4 players.
Bingo ! I had enough to keep going.
Why would my game be different ?
Good and polished graphics.2 to 4 playersYeah, but you need a robust AI now.Right again, although I've played at Reversi several times i'm not a good player, so I had no idea how to implement an AI.
After some research on Internet here is the way I've done it :
I basically assign a weight to each possible board I come accross.
That weight depends on 4 factors :
- Basic weight : each case has it's own weight, so I just add all my cases weights, and substract the opponents ones.
- Safe discs : discs that cannot be flipped are considered safe, usually safe discs radiate from a corner.
- frontier discs : I maximize the frontier discs ( adjacent to an empty case ) of the opponents, and minimize my own
- mobility : I minimize the number of legal move the opponents can make, while maximizing mines.
after that I create a tree with all possible moves, using a min-max algorithm, that will give me the move that has the smallest chance of losing.
To reduce the number of move searched I added an alpha-beta pruning to remove in advance some moves I know will be bad. It was really cool to see the results.
With a depth of 6 moves, I reduced from 3 millions calculated moves to 100 thousands during the middle of the game.
I then made 5 levels of AI by playing with two things :
- the depth of the search
- the weight associated to the four factors aforementioned.
I don't know how my AI will keep it toghether against a real reversi player, but with the latest difficulty settings I get the general feeling I have while playing the other reversi games. ( and I loose badly

).
While browsing Reversi websites, I also came across the less-known "Reverse" rules, which consist of having the less discs at the end of the game.
I just had to invert some of the weight and I had a very decent AI, so it made a nice addition to the game.
And why that theme ? and that ridiculous name ?After deciding I would have 4 players, I needed a four-way theme, like seasons, elements, cardinal points, etc.
Beeing a huge manga reader I though of the four beasts we see on a regularly basis in that culture, plus it combined all the previous researched themes. It was perfect.
I wanted a design that would talk to japan friendly people as well to everybody that would look at the discs and say : "whoa, that looks awesome", so I asked for a more modern, minimalist, clean style, with just a hint of asian culture, same for the music.
And i feel that my artist and sound designer got that very well.
For the name, I didn't want to have reversi in it, but I was afraid a reversi game without reversi in the title would loose a massive amount of visibility.
So I searched for how the beasts were called in Japan and took the simplest name : Shijin.
If anyone here speak japanese, I apologize if the term is wrong

.
If you have any questions or remarks, please don't hesitate to ask.
MangeCailloux.