Can YOU compile this engine?

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.
Post Reply
User avatar
PeterO
Posts: 121
Joined: Sun Jul 31, 2016 4:35 pm

Can YOU compile this engine?

Post by PeterO » Wed Oct 02, 2019 8:10 am

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

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

Re: Can YOU compile this engine?

Post by PeterO » Fri Oct 04, 2019 6:45 pm

Nobody? :(

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

Peter

Dann Corbit
Posts: 10192
Joined: Wed Mar 08, 2006 7:57 pm
Location: Redmond, WA USA
Contact:

Re: Can YOU compile this engine?

Post by Dann Corbit » Fri Oct 04, 2019 7:29 pm

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.
Taking ideas is not a vice, it is a virtue. We have another word for this. It is called learning.
But sharing ideas is an even greater virtue. We have another word for this. It is called teaching.

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

Re: Can YOU compile this engine?

Post by abik » Fri Oct 04, 2019 9:07 pm

PeterO wrote:
Fri Oct 04, 2019 6: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).

MikeB
Posts: 3542
Joined: Thu Mar 09, 2006 5:34 am
Location: Pen Argyl, Pennsylvania

Re: Can YOU compile this engine?

Post by MikeB » Sat Oct 05, 2019 5:42 am

abik wrote:
Fri Oct 04, 2019 9:07 pm
PeterO wrote:
Fri Oct 04, 2019 6: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

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

Re: Can YOU compile this engine?

Post by petero2 » Sat Oct 05, 2019 10:08 am

PeterO wrote:
Wed Oct 02, 2019 8: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

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

Re: Can YOU compile this engine?

Post by PeterO » Sat Oct 05, 2019 12: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

MikeB
Posts: 3542
Joined: Thu Mar 09, 2006 5:34 am
Location: Pen Argyl, Pennsylvania

Re: Can YOU compile this engine?

Post by MikeB » Sat Oct 05, 2019 3:22 pm

PeterO wrote:
Sat Oct 05, 2019 12: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.

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

Re: Can YOU compile this engine?

Post by abik » Sat Oct 05, 2019 10:27 pm

PeterO wrote:
Sat Oct 05, 2019 12: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!

Post Reply