MacPorts/xboard: Timing anomalies

Discussion of chess software programming and technical issues.

Moderators: hgm, Dann Corbit, Harvey Williamson

User avatar
sje
Posts: 4675
Joined: Mon Mar 13, 2006 7:43 pm

MacPorts/xboard: Timing anomalies

Post by sje »

MacPorts/xboard: Timing anomalies

Running the MacPorts version of xboard exhibits some timing anomalies.

1) When running locally (no ICS) between two programs, the time and otim directives correctly present time value to the nearest centisecond. But when running in ICS mode, all time and otim values are rounded or truncated to the nearest second; i.e., each value ends with "00".

2) When using the helper program timestamp packaged in the Mac native XBoard application, having the name of the ICS ("chessclub.com") as a parameter to xboard does not work as advertised. (This may have been like this for a long time.) The dotted quad IP address is needed.

3) The help files at chessclub.com give the wrong IP address for the site. The current IP address is (207.192.66.15).

The xboard invocation call which seems to work (other than rounded times):

Code: Select all

xboard \
        -autoflag \
        -fcp "./Symbolic -c X" \
        -fd $HOME/Arena/Symbolic \
        -hideThinkingFromHuman false \
        -ics \
        -icshelper $HOME/Arena/Symbolic/timestamp \
        -icshost 207.192.66.15 \
        -icslogon $HOME/Arena/Symbolic/icclogon \
        -sgf $HOME/Arena/Symbolic/icc.pgn \
        -size Medium \
        -thinking \
        -xalarm \
        -xanimate \
        -xbuttons \
        -xzab \
        -xzadj \
        -zippyGameEnd "multi seek 5 ; seek 15" \
        -zippyMaxGames 4 \
        -zp
JoshPettus
Posts: 730
Joined: Fri Oct 19, 2012 2:23 am

Re: MacPorts/xboard: Timing anomalies

Post by JoshPettus »

Yah. the chessclub.com domain name doesn't seem to work when used with timestamp. I'm pretty sure that this is not xboard's fault but chessclubs as freechess.org has no such problem with their timeseal, and indeed has been like that for a while.
User avatar
sje
Posts: 4675
Joined: Mon Mar 13, 2006 7:43 pm

More details

Post by sje »

The time rounding/truncation occurs both with and without use of the timestamp helper.

Helper MD5 sums:

Code: Select all

sje$ md5 timeseal timestamp
MD5 (timeseal) = abb2955cbef6eac19e7a6857ed95e176
MD5 (timestamp) = 588d3d6b2cea8a97bcb3687852f0e6c1
JoshPettus
Posts: 730
Joined: Fri Oct 19, 2012 2:23 am

Re: More details

Post by JoshPettus »

again sounds like an ICC issue.
User avatar
sje
Posts: 4675
Joined: Mon Mar 13, 2006 7:43 pm

Meanwhile, at FICS

Post by sje »

For the second or third time, FICS locked Symbolic's account for inactivity. Which is their right, I guess. But getting them to re-activate it is taking time, and so I can't test my set-up with FICS at present.

The diagnostic from FICS for a locked account says "contact abuse@freechess.org", but when they answer they say "contact the computer committee instead". The last time this happened it took many weeks for a response from the computer committee.
User avatar
sje
Posts: 4675
Joined: Mon Mar 13, 2006 7:43 pm

Re: More details

Post by sje »

JoshPettus wrote:again sounds like an ICC issue.
There are several possible treatments.

The first and best solution is to fix timestamp to call gethostbyname() to map the site name to an IP address.

The second way is for xboard to call gethostbyname() to map the site name to an IP address and then pass this to timestamp.

The third way, which helps only me, is to wrap timestamp into a script and then call that script via the xboard helper option.

Note that if the ICS site name is missing from the xboard call, then the site name will not show up in an ics directive sent to an engine. So no ICS name for the PGN Site tag pair.
User avatar
sje
Posts: 4675
Joined: Mon Mar 13, 2006 7:43 pm

Re: MacPorts/xboard: Timing anomalies

Post by sje »

I spent some more time researching the centiseconds rounding. It appears that an ICS keeps track of clock values with a 1 ms resolution, but there is no obvious way to communicate these high resolution values to a player.

So, using an ICS for super fast games may not be possible without some kludges. One such kludge would be to have one of the players maintain a canonical clock which both player must obey and have the clock value communicated as appropriate. A third party clock could be used as well, as long as each player can be trusted to report accurate time usage values.

Symbolic could benefit from a high precision clock, but perhaps not as much as some programs because Symbolic eats at least 20 ms of overhead for each move no matter how simple the search.

Probably the best treatment would be to convince the ICS operators to report times using a precision better than the current one second resolution.
User avatar
sje
Posts: 4675
Joined: Mon Mar 13, 2006 7:43 pm

FICS update

Post by sje »

Symbolic is now back on FICS. Thank you FICS.

The first thing I noticed was that FICS is reporting time values with millisecond precision, so xboard no longer presents clocks rounded to the nearest second.

An idea here is to add a clock directive feature to xboard which would replace the time/otim directives upon request. A clock directive sent to a program would contain two operands; the first being the program's remaining time and the second the opponent's remaining time. (Or maybe White's, then Black's.) Time values would be represented in decimal seconds for generality and for the possibility of future improvements in clock value precision.
User avatar
hgm
Posts: 27703
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: MacPorts/xboard: Timing anomalies

Post by hgm »

sje wrote:1) When running locally (no ICS) between two programs, the time and otim directives correctly present time value to the nearest centisecond. But when running in ICS mode, all time and otim values are rounded or truncated to the nearest second; i.e., each value ends with "00".
In ICS mode the ICS is in charge of the clocks. XBoard just passes on the timing information that the ICS sends it (sent together with the board you receive after every own move, opponent move or refresh command). Some ICS account in seconds. You could look in the xboard.debug file to se exactly what the ICS sends you, and it will likely be integer seconds.
2) When using the helper program timestamp packaged in the Mac native XBoard application, having the name of the ICS ("chessclub.com") as a parameter to xboard does not work as advertised. (This may have been like this for a long time.) The dotted quad IP address is needed.
This is a timestamp issue; timestamp is distributed by ICC.
3) The help files at chessclub.com give the wrong IP address for the site. The current IP address is (207.192.66.15).
Not much I can do about that either...
User avatar
hgm
Posts: 27703
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: More details

Post by hgm »

sje wrote:
JoshPettus wrote:again sounds like an ICC issue.
There are several possible treatments.

The first and best solution is to fix timestamp to call gethostbyname() to map the site name to an IP address.
Timestamp is closed source; it needs to be that for secrecy of the encryption key. So unless you want to reverse-engineer and patch the binary with a hex editor, there is nothing we can do to fix any problems with it.
The second way is for xboard to call gethostbyname() to map the site name to an IP address and then pass this to timestamp.
Yes, this could be done. But I am a firm believer in the philosophy that problems should be solved where they ly, and it is clearly (the Mac version of) timestamp that is broken here. ICC should fix it.
The third way, which helps only me, is to wrap timestamp into a script and then call that script via the xboard helper option.
Well, as I assume the ICC IP address does not change daily, I guess simply calling XBoard (for which you probably also use a script, or some .desktop file) with the IP address instead of chessclub.com as the -icshost seems a simpler solution. It might not be robust against future changes of the chessclub.com IP address, but how far do you want to go in solving hypothetical problems that might or might not materialize in some distant future?
Note that if the ICS site name is missing from the xboard call, then the site name will not show up in an ics directive sent to an engine. So no ICS name for the PGN Site tag pair.
True, XBoard has no way to recognize it is chessclub.com when it only was given the IP address. But doesn't the IP address appear in the 'ics' command?