I just released version 2.5 of Chess for Android at the Android market. Besides a few minor improvements, this release introduces the ability to play engine-engine matches automatically.
To perform a match:
Long-press, import UCI engine, and select primary engine (or skip this step to play against the built-in Java engine)
Long-press, engine-engine match, and select secondary engine to start the match
This will play 10 games from random openings at the moves-per-second level selected. During the match, current standing is displayed and engine analysis output is shown at the bottom of the window. Afterwards, the full match annotated with engine analysis can be found in the file /data/local/eng/match.pgn (use adb pull /data/local/eng/match.pgn to move the file from the phone to your computer). I recommend keeping the phone connected to the USB cable during a match for power.
thorstenczub wrote:heureka it works.
now we need many different (!) engines. not only stockfish versions
Basically any engine available on Linux can be _trivially_ ported to Android.
If you are lazy: just compile a static binary with your favorite gcc-ARM toolchain (e.g. CodeSourcery).
If you want to do a tiny bit more work: the latest version of the Android NDK can create a gcc-ARM toolchain specifically
tailored for Android. In that way you can create dynamically linked binaries.
Some obvious candidates for porting are Fruit, Toga, Robbolito...
Installing engines in Chess for Android currently seems a bit too difficult for ordinary users (it needs the SDK).
It would be more natural if users could simply copy an engine to a specific directory on the sdcard and CfA would
pick it up from there. This would be similar to the way one copies music to the phone. So people are familiar with that.
Unfortunately the sdcard is mounted noexec so one can not start the engine directly from the sdcard.
But perhaps CfA could have an option "Install an engine" which would copy the engine (once) from the sdcard to internal storage and then run it from there. Of course one then would also need the option "Uninstall an engine".
Michel Van den Bergh wrote:Installing engines in Chess for Android currently seems a bit too difficult for ordinary users (it needs the SDK).
You hit the nail on the head. The current approach is cumbersome, but it seems the only viable way to deal with security issues on a wide variety of phones (simpler ways that worked on one did not work on others). Nevertheless, I am going to ponder over simpler ways to install engines. All suggestions welcome.
AartBik wrote:Nevertheless, I am going to ponder over simpler ways to install engines.
Inspired by Michel's suggestion, I may have found a much easier way to install UCI engines (without having to install the adb utility). If this works on all phones, expect an update soon!
Unfortunately this binary seems to segfault on my phone after a while. I tried both with the Google toolchain and with the CodeSourcery one.
Very weird.