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 »

abik wrote: Thu Jun 20, 2019 7:33 pm
flok wrote: Thu Jun 20, 2019 9:55 amFrom the chess programming wiki I understood that there's a chessbase-format for packaging chess-programs for Android and that C-f-A also supports this. Is this how it currently works? E.g. with the importing from sd-card feature etc? Or is there also an other way to package things? If so: can you give pointers to documentation how build for that?
Note that there are three common ways of "installing" an UCI or XBoard chess engines in the Android chess eco-system before it can be "imported".
  • The original way, where the GUI needs to do a one-time "install" of the binary from SD card
Then two new formats were introduced that avoid the "install" phase altogether, making the engine directly available for "import" by any GUI that supports this format. I actually was planning to update the chess programming Wiki with some more background information on all of this, but for now I have added URLs in this reply for your reference.

While developing, the original way is the simplest for the developer. But I would suggest to eventually package your engine in OEX format (you can read how-to in the link), since that is easier for the user.
Thank you. Unfortunately the https://code.google.com/archive/p/chess ... androidlib page is broken: all links bring to 404 and code is malformed.
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: Thu Jun 20, 2019 8:03 pmThank you. Unfortunately the https://code.google.com/archive/p/chess ... androidlib page is broken: all links bring to 404 and code is malformed.
Interesting. The main page and description are there, but most links indeed are broken.
How about https://github.com/gkalab/chessenginesupport-androidlib ?

Perhaps Gerhard or Peter can chime in and say which repository is the "master" for OEX?
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 »

abik wrote: Thu Jun 20, 2019 8:16 pmPerhaps Gerhard or Peter can chime in and say which repository is the "master" for OEX?
Gerhard kindly confirmed that https://github.com/gkalab/chessenginesupport-androidlib is the master repository going forward.
Aleksei
Posts: 25
Joined: Fri Jul 06, 2018 1:14 am
Full name: Aleksei

Re: Chess for Android: UCI engine options

Post by Aleksei »

Hi Aart!
I have a small "request", if it's possible! Can you add new option for tournaments, "Search Depth"? As you know, there is a lot of engines which are made with LTO and PGO, with "Search Depth" option, engines will make a move after they reach the specific depth (eg 10 or 16 etc). With this way faster engines will not be able to use their speed advantage, tournaments will be more fair. ;-)
Thank you!
User avatar
hgm
Posts: 27788
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Chess for Android: UCI engine options

Post by hgm »

Such a 'fair' tournament will make Fairy-Max far stronger than Stockfish for sure! Of course it would think a few million times longer to reach the same depth, but it will ovelook much less. :lol: :lol: :lol:
petero2
Posts: 684
Joined: Mon Apr 19, 2010 7:07 pm
Location: Sweden
Full name: Peter Osterlund

Re: Chess for Android: UCI engine options

Post by petero2 »

About fixed depth matches:
hgm wrote: Sun Jul 21, 2019 9:53 pm Such a 'fair' tournament will make Fairy-Max far stronger than Stockfish for sure! Of course it would think a few million times longer to reach the same depth, but it will ovelook much less. :lol: :lol: :lol:
While I agree that fixed depth matches will give a big advantage to engines that reduce less than other engines, your claim about Fairy-Max vs Stockfish does not seem to be correct.

I ran a series of 100 games matches between Stockfish 10 and Fairy-Max 5.0b at fixed depth. The result was as below. "elo" is from Stockfish's perspective, so a positive number means Stockfish was stronger.

Code: Select all

depth  elo  win draw loss   t1     t2
6       21   48   10   42    1    179
7       85   53   18   29    2    522
8      119   57   19   24    3   1490
9      346   83   10    7    6   3964
10     330   82   10    8   12  13437
11     463   90    7    3   30  51842
12     552   93    6    1   51 158719
t1 is the average thinking time in milliseconds of Stockfish for the first 20 moves (after the opening book) in each game.
t2 is the corresponding thinking time for Fairy-Max.

At fixed depth 12 Stockfish was 552 elo stronger than Fairy-Max even though Fairy-Max used 3000 times as much time.

I think the explanation is that Stockfish has more sophisticated evaluation and search extensions, and those are worth much more than Fairy-Max's wider search tree.
User avatar
hgm
Posts: 27788
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Chess for Android: UCI engine options

Post by hgm »

This is a quite surprising result. The general principle I wanted to point out was of course that at 'fixed depth' the engine that exaggerates its depth most will lose. I had expected this to be Stockfish. But if Stockfish also does extensions, this is not so clear anymore. Apart from check extension Fairy-Max has no extensions. So at 'equal' depth the Stockfish tree might not be entirely covered by the Fairy-Max tree.

Of course evaluation will be worth something too, but especially at low depth I had expected tactical errors to be the dominant factor in game results.

Nevertheless, it is encouraging that in a 'fair' match Fairy-Max is only 21 Elo behind Stockfish! :wink:
petero2
Posts: 684
Joined: Mon Apr 19, 2010 7:07 pm
Location: Sweden
Full name: Peter Osterlund

Re: Chess for Android: UCI engine options

Post by petero2 »

In CCRL 40/4 Stockfish 10 is currently around 1600 elo stronger than Fairy-Max 5.0b. This means that for fixed depth 12, Fairy-Max gained more than 1000 elo compared to Stockfish. So the effect of fixed depth is very large, but not large enough to close the 1600 elo gap.

According to the source code, Stockfish extensions are worth around 70 elo (in timed games). 60 elo from singular extensions and 10 elo from various other extensions. In fixed depth matches the effect will be bigger, since all extensions are "for free" in that case.
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 »

Aleksei wrote: Sun Jul 21, 2019 8:15 pm I have a small "request", if it's possible! Can you add new option for tournaments, "Search Depth"?
Added to TODO list. Interesting follow-up discussions too!