Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Autoplayer for Win32 (again)

Author: Stefan Meyer-Kahlen

Date: 04:40:29 09/13/98

Go up one level in this thread


On September 12, 1998 at 13:22:34, Robert Hyatt wrote:

>On September 12, 1998 at 05:11:14, Stefan Meyer-Kahlen wrote:
>
>>
>>I have posted this here a couple of times now, but still I get the impression
>>that is was not properly understood:
>>
>>I have released the source code for an autoplayer for Win32 free of charge,
>>everybody can add it to his program, even though he/she wants to sell it (the
>>program, not my source code).
>>The autoplayer is compatible with the standard auto232 interface and also with
>>the chess232 chessboard. (That means if you want to play autoplayer games with
>>your program against eg. Hiarcs6 you can do so if you have a serial cable). If
>>you use Win32 you don't have to take care about any timing problems or strange
>>move formats. All of this is handled by my code.
>
>Let me reiterate:  my major complaints are the following two points:
>
>1.  the dos-based auto232 is unreliable.  It has gross timing problems, has
>had gross timing problems, particularly when a program can move *very* quickly
>(Crafty for example, which can receive a move and send one back in < 1 ms at
>times...)

If two windows programs are playing against each other no DOS is involved. DOS
is only need if you want to play Mchess or Rebel, and only on the machine
running Mchess or Rebel.

>2.  the protocol itself is gross.  You can't do the following:  underpromotion
>(unless using your code on both ends); offer/accept a draw;  find out the name
>of your opponent;  find the approximate rating of your opponent;  find out
>how much time your opponent has left on his clock;  etc.

Yes, that's true. But if more people are using the interface it should be
possible to add those feature without loosing compatibility to the old DOS
programs. This was already done partly by Chrilly Donninger who added
underpromotion to the code.

>Your code seems reasonable, except for one thing:  I don't like making the
>interface exist inside code that is linked with a chess engine.  I'd much
>rather have a program that "talks" via stdin/stdout, which is normal, and
>have a separate interface module (like winboard/xboard) that can be modified/
>extended without changing the engines at all (again, just like winboard/xboard
>works, by letting the interface execute the engine as a separate process...)

If you are using winboard you have to send a move in the following way.
 fprintf(stdout, "e2e4");
With my autoplayer you call the function
 int auto232_sendmove(Move m);
This is pretty similiar.

Receiving moves works like this:
You get a message when the autoplayer has received a move and can handle this
message in your favoured way like forwarding it to your IO or poking it into
stdin or whatever.


The reason why the code is included in the program is that I wrote it for
Shredder and decided afterwords to publish it. Then it was easiest just to
release the source code of the c-file.

>>If you don't have the auto232 cable and want to play on two computers which are
>>connected in a network, fine, this can also be done with my code. (Obviously you
>>can't play against eg. MChessPro, but against any program that comes with my
>>code). You can even play autoplayer games on one machine. (For the last two
>>options you need at least one WindowsNT operating system).
>>Example:
>>If somebody adds this code to Crafty you can play autoplayer games in a network
>>(no serial cable) against Shredder or against Genius5 on another machine connect
>>with a serial cable. All with the same code.
>
>
>the above makes no sense.  A "network" doesn't use serial cables.  It uses
>ethernet interface cards in each pc.  Can I play, using your software, with
>one program on machine A, another on machine B, with them connected only via
>ethernet?  With winboard/xboard, yes...


Yes you can, but at least one machine need NT for this. I was trying to make it
clear by writing "no serial cable".
Again:
If you have two computers and want to play Shredder vs. Shredder automatically
you have three choices:

* connect your computers via a serial cable,
* connect it via ethernet,
* play only on one computer.


>>It is really not rocket science to add this autoplayer to your program, it takes
>>two or three hours maximum.
>
>
>The problem I had was trying to understand your code, because the comments
>and variable names are all German.  It is big enough that the only way I could
>try to make progress was understanding it line by line... with all the
>windows serial port stuff in the way...


Oh sorry, I forgot. Yes I agree, German could be a problem. When I was writing
the code I didn't have in mind to publish it :-( Chrilly was the first one who
used the code and he didn't complain about this. Why should he, he is a native
German speaker :-)


>>If you are complaining that it is Windows only:
>>It should be no(!) problem to write a similiar driver for Unix or whatever, that
>>can be used by all programs running on this operating system, but please don't
>>expect me to do this or blame me for not doing it.
>
>
>Again I'm not blaming *you* for anything.  You simply wrote something for
>windows that remained compatible with something that works on DOS.  The
>"protocol" you chose to be compatible with is, however, still ugly.  It has
>too many missing things.  Requires a oddball move format (xboard lets you
>specify SAN or coordinate-algebraic as you wish), and so forth.  *none* of
>which was your fault.  So don't take my criticism of auto232 as a knock on
>you at all.  It is a knock on the "protocol" that is simply lousy...


I totally agree that the protocol is not perfect, but it has one major
advantage: There are many programs out there which are using it, so you have the
choice of a pretty large number of programs to play against.
The move format doesn't really matter, see above.

Stefan



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.