Computer Chess Club Archives


Search

Terms

Messages

Subject: Definition of the Extended Autoplayer 232 Protocol

Author: Stefan Meyer-Kahlen

Date: 08:47:15 05/16/00




I have collected some enhancements and extensions of the existing autoplayer 232
protocol and put them together in one file to have a new standard reference.
None of the extensions were my idea, they were invented  by Chrilly Donninger
and Mathias Feist of ChessBase. Thanks to Chrilly and Mathias for sharing their
ideas with me.

All 32 bit ChessBase interfaces are supporting this, current versions included,
and also the next release version of my program Shredder. I hope that all the
other interface programmers will also add this in their next versions.

Stefan Meyer-Kahlen


--------------------------

Definition of the Extended Autoplayer 232 Protocol

* Underpromotion

The original autoplayer did not support underpromotion, the pawn was always
promoted to a queen. In the MFC version of the windows autoplayer Chrilly
Donninger already added support for underpromotion in 1997. To keep
compatibility with older DOS versions both programs had to send the
A232_EXTENDEDMODE command to agree on the extended mode. As there will be
problems after an underpromotion anyway those command is no longer needed
anymore, so using the underpromotion code will be the default.

* Resigning and offering draw

Mathias Feist of ChessBase made another extension to the autoplayer protocol
which made it possible to resign games and to agree to a draw. I will call this
the new extended mode. If both programs are supporting this mode they have to
tell each other about it by using the new A232_EXTENDEDCOMMANDMODE flag.

The master has to send the A232_EXTENDEDCOMMANDMODE flag in the 4th byte of the
request match command and the slave in the 4th byte of the confirm match
command.

The commands should be

     command[0] = A232_STX;
     command[1] = A232_REQUESTMATCH;
     command[2] = auto232_numgames;
     command[3] = A232_EXTENDEDCOMMANDMODE;
     command[4] = A232_ETX;

for the master and

     command[0] = A232_STX;
     command[1] = A232_CONFIRMMATCH;
     command[2] = 0;
     command[3] = A232_EXTENDEDCOMMANDMODE;
     command[4] = A232_ETX;

for the slave.

If both are sending the A232_EXTENDEDCOMMANDMODE the following commands can be
used, if not, those commands should not be used and should be ignored if sended
anyway.

   A232_COM_OFFERDRAW,
   A232_COM_ACCEPTDRAW,
   A232_COM_REJECTDRAW and
   A232_COM_RESIGN.

All those commands have to be send in the third byte together with the
A232_COMMAND command.
Example for a draw offer.

     command[0] = A232_STX;
     command[1] = A232_COMMAND;
     command[2] = A232_COM_OFFERDRAW;
     command[3] = 0;
     command[4] = A232_ETX;

Draw offers should be declined with A232_COM_REJECTDRAW if desired. Otherwise it
might be useful to send more A232_COM_OFFERDRAW commands, I mean one after every
move, as there is no way of synchronizing moves and draw offers especially at
faster time controls. My current implementation treats sending a move like
rejecting the offer. As this can be done unintentionally, I will send the draw
offer again after the next move until the offer get rejected officially. Like
that, the draw offer will be valid for this particular move only.

* Nunn Matches

Also Mathias Feist added the ability to play Nunn Matches with the autoplayer.
Nunn Matches are matches with no opening book from certain starting positions.

The following commands are needed for Nunn matches:

     A232_COM_MEMOON,
     A232_COM_MEMOOFF and
     A232_COM_BOOKOFF

All are send in the third byte of the A232_COMMAND command as usual.

The master will send A232_COM_NEWGAME followed by A232_COM_BOOKOFF and
A232_COM_MEMOON. Then is will send all the moves until the desired starting
position is reached. The memo mode will be switched off with A232_COM_MEMOOFF
again and then the game starts as usual.

In memo mode the program must not start calculating a move but should be able to
receive a couple of moves in a row.


* Finally the new definitions for the header file.

// Command for old extended mode, no longer needed
#define A232_EXTENDEDMODE 0x25

// Commands
#define A232_COM_COMPUTE    0x01
#define A232_COM_STOP       0x02
#define A232_COM_NEWGAME    0x03
#define A232_COM_TAKEBACK   0x04
#define A232_COM_MEMOON     0x05
#define A232_COM_MEMOOFF    0x06
#define A232_COM_FLIPBOARD  0x07
#define A232_COM_OFFERDRAW  0x08
#define A232_COM_ACCEPTDRAW 0x09
#define A232_COM_REJECTDRAW 0x0a
#define A232_COM_RESIGN     0x0b
#define A232_COM_BOOKON     0x0c
#define A232_COM_BOOKOFF    0x0d

// Flag to use the extended mode
#define A232_EXTENDEDCOMMANDMODE   0x66


Stefan Meyer-Kahlen



This page took 0.03 seconds to execute

Last modified: Thu, 07 Jul 11 08:48:38 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.