Posts

Showing posts with the label reversi

Chess for Android 10 Year Anniversary!

Image
I can't believe it, but Chess for Android just passed its ten year anniversary! In November 2008, it appears for the first time on the -then-called- Android Market, together with Reversi for Android. Checkers for Android was soon to follow. The Android Market was later renamed Google Play.
Working on this GUI has been a lot of fun, even though it took all spare time away from further developing my chess engine BikJump. But pioneering support for third party engines (at a time nobody was compiling for ARM), both UCI and XBoard, accessing endgame tablebases on SD card, adding PGN and setup features,simplifying engine setup through Chessbase compatible format and the Android Open Exchange format, using OCR apps to read chess positions, translating text to other languages, maintaining an online manual, and recently adding support for Certabo, DGT, and Millennium electronic chessboards has been just as rewarding. I have compiled many engines for Android back in the days, ran full tour…

Checkers and Reversi for Android

Image
New releases for both Checkers and Reversi for Android. Both games made some improvements in the notation display, most obvious the use of parenthesis for the alternating moves (suggested by Rein Halbersma), a better column layout, and improved "scrolling" while navigating.
Also, both games now support exporting the game to the clipboard or via sharing with another program. For checkers, the PDN (portable draughts notation) is used, for reversi something similar to PGN (portable game notation). For checkers this also required "disambiguating" captures using an intermediate square (which should cover most normal games).


Reversi for Android: Full Game Navigation

Image
It has been a while since I added major features to Reversi for Android, but I recently added something I had been planning for a long time: a notation window and full game navigation, similar to Chess for Android. The result is shown below. No more artificial restrictions on the undo, one can simply go back and forth in the full game, and try different strategies to learn from one's mistakes!
An interesting factoid is that Reversi uses a slightly different board orientation for the algebraic notation: the a1 square is in the upper left corner with the h8 square in the bottom right corner. This goes a bit against my chess intuition, but obviously I had to follow the Reversi convention.

Direct Downloads

Because not all Android devices support the Android Market yet, I decided to made my Android applications available as direct downloads:
Chess for AndroidCheckers for AndroidReversi for AndroidAfter the download completes, simply click the apk to start the install (make sure to check "unknown sources" under settings=>applications).

Board Gradient

Image
Although I like the wooden board textures that I use for chess and checkers, I was never quite happy with the board texture I used for Reversi for Android (some called it a dirty pool table :-). Therefore, I am trying something new in version 2.3. Instead of using a texture, I use a radial gradient on the board, which gives the impression that the board has been placed under a lamp.


This new approach also slightly reduces the size of the binary. Let me know what you think.

More Board Textures

Image
Now that I am enthusiastic about textures, I also added a board texture to the other games. For Reversi for Android this hopefully also addresses complaints that the board was "too green".


For Checkers for Android, I simply reused the coffee table texture, as shown below.

Explanation of Levels

Image
Since I just got some questions on the different levels in my Android games, I hope the following posting on this topic is helpful.

To change the level in either Chess, Checkers, or Reversi for Android, first press the Menu button on your phone, then pick the Level option, which gives you something that looks like the following screenshot.



Then select any of these levels. Here, Free Play means that the game engine will never compute a reply. Instead, the phone can be used as a "magnetic board" to study games or play a game up to a position for further play with the engine. In Random, the engine will instantaneously pick a valid next move at random. Pick this level if you like to win! The next Level 1 through Level 5 select different normal playing levels, increasing in both strength as well as time taken by the engine to compute its next move.

Finally, Chess for Android also has an Auto Play option where the engine plays against itself. After selecting this level, either make a…

More Updates

Image
I just released new versions of Checkers and Reversi for Android that improve the text size on larger screens. The reversi application now also uses a randomized opening for variety of play (see below).

New Game and Undo

I just posted version 2.1.1 of Chess, Checkers, and Reversi for Android at the Android Market that allows starting a new game or undoing the last played human move while the computer is thinking. In the older versions, this could only happen during the human player's turn. The latest releases remove that unnecessary restriction.

As before, keep in mind that each undo takes back only one half-move (ply). This means that each undo effectively switches the side-to-move. Either use "Switch Side" or make your move on the board to start the engine again.

Android Updates

Image
I just posted v2.0 of Chess, Checkers, and Reversi for Android at the Android Market with the following improvements:

=> Small, normal, and large screen size support.
=> Full screen board layout.
=> On screen buttons moved to menu.
=> Unified trackball cursor.
=> More levels of strength.

In addition, chess has been improved with:

=> Choice of two chess piece sets.
=> Rotating board.



Are You Really Sure?

Image
Several users requested a confirmation dialog when starting a new game in Chess for Android to avoid resetting a game in progress by accidentally hitting the new game button. Therefore, I just posted v1.5.5 at the Android Market that adds this feature, illustrated below.


Although not directly requested, I have added this feature to both Checkers and Reversi for Android as well.

Reversi for Android Update

I made minor improvements to the reversi move generator and evaluation function in version 1.5.5, hopefully resulting in stronger play. Unfortunately, in my excitement I forgot to add a new internal state to the save/restore functionality, which could introduce wrong play if a game was exited and later resumed. This has been fixed in version 1.6 of Reversi for Android. Many thanks to Patrick Barnes for reporting the bug (with a screen shot as illustration!).

Android Updates: Save on Exit

Image
I just posted version 1.5 of Chess, Checkers, and Reversi for Android at the Android Market, all with the much requested "save on exit" feature. If a user exits a game in progress, the game is automatically saved and later restored when the application is restarted. Even if the interrupt happened while the engine was thinking about its move, the game will restart in that state (albeit taking the full allocated time again). Apologies to all users who have been requesting this feature for a while, I just needed to find some time for it.

Perft for Reversi

As can be seen in previous postings, the perft method is useful to verify the correctness of a move generator. The method traverses the game tree up to various, increasing depths to count all leaf nodes. The results are compared with pre-computed values to isolate bugs. Although the method originated in the chess programming community, the same debugging principle can be used for any board game with deterministic rules. So far, I have used perft to verify the move generation of Chess for Android and, thanks to Martin Fierz, also for Checkers for Android. I was unable to find pre-computed perft numbers for reversi, however.

Therefore, here is what is probably the debut of perft for reversi from the initial position, hopefully useful data for aspirant reversi programmers (at depths 9 and up, "passing" moves start to occur; at depths 11 and up, higher leaf nodes in which neither player can move start to occur).

DEPTH #LEAF NODES
========================
1 …

Reversi for Android Update

Image
Version 1.3 of Reversi for Android at the Android Market adds an "undo" feature of the last move (to correct a mistake) and an option to disable the "ghost stones" for all valid moves (for users that prefer to see the board as in real-life).

Trackball Support

Image
I just posted version 1.2.1 of Chess, Checkers, and Reversi for Android at the Android Market with trackball support. A small circle denotes the trackball cursor, as illustrated in the screen shot below. Hopefully this will make the input easier. Many thanks to Chris Bueno for quickly testing the applications shortly after posting!

Reversi for Android Update

Image
Version 1.2 of Reversi for Android at the Android Market now highlights the new and flipped white stones after each computer move with a red border, as shown below. Hopefully this will make it more clear what was played last.

Chess and Reversi for Android

Image
If you have a G1 Android phone, you can try out two games that I developed. They are available for free at the Android Market.

Chess for Android is a simple standalone chess application, consisting of a chess engine (derived from BikJump) together with a GUI (thanks to Joseph Wain for designing the chess graphics). The application accepts moves through the keyboard or touch screen. Once a source square has been determined, all valid destination squares are shown in green. The engine plays at various levels (including random or against itself).


Reversi for Android supports keyboard and touchscreen input, and displays all valid moves through labeled "ghost" stones. This engine also plays at various levels (including random).