Designing an analysis friendly Stockfish?

Code, algorithms, languages, construction...
BB+
Posts: 1484
Joined: Thu Jun 10, 2010 4:26 am

Re: Designing an analysis friendly Stockfish?

Post by BB+ » Mon Jan 31, 2011 4:39 am

I am seeing a slow down of ~15%. Is this to be expected?
If that is just NPS, then "yes" is the likely answer --- for instance, turning the hash table completely off will give you more NPS (it does more make/unmake operations as it spends less time in memory lookups), but the time to reach a given depth will go way up.

gaard
Posts: 127
Joined: Thu Jun 10, 2010 1:39 am
Real Name: Martin Wyngaarden
Location: Holland, Michigan

Re: Designing an analysis friendly Stockfish?

Post by gaard » Mon Jan 31, 2011 6:19 am

gaard wrote:
mcostalba wrote:It would look like this:

Code: Select all

if (tte && (PvNode ? ok_to_use_TT_PV(tte, depth, alpha, beta, ply) : ok_to_use_TT(tte, depth, beta, ply))
 {
    TT.refresh(tte);
    ss->bestMove = ttMove; // Can be MOVE_NONE
    return value_from_tt(tte->value(), ply);
}
I made the changes both in the normal and qsearch parts of search.cpp. I am seeing a slow down of ~15%. Is this to be expected?
For anyone interested,

http://dl.dropbox.com/u/11904592/stockf ... _F_PGO.zip

Should you ever want to switch to the default behavior, there is now a UCI option to do so. PH is on by default. The bench feature uses different positions in this version also, so (bench)marks from this version should not be compared to earlier versions or JA's builds.

Prima
Posts: 328
Joined: Tue Dec 14, 2010 6:12 am

Re: Designing an analysis friendly Stockfish?

Post by Prima » Mon Jan 31, 2011 6:42 am

Thanks gaad for this Stockfish version. For some reason, your PGO doesn't work in my Q6700 (Win 7, 64-bit). Anyway, I've made Microsoft compiles (Ms VS2010) and a Microsoft PGO compile.
Attachments
Stockfish-2.01PersistentHash-MS-VS2010+PGO-x64.7z
Stockfish 2.01 with Persistent Hash-F. Microsoft Visual Studio2010 and MsVS2010 PGO x64 Compiles
(217.03 KiB) Downloaded 248 times

gaard
Posts: 127
Joined: Thu Jun 10, 2010 1:39 am
Real Name: Martin Wyngaarden
Location: Holland, Michigan

Re: Designing an analysis friendly Stockfish?

Post by gaard » Mon Jan 31, 2011 6:58 am

Prima wrote:Thanks gaad for this Stockfish version. For some reason, your PGO doesn't work in my Q6700 (Win 7, 64-bit). Anyway, I've made Microsoft compiles (Ms VS2010) and a Microsoft PGO compile.
Was there a specific error you were getting? or was it just failing to start?

BB+
Posts: 1484
Joined: Thu Jun 10, 2010 4:26 am

Re: Designing an analysis friendly Stockfish?

Post by BB+ » Mon Jan 31, 2011 7:01 am

PH is on by default.
Is this really "Persistent Hash" (that is, it saves positions to disk, and then loads them back when desired), or is it just a more analysis-friendly hashing scheme?

gaard
Posts: 127
Joined: Thu Jun 10, 2010 1:39 am
Real Name: Martin Wyngaarden
Location: Holland, Michigan

Re: Designing an analysis friendly Stockfish?

Post by gaard » Mon Jan 31, 2011 7:05 am

BB+ wrote:
PH is on by default.
Is this really "Persistent Hash" (that is, it saves positions to disk, and then loads them back when desired), or is it just a more analysis-friendly hashing scheme?
The latter. I guess preserve analysis would be more appropriate. I had forgotten that V. Rajlich had coined PH to mean "saved to disk" :o

mcostalba
Posts: 91
Joined: Thu Jun 10, 2010 11:45 pm
Real Name: Marco Costalba

Re: Designing an analysis friendly Stockfish?

Post by mcostalba » Mon Jan 31, 2011 7:15 am

gaard wrote:
mcostalba wrote:It would look like this:

Code: Select all

if (tte && (PvNode ? ok_to_use_TT_PV(tte, depth, alpha, beta, ply) : ok_to_use_TT(tte, depth, beta, ply))
 {
    TT.refresh(tte);
    ss->bestMove = ttMove; // Can be MOVE_NONE
    return value_from_tt(tte->value(), ply);
}
I made the changes both in the normal and qsearch parts of search.cpp. I am seeing a slow down of ~15%. Is this to be expected?
The above code should have zero speed impact.

Prima
Posts: 328
Joined: Tue Dec 14, 2010 6:12 am

Re: Designing an analysis friendly Stockfish?

Post by Prima » Mon Jan 31, 2011 7:16 am

gaard wrote:
Prima wrote:Thanks gaad for this Stockfish version. For some reason, your PGO doesn't work in my Q6700 (Win 7, 64-bit). Anyway, I've made Microsoft compiles (Ms VS2010) and a Microsoft PGO compile.
Was there a specific error you were getting? or was it just failing to start?
I've attached the error report with your PGO compile in my Core2 Quad Q6700, Win 7 64-bit OS.

EDIT: The file is 269KB and is considered too big to upload in the forum. Here's Rapid share link: http://rapidshare.com/files/445415842/S ... Report.PNG

gaard
Posts: 127
Joined: Thu Jun 10, 2010 1:39 am
Real Name: Martin Wyngaarden
Location: Holland, Michigan

Re: Designing an analysis friendly Stockfish?

Post by gaard » Mon Jan 31, 2011 7:39 am

Prima wrote:
gaard wrote:
Prima wrote:Thanks gaad for this Stockfish version. For some reason, your PGO doesn't work in my Q6700 (Win 7, 64-bit). Anyway, I've made Microsoft compiles (Ms VS2010) and a Microsoft PGO compile.
Was there a specific error you were getting? or was it just failing to start?
I've attached the error report with your PGO compile in my Core2 Quad Q6700, Win 7 64-bit OS.

EDIT: The file is 269KB and is considered too big to upload in the forum. Here's Rapid share link: http://rapidshare.com/files/445415842/S ... Report.PNG
http://dl.dropbox.com/u/11904592/stockfish_201_PA_G.7z

Does this one fail for you too?

Prima
Posts: 328
Joined: Tue Dec 14, 2010 6:12 am

Re: Designing an analysis friendly Stockfish?

Post by Prima » Mon Jan 31, 2011 8:25 am

gaard wrote:http://dl.dropbox.com/u/11904592/stockfish_201_PA_G.7z

Does this one fail for you too?
gaad, thanks for the build. The "Stockfish 2.0.1 PA G" now works in my Q6700. I was just pointing out the error, in case other Q6700 owners encountered the same problem.

Just out of curiosity, what does "PA_G" mean in the updated Stockfish 2.0.1 build?

Regards,
Prima.

Post Reply