pv info not at end of line ?

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

stevenaaus
Posts: 608
Joined: Wed Oct 13, 2010 9:44 am
Location: Australia

pv info not at end of line ?

Post by stevenaaus »

Ignacio Garcia wrote:
UCI: Some engines do not send pv token last. Because this is not possible to see the information sent by engine after pv. (happened with Gaviota
Hmmm - Gaviota 0.85.1 adds a "hashfull" info after the pv.
I suppose this is fine by UCI standards, but do any other engines send infos after pv on the same line ?
now changed by Miguel
I guess this change will be in his next release ?
But is better the GUI be ready for this.
Yes... but it's such a nice optimisation :P So how many engines do this ?
tpetzke
Posts: 686
Joined: Thu Mar 03, 2011 4:57 pm
Location: Germany

Re: pv info not at end of line ?

Post by tpetzke »

I actually send them in the order the UCI protocol suggests them

so a typical info string in iCE looks like this
info depth 3 seldepth 8 time 0 nodes 1268 pv d2d4 d7d5 c1f4 nps 1267999 score cp 15 hashfull 0 tbhits 0
Thomas...
User avatar
hgm
Posts: 27808
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: pv info not at end of line ?

Post by hgm »

I guess this would also fool UCI2WB.
tpetzke
Posts: 686
Joined: Thu Mar 03, 2011 4:57 pm
Location: Germany

Re: pv info not at end of line ?

Post by tpetzke »

I don't know why it is considered so difficult just to parse an input string. In the GUI I've written I just parse it piece by piece no matter in what order they come

like this (sorry is in Pascal)

Code: Select all

    if strList[i]='pv' then
    begin
      while &#40;i+1 < strList.Count&#41; and &#40;not&#40;reservedWord&#40;strList.Strings&#91;i+1&#93;))) do
      begin
        aInfoRec.pv&#58;=aInfoRec.pv+strList.Strings&#91;i+1&#93;+' ';
        Inc&#40;i&#41;;
      end;
    end  else

    if strList&#91;i&#93;='time' then
    begin
      if i+1 < strList.Count then
      try
        aInfoRec.time&#58;=StrToInt&#40;strList.Strings&#91;i+1&#93;);
      except
        on E&#58;Exception do aInfoRec.time&#58;=0;
      end;
      Inc&#40;i,1&#41;;
    end  else          
Thomas...
User avatar
hgm
Posts: 27808
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: pv info not at end of line ?

Post by hgm »

It is not difficult, but it takes time code. What UCI2WB does is simply

printf(strstr(lineReceivedFromEngine, " pv ") + 4);
IGarcia
Posts: 543
Joined: Mon Jul 05, 2010 10:27 pm

Re: pv info not at end of line ?

Post by IGarcia »

hgm wrote:It is not difficult, but it takes time code. What UCI2WB does is simply

printf(strstr(lineReceivedFromEngine, " pv ") + 4);
The problem is not getting the pv, wich is done correctly by SCID.

The problem is the tokens after the pv are not parsed at all. The loop has a break, assuming the pv is the last token sent by engine.

I havent tested iCE (wich is for windows) in SCID, but if im not wrong, there will be problems to see any info after the pv.


So, as posted by Thomas, if the Ice info is in ths way, I bet the nps, score hash and tb will never be displayed in scid.

Code: Select all

info depth 3 seldepth 8 time 0 nodes 1268 pv d2d4 d7d5 c1f4 nps 1267999 score cp 15 hashfull 0 tbhits 0
I will give a try to this combination, iCE + SCIDvsPC in a old notebook wich still has a windows xp and let you know.


Ignacio.
User avatar
hgm
Posts: 27808
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: pv info not at end of line ?

Post by hgm »

IGarcia wrote:The problem is the tokens after the pv are not parsed at all. The loop has a break, assuming the pv is the last token sent by engine.
Ah, I see. Well, at least UCI2WB would not suffer from that. There you just get the stuff appended to the PV in the sisplay. But to extract other info, each keyword has its own strstr, so it is always found if it is there.
stevenaaus
Posts: 608
Joined: Wed Oct 13, 2010 9:44 am
Location: Australia

Re: pv info not at end of line ?

Post by stevenaaus »

OK. I guess i should parse the line fully. (now in svn).
The known tokens are

cp
cpuload
currline
currmove
currmovenumber
depth
hashfull
lowerbound
mate
multipv
nodes
nps
pv
refutation
sbhits
score
seldepth
string
tbhits
time
upperbound

Are there any more ?
IGarcia
Posts: 543
Joined: Mon Jul 05, 2010 10:27 pm

Re: pv info not at end of line ?

Post by IGarcia »

tpetzke wrote:I actually send them in the order the UCI protocol suggests them

so a typical info string in iCE looks like this
info depth 3 seldepth 8 time 0 nodes 1268 pv d2d4 d7d5 c1f4 nps 1267999 score cp 15 hashfull 0 tbhits 0
Thomas...
After installing on windows, I confirm that iCE does not show any info under SCIDvsPC.
By commenting out the line 168348 in scid.gui, the break in the loop, iCE stat showing all info:

Image


Still, I don't know all the code and can't say if commenting out will make code slower, or break other SCID components, like multipv display, etc...


A couple of commments, for Thomas: The engine is iCE V02 built 1092 but in the readme the title says "iCE 0.2 Build 1097 by ... " And later again build 1097 fixes a time control bug. When running executable also confirms its 1092 build, with date 2011.10.17. So teh readme does not match the executable. (I downloaded the only engine zip)

For Steven: SCISvsPC 4.7 for windows has in the initial configuration cant open the eco file, neither teh spell checker file because they point to your local folder "C:\Documents and Settings\Steven\Desktop\... etc"


Regards,

Ignacio.
stevenaaus
Posts: 608
Joined: Wed Oct 13, 2010 9:44 am
Location: Australia

Re: pv info not at end of line ?

Post by stevenaaus »

For Steven: SCISvsPC 4.7 for windows has in the initial configuration cant open the eco file, neither teh spell checker file because they point to your local folder "C:\Documents and Settings\Steven\Desktop\... etc"
dammit