Chess for Android: UCI engine options

Discussion of anything and everything relating to chess playing software and machines.

Moderators: bob, hgm, Harvey Williamson

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
User avatar
flok
Posts: 198
Joined: Tue Jul 03, 2018 8:19 am
Full name: Folkert van Heusden
Contact:

Re: Chess for Android: UCI engine options

Post by flok » Mon Jun 17, 2019 3:29 pm

Hi Aart,

When a program crashes, is there a logfile of any kind available in chess-for-android? E.g. with uci logging.
www.vanheusden.com: Micah / Embla / PuppetMaster / DeepBrutePos / Pos / Feeks

User avatar
abik
Posts: 740
Joined: Fri Dec 01, 2006 9:46 pm
Location: Mountain View, CA, USA
Full name: Aart Bik
Contact:

Re: Chess for Android: UCI engine options

Post by abik » Mon Jun 17, 2019 5:20 pm

retep1 wrote:
Mon Jun 17, 2019 2:51 pm
I can not load an opening-bin-book. I entered the following path (book-file):
/storage/emulated/0/DroidFish/book/Goi 6.bin
What am I doing wrong?
I need a lot more details than just this :-)

What engine? Does it have the UCI option for a book? What is "cannot load" mean precisely, what error message is given by the engine? Is the path correct? Is there really a space in the full path name? The emulated SD cards are sometimes a bit different. Did you try just /sdcard/.... to see if that works?
Last edited by abik on Mon Jun 17, 2019 5:27 pm, edited 1 time in total.

User avatar
abik
Posts: 740
Joined: Fri Dec 01, 2006 9:46 pm
Location: Mountain View, CA, USA
Full name: Aart Bik
Contact:

Re: Chess for Android: UCI engine options

Post by abik » Mon Jun 17, 2019 5:23 pm

flok wrote:
Mon Jun 17, 2019 3:29 pm
When a program crashes, is there a logfile of any kind available in chess-for-android? E.g. with uci logging.
Yes, if the engine has a log-to-file option, you can simply set that. Make sure to write the log file to a path where you can access it later. The production version of Chess for Android by itself does not generate a UCI log file without engine support, that is only done in the debugging version.

retep1
Posts: 42
Joined: Sun Aug 07, 2016 3:24 pm

Re: Chess for Android: UCI engine options

Post by retep1 » Mon Jun 17, 2019 7:17 pm

abik wrote:
Mon Jun 17, 2019 5:20 pm
retep1 wrote:
Mon Jun 17, 2019 2:51 pm
I can not load an opening-bin-book. I entered the following path (book-file):
/storage/emulated/0/DroidFish/book/Goi 6.bin
What am I doing wrong?
I need a lot more details than just this :-)

What engine? Does it have the UCI option for a book? What is "cannot load" mean precisely, what error message is given by the engine? Is the path correct? Is there really a space in the full path name? The emulated SD cards are sometimes a bit different. Did you try just /sdcard/.... to see if that works?
The engine is Cfish 030619-arm7-pgo. After I have reset the options of the engine and re-entered the path, loading the opening book will work now. Thank you for your patience.

User avatar
abik
Posts: 740
Joined: Fri Dec 01, 2006 9:46 pm
Location: Mountain View, CA, USA
Full name: Aart Bik
Contact:

Re: Chess for Android: UCI engine options

Post by abik » Mon Jun 17, 2019 8:16 pm

retep1 wrote:
Mon Jun 17, 2019 7:17 pm
The engine is Cfish 030619-arm7-pgo. After I have reset the options of the engine and re-entered the path, loading the opening book will work now. Thank you for your patience.
Glad to hear it is working 👍

User avatar
PeterO
Posts: 120
Joined: Sun Jul 31, 2016 4:35 pm

Re: Chess for Android: UCI engine options

Post by PeterO » Tue Jun 18, 2019 9:45 am

Hi Aart,

what are your next ideas for „Chess for Android“?

Peter

User avatar
flok
Posts: 198
Joined: Tue Jul 03, 2018 8:19 am
Full name: Folkert van Heusden
Contact:

Re: Chess for Android: UCI engine options

Post by flok » Wed Jun 19, 2019 9:05 am

abik wrote:
Mon Jun 17, 2019 5:23 pm
flok wrote:
Mon Jun 17, 2019 3:29 pm
When a program crashes, is there a logfile of any kind available in chess-for-android? E.g. with uci logging.
Yes, if the engine has a log-to-file option, you can simply set that. Make sure to write the log file to a path where you can access it later.
I tried writing in the root of the sd-card but that doesn't work apparently?
The production version of Chess for Android by itself does not generate a UCI log file without engine support, that is only done in the debugging version.
Do I need to root my phone to run that version?
Where can I find it? I googled for it but it is nowhere to be found?

Also: sometimes my program crashes. In adb logcat I saw a process faulting because of SIGABRT, probably my chess program.
How can you debug such a thing? Is there a way to connect gdb to it or so?

Last question: am I right that c-f-a automatically switches to an other chess engine when the one you're playing with crashes? That would be a bit confusing while e.g. debugging.
www.vanheusden.com: Micah / Embla / PuppetMaster / DeepBrutePos / Pos / Feeks

User avatar
pedrox
Posts: 992
Joined: Fri Mar 10, 2006 5:07 am
Location: Basque Country (Spain)
Contact:

Re: Chess for Android: UCI engine options

Post by pedrox » Wed Jun 19, 2019 12:15 pm

flok wrote:
Wed Jun 19, 2019 9:05 am
abik wrote:
Mon Jun 17, 2019 5:23 pm
flok wrote:
Mon Jun 17, 2019 3:29 pm
When a program crashes, is there a logfile of any kind available in chess-for-android? E.g. with uci logging.
Yes, if the engine has a log-to-file option, you can simply set that. Make sure to write the log file to a path where you can access it later.
I tried writing in the root of the sd-card but that doesn't work apparently?
The production version of Chess for Android by itself does not generate a UCI log file without engine support, that is only done in the debugging version.
Do I need to root my phone to run that version?
Where can I find it? I googled for it but it is nowhere to be found?

Also: sometimes my program crashes. In adb logcat I saw a process faulting because of SIGABRT, probably my chess program.
How can you debug such a thing? Is there a way to connect gdb to it or so?

Last question: am I right that c-f-a automatically switches to an other chess engine when the one you're playing with crashes? That would be a bit confusing while e.g. debugging.
I had the same problem, look at the thread:

viewtopic.php?f=7&t=70226&p=793712&hili ... id#p793712

User avatar
abik
Posts: 740
Joined: Fri Dec 01, 2006 9:46 pm
Location: Mountain View, CA, USA
Full name: Aart Bik
Contact:

Re: Chess for Android: UCI engine options

Post by abik » Wed Jun 19, 2019 3:59 pm

PeterO wrote:
Tue Jun 18, 2019 9:45 am
Hi Aart,
what are your next ideas for „Chess for Android“?
Peter
Hi Peter,
Many! I have at least 20 items on a TODO list that I collected from user feedback, some small, some larger tasks, some for Chess for Android, others for Reversi or Checkers. Also, at one point, I really would like to go back to my BikJump engine. Not that the world is waiting for yet-another chess engine, but I started the project with a solid foundation, but never got around moving it to a good level. I am also pondering running some Android tournaments again. So, I guess you will see me around :-)
Aart

User avatar
abik
Posts: 740
Joined: Fri Dec 01, 2006 9:46 pm
Location: Mountain View, CA, USA
Full name: Aart Bik
Contact:

Re: Chess for Android: UCI engine options

Post by abik » Wed Jun 19, 2019 4:14 pm

flok wrote:
Wed Jun 19, 2019 9:05 am
Also: sometimes my program crashes. In adb logcat I saw a process faulting because of SIGABRT, probably my chess program. How can you debug such a thing? Is there a way to connect gdb to it or so? Last question: am I right that c-f-a automatically switches to an other chess engine when the one you're playing with crashes? That would be a bit confusing while e.g. debugging.
Note that logging can mean two things in this context. First, the centralized logging built in the Android framework (the one you inspect with adb logcat). Second, an engine specific log file written to "disk". The debugging version of Chess for Android (a version I use internally only for verification and debugging) uses the former heavily. The production version allows engines to use the latter (make sure to set enable the "Storage" permissions though, since the engine process will inherit from the GUI).

As for engine crashes, I am still thinking of a good way to relay the crash information back to the GUI (so far, a harder problem than I initially thought). I am happy to have a look if you are willing to share the binary and want to make progress. Other options are simply running the binary from the command line on the device (or on a similar Linux ARM device, such as the RaspberryPi).

Lastly, yes, on any engine crash, the GUI falls back to the built-in engine for safety (as indicated by the lack of engine output at the bottom window).

Post Reply