Author: Robert Hyatt
Date: 10:41:49 12/30/98
Go up one level in this thread
On December 30, 1998 at 09:27:55, Inmann Werner wrote:
>On December 30, 1998 at 00:00:25, Robert Hyatt wrote:
>
>>On December 29, 1998 at 18:01:12, Inmann Werner wrote:
>>
>>>Hello.
>>>
>>>I played today with my engine and winboard on ICC. If I play one game, and then
>>>restart ICC everything is ok.
>>>If I play two games in line, I loose on time. A checked the Winboard debug File,
>>>and it gave me seconds before loosing on time the command
>>>time 5800
>>>Does that not mean, i have 58 secs left?
>>>The problem is, my program parses the time command and uses it.
>>>What could be wrong?
>>>
>>>Werner
>>
>>
>>lots of answers:
>>
>>1. lag. are you running with timestamp? if not, lag can cause this. If
>>you are using timestamp, go to 2 below.
>>
>>2. programming bugs that prevent you from properly sending a move to
>>xboard/winboard, such as forgetting to either disable buffering, or forgetting
>>to do a fflush(stdout). And screwing up on input so that you miss a move.
>>This happens frequently if you use scanf() type buffered input.
>>
>>too many of us are running on ICC using xboard/winboard for there to be such
>>gross bugs in it, so it is more likely that you are simply hitting some sort
>>of bug in your interface...
>
>sure it can be some bug by me. but how? I use timestamp.
>I got the move of the opponent and the time 5800 command and then set my
>internal clock to 58 sec rest time and began to think. after 1 second, I lost on
>time. The winboard also showed 1 sec remaining, but in the logfile was 58 secs.
>I do not understand it any way.
>I give my moves to winboard with normal printf("move E2E4\n"). At the beginning
>of the program I use setbuf(stdout,NULL) to disable buffering. I make no fflush
>at all. Is it needed?
>On Input I use
>rr=read(0,&buffer,1) and nothing else.
>Is there something wrong about it?
>
>Werner
>
>do anybody of you use the "time" command comming from winboard to update your
>time?
I use both time _and_ otim in crafty. One thing you didn't mention: it may
be that at the point in time when winboard sent you the time 5800 message, that
was correct. Nothing says you read it instantly however. That is a common
glitch using buffered I/O. You aren't (above) but there are lots of ways to
blow up the input (ie you may "read" multiple commands with a single read(), or
you may read part of a command and have to come back later when the rest of it
has arrived...
This page took 0 seconds to execute
Last modified: Thu, 15 Apr 21 08:11:13 -0700
Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.