Saturday, March 19, 2016

New Buttons for Chess for Android

Not everyone was happy with the "swipe-up" to open the options menus (for devices that lack a menu button, or that broke the legacy options menu altogether), so I decided to simply implement an on-screen button instead. I also improved the graphics in the on-screen buttons for navigation, something that as long overdue.

The result is shown below. The right-most button with the horizontal lines opens the new-style options menu. As before, the other buttons are used for navigating the game, see the manual for details. On devices that still support a physical or virtual menu button (vertical dots in the screen-shot below), that button opens the legacy options menu.

Expect a similar update for Reversi and Checkers for Android soon too.


Friday, March 18, 2016

Chess-playing Robotic Arm

A while back I got an email from Isaiah James D. Puzon, a computer engineering student at the Philippines FEU Institute of Technology, with a minor request for a new feature in Chess for Android that would help with his thesis project: a chess-playing robotic arm. It was very rewarding to receive pictures from his exciting working prototype a few months later. You did a great job building this robot arm, Isaiah. Congrats with your graduation and good luck with your further career!




Friday, March 11, 2016

Opening Books in Chess for Android

I got several questions on how to use the opening book features in Chess for Android, so I hope this blog posting will be useful.

By default, the GUI uses a built-in opening book before it consults any chess engine, either the built-in Java engine, or an imported third-party chess engine. This small built-in opening book (consisting of few opening lines I studied a long time ago as a young member of a chess club, by the way) provides some variety of play, but otherwise is probably not sufficient for the more serious chess player. Therefore, before using an engine's own opening book, one has to disable the GUI opening book, by disabling the "Use Book" choice in the options menu, as shown below (touch to remove the check mark).


It may seem a bit counter-intuitive to disable the "Use Book" feature in order to use an engine's opening book, but without doing this, the GUI will first consult the built-in opening book before consulting the engine, so the engine will only start to consult its own opening book once the GUI runs out of its own. Just think of this feature as "Use GUI Book".

With this being done, there are two ways to enable an engine's book. First, let's assume you have installed an opening book someplace on the SD card, say in /sdcard/book/komodo.bin on the phone. Then, when setting the options of an UCI engine during the first import (clear the engine options first if you imported it earlier), fill out the opening books path accordingly, as shown below. UCI engines that don't support this opening book feature will have this part grayed out.


That's it! After this, the engine (Komodo in this case) will use its own opening book (don't remove the opening book from the SD card though, it is not copied to internal memory).

Alternatively, if an engine does not support this feature, but it does try to read an opening books from the current directory in which the engine is started, the following trick may work. Simply install the opening book as if it were an engine, see below. Note that this only works if the engine expects an opening book with that name in the current directory or if one can somehow define this information through an initialization file (viz.an engine.ini file, which can be copied to the same directory using the trick described above).


Happy opening booking! Please let me know if you have any more questions.