Instructions: WB-Engines under the fritz-gui

Archive of the old Parsimony forum. Some messages couldn't be restored. Limitations: Search for authors does not work, Parsimony specific formats do not work, threaded view does not work properly. Posting is disabled.

Instructions: WB-Engines under the fritz-gui

Postby Christian » 06 Jul 2000, 21:52

Geschrieben von: / Posted by: Christian at 06 July 2000 22:52:51:
may be helpful for some of the new kids on the block:
Technical side of the Winboard Interface
Dear chess software developer,
Fritz 5.32, Nimzo99, and ChessBase 7.0 support the Winboard interface. If you would like to make your engine compatible with those programs, please have a look at the below specifications.
Here's what you need:
Mandatory:
"new" (some programs don't have that, they won't work)
"edit" - "#" - "c" - "."
"force"
"go" - "?"
"level"
"quit"

Special cases:
- "hard" - "easy" (pondering has to be off; you may ignore it if this is the default)
- "post" (only if this isn't default; you may ignore it if this is the default)

Additional:
- "analyze" - "exit" (print an error message like: "Error (unknown command): analyze" if you don't have it)
- "white" - "black" (may be ignored if Tim Mann's way works)
- "ponder" (new command, only used if activated through initfile)
- "fritz" (sent once as first command, engine may switch state to be better support our interface)
- "reset" (clear the hashtables, and other chess related information)

If you don't support some of the winboard keywords, please don't implement them with a different meaning. Please read Tim Mann's Chess Engine Communication Protocol from Jun 12 1998 for further information.
Please note that the Fritz interface has a different logic compared to Winboard. Before any computation is started the engine will receive a "new", "edit" (if it's a position), "force" (if there are moves), and all moves of the game. Then the engine will receive "level n t p" (n=moves left for next time control, t=time left for next time control, p=additional time per move). Then "hard", "easy" to switch off pondering ("new" may trigger it again, I want to be sure). The analysis is started with "go", or "analyze". "?" is used to stop a search if necessary. To be sure, "white" or "black" is sent before "go", but you may ignore it. If black is to start, the interface also uses Tim Mann's way of "new", "a2a3", "edit", furthermore it will always leave "edit" with the colour to move.
You should switch off the logfile (Crafty starts a new logfile with every "new" otherwise). You shouldn't implement Winboard commands with different meanings (Some engines use "exit" to quit the program, and "?" to show help).
There is a special command for pondering which was suggested by Crafty. If the engine doesn't support this command a suboptimal pondering will be used. A standard search will be started in this, so the opponent time may not be fully used.

Enhancements:
1. For coding of mate values please use Steven J. Edwards' proposal in his EPD specification. (mate value is 32767; 32767-1 is #1, -32767+2 is -#1, 32767-3 is #2, -32767+4 is -#2, etc.)
2. The first command sent to the engine is "fritz", the second is "xboard".
3. I introduced a new command "ponder e2e4"; this command is sent instead of "go" if the engine should start pondering. The engine should execute the move and start pondering on it. If the user plays that move, the move is sent.
4. There are two new edit commands "castle " and "ep "; castleright is one of the following: +w00, -w00, +w000, -w000, +b00, -b00, +b000, -b000; the "+" commands are superfluous since there's only a point in disabling a possible castle, but sent anyway. is the targetsquare of the ep move, so it's a3..h3 if black to move and a6..h6 if white to move. You have to activate this through the init-file.
5. Please don't clear the hashtables with "new", otherwise the engine may lose information. There's a specific command to clear the hashtables and other chess related information: "reset", which is used in tactical test suites, not during games or analyzing. Please note that current versions of Fritz 5.32 won't send this command yet. We will introduce it in the future because some programmers critisized that Fritz never actively resets the hash tables by himself and so tactical test suites might become indeterministic.

Shortcomings:
1. We found no way to set the ep square or the castle flags. So after "edit" it's always assumed that all possible castle are legal, and ep is always reset. The former may actually cause illegal moves in Fritz (which are detected and cause no further problems), but that can't be helped. Luckily these cases are rare. And most games will start from the starting position anyway.
2. Pondering may stop before the opponent made a move and if the ponder command is not supported. This won't cause problems, but the thinking time is not used optimal. In most cases it doesn't matter.
3. Some engines may not be suited perfectly to get the whole information with every position to search, they where written to work best incrementally. For example hashtables may be cleared with "new". Solution: Simply do not clear your hashtables when you know you are in Fritz mode (first command was Fritz, see above).

Initfile:
[Parameter]
CommandLine = {add command line parameters, if any}
Author = {insert your name}
Engine = {the name displayed in Fritz}
Debug = True/False {if True, a console window with the output of the engine is opened}
[Support]
AnalyzeMode = True/False {if True, engine supports "analyze", i.e. infinite mode}
PonderMode = True/False {if True, engine supports new command "ponder e2e4"}
CastleAndEP = True/False {if True, engine supports new edit commands castle and ep}

This is a draft of the interface, comments of chess programmers are very welcome.
Christian
 

Re: Instructions: WB-Engines under the fritz-gui

Postby Christian Söderström » 06 Jul 2000, 23:49

Geschrieben von: / Posted by: Christian Söderström at 07 July 2000 00:49:37:
Als Antwort auf: / As an answer to: Instructions: WB-Engines under the fritz-gui geschrieben von: / posted by: Christian at 06 July 2000 22:52:51:
may be helpful for some of the new kids on the block:
This is a draft of the interface, comments of chess programmers are very >welcome.

Hello Christian!
Thanks for the documentation! I am myself a programmer of the newly released
winboard engine Mint. (http://ds.onyx.nu/mint/) I was slightly inspired by
your post and decided to try running Mint under the demo version of Fritz 6.
It produced rather strange results, though I'm sure this is more my fault than
yours. Maybe I'll try to fix it up but I couldn't even get the debug-output
window to work and I managed to crash windows twice.
Anyway, one thing I noticed was that the interface forces the engine to play
opening lines from its own book?! I can't imagine why you'd want to do
something like that. Am I right in assuming that the endgame databases work in
the same way? This seems just plain wrong to me.
- Christian Söderström
Christian Söderström
 

Re: Instructions: WB-Engines under the fritz-gui

Postby Christian Liebert » 07 Jul 2000, 08:59

Geschrieben von: / Posted by: Christian Liebert at 07 July 2000 09:59:30:
Als Antwort auf: / As an answer to: Re: Instructions: WB-Engines under the fritz-gui geschrieben von: / posted by: Christian Söderström at 07 July 2000 00:49:37:
may be helpful for some of the new kids on the block:
This is a draft of the interface, comments of chess programmers are very >welcome.
may be helpful for some of the new kids on the block:
This is a draft of the interface, comments of chess programmers are very >welcome.

Hello Christian!
Thanks for the documentation! I am myself a programmer of the newly released
winboard engine Mint. (http://ds.onyx.nu/mint/) I was slightly inspired by
your post and decided to try running Mint under the demo version of Fritz 6.
It produced rather strange results, though I'm sure this is more my fault than
yours. Maybe I'll try to fix it up but I couldn't even get the debug-output
window to work and I managed to crash windows twice.
Anyway, one thing I noticed was that the interface forces the engine to play
opening lines from its own book?! I can't imagine why you'd want to do
something like that. Am I right in assuming that the endgame databases work in
the same way? This seems just plain wrong to me.
- Christian Söderström

Hello Christian!
Thanks for the documentation! I am myself a programmer of the newly released
winboard engine Mint. (http://ds.onyx.nu/mint/)
window to work and I managed to crash windows twice.
Anyway, one thing I noticed was that the interface forces the engine to play
opening lines from its own book?!
the same way? This seems just plain wrong to me.
- Christian Söderström
Yes, I know. I just tried it.
I was slightly inspired by >your post and decided to try running Mint under the demo version of Fritz 6. >It produced rather strange results, though I'm sure this is more my fault than yours.
It´s not me, it is mathias feist who has written that. I just want to post again for all the "new talents".
Mint is running under fritz if you start it without -xboard command (as you
have written). But it always crashes later in the game, mainly at the end.

Maybe I'll try to fix it up but I couldn't even get the debug-output
No, Fritz surely allows using
- own books and
- openingtrees of chessbase
I can't imagine why you'd want to do something like that.
Am I right in assuming that the endgame databases work in
Every wb-engine can use the nalimov tablebases under fritz if I understand your question correct. For more details please feel free to contact m. feist, see www.chessbase.com.
Hope that you get it work
Christian
Christian Liebert
 

Re: Instructions: WB-Engines under the fritz-gui

Postby Dieter Buerssner » 07 Jul 2000, 10:02

Geschrieben von: / Posted by: Dieter Buerssner at 07 July 2000 11:02:47:
Als Antwort auf: / As an answer to: Instructions: WB-Engines under the fritz-gui geschrieben von: / posted by: Christian at 06 July 2000 22:52:51:
Sorry, if this is off-topic here. But there was no email address given.
Please note that the Fritz interface has a different logic compared to Winboard.
Before any computation is started the engine will receive a "new", "edit"
(if it's a position), "force" (if there are moves), and all moves of the game.
Then the engine will receive "level n t p" (n=moves left for next time control,
t=time left for next time control, p=additional time per move).
There is a special command for pondering which was suggested by Crafty.
If the engine doesn't support this command a suboptimal pondering will be used.
A standard search will be started in this, so the opponent time may
not be fully used.
What is the reason, that the engines are sent new and all moves all the time?
To disable clearing of the hash-tables in fritz mode is easy enough, but there
is more, like updating the killer moves. With this scheme, all the information
in the "killer tables" will be lost with my program.
Why is level sent after each move? time and otim seem good enough for
syncronization of the clocks of the interface and the engine.
I don't understand the logic behind this. What is the difference between
hard; e2e4; go an ponder e2e4?

Hmm, parse error ;) Can you elaborate on this. What is suboptimal? Why?
Also, what is the exact format for the "thinking lines"? What is accepted
by Winboard, seems not to be accepted by Fritz 6.
One suggestion, instead of edit, use optionally setboard FEN.
Here ep and castling rights can be set. Programs, that understand
setboard can tell so in the ini file (or even the name of the command
that reads FEN could be set).
Regards,
Dieter
Dieter Buerssner
 

Re: Instructions: WB-Engines under the fritz-gui

Postby Christian Söderström » 07 Jul 2000, 12:25

Geschrieben von: / Posted by: Christian Söderström at 07 July 2000 13:25:05:
Als Antwort auf: / As an answer to: Re: Instructions: WB-Engines under the fritz-gui geschrieben von: / posted by: Christian Liebert at 07 July 2000 09:59:30:
may be helpful for some of the new kids on the block:
Hello Christian!
Thanks for the documentation! I am myself a programmer of the newly released
winboard engine Mint. (http://ds.onyx.nu/mint/)
Every wb-engine can use the nalimov tablebases under fritz if I understand >your question correct. For more details please feel free to contact m. feist, >see www.chessbase.com.
Yes, I know. I just tried it.
I was slightly inspired by >your post and decided to try running Mint under the demo version of Fritz 6. >It produced rather strange results, though I'm sure this is more my fault than yours.
It´s not me, it is mathias feist who has written that. I just want to post again for all the "new talents".
Mint is running under fritz if you start it without -xboard command (as you
have written). But it always crashes later in the game, mainly at the end.
No, Fritz surely allows using
- own books and
- openingtrees of chessbase
Hope that you get it work
And I hope you liked it :)
OK sorry, I'm not very knowledgable of the computerchess hierarcies :)
Yes I noticed. Very strange ...
All I know is that it played moves from its own opening book without
consulting my engine first, I found it rather upsetting :) I could
probably turn off the book in Fritz though, and Mint would obviously
churn out its own opening moves. But still it feels wrong that it
uses a built in book automatically.
What I was thinking was that Fritz would automatically jump in and
assume control of the board once it recognized the position in a
tablebase, like it does in the opening. Voila, you have tablebases
implemented in your program. I hope this is not the case. It's not
exactly fail-safe either.
Yeah, that would be a good thing. I can't figure out why the
chessbasers couldn't stick to the dodgy Winboard standards. They
are standards after all.
- Christian Söderström
Christian Söderström
 

Re: Instructions: WB-Engines under the fritz-gui

Postby Gian-Carlo Pascutto » 09 Jul 2000, 12:17

Geschrieben von: / Posted by: Gian-Carlo Pascutto at 09 July 2000 13:17:39:
Als Antwort auf: / As an answer to: Instructions: WB-Engines under the fritz-gui geschrieben von: / posted by: Christian at 06 July 2000 22:52:51:
may be helpful for some of the new kids on the block:
Then the engine will receive "level n t p" (n=moves left for next time
control, t=time left for next time control, p=additional time per move).
There is a special command for pondering which was suggested by Crafty. If the
engine doesn't support this command a suboptimal pondering will be used. A
standard search will be started in this, so the opponent time may not be fully
used.
5. Please don't clear the hashtables with "new", otherwise the engine may lose >information. There's a specific command to clear the hashtables and other >chess related information: "reset", which is used in tactical test suites, not >during games or analyzing. Please note that current versions of Fritz 5.32 >won't send this command yet. We will introduce it in the future because some >programmers critisized that Fritz never actively resets the hash tables by >himself and so tactical test suites might become indeterministic.
This is a draft of the interface, comments of chess programmers are very
welcome.
I suspect the resending of 'level' may be what causes trouble
for the current programs. Also, I do not see any way to get information
about the opponent's clock, which is important too.
Why not 'time' and 'otime' like WinBoard does ?
Again, why not use the standard engine pondering ?
You say we should not change the meaning of a WinBoard command, but
here you do exactly that. Not a nice way of designing things, and again
a major source of trouble for WinBoarders...
Any chances of the .eng interface ever being published ? Being able
to make a Fritz/Chessbase version of our engines would be a lot more
convenient to us AND the users...
Gian-Carlo Pascutto
 


Return to Archive (Old Parsimony Forum)

Who is online

Users browsing this forum: No registered users and 54 guests

cron