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: 199
Joined: Tue Jul 03, 2018 8:19 am
Full name: Folkert van Heusden
Contact:

Re: Chess for Android: UCI engine options

Post by flok » Thu Jun 20, 2019 6:03 pm

abik wrote:
Thu Jun 20, 2019 5:33 pm
flok wrote:
Thu Jun 20, 2019 7:55 am
From 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.
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 » Thu Jun 20, 2019 6:16 pm

flok wrote:
Thu Jun 20, 2019 6:03 pm
Thank 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: 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 » Fri Jun 21, 2019 4:32 pm

abik wrote:
Thu Jun 20, 2019 6:16 pm
Perhaps 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: 12
Joined: Thu Jul 05, 2018 11:14 pm
Full name: Aleksei

Re: Chess for Android: UCI engine options

Post by Aleksei » Sun Jul 21, 2019 6:15 pm

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: 23723
Joined: Fri Mar 10, 2006 9:06 am
Location: Amsterdam
Full name: H G Muller
Contact:

Re: Chess for Android: UCI engine options

Post by hgm » Sun Jul 21, 2019 7: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:

petero2
Posts: 587
Joined: Mon Apr 19, 2010 5:07 pm
Location: Sweden
Contact:

Re: Chess for Android: UCI engine options

Post by petero2 » Mon Jul 22, 2019 4:04 pm

About fixed depth matches:
hgm wrote:
Sun Jul 21, 2019 7: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: 23723
Joined: Fri Mar 10, 2006 9:06 am
Location: Amsterdam
Full name: H G Muller
Contact:

Re: Chess for Android: UCI engine options

Post by hgm » Mon Jul 22, 2019 8:33 pm

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: 587
Joined: Mon Apr 19, 2010 5:07 pm
Location: Sweden
Contact:

Re: Chess for Android: UCI engine options

Post by petero2 » Mon Jul 22, 2019 9:23 pm

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: 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 » Tue Jul 23, 2019 3:40 am

Aleksei wrote:
Sun Jul 21, 2019 6: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!

Post Reply