Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: new autoplayer interface standard

Author: Dan Newman

Date: 00:47:53 09/17/98

Go up one level in this thread


On September 17, 1998 at 02:23:28, Keith Ian Price wrote:

>On September 16, 1998 at 04:25:57, Dan Newman wrote:
>
>>On September 15, 1998 at 22:31:33, Keith Ian Price wrote:
>>
>>>
>>>What about the fact that DOS/Windows programs' newlines will have carriage
>>>returns attached, and the Unix ones will only have the line feeds? It should be
>>>made standard that either case is acceptable, or is that handled well enough by
>>>modern compilers?
>>>
>>>kp
>>
>>This shouldn't be a problem since the engine and the interface code reside
>>on the same machine and will both use whatever convention is used for line
>>termination.  On the other hand this could be a problem for communication
>>between interfaces...how about we settle on line-feeds?
>>
>>-Dan.
>
>The current interface resides on the same machine as one engine. There was
>discussion of a tournament server version, which I would prefer, so that the
>engine has complete use of the computer it runs on. Settling on line feeds means
>that DOS/Windows programs, (which far outnumber Unix ones) can't use a simple
>printf statement, but will have to create special output routines. If the
>standard requires handling both, then a poorly written implementation should not
>cause a problem because the other side will handle the "incorrect" characters.
>If it is specified in the standard that line feeds are correct, then any bad
>implementation will cause problems for the user. It is generally easier to strip
>an unwanted character than to input a line that does not have the required
>termination character, and then add it, so if it is only one way, then the CR/LF
>would seem to be the better spec, IMO.
>
>kp

A tournament server is a great idea: the server could reside on one
machine, and each engine could have its own machine.

As I understand it, the idea is to have a separate interface running
for each engine.  These interfaces would carry out the communication
between the engines--so no engine would be at a disadvantage because
its machine had to bear a greater burden.  (The interface code shouldn't
cost much cpu time anyway.)  The interfaces would either talk to each
other (for a game or a match) or perhaps to a tournament server.  Since
the engine and its interface are always on the same machine we don't
need to worry about line terminators in communications between engines
and interfaces.

On the other hand, writers of the interface code might need to worry
about line terminators in interface-interface or interface-server
communications.  If each command gets its own packet, perhaps line
termination isn't of any concern here either...  I suppose the
interfaces could be written to accept any of the the three (<cr>,
<lf>, or <cr><lf>) as valid line terminators, though it might be
simpler just to settle on one...  Maybe it's as simple as settling
on two: <cr> and <lf>, then <cr><lf> would look like a line followed
by a blank line, which could just be ignored as a no-op.

-Dan.



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.