Showing posts from 2018

Chess for Android 10 Year Anniversary!

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…

Chess for Andoid: version 5.9

I am enthusiastic to announce that I am rolling out version 5.9 of Chess for Android on Google Play. New features include:
Configurable tags for PGN export (player, ELO, event)Ability to offer draw or resign (click king twice to enter menu)Support for Certabo electronic chessboards The application now supports connecting to any of the DGT, Millennium, and Certabo chessboards (let me know if there are others). I have a second instructional video on this topic on YouTube. As usual, looking forward to your constructive feedback!

Chess for Android: Certabo Support

Besides the Millennium and DGT, Chess for Android now also supports the Certabo electronic chessboards. I hope to roll out a next update soon, after more rigorous testing.

Unlike the other boards, the Certabo board does not necessarily come with chess pieces. Instead, a set of 34 identifying chips is provided, which can be attached to the bottom of pieces in any chess set (which means that, unlike the other board, the GUI must first match newly attached chips with the right pieces).
Since I did not have a spare set, I asked my brother-in-law, Gerard Harbers, who just bought a fancy new 3D printer, to print a full chess set for me. He enthusiastically got to work!

The pieces have some spare room at the bottom, perfect for placing the identifying chips.

Checkers and Reversi for Android

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).

Checkers for Android: Full Game Navigation

Folks that know me probably saw this coming, but Checkers for Android now also has a notation window and full game navigation, just like Chess for Android and, recently, Reversi for Android. All three games have the same look-and-feel again!
Unlike the algebraic notation in chess or reversi, checkers uses a numbered notation, explained in detail in The Checker Maven (note that, for simplicity of display, my checkers app always just shows the "from" and "to" square for each move or capture, even though technically intermediate squares are sometimes needed to disambiguate multiple jumps). At first glance the numbering may seem a bit confusing, but the notation becomes easier with practice.

Reversi for Android: Full Game Navigation

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.

Chess for Android Coding

Around the holidays I am finally getting some spare time to implement new features for Chess for Android. I am actively "in the zone" working on:

The ability to offer a draw or resign during an ongoing game. Since the UCI protocol does not provide this feature, the GUI will accept the draw simply based on past evaluations of the position.The ability to change the users name and ELO rating, which will appear in the header for all user games that are saved in PGN format to the SD card.The ability to connect to FICS, the free internet service. This is of course the most work and currently still in prototype stage. The first release will probably start simple by just allowing to watch demo games.

Tensorflow: first book (continued)

Before moving to the next book, first a posting on an example given in the Tensorflow book by Ramsundar and Zadeh.
The chapter on convolutional neural networks discusses training a tensorflow architecture to recognize handwritten digits taken from the MNIST dataset. The given Python code automatically downloads the dataset from the Web and partitions the labeled data into a train, validation, and test set (as explained in the book, used to train the network, validate the performance of the model, and test the final model, respectively).
The ultimate objective of the algorithm is, given the tensor with handwritten digits shown below to the left, finding the tensor with labels shown below to the right. 
[7 2 1 0 4 1 4 9
 5 9 0 6 9 0 1 5
 9 7 3 4 9 6 6 5
 4 0 7 4 0 1 3 1
 3 4 7 2 7 1 2 1
 1 7 4 2 3 5 1 2
 4 4 6 3 5 5 6 0
 4 1 9 5 7 8 9 3]

Clearly a fun example, since recognizing digits is an intuitive, but non-straightforward problem. I highly recommend running and modifying the code to become …

TensorFlow: first book

Some first impressions after finishing the book "TensorFlow for Deep Learning - From Linear Regression to Reinforcement Learning" (by Ramsundar and Zadeh). 
The book introduces the concept of tensors, primitives and architectures for deep learning, and the basics of regression, various neural networks, hyperparameter optimization, and reinforcement learning. The art work in the figures is beautiful (something that convinced me to buy the book). The tensorflow code examples can be downloaded from the book's website, making it easy to follow along with the discussion the book.
The book falls a bit short on detailed explanation, however. I found that many times when the discussion in the book was about to get interesting, it referred to other work for details instead. Several architectures were merely "explained" with a figure, no accompanying details in the text.
In addition, although I realize how hard it is to avoid errors in a book, the given linear regressio…

TensorFlow for Deep Learning

As a CS student, a long time ago in a country far away, I was very interested in AI (Artificial Intelligence), and not just for chess playing programs. In fact, if it weren't for my professor convincing me to continue with compilers and high-performance computing, I may have ended up specializing in the field of AI. Perhaps lucky for me, since AI has gone through many rounds of boom-and-bust.
Nowadays, however, machine learning in general, and deep learning in particular really seem to have taken AI in a very promising new direction. Since I feel machine learning will become an important, if not mandatory skill for computer scientists, I decided to buy a few books on TensorFlow and familiarize myself with the new paradigm.
For starters, I bought the three O'Reilly books below (other recommendations are welcome) and plan to do a few follow-up posts on this topic.

Connecting with the DGT Board

After all the fun I had connecting Chess for Android with the Millennium over Bluetooth, I was curious if I could provide similar support for the DGT electronic chess boards. Some of these have Bluetooth capabilities, most use USB connections, and some older models, like the one I have, still use the RS-232 connector.

To my pleasant surprise, by combining the original serial cable of DGT with a USB-to-serial cable and a female-USB-to-USB-C cable, I was able to get an actually working connection between my DGT board and my tablet or phone.

Next was implementing support in Chess for Android. Luckily, DGT kindly shared the protocol documentation with me, and after a fun weekend of hacking, Chess for Android now proudly supports DGT electronic chess boards as well.

Lots of New Features for Chess for Android.

Recently I have been very active adding new features to Chess for Android again. I have added support to connect to the Millennium ChessGenuis Exclusive electronic chessboard, added a new piece set (thanks Bryan Whitby), added various engine related features requested by users, and switched to the much better model where users can enable (and thus disable) permissions just for the features they like.
Now, I also added optional piece animation and algebraic notation on the board. Hopefully this makes watching ongoing tournaments more smooth, as illustrated below for a match between Komodo and DiscoCheck. Keep an eye on Google Play for updates!

Android Phone Screens under a Microscope

Did you ever wonder what an Android phone screen looks like under a microscope? So did I. So at the start of this weekend, I got the microscope out and took some photos, collected in one picture below. The results are amazing. What looks white to the naked eye, is really a large field of RGB (red-green-blue) elements under magnification. All colors are, of course, obtained by adjusting the brightness of each RGB element appropriately, as illustrated in this picture too.