Saving pv to file

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

User avatar
cdani
Posts: 2204
Joined: Sat Jan 18, 2014 10:24 am
Location: Andorra

Saving pv to file

Post by cdani »

Hi. I plan to make a version of Stockfish that saves the principal variation found in a text file and then loads it again to save analysis time.
It will not save the pv itself, but any move in the pv that for example is depth >= 10.
The file will be like this, one position per line

fen;move;depth

There will be an uci parameter that will be the pv file. When set, it will load it and save the readed positions to the hash. And it will continue saving to the file any new moves that become pv and where analyzed at depth >= 10.

Do you think it will work as intended? Of course, this version will treat all the analysis as a single session, meaning that the hash counter will not change even if the users goes back and forward.

Thanks
User avatar
cdani
Posts: 2204
Joined: Sat Jan 18, 2014 10:24 am
Location: Andorra

Re: Saving pv to file

Post by cdani »

This version is intended for analysis, not for playing. Anyway sure can be used for playing also.
User avatar
hgm
Posts: 27790
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Saving pv to file

Post by hgm »

It seems better to save all deep hash entries in a file (and even the somewhat less deep when they are PV). That would imply the PV. Saving only the PV might not save all that much time.