Moderator: Andres Valverde
Kirill Kryukov wrote:I first noticed this with "EXchess 5.01 beta 64-bit JA", in repeated time control. It plays normally until move 40, then it suddenly starts taking very long time for each move, for about 5 moves. After that it is in time trouble and has to play fast till the next control at move 80. At move 80 the pattern repeats.
I first thought it's EXchess own issue, but now there is one more engines with the same behavior - Resp 0.19 64-bit JA.
In the example screenshot above you can see that Resp case is more severe, it uses almost all its time for a few moves after move 40. In this particular game Resp had advantage before move 40, but lost the game because of time trouble.
Have you seen anything similar? Is it an engine issue, or my setup, or may be it's a 64-bit compile problem? Any ideas will be appreciated!
Kirill Kryukov wrote:I first thought it's EXchess own issue
Graham Banks wrote:Strangely enough, I haven't had this problem with EXchess, perhaps because I use the wb2uci adapters, even under Arena or ChessGUI. Seems to be safer and less troublefree than installing as a WB engine. Doesn't work for all engines though, eg, Butcher and Wing.
Kirill Kryukov wrote:Thanks H.G., Gabor and Graham! Particularly H.G. for a great explanation! Does Winboard interface have any magic to work around this, or it happens there too?
H.G.Muller wrote:Many WB engines suffer from this when you play from an external opening book.
They then receive the go command later in the game, (say at move 5), and start counting
the moves only from there. So when they reach move 40, to them it is only move 35.
The extra time on their clock that the GUI reports to them then comes as a complete surprise
to them, which they happily exploit during the remaining 5 moves, so that they have used up
nearly all time at move 45 (which they think is move 40). It then comes again as a complete
surprise (this time an unpleasant one) that they do not receive the expected new time
quota after this move, so that in fact they have to play the remaining 35 moves of the second
session in the few seconds that were left on their clock after move 45 (which they thought
to be 40). On move 75/80 the whole thing repeats. They thus play the first 5 moves of any
session except the first in the full time for the session, and the other 35 moves in just a few
seconds. Of course this means they usually do not survive upto the third session...
In principle this behavior also occurs under WinBoard. But the more book moves you have,
the less obvious the effect is. This because most engines manage their time such that they
normally do leave a safety margin of about 7 moves before any time-control point. This
because a move in a difficult position can easily take 5 times as long as an average move.
So if you had 24 moves in book, the engine realizes its error only on move 64, (at 40/40),
and then have to do the remaining 16 moves before it gets new time in 7 min, which is not
extremely much faster than normal, and usually interpreted as that the engine speeds up
in the end-game under time pressure.
has to do 16 moves
That this is so common is due to a very unclear sn confusing description of the clock issue in
the WB protocol document on Tim Mann's website. I tried to clarify it in the protocol definitin
here, based on how WB did actually manage the clocks. There is no easy work-around for engines
that suffer from this, other than play them with external book at incremental time controls
only.
Kirill Kryukov wrote:I have an idea. How about setting book position in force mode instead of using setboard command? (not sure the terminology is correct). This way an engine will count every move, so it should work? I think WB2UCI can be configured this way?
Many would need it but probably only few would like the additional "level" commands, that's my feeling at least. So even if you implement it as an option then some of these engines might get into trouble by that. This is what I wanted you to try: how many engines with the move counting problem could live with it and not run into other problems. Perhaps not by choosing engines by random as I suggested but by choosing those that appear to have that move counting problem.H.G.Muller wrote:But why would you send level commands bfore the time commands to engines that work correctly? That is just asking for trouble. Only do it to the engines that need it and like it.
So you say that the time from the "time" command would always prevail. That's fine and what I would expect. But then, what should be the idea of the additional "level" command right before "time"? Only for updating the move counter? Wouldn't that be confusing for programmers?H.G.Muller wrote:I don't share your worries about which time would prevail, from the level or the later time command. I think it is an extremely safe bet that there is not a single engine in the World that would say, on reception of a time command "hey, let's ignore this, because some time ago I received another time or level command that said I had more time! So I will keep using that old time in stead." The whole idea of the time command is that it forces the engines clock.
If an engine plays weaker due to a bug that leads to bad time management but not to time losses, then why should this affect a TD? The problem is not caused by the GUI but by the engine itself, and time management issues and bugs in general are part of the playing strength.H.G.Muller wrote:I share your doubts about catering too much to defective engines. But there are tournament managers that would go to extreme length to run as many dfferent engines as possible, even buggy ones, and if it helps them to achieve their goals if I add a smple kludge, I do consider it worthwile. If it does not hurt anything else, of course, which does not seem the case here.
If other GUIs have the same problem and you refuse to be the first GUI that fixes it, why would other GUIs like to be the first ones? So just do it, be the first one, and the others will follow. Fixing such a problem is not expensive at all, not for anyone.H.G.Muller wrote:My main point was this: If other GUIs would sent a FEN to the engine with move number 5 (say), but still award new quota at move 45, 85, etc. (in 5/40, say), but WinBoard would would award the time quota at 40, 80, etc. it would not be possible to make an engine that woud run correctly on both, as they would expect to get extra time (greedily using up all the time they had before) at a moment when they will get none, and then have to do 35 moves in near-zero time.
Sven Schüle wrote:Many would need it but probably only few would like the additional "level" commands, that's my feeling at least.
So even if you implement it as an option then some of these engines might get into trouble by that. This is what I wanted you to try: how many engines with the move counting problem could live with it and not run into other problems. Perhaps not by choosing engines by random as I suggested but by choosing those that appear to have that move counting problem.
So you say that the time from the "time" command would always prevail. That's fine and what I would expect. But then, what should be the idea of the additional "level" command right before "time"? Only for updating the move counter? Wouldn't that be confusing for programmers?
If an engine plays weaker due to a bug that leads to bad time management but not to time losses, then why should this affect a TD? The problem is not caused by the GUI but by the engine itself, and time management issues and bugs in general are part of the playing strength.
If other GUIs have the same problem and you refuse to be the first GUI that fixes it, why would other GUIs like to be the first ones? So just do it, be the first one, and the others will follow. Fixing such a problem is not expensive at all, not for anyone.
H.G.Muller wrote:Sven Schüle wrote:Many would need it but probably only few would like the additional "level" commands, that's my feeling at least.
Why do you think that? There are only two obvious wy to implement classical time controls:
The first is a counter (movesLeft) that is initialized at the level MPS parameter, and counting down, ading MPS when it reaches zero, and using a target time per move approximately equal to timeRemaining/movesLeft. Such engines would interpret the intra-game level commands without problems.
The second way is to count move number up starting from zero, and compare it to the next-larger multiple of MPS to know how many moves you still have to do, in order to calculate target time. On such engines the proposed scheme would fail. But to handle those I have added the options /...AccumulateTC (... = first or second). With this option set, the intra-game level commands would not use the moves left in the current session, but in stead send the move number of the next time control, adding the tim of all time controls upto then to use as time parameter. So at move 65 in a 40/5 game they would send level 80 10 0, so the engine would start behaving like it was in an 80/10 game.
I would be surprised if these two modes together would not capture 90%+ of all existing engines.
H.G.Muller wrote:Furthermore, I doubt your point: If programmers would be confused by this, they would be confused already: WinBoard always first sends a level command, and then a time command, on the first move. The TC parameter in the level command is totaly redundant!
H.G.Muller wrote:P.S. WinBoard 4.3.15 does recognize any KBBB...KBBB... with all like B as draws now.
Sven Schüle wrote:You assume that everyone already follows your new definition of the "level" semantics. I doubt that. In the original definition the first parameter was "moves per session", now you want it to be read as "moves left in this session". And an engine that has a move counting problem in force mode and/or when receiving an FEN will most probably also not update its move counter when receiving an additional "level" command.
That's wrong IMO, it is not always redundant. First of all it is optional for engines whether they support "time" or not. Although it may be better to support it, there are some engines that don't. Second, I already mentioned the different resolutions (seconds vs. microseconds).
To be clear: I do not say that the time control part of the WB protocol is near to perfect. But I don't think you improve it by introducing a new complexity with that changed semantics of the "level" command.
That lets me believe that you will eventually follow my advice, despite your desperate attempts to avoid it
H.G.Muller wrote:Sven Schüle wrote:You assume that everyone already follows your new definition of the "level" semantics. I doubt that. In the original definition the first parameter was "moves per session", now you want it to be read as "moves left in this session". And an engine that has a move counting problem in force mode and/or when receiving an FEN will most probably also not update its move counter when receiving an additional "level" command.
I am assuming no such thing, I am just talking about the way an engine handles the level command given at the beginning of each game. What you say is extremely unlikely: it would require that the engine programmer would have added special code in the processing of the level command to test if the game has already started, and treat the level command differently in that case. Why would they do that? What would be their motivation to treat an intra-game level command differently anyway? That it never occurs? The protocol discription does not guarantee or even suggest that anywhere. And if they do realize that it never occurs, why would they still bother? Do you have such special treatment of an intra-game level command in your engine?
H.G.Muller wrote:To be clear: I do not say that the time control part of the WB protocol is near to perfect. But I don't think you improve it by introducing a new complexity with that changed semantics of the "level" command.
IMO the semantics is not changed. What was according to you the old semantics for a level command? I think it has always been: "start playing a game with the specified time control from the current position". The protocol document never specified that it could not be sent during a game.
H.G.Muller wrote:But tell me, how would you implement multi-session time controls so that it would work in most existing WinBoard engines? [...]
Sven Schüle wrote:It is the other way round. There is no such special handling of intra-game "level" commands, the handling is always the same: the first of three numbers determines the number of moves per session counted from the beginning of the game. WB engines subtract the number of moves already played from that number to get the number of moves left until next time control. So if they always count the number of moves from ply 0 then this means that they do *not* read the first argument of "level" as number of moves counted from the *current position*.
I am pretty sure that this has always been the only intent of the WB protocol specifiers for "level". As an example, I also checked the source code of three native WB engines: Delfi, Crafty, Romichess to verify that they handle it as I expected.
As a consequence, I think the following could happen for example: an engine receives "level 40 40 0", then thinks a minute for its move (let's forget opening books for a moment), then receives "level 39 39 0" which means it has total 39 minutes for total 39 moves from which 1 minute for 1 move has already passed; and so on, until it receives "level 20 20 0" after it has already spent 20 minutes for 20 moves. So what should the engine do now? According to its last info the time control was defined at move 20, so it adds another 20 minutes for the next 20 moves. But is that intended?
The multi-session topic may be related to what we discuss here but at least your proposal to optionally send intra-game "level" commands to some engines is something different from the multi-session feature which is definitely desired to have, so I would prefer to leave it out of this discussion.
Return to Winboard and related Topics
Users browsing this forum: No registered users and 35 guests