How can it be 'exactly right' to require info that is not yet known?
UCI pondering done right
Moderators: hgm, Rebel, chrisw
-
- Posts: 27790
- Joined: Fri Mar 10, 2006 10:06 am
- Location: Amsterdam
- Full name: H G Muller
Re: UCI pondering done right
-
- Posts: 27790
- Joined: Fri Mar 10, 2006 10:06 am
- Location: Amsterdam
- Full name: H G Muller
-
- Posts: 2487
- Joined: Tue Aug 30, 2016 8:19 pm
- Full name: Rasmus Althoff
Re: UCI pondering done right
It doesn't require info that isn't known yet. Everything is there. If you absolutely want to take opponent's time into consideration, here is the formula: current_opp_time = opp_time_from_go - your_time_until_ponderhit. Big deal. However, I wouldn't recommend that anyway because it will fall flat on games with asymmetric thinking time (i.e. time handicap).
Rasmus Althoff
https://www.ct800.net
https://www.ct800.net
-
- Posts: 27790
- Joined: Fri Mar 10, 2006 10:06 am
- Location: Amsterdam
- Full name: H G Muller
Re: UCI pondering done right
So you propose the engine should work around the flaw in the protocol, and then point out that it cannot reliably do that.
And this should make the protocol then 'exactly right'?
If you are not supposed to use the opponent time, why demand it is sent with the 'go' command at all? The whole point of sending those times is that the engine does not have to measure them by itself. You might as well require an extra parameter 'easterdate' on every 'go' command. I suppose that would have made the protocol 'exactly righter' still...
And this should make the protocol then 'exactly right'?
If you are not supposed to use the opponent time, why demand it is sent with the 'go' command at all? The whole point of sending those times is that the engine does not have to measure them by itself. You might as well require an extra parameter 'easterdate' on every 'go' command. I suppose that would have made the protocol 'exactly righter' still...
-
- Posts: 2487
- Joined: Tue Aug 30, 2016 8:19 pm
- Full name: Rasmus Althoff
Re: UCI pondering done right
There is no flaw in the protocol here that needs to be "fixed".
One of the UCI design goals was to strive for uniform handling, and the GUI just always puts both sides' time data into the go command. The engine is not obliged to evaluate irrelevant data. Since stdin/out is not paid per byte, it doesn't really make sense to "optimise" and introduce more if/else code paths that would just increase the probability of bugs.If you are not supposed to use the opponent time, why demand it is sent with the 'go' command at all?
Rasmus Althoff
https://www.ct800.net
https://www.ct800.net
-
- Posts: 27790
- Joined: Fri Mar 10, 2006 10:06 am
- Location: Amsterdam
- Full name: H G Muller
Re: UCI pondering done right
So in your judgement, requiring data to be sent at a time it is not available is not a flaw.
I am afraid that says more about your judgement than about the protocol, though... But it makes it pointless to discuss this any further.
I am afraid that says more about your judgement than about the protocol, though... But it makes it pointless to discuss this any further.
-
- Posts: 855
- Joined: Sun May 23, 2010 1:32 pm
Re: UCI pondering done right
YOU are a moderator of those forum, please act like a moderator and stop attacking everyone who don't think like you.
-
- Posts: 27790
- Joined: Fri Mar 10, 2006 10:06 am
- Location: Amsterdam
- Full name: H G Muller
Re: UCI pondering done right
Attack? Since when is questioning someone's judgement an attack? I did not even mention what it says about his judgement. If you think my above statement implies that he is an idiot, (say), then that is 100% your own conclusion... Presumably based on what you think about his judgement yourself.
Or do you agree that it is no flaw for a protocol to require something that is absolutely impossible?
Or do you agree that it is no flaw for a protocol to require something that is absolutely impossible?
-
- Posts: 855
- Joined: Sun May 23, 2010 1:32 pm
Re: UCI pondering done right
I agree that in some places the UCI protocol could have been done better, but I think it's good enough.
what I sometimes don't agree, is that I think that a moderator moderator shall be attentive and always polite with other members. This is my opinion, but English is not my first language and i could be wrong
what I sometimes don't agree, is that I think that a moderator moderator shall be attentive and always polite with other members. This is my opinion, but English is not my first language and i could be wrong
-
- Posts: 2487
- Joined: Tue Aug 30, 2016 8:19 pm
- Full name: Rasmus Althoff
Re: UCI pondering done right
Please re-read what I wrote on why it's a bad idea to evaluate the opponent's time anyway. The supplied data are not necessary, and that irrelevant data are suppplied is not a problem. And even IF you want to implement that bad idea, you DO have that information anyway.
On top of that, it's astonishing how keen you suddenly are on evaluating the opponent's time. Your source code in kingslayer for "otim" reads as follows:
Code: Select all
if(!strcmp(command, "otim")) { continue; } // move will follow immediately, wait for it
Code: Select all
if (!strcmp(command, "otim")) {
/* opponent's time (not kept, so ignore) */
continue;
Rasmus Althoff
https://www.ct800.net
https://www.ct800.net