Page 1 of 1

Can YOU compile this engine?

Posted: Wed Oct 02, 2019 10:10 am
by PeterO
Hello chess friends,

I need your help. Can you PLEASE make a ANDROID version of Honey-X5i/Crystal-Honey-X5i engine?

I am looking FOR YEARS for such an engine - adaptive levels will tend to play at your level - so if you're having a bad day, the engine will have a bad day as well. Both engines have the exact same features - ability to use 4 opening books in sequence ( including Brainfish books) , play by Elo , adaptive play , sleep option to stop rapid fire moves etc.

Links:
https://github.com/MichaelB7/Stockfish/releases/tag/X5i
https://github.com/MichaelB7/Stockfish/ ... /tag/C-X5i

I hope you can help me.

Peter

Re: Can YOU compile this engine?

Posted: Fri Oct 04, 2019 8:45 pm
by PeterO
Nobody? :(

Is it much work to compile an engine for Android? :?:

Peter

Re: Can YOU compile this engine?

Posted: Fri Oct 04, 2019 9:29 pm
by Dann Corbit
I gave it a shot, but it is harder than you might think.

Something naive like this does not work:

Code: Select all

#if defined(_M_ARM64)
#include "arm64_neon.h"
#include "arm64intr.h"
typedef _n64 Bitboard;
inline int popcount(Bitboard b)
{
	return neon_cnt(b);
}
#undef USE_PEXT
#define USE_POPCNT
#else
...
because it will take an update to the whole Stockfish type system to understand the new structure, and all the templates would have to be _n64 aware.

I guess that an ARM64 guru can do it in a few hours, but I am a neophyte and I don't have the time to do it right.

Re: Can YOU compile this engine?

Posted: Fri Oct 04, 2019 11:07 pm
by abik
PeterO wrote: Fri Oct 04, 2019 8:45 pm Nobody? :(
Is it much work to compile an engine for Android? :?:
Allow me to give some historical background here too.

I (and others, such as Jim Ablett) have compiled many third party engines for Android in the past since I was highly motivated to get the chess eco-system going on Android. But there are always challenges!

Some challenges are technical, but usually doable, such as finding alternative arm implementations for hand-written x86 assembly, working around compiler differences, broken build systems, etc. etc. I even found bugs in some code, often due to undefined behavior (something that just "happened to work" on the original target platform). Some challenges are social. With many pleasant exceptions, chess engine authors do not always seem to care for the Android version, leaving email inquires unanswered. Lastly, licenses may pose challenges. Some licenses allow re-distribution but only under the condition that changes to the source code are made public too. And if the author does not reply to inquiries, I really don't feel like hosting the sources just for the purpose of distributing an Android engine.

I am still very willing to help out compiling engines for Android, but only if the original author is involved, willing to accept source changes required for that compile, and willing to host the Android binary on the original website (possibly with some compilations credits ;-), although that is not the reason I am helping out).

Re: Can YOU compile this engine?

Posted: Sat Oct 05, 2019 7:42 am
by MikeB
abik wrote: Fri Oct 04, 2019 11:07 pm
PeterO wrote: Fri Oct 04, 2019 8:45 pm Nobody? :(
Is it much work to compile an engine for Android? :?:
Allow me to give some historical background here too.

I (and others, such as Jim Ablett) have compiled many third party engines for Android in the past since I was highly motivated to get the chess eco-system going on Android. But there are always challenges!

Some challenges are technical, but usually doable, such as finding alternative arm implementations for hand-written x86 assembly, working around compiler differences, broken build systems, etc. etc. I even found bugs in some code, often due to undefined behavior (something that just "happened to work" on the original target platform). Some challenges are social. With many pleasant exceptions, chess engine authors do not always seem to care for the Android version, leaving email inquires unanswered. Lastly, licenses may pose challenges. Some licenses allow re-distribution but only under the condition that changes to the source code are made public too. And if the author does not reply to inquiries, I really don't feel like hosting the sources just for the purpose of distributing an Android engine.

I am still very willing to help out compiling engines for Android, but only if the original author is involved, willing to accept source changes required for that compile, and willing to host the Android binary on the original website (possibly with some compilations credits ;-), although that is not the reason I am helping out).
That's my Github page , we can give it go and see what we can do to make an Android version.

Will PM you.

MikeB

Re: Can YOU compile this engine?

Posted: Sat Oct 05, 2019 12:08 pm
by petero2
PeterO wrote: Wed Oct 02, 2019 10:10 am Can you PLEASE make a ANDROID version of Honey-X5i/Crystal-Honey-X5i engine?
I put the source code for Honey-X5i into the DroidFish source tree and was able to compile the engine with a one line change in the source code.

Here are the compiled files: https://www.dropbox.com/s/4t2vm6nykc9y0 ... id.7z?dl=1

This is what I did: https://github.com/peterosterlund2/droi ... mits/honey

Re: Can YOU compile this engine?

Posted: Sat Oct 05, 2019 2:35 pm
by PeterO
Wow - so many friends try to help - thank you all so much!!!

Now I can spend this weekend ( alone at home :lol: ) playing on my wooden chesscomputer (Chessgenius Exclusive) - with the GREAT app „Chess for Android“ (from Aart Bik) - an play against the new HONEY engine - many thanks to Michael/Peter.

Thanks to all for your help!

THANK YOU!!!!! :D

Re: Can YOU compile this engine?

Posted: Sat Oct 05, 2019 5:22 pm
by MikeB
PeterO wrote: Sat Oct 05, 2019 2:35 pm Wow - so many friends try to help - thank you all so much!!!

Now I can spend this weekend ( alone at home :lol: ) playing on my wooden chesscomputer (Chessgenius Exclusive) - with the GREAT app „Chess for Android“ (from Aart Bik) - an play against the new HONEY engine - many thanks to Michael/Peter.

Thanks to all for your help!

THANK YOU!!!!! :D
and thank you here, I guess I will have tp get an android pad now. I have forked your GitHub page and will update the honey branch for the next release, hopefully sometime early next week.

Re: Can YOU compile this engine?

Posted: Sun Oct 06, 2019 12:27 am
by abik
PeterO wrote: Sat Oct 05, 2019 2:35 pm Now I can spend this weekend ( alone at home :lol: ) playing on my wooden chesscomputer (Chessgenius Exclusive) - with the GREAT app „Chess for Android“ (from Aart Bik) - an play against the new HONEY engine - many thanks to Michael/Peter.
I log in and all problems are solved already! :D
Thanks petero2 and MikeB! And I hope you enjoy the new engine PeterO!