Chess for Android: UCI engine options

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

Moderators: hgm, Rebel, chrisw

User avatar
flok
Posts: 481
Joined: Tue Jul 03, 2018 10:19 am
Full name: Folkert van Heusden

Re: Chess for Android: UCI engine options

Post by flok »

Hi Aart,

When a program crashes, is there a logfile of any kind available in chess-for-android? E.g. with uci logging.
User avatar
abik
Posts: 819
Joined: Fri Dec 01, 2006 10:46 pm
Location: Mountain View, CA, USA
Full name: Aart Bik

Re: Chess for Android: UCI engine options

Post by abik »

retep1 wrote: Mon Jun 17, 2019 4: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 7:27 pm, edited 1 time in total.
User avatar
abik
Posts: 819
Joined: Fri Dec 01, 2006 10:46 pm
Location: Mountain View, CA, USA
Full name: Aart Bik

Re: Chess for Android: UCI engine options

Post by abik »

flok wrote: Mon Jun 17, 2019 5: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: 44
Joined: Sun Aug 07, 2016 5:24 pm

Re: Chess for Android: UCI engine options

Post by retep1 »

abik wrote: Mon Jun 17, 2019 7:20 pm
retep1 wrote: Mon Jun 17, 2019 4: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: 819
Joined: Fri Dec 01, 2006 10:46 pm
Location: Mountain View, CA, USA
Full name: Aart Bik

Re: Chess for Android: UCI engine options

Post by abik »

retep1 wrote: Mon Jun 17, 2019 9:17 pmThe 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: 215
Joined: Sun Jul 31, 2016 6:35 pm

Re: Chess for Android: UCI engine options

Post by PeterO »

Hi Aart,

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

Peter
User avatar
flok
Posts: 481
Joined: Tue Jul 03, 2018 10:19 am
Full name: Folkert van Heusden

Re: Chess for Android: UCI engine options

Post by flok »

abik wrote: Mon Jun 17, 2019 7:23 pm
flok wrote: Mon Jun 17, 2019 5: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.
User avatar
pedrox
Posts: 1056
Joined: Fri Mar 10, 2006 6:07 am
Location: Basque Country (Spain)

Re: Chess for Android: UCI engine options

Post by pedrox »

flok wrote: Wed Jun 19, 2019 11:05 am
abik wrote: Mon Jun 17, 2019 7:23 pm
flok wrote: Mon Jun 17, 2019 5: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: 819
Joined: Fri Dec 01, 2006 10:46 pm
Location: Mountain View, CA, USA
Full name: Aart Bik

Re: Chess for Android: UCI engine options

Post by abik »

PeterO wrote: Tue Jun 18, 2019 11: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: 819
Joined: Fri Dec 01, 2006 10:46 pm
Location: Mountain View, CA, USA
Full name: Aart Bik

Re: Chess for Android: UCI engine options

Post by abik »

flok wrote: Wed Jun 19, 2019 11:05 amAlso: 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).