Chess for Android

Discussion of chess software programming and technical issues.

Moderators: hgm, Harvey Williamson, bob

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
Patrice Duhamel
Posts: 112
Joined: Sat May 25, 2013 9:17 am
Contact:

Chess for Android

Post by Patrice Duhamel » Sun Jan 04, 2015 3:50 pm

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: Tue Oct 28, 2014 11:42 pm
Contact:

Re: Chess for Android

Post by Gurcan Uckardes » Sun Jan 04, 2015 6:20 pm

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: 112
Joined: Sat May 25, 2013 9:17 am
Contact:

Re: Chess for Android

Post by Patrice Duhamel » Sun Jan 04, 2015 7:46 pm

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: Tue Oct 28, 2014 11:42 pm
Contact:

Re: Chess for Android

Post by Gurcan Uckardes » Sun Jan 04, 2015 8:34 pm

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: 626
Joined: Fri Dec 01, 2006 9:46 pm
Location: Mountain View, CA, USA
Contact:

Re: Chess for Android

Post by abik » Mon Jan 05, 2015 12:18 am

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: 3607
Joined: Sun Aug 10, 2008 1:15 pm
Location: Philippines

Re: Chess for Android

Post by Ferdy » Mon Jan 05, 2015 4:52 am

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: 112
Joined: Sat May 25, 2013 9:17 am
Contact:

Re: Chess for Android

Post by Patrice Duhamel » Mon Jan 05, 2015 7:41 am

Thanks, I will look at movetime if I see something wrong.

Patrice Duhamel
Posts: 112
Joined: Sat May 25, 2013 9:17 am
Contact:

Re: Chess for Android

Post by Patrice Duhamel » Mon Jan 05, 2015 7:43 am

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: 626
Joined: Fri Dec 01, 2006 9:46 pm
Location: Mountain View, CA, USA
Contact:

Re: Chess for Android

Post by abik » Mon Jan 05, 2015 7:26 pm

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: 112
Joined: Sat May 25, 2013 9:17 am
Contact:

Re: Chess for Android

Post by Patrice Duhamel » Mon Jan 05, 2015 7:36 pm

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.

Post Reply