Chess for Android

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

Patrice Duhamel
Posts: 193
Joined: Sat May 25, 2013 11:17 am
Location: France
Full name: Patrice Duhamel

Chess for Android

Post by Patrice Duhamel »

I compiled my engine Cheese for armv7, using android-cmake + android ndk.

In the android emulator with Chess for android, I play e4, my engine play Nf6, then I play d4 and the engine wants to play Nf6 again ! :?

When running the engine in a terminal emulator it works, using uci commands to play I don't have the same problem.

Any advices on how to solve this problem ?

Is it possible to have a log to see what happens in Chess for android ?
Gurcan Uckardes
Posts: 196
Joined: Wed Oct 29, 2014 12:42 am

Re: Chess for Android

Post by Gurcan Uckardes »

Did you try with Droidfish and Hawk Chess? They can also drive uci engines. I would wonder if the same behaviour repeats with other gui's or not. If yes, there's something in the code that needs a specific adjustment for Android.
Looks like the engine doesn't care about your first move and repeats the same calculation of its first move. Weird loop...
My blog for Android users: http://chesstroid.blogspot.com
Patrice Duhamel
Posts: 193
Joined: Sat May 25, 2013 11:17 am
Location: France
Full name: Patrice Duhamel

Re: Chess for Android

Post by Patrice Duhamel »

I tried in DroidFish and it works, but I don't understand the problem with Chess for android, Stockfish and Komodo work well in this GUI.
Gurcan Uckardes
Posts: 196
Joined: Wed Oct 29, 2014 12:42 am

Re: Chess for Android

Post by Gurcan Uckardes »

In constrast to Droidfish, Chess for Android uses, as far as i understood, uses "go movetime" command, which is best for analyzing positions rather than clocked games. That's why some engines don't like :-) CfA (ie Fruit Reloaded, Octochess).
I guess focusing on this basic difference might give a clue. You can also share details with Aart. PM him. He's registered to Talkchess.
My blog for Android users: http://chesstroid.blogspot.com
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

Post by abik »

Patrice Duhamel wrote: Is it possible to have a log to see what happens in Chess for android ?
If you can share your engine with me, I am happy to debug and let you know what goes wrong. Indeed some engines did not implement the movetime correctly in the past, as Gurcan correctly observes.

Incidentally, I am soooo close to releasing Chess for Android with clocks (finally).
Ferdy
Posts: 4833
Joined: Sun Aug 10, 2008 3:15 pm
Location: Philippines

Re: Chess for Android

Post by Ferdy »

abik wrote:
Patrice Duhamel wrote: Is it possible to have a log to see what happens in Chess for android ?
If you can share your engine with me, I am happy to debug and let you know what goes wrong. Indeed some engines did not implement the movetime correctly in the past, as Gurcan correctly observes.

Incidentally, I am soooo close to releasing Chess for Android with clocks (finally).
I have this issue on log generated by crafty. These games.001 and log.001,
game.00n, log.00n will appear in the import engine list. Currently I removed these logs by uninstalling same like an engine. I tried the cleanup logs but the crafty logs are still there.
Patrice Duhamel
Posts: 193
Joined: Sat May 25, 2013 11:17 am
Location: France
Full name: Patrice Duhamel

Re: Chess for Android

Post by Patrice Duhamel »

Thanks, I will look at movetime if I see something wrong.
Patrice Duhamel
Posts: 193
Joined: Sat May 25, 2013 11:17 am
Location: France
Full name: Patrice Duhamel

Re: Chess for Android

Post by Patrice Duhamel »

Can you give me the uci commands sent by Chess for android to the engine at the begining of a game, for few moves ?

It should be enough to find the problem.
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

Post by abik »

Patrice Duhamel wrote:Can you give me the uci commands sent by Chess for android to the engine at the begining of a game, for few moves?
Of course! Assuming the regular UCI set up works, here are the commands (when set to level 2). Also note the extra spaces in between the moves (allowed by the standard and done for simplicity while generating the string; all engines accept this, but if this becomes an issue I could trim that).
position startpos moves e2e4 g8f6 d2d4
go movetime 1000
Patrice Duhamel
Posts: 193
Joined: Sat May 25, 2013 11:17 am
Location: France
Full name: Patrice Duhamel

Re: Chess for Android

Post by Patrice Duhamel »

Finally I can write in a log file on the android emulator, I thought it was not possible.

Thanks, it was the extra spaces in the command "position startpos ....".
My engine accepted only one space, but I fixed it.

I will release the android version later this year when the next version of Cheese is ready.