Feedback request: libchessinterface

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

diep
Posts: 1822
Joined: Thu Mar 09, 2006 11:54 pm
Location: The Netherlands

Re: Feedback request: libchessinterface

Post by diep »

hgm wrote:
diep wrote:What would be interesting to some is being able to read the chessbase CTG book and even more their databases. But i don't know whether that's legal to build - you have to figure that out first.
The book format has been decoded. I have a program that can read it.

Knowing what is in the book (mostly raw statistics) is not enough to emulate it, however. You would have to know how the probing code uses the raw stats to convert it to playing probabilities. (Which is furthermore dependent on user settings.)
Most interesting - link?
User avatar
hgm
Posts: 27837
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Feedback request: libchessinterface

Post by hgm »

diep
Posts: 1822
Joined: Thu Mar 09, 2006 11:54 pm
Location: The Netherlands

Re: Feedback request: libchessinterface

Post by diep »

I see the description - where is the code implementing this you refer to?

Kind Regards,
Vincent
JonasThiem
Posts: 36
Joined: Sun Sep 02, 2012 5:23 pm

HGM question: multiple time controls with level

Post by JonasThiem »

I assume this is the "level 40 25+5 0" suggestion in the CECP protocol. Is there a GUI that actually implements this? It appears to be a nice thing to add though, good catch.

I'm wondering, does stuff like "level 40+10 25+5+5 0" for 40 moves in 25, then 10 moves in 5 minutes, then 5 minutes for the remaining game exist?

I guess the CECP draft by HGM would need some expansion first to allow for multiple time controls (e.g., more than 2 which it can do now).
User avatar
hgm
Posts: 27837
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Feedback request: libchessinterface

Post by hgm »

diep wrote:
I see the description - where is the code implementing this you refer to?

Kind Regards,
Vincent
I wrote that myself, of course. The intension was to write a converter from CTG to Polyglot format. But I never finished it, because I did not know how to calculate the weights. (And it was not really a high-priority project.)

If you want I an e-mail you the code. If I can still find it. I don't recall what exactly it prints, though. Probably FEN + list of moves for that position.
diep
Posts: 1822
Joined: Thu Mar 09, 2006 11:54 pm
Location: The Netherlands

Re: HGM question: multiple time controls with level

Post by diep »

JonasThiem wrote:I assume this is the "level 40 25+5 0" suggestion in the CECP protocol. Is there a GUI that actually implements this? It appears to be a nice thing to add though, good catch.

I'm wondering, does stuff like "level 40+10 25+5+5 0" for 40 moves in 25, then 10 moves in 5 minutes, then 5 minutes for the remaining game exist?

I guess the CECP draft by HGM would need some expansion first to allow for multiple time controls (e.g., more than 2 which it can do now).
When i played Korchnoi end of 90s, the game lasted nearly 7 hours.

Time control was something like: 40 in 2 , then 20 in 1 , then 30 minutes all.
User avatar
hgm
Posts: 27837
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: HGM question: multiple time controls with level

Post by hgm »

JonasThiem wrote:I assume this is the "level 40 25+5 0" suggestion in the CECP protocol. Is there a GUI that actually implements this? It appears to be a nice thing to add though, good catch.

I'm wondering, does stuff like "level 40+10 25+5+5 0" for 40 moves in 25, then 10 moves in 5 minutes, then 5 minutes for the remaining game exist?

I guess the CECP draft by HGM would need some expansion first to allow for multiple time controls (e.g., more than 2 which it can do now).
This idea has been abandoned. After discussion here on the forum, the format for multi-session TCs that we decided upon was

level MPS1 TC1 INC1; MPS2 TC2 INC2; ...

(so triples separated by semi-colons), and that the level command could be resent at the end of a session to change the parameters (leaving out those for the sessions that have already been played). The advantage was that this works with most existing engines.

WinBoard does not yet implement this, though. (But I think ChessGUI does.)

I still want to extend the specs with other TC modes, (like Bronstein and Byoyomi) by assigning a meaning to negative values of the parameters.
User avatar
Giorgio Medeot
Posts: 52
Joined: Fri Jan 29, 2010 2:01 pm
Location: Ivrea, Italy

Re: HGM question: multiple time controls with level

Post by Giorgio Medeot »

Hi,
just a check: I am referring to this copy of the protocol specs: Is this the official place? I'm asking because I can't find a reference to multiple levels specification (I guess they are just not up to date).

Thanks,
  • Giorgio
diep
Posts: 1822
Joined: Thu Mar 09, 2006 11:54 pm
Location: The Netherlands

Re: HGM question: multiple time controls with level

Post by diep »

hgm wrote:
JonasThiem wrote:I assume this is the "level 40 25+5 0" suggestion in the CECP protocol. Is there a GUI that actually implements this? It appears to be a nice thing to add though, good catch.

I'm wondering, does stuff like "level 40+10 25+5+5 0" for 40 moves in 25, then 10 moves in 5 minutes, then 5 minutes for the remaining game exist?

I guess the CECP draft by HGM would need some expansion first to allow for multiple time controls (e.g., more than 2 which it can do now).
This idea has been abandoned. After discussion here on the forum, the format for multi-session TCs that we decided upon was

level MPS1 TC1 INC1; MPS2 TC2 INC2; ...

(so triples separated by semi-colons), and that the level command could be resent at the end of a session to change the parameters (leaving out those for the sessions that have already been played). The advantage was that this works with most existing engines.

WinBoard does not yet implement this, though. (But I think ChessGUI does.)

I still want to extend the specs with other TC modes, (like Bronstein and Byoyomi) by assigning a meaning to negative values of the parameters.
in DEP (diep engine protocol) i implemented it simpler.
Just use 1 command for timecontrol 1, the normal level command
and then use different command(s) for the rest.
So level2 and level3. That keeps compatible with winboard.

Note DEP uses textmode and is similar to winboard in that the engine keeps state; it's not a stateless protocol.

A big difference is the 'ack' shipped back after each command.
User avatar
hgm
Posts: 27837
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: HGM question: multiple time controls with level

Post by hgm »

I guess this did not find its way in the official specs yet. Because WB does not implement it yet, I guess I never felt the urgency.

In a discussion here, however, I was convinced that the best way to do it in the protocol would be with multiple triples separated by semi-colons, subject to a feature xlevel=1. Implementations are expected to still send a new level command at the start of each new session with deviating parameters, though, when the user has set such a TC and the engine did not explicitly send xlevel=1. This because it seemed to work for ~80% of all existing engines. Only to engines that did send xlevel=1 the parameters of future sessions would be suffixed to those for the upcoming one, however. This system is mentioned in the specs at the link. The xlevel=1 extension is just for engines that want to have a preview, so they cannot be tricked by treacherous TCs like 40/3600:30+0.

I furthermore plan to let negative INC parameters indicate the specified time is only a maximum, and that you don't get more time added to your clock than you actually used. (b. So that level 0 0 -10 basically becomes 10 sec/move maximum, like st 10 (but usable in a multi-session context). While level 0 5 -10 would specify a Bronstein TC with 5 min initially, and the first 10 sec thinking on each move not deducted from your clock (because it gets added back afterwards, if you used more than 10 sec, and otherwise it gets added what you actually used). And a 'sudden-death' (T+0) session that is not the last session would not really have 'death' at its end, but just transfer to the next session. So that level 0 60 0; 0 0 -30 would specify a byoyomi TC of 60 min for an arbitrary number of moves, followed by 30 sec/move max (non-accumulating).