Steps to compile for Android

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

User avatar
JuLieN
Posts: 2949
Joined: Mon May 05, 2008 12:16 pm
Location: Bordeaux (France)
Full name: Julien Marcel

Re: Steps to compile for Android

Post by JuLieN »

asanjuan wrote:
JuLieN wrote:
asanjuan wrote:Hi all,
My friends are asking me when I'm going to make an android version of my UCI engine Rhetoric. I wonder which are the steps to build such version because I've never compiled anything to that platform.

do I have to change something in the uci protocol?
is so simple as compile for the arm processor?
Is there a tutorial? Any reference guide?

I need a hint.

Thanks in advance.
I compile directly on my Android device, using CCTools. :) That's where the Android build of Senpai comes from, for instance.

https://play.google.com/store/apps/deta ... tools.free
That's cool! because I have an android TV box, so I even can edit in a big screen for android, while I'm sitting in my sofa !

I can't wait to get home and install it on my TV!
Thank you so much!

Android has brought a world of posibilities to work, enjoy, or even compile your own programs! And everything in a device that fits in a hand. It's amazing.
Yes, compiling a chess engine on a mobile device is really epic ! :) The only problem with CCTool's shell is that it has no cut & paste, and no commands history, so if you typed something wrong in your five-lines long command you'll have to write it all again. ;)
"The only good bug is a dead bug." (Don Dailey)
[Blog: http://tinyurl.com/predateur ] [Facebook: http://tinyurl.com/fbpredateur ] [MacEngines: http://tinyurl.com/macengines ]
asanjuan
Posts: 214
Joined: Thu Sep 01, 2011 5:38 pm
Location: Seville, Spain

Re: Steps to compile for Android

Post by asanjuan »

Hello guys!
Thanks to your comments, just now, I'm playing against Rhetoric running in my phone!
(and losing every single game, of course)

@Pedro, I could make my own makefile from your example. Thank you very much!!
Still learning how to play chess...
knigths move in "L" shape ¿right?
User avatar
abik
Posts: 819
Joined: Fri Dec 01, 2006 10:46 pm
Location: Mountain View, CA, USA
Full name: Aart Bik

Re: Steps to compile for Android

Post by abik »

asanjuan wrote:Hello guys!
Thanks to your comments, just now, I'm playing against Rhetoric running in my phone!
(and losing every single game, of course)

@Pedro, I could make my own makefile from your example. Thank you very much!!
Cool! Interested in participating in the 2014 edition of the Android engines tournament?

I may do a slightly different format this year.
asanjuan
Posts: 214
Joined: Thu Sep 01, 2011 5:38 pm
Location: Seville, Spain

Re: Steps to compile for Android

Post by asanjuan »

abik wrote:
asanjuan wrote:Hello guys!
Thanks to your comments, just now, I'm playing against Rhetoric running in my phone!
(and losing every single game, of course)

@Pedro, I could make my own makefile from your example. Thank you very much!!
Cool! Interested in participating in the 2014 edition of the Android engines tournament?

I may do a slightly different format this year.
Twice Cool!!
:D

But I think that I still have to do some more tests... May i have to compile for ARMv5TE? I don't know how to do it. I used the -mtune=arm7 option, like Pedro did with DanaSah.

Is it useful for you? is it equivalent?
Still learning how to play chess...
knigths move in "L" shape ¿right?
User avatar
abik
Posts: 819
Joined: Fri Dec 01, 2006 10:46 pm
Location: Mountain View, CA, USA
Full name: Aart Bik

Re: Steps to compile for Android

Post by abik »

asanjuan wrote: Is it useful for you?
Yes that should be fine. If you can send me a binary, I can run a quick test for you. You can find my email as picture at my website.
asanjuan
Posts: 214
Joined: Thu Sep 01, 2011 5:38 pm
Location: Seville, Spain

Re: Steps to compile for Android

Post by asanjuan »

abik wrote:
asanjuan wrote: Is it useful for you?
Yes that should be fine. If you can send me a binary, I can run a quick test for you. You can find my email as picture at my website.
Mail sent!
Hope to see Rhetoric playing in your tournaments. Have you planned any starting date?
Still learning how to play chess...
knigths move in "L" shape ¿right?
User avatar
abik
Posts: 819
Joined: Fri Dec 01, 2006 10:46 pm
Location: Mountain View, CA, USA
Full name: Aart Bik

Re: Steps to compile for Android

Post by abik »

asanjuan wrote:Mail sent!
Hope to see Rhetoric playing in your tournaments. Have you planned any starting date?
Thanks. Works great. Here are the results of a few quick test matches at 1 seconds per move on my Nexus 4 phone using random book opening lines and engines of various strength. Very well done!

Code: Select all

Rhetoric 1.3 Android   - BikJump v2.1     10.0 - 0.0    +10/-0/=0    100.00%
Rhetoric 1.3 Android   - Gaviota v0.86     5.0 - 5.0    +4/-4/=2      50.00%
Rhetoric 1.3 Android   - Rotor 0.8         3.5 - 6.5    +3/-6/=1      35.00%
Rhetoric 1.3 Android   - DiscoCheck 4.3    0.5 - 9.5    +0/-9/=1       5.00%
Rhetoric 1.3 Android   - Stockfish 3       0.0 - 10.0   +0/-10/=0      0.00%
I am not completely sure yet when I will do another Android tournament and in what format. In earlier tournaments, I collected and even compiled many engines myself, because I was still interested in promoting Android as a viable platform for chess at the time. But nowadays I would actually like to see a lot more interest from participating engine authors as well, so I may send out a call for participation first and see how many engine authors enroll, and then proceed with just that set if we have critical mass.