Chess on Android.

Discussion of anything and everything relating to chess playing software and machines.

Moderators: hgm, Harvey Williamson, bob

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
User avatar
pedrox
Posts: 938
Joined: Fri Mar 10, 2006 5:07 am
Location: Basque Country (Spain)
Contact:

Chess on Android.

Post by pedrox » Tue Apr 19, 2016 4:28 pm

Chess for Android is one of the best chess programs on Android, since it enables tournaments between engines with xboard and uci protocols, but I have some problems with the program.

When my engine plays with the xboard protocol can only play games with fixed time (time per move), because otherwise the program seems to play instantly. This not only happens with my engine but also with many other engines (per example TSCP...). These engines are playing well in other interfaces, this is the only interface that fails. You can see a list on rapidroid.

I think this may be a failure of chess for Android, unfortunately I can not see a log to see what happens. Perhaps not send a command "time" after "level" or another.

Once the engine has played a first game with fixed time then it can play with other time control. Then everything seems to work correctly, but the engines seem to spend less time than other interfaces. For example playing games 1+1 engines always have more than 30 seconds on the clock even with 200 moves.

I turned my engine to UCI protocol, now the engine has no problem to play any time control even the first game, although as in the xboard protocol engines seem to spend less time than other interfaces.

On uci protocol I can not see all engine options on the interface, for example I can not choose different personalities, Droidfish controls better this options.

For rapidroid list, if you are interested I have a engine (UCI) that plays only random movements.
http://www.mediafire.com/download/jhdo0 ... h6_rnd.zip

For Art Bik or others if they want to test. This is DanaSah 6 limitstrength.
http://www.mediafire.com/download/6959u ... ah6_ls.zip

The engine has protocol xboard and uci protocol for configuration xboard requires the danacfg.txt file(included) on the path /scard/engines/danasah. Do not use this engine to test full strength, for this use old DanaSah 5.07.

DanaSah 6 limitstrength can also play on Droidfish . But there is also something on droidfish that I not like, engine does not send UCI_LimitStrength and UCI_Elo options so you can not modify this, yes for the other options.

Gurcan Uckardes
Posts: 196
Joined: Tue Oct 28, 2014 11:42 pm
Contact:

Re: Chess on Android.

Post by Gurcan Uckardes » Tue Apr 19, 2016 5:42 pm

Hi Pedro.
I agree with your comments about xb on CfA. Few xb engines play Fischer clocks correctly enough: Crafty, ExChess.
Honestly i don't expect that Aart will concentrate on the issue.
Nevertheless, the random engine is highly interesting for me. Maybe Olivechess can have some points from now on :-)
My blog for Android users: http://chesstroid.blogspot.com

User avatar
abik
Posts: 643
Joined: Fri Dec 01, 2006 9:46 pm
Location: Mountain View, CA, USA
Contact:

Re: Chess on Android.

Post by abik » Tue Apr 19, 2016 6:21 pm

pedrox wrote:Chess for Android is one of the best chess programs on Android, since it enables tournaments between engines with xboard and uci protocols, but I have some problems with the program.
Thanks for your kind (starting) words :-) and bug report. I am not sure what happens, but I am very interested in fixing this. Stay tuned.

User avatar
abik
Posts: 643
Joined: Fri Dec 01, 2006 9:46 pm
Location: Mountain View, CA, USA
Contact:

Re: Chess on Android.

Post by abik » Tue Apr 19, 2016 7:46 pm

I can confirm that DanaSah plays instantaneously when time control is set to x moves per y minutes. After setting a fixed time per move once, I suspect the engine simply remains in that mode (which could explain why it looks like it uses the time control later, but simply falls back to that mode).

It is possible the GUI does not follow XBoard standard correctly. It sends:

Code: Select all

new
hard
easy
post
level 40 40 0
go
for example when engine plays white at the start of the game. This seemed to work for engines I tested in the past, but perhaps I missed something?

User avatar
Evert
Posts: 2909
Joined: Fri Jan 21, 2011 11:42 pm
Location: NL
Contact:

Re: Chess on Android.

Post by Evert » Tue Apr 19, 2016 8:19 pm

abik wrote:I can confirm that DanaSah plays instantaneously when time control is set to x moves per y minutes. After setting a fixed time per move once, I suspect the engine simply remains in that mode (which could explain why it looks like it uses the time control later, but simply falls back to that mode).

It is possible the GUI does not follow XBoard standard correctly. It sends:

Code: Select all

new
hard
easy
post
level 40 40 0
go
for example when engine plays white at the start of the game. This seemed to work for engines I tested in the past, but perhaps I missed something?
This looks correct to me: "new" should clear any previous settings from "sd" and "st" and the level command sets the time control to 40 moves in 40 minutes. If an engine behaves differently, it looks like an engine bug to me...

User avatar
pedrox
Posts: 938
Joined: Fri Mar 10, 2006 5:07 am
Location: Basque Country (Spain)
Contact:

Re: Chess on Android.

Post by pedrox » Tue Apr 19, 2016 8:24 pm

My engine always need the "time" (otime) command before that "go" command , I think the rest of GUI send.

Arena:

Code: Select all

2016-04-19 21:59:20,342-->1:new
2016-04-19 21:59:20,346-->1:random
2016-04-19 21:59:20,352-->1:ics -
2016-04-19 21:59:20,357-->1:level 0 1 1
2016-04-19 21:59:20,363-->1:post
2016-04-19 21:59:20,368-->1:hard
2016-04-19 21:59:20,374-->1:easy
2016-04-19 21:59:20,380-->1:ping 10
2016-04-19 21&#58;59&#58;20,389<--1&#58;pong 10
2016-04-19 21&#58;59&#58;20,398-->1&#58;force
2016-04-19 21&#58;59&#58;20,611-->1&#58;e2e4
2016-04-19 21&#58;59&#58;20,615-->1&#58;c7c5
2016-04-19 21&#58;59&#58;20,619-->1&#58;h2h3
2016-04-19 21&#58;59&#58;20,623-->1&#58;b8c6
2016-04-19 21&#58;59&#58;20,627-->1&#58;ping 14
2016-04-19 21&#58;59&#58;20,634<--1&#58;pong 14
2016-04-19 21&#58;59&#58;20,641-->1&#58;g2g3
2016-04-19 21&#58;59&#58;20,650-->1&#58;ping 16
2016-04-19 21&#58;59&#58;20,657<--1&#58;pong 16
2016-04-19 21&#58;59&#58;20,664-->1&#58;ping 22
2016-04-19 21&#58;59&#58;20,672<--1&#58;pong 22
2016-04-19 21&#58;59&#58;20,679-->1&#58;time 6200
2016-04-19 21&#58;59&#58;20,683-->1&#58;otim 5939
2016-04-19 21&#58;59&#58;20,686-->1&#58;go
In my case I only use the "level" command to find if the game has a control for x moves or for increase. In other GUI I have no need to capture the time with the level command.

I could now solve this, but I suggest if possible you send the time command before go command in your program as this seems to affect many engines. Besides the engines that only support the xboard protocol version 1 as TSCP not know the level command, this should make TSCP also play instantly (perhaps fixed depth as 4 which it is the default configuration?).

User avatar
hgm
Posts: 22896
Joined: Fri Mar 10, 2006 9:06 am
Location: Amsterdam
Full name: H G Muller
Contact:

Re: Chess on Android.

Post by hgm » Tue Apr 19, 2016 8:38 pm

Note that 'new' would reset the effect of any previous 'sd', but not of 'st' or 'level'. Only a new 'st' or 'level' would do that.

As to the sending of 'time' commands: the official CECP specs do not require this of a GUI, but as virtually every GUI supporting CECP does it, it has become a de-facto standard. So unfortunately many engines do not update their own clocks anymore, but are solely dependent on receiving the time command. It is also highly recommended, as the time command is much more precise than the level command (centi-sec rather than sec).

User avatar
abik
Posts: 643
Joined: Fri Dec 01, 2006 9:46 pm
Location: Mountain View, CA, USA
Contact:

Re: Chess on Android.

Post by abik » Tue Apr 19, 2016 8:44 pm

hgm wrote:As to the sending of 'time' commands: the official CECP specs do not require this of a GUI, but as virtually every GUI supporting CECP does it, it has become a de-facto standard.
Thanks HG. So just to make sure I get this de-facto standard right, I need to send time/otim once right before the go command, and with the current value of these clocks? I assume that engines that don't understand level will still play too fast, since they will use the clock for the full game?

User avatar
pedrox
Posts: 938
Joined: Fri Mar 10, 2006 5:07 am
Location: Basque Country (Spain)
Contact:

Re: Chess on Android.

Post by pedrox » Tue Apr 19, 2016 9:08 pm

TSCP (no known level command) always makes time/30 (considers that there are always 30 moves for finish the game) independent of the type of control and position the game.

This makes that engine where there is no control at x moves (to finish game) time management is quite effective and not so much when control is x moves and y minutes (here can play too fast, example, 1 move to control, time 1 minute, TSCP only use for this move 2 seconds.), but this is a problem that has always existed.

User avatar
abik
Posts: 643
Joined: Fri Dec 01, 2006 9:46 pm
Location: Mountain View, CA, USA
Contact:

Re: Chess on Android.

Post by abik » Tue Apr 19, 2016 9:40 pm

Okay, I implemented the de-facto standard (but let the records show, I was following protocol correctly), and now DanaSah seems to use the time better.

Expect an update on Google Play/my website soon. Gurcan, you probably want to retest some XBoard engines under time control after that.

Sample output for the level command used in the Arena output.

Code: Select all

new
hard
easy
post
level 0 1 1
time 6000
otim 6000
go

Post Reply