Authors of WinBoard SMP engines, take note!

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

Dirt
Posts: 2851
Joined: Wed Mar 08, 2006 10:01 pm
Location: Irvine, CA, USA

Re: Authors of WinBoard SMP engines, take note!

Post by Dirt »

hgm wrote:As I wrote above, WinBoard displays any variation the engine produces as thinking output, in the engine-output window. That would automatically include multi-variation.
The current results are less than ideal. I added "MultiPV=4" to my polyglot file for Rybka and analyzed [d]rnbqk1nr/pppp1ppp/8/2b1p3/3PP3/8/PPP2PPP/RNBQKBNR w KQkq - 1 3

At some point the analysis window showed
Image
and then the next update showed
Image
It then continued to delete lines from the bottom until one was left, and then the next update showed five lines like the first image above, but one ply deeper. Showing the worst variation on top is a little confusing, though understandable, but the deletions make it more or less useless.
ernest
Posts: 2041
Joined: Wed Mar 08, 2006 8:30 pm

Re: Authors of WinBoard SMP engines, take note!

Post by ernest »

Sorry, Greg and H.G., I did not see that the same question about multi-variation had just been asked :o

I have another one: why is it impossible to have 64-bit engines run in Winboard?
User avatar
hgm
Posts: 27790
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Authors of WinBoard SMP engines, take note!

Post by hgm »

Greg, can you send me the debug file?

It must be something Polyglot does that causes the deletion of engine-output lines. Normally all lines stay in the Window until the engine moves, or a move is sent to the engine.

If your OS can run 64-bit engines, and your OS can run WinBoard, you can run the engines under WinBoard.
Dirt
Posts: 2851
Joined: Wed Mar 08, 2006 10:01 pm
Location: Irvine, CA, USA

Re: Authors of WinBoard SMP engines, take note!

Post by Dirt »

hgm wrote:Greg, can you send me the debug file?

It must be something Polyglot does that causes the deletion of engine-output lines. Normally all lines stay in the Window until the engine moves, or a move is sent to the engine.
The Polyglot log for one ply is pasted below. If you want the whole thing you could PM me your email or something.

Code: Select all

Engine->Adapter: info depth 3
Engine->Adapter: info multipv 1 depth 3 score cp 178 hashfull 0 time 49 nodes 2388 nps 49904 pv d4c5
Adapter->XBoard: 3 +178 5 2388 dxc5
Engine->Adapter: info multipv 2 depth 2 score cp 29 hashfull 0 time 36 nodes 1630 nps 46364 pv g1f3
Adapter->XBoard: 2 +29 4 1630 Nf3
Engine->Adapter: info multipv 3 depth 2 score cp 29 hashfull 0 time 39 nodes 1692 nps 44425 pv g1e2
Adapter->XBoard: 2 +29 4 1692 Ne2
Engine->Adapter: info multipv 4 depth 2 score cp 8 hashfull 0 time 24 nodes 1497 nps 63872 pv c2c3
Adapter->XBoard: 2 +8 2 1497 c3
Engine->Adapter: info multipv 1 depth 3 score cp 178 hashfull 0 time 49 nodes 2388 nps 49904 pv d4c5
Adapter->XBoard: 3 +178 5 2388 dxc5
Engine->Adapter: info multipv 2 depth 3 score cp 3 hashfull 0 time 64 nodes 3037 nps 48592 pv g1f3
Adapter->XBoard: 3 +3 6 3037 Nf3
Engine->Adapter: info multipv 3 depth 2 score cp 29 hashfull 0 time 39 nodes 1692 nps 44425 pv g1e2
Adapter->XBoard: 2 +29 4 1692 Ne2
Engine->Adapter: info multipv 4 depth 2 score cp 8 hashfull 0 time 24 nodes 1497 nps 63872 pv c2c3
Adapter->XBoard: 2 +8 2 1497 c3
Engine->Adapter: info multipv 1 depth 3 score cp 178 hashfull 0 time 49 nodes 2388 nps 49904 pv d4c5
Adapter->XBoard: 3 +178 5 2388 dxc5
Engine->Adapter: info multipv 2 depth 3 score cp 3 hashfull 0 time 64 nodes 3037 nps 48592 pv g1f3
Adapter->XBoard: 3 +3 6 3037 Nf3
Engine->Adapter: info multipv 3 depth 3 score cp 3 hashfull 0 time 70 nodes 3107 nps 45450 pv g1e2
Adapter->XBoard: 3 +3 7 3107 Ne2
Engine->Adapter: info multipv 4 depth 2 score cp 8 hashfull 0 time 24 nodes 1497 nps 63872 pv c2c3
Adapter->XBoard: 2 +8 2 1497 c3
Engine->Adapter: info multipv 1 depth 3 score cp 178 hashfull 0 time 49 nodes 2388 nps 49904 pv d4c5
Adapter->XBoard: 3 +178 5 2388 dxc5
Engine->Adapter: info multipv 2 depth 3 score cp 15 hashfull 0 time 74 nodes 3287 nps 45484 pv c2c3
Adapter->XBoard: 3 +15 7 3287 c3
Engine->Adapter: info multipv 3 depth 3 score cp 3 hashfull 0 time 64 nodes 3037 nps 48592 pv g1f3
Adapter->XBoard: 3 +3 6 3037 Nf3
Engine->Adapter: info multipv 4 depth 3 score cp 3 hashfull 0 time 70 nodes 3107 nps 45450 pv g1e2
Adapter->XBoard: 3 +3 7 3107 Ne2
Engine->Adapter: info multipv 1 depth 3 score cp 178 hashfull 0 time 49 nodes 2388 nps 49904 pv d4c5
Adapter->XBoard: 3 +178 5 2388 dxc5
Engine->Adapter: info multipv 2 depth 3 score cp 15 hashfull 0 time 74 nodes 3287 nps 45484 pv c2c3
Adapter->XBoard: 3 +15 7 3287 c3
Engine->Adapter: info multipv 3 depth 3 score cp 14 hashfull 0 time 86 nodes 3440 nps 40960 pv d4e5
Adapter->XBoard: 3 +14 9 3440 dxe5
Engine->Adapter: info multipv 4 depth 3 score cp 3 hashfull 0 time 64 nodes 3037 nps 48592 pv g1f3
Adapter->XBoard: 3 +3 6 3037 Nf3
Engine->Adapter: info depth 3 time 94 nodes 4134 nps 45034  
Engine->Adapter: info depth 4
Dirt
Posts: 2851
Joined: Wed Mar 08, 2006 10:01 pm
Location: Irvine, CA, USA

Re: Authors of WinBoard SMP engines, take note!

Post by Dirt »

ernest wrote:Sorry, Greg and H.G., I did not see that the same question about multi-variation had just been asked :o
I'm happy to see that someone else is interested.
ernest
Posts: 2041
Joined: Wed Mar 08, 2006 8:30 pm

Re: Authors of WinBoard SMP engines, take note!

Post by ernest »

Dirt wrote:The Polyglot log for one ply is pasted below.
Any news? :)
User avatar
hgm
Posts: 27790
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Authors of WinBoard SMP engines, take note!

Post by hgm »

It seems in the above engine output, PV lines are sent repeatedly: each time one of the four PV lines is increased in depth from 2 to 3, not only the new line is sent, but also a repetition of all the other PVs, which are still at depth 2.

This is not what the engine should do. Even if WinBoard would display such lines, it would needlessly eat up space in the engine-output window, as the lines are already there exactly as repeated. WinBoard reacts by clearing the engine-output window when it receives a PV with lower depth as the one it already has, as it assumes a new search has started.

In the end the 4 d=3 lines should have been displayed, though, which is the intended effect. But you would have lost all d=2 info, which is unintended. And if the search would have been continued with d=4, all d=4 lines would have immediately been cleared away by the following (repeated) d=3 lines, untill all d=4 lines are available.

A WinBoard engine running in multi-PV mode should not repeat lower-depth lines in its thinking output, but only send the PVs that are truly new.
Harald
Posts: 317
Joined: Thu Mar 09, 2006 1:07 am

Re: Authors of WinBoard SMP engines, take note!

Post by Harald »

hgm wrote:WinBoard reacts by clearing the engine-output window when it receives a PV with lower depth as the one it already has, as it assumes a new search has started.
Ah, that's the reason why the output sometimes just disappears when my
engine prints its PV. I have a strange depth management in the search
with increments and decrements a fraction of a ply and somehow this
may go down through the iterative search and its output. Or may be I write
the PV at each new best move in ply 0. I can't remember exactly without
looking in the source. But I plan to clean up this mess if I ever work on the
engine again.

Harald
ernest
Posts: 2041
Joined: Wed Mar 08, 2006 8:30 pm

Re: Authors of WinBoard SMP engines, take note!

Post by ernest »

hgm wrote:It seems in the above engine output, PV lines are sent repeatedly
I wonder if this is special to Rybka, or if it is the case for all (or most) UCI engines supporting multi-variation PVs.
User avatar
hgm
Posts: 27790
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Authors of WinBoard SMP engines, take note!

Post by hgm »

I have no idea. If this is standard behavior for UCI engines, it should be considered an error of Polyglot translating UCI to WB protocol. If Polyglot would only forward those lines to WB it is not receiving for a second or later time, things would work smoothly.