Seeking an explanation in a bit different direction, I don't know anything about operating systems but is it not possible that clearing the hash might cause the operating system, presumably Windows if it's a match against Rybka, change the priority of the thread with the engine? A chessprogram will not always have the same priority if you start it up, I believe Bob posted that, it may take several tries of starting up before you get a good speed and this has to do with the priority given by the OS. Rybka is a process, not a threaded application and that might make another difference maybe. At least, something like this sounds a bit more probable to me than the engine getting hash hits from a previous game?
Regards, Eelco
SF 191 Why not clear TT?
Moderator: Ras
-
Eelco de Groot
- Posts: 4693
- Joined: Sun Mar 12, 2006 2:40 am
- Full name: Eelco de Groot
Re: SF 191 Why not clear TT?
Debugging is twice as hard as writing the code in the first
place. Therefore, if you write the code as cleverly as possible, you
are, by definition, not smart enough to debug it.
-- Brian W. Kernighan
place. Therefore, if you write the code as cleverly as possible, you
are, by definition, not smart enough to debug it.
-- Brian W. Kernighan
-
mcostalba
- Posts: 2684
- Joined: Sat Jun 14, 2008 9:17 pm
Re: SF 191 Why not clear TT?
On the other hand I see that don't understanding why it might be beneficial does not prevent you to joke other people workHoudini wrote:I don't like to do something without at least trying to understand why it might be beneficial.mcostalba wrote:Please feel free to repeat the test (we used 1'+0" TC) and take us to the wonderful world of real medicine
-
Ralph Stoesser
- Posts: 408
- Joined: Sat Mar 06, 2010 9:28 am
Re: SF 191 Why not clear TT?
It's proven that there are hash hits from previous games, and the ELO difference is evident. I think Marco is right here.Eelco de Groot wrote:Seeking an explanation in a bit different direction, I don't know anything about operating systems but is it not possible that clearing the hash might cause the operating system, presumably Windows if it's a match against Rybka, change the priority of the thread with the engine? A chessprogram will not always have the same priority if you start it up, I believe Bob posted that, it may take several tries of starting up before you get a good speed and this has to do with the priority given by the OS. Rybka is a process, not a threaded application and that might make another difference maybe. At least, something like this sounds a bit more probable to me than the engine getting hash hits from a previous game?
Regards, Eelco
-
micron
- Posts: 155
- Joined: Mon Feb 15, 2010 9:33 am
- Location: New Zealand
Re: SF 191 Why not clear TT?
Another short-term (and hence credible) impact could arise if the openings suite is not randomized. If, for instance, these two openings were played in succession:Houdini wrote:Assuming that one plays all positions twice with inverted colors, it is clear that the second game might benefit slightly from the analysis of the first game if the TC is that short that an important part of the entire game tree can be held in the hash table.
But that is an immediate impact (every second game benefits from the previous game), and not the situation that you describe in the SF-Rybka3 match where "after several hundreds games" there would be some mysterious impact from not clearing the hash. It simply doesn't make sense.
[ECO "E92"]
[Opening "King's Indian"]
[Variation "Gligoric-Taimanov system"]
1.d4 Nf6 2.c4 g6 3.Nc3 Bg7 4.e4 d6 5.Nf3 O-O 6.Be2 e5 7.Be3 Ng4 8.Bg5 f6 9.Bh4 Qd7 10.Bg3 *
[ECO "E92"]
[Opening "King's Indian"]
[Variation "Gligoric-Taimanov system"]
1.d4 Nf6 2.c4 g6 3.Nc3 Bg7 4.e4 d6 5.Nf3 O-O 6.Be2 e5 7.Be3 Ng4 8.Bg5 f6 9.Bh4 Qd7 10.O-O *
there would be significant overlap of the search trees, and TT remnants from the first opening would be useful for the second.
Such an effect would disappear if the openings suite were randomly permuted before each engine-testing match.
Robert P.
-
Ralph Stoesser
- Posts: 408
- Joined: Sat Mar 06, 2010 9:28 am
Re: SF 191 Why not clear TT?
Btw, speaking about king safety eval. You have the following bonus constants for safe non-contact checks
I'd say the KnightCheckBonus should be higher than 1 because a safe check from a knight is more dangerous than a check from a bishop, because the only way to escape from knight's check is to move the king. KnightCheckBonus = 2 works for me in in ultra fast games. (~ +5 Elo)
Code: Select all
// Bonuses for enemy's safe checks
...
const int QueenCheckBonus = 3;
const int RookCheckBonus = 2;
const int BishopCheckBonus = 1;
const int KnightCheckBonus = 1;
-
mcostalba
- Posts: 2684
- Joined: Sat Jun 14, 2008 9:17 pm
Re: SF 191 Why not clear TT?
Thanks Ralph, I will add your tweak to our test queue.Ralph Stoesser wrote:Btw, speaking about king safety eval. You have the following bonus constants for safe non-contact checks
I'd say the KnightCheckBonus should be higher than 1 because a safe check from a knight is more dangerous than a check from a bishop, because the only way to escape from knight's check is to move the king. KnightCheckBonus = 2 works for me in in ultra fast games. (~ +5 Elo)Code: Select all
// Bonuses for enemy's safe checks ... const int QueenCheckBonus = 3; const int RookCheckBonus = 2; const int BishopCheckBonus = 1; const int KnightCheckBonus = 1;
-
zamar
- Posts: 613
- Joined: Sun Jan 18, 2009 7:03 am
Re: SF 191 Why not clear TT?
We will try to confirm your result.Ralph Stoesser wrote:Btw, speaking about king safety eval. You have the following bonus constants for safe non-contact checks
I'd say the KnightCheckBonus should be higher than 1 because a safe check from a knight is more dangerous than a check from a bishop, because the only way to escape from knight's check is to move the king. KnightCheckBonus = 2 works for me in in ultra fast games. (~ +5 Elo)Code: Select all
// Bonuses for enemy's safe checks ... const int QueenCheckBonus = 3; const int RookCheckBonus = 2; const int BishopCheckBonus = 1; const int KnightCheckBonus = 1;
Joona Kiiski
-
lech
- Posts: 1174
- Joined: Sun Feb 14, 2010 10:02 pm
Re: SF 191 Why not clear TT?
Maybe it is worth to check this code too:mcostalba wrote:Thanks Ralph, I will add your tweak to our test queue.Ralph Stoesser wrote:Btw, speaking about king safety eval. You have the following bonus constants for safe non-contact checks
I'd say the KnightCheckBonus should be higher than 1 because a safe check from a knight is more dangerous than a check from a bishop, because the only way to escape from knight's check is to move the king. KnightCheckBonus = 2 works for me in in ultra fast games. (~ +5 Elo)Code: Select all
// Bonuses for enemy's safe checks ... const int QueenCheckBonus = 3; const int RookCheckBonus = 2; const int BishopCheckBonus = 1; const int KnightCheckBonus = 1;
Code: Select all
// Enemy knights safe checks and queen proximity
b = pos.attacks_from<KNIGHT>(ksq) & (ei.attackedBy[Them][KNIGHT] | ei.attackedBy[Them][ QUEEN]) & safe;
if (b)
attackUnits += KnightCheckBonus * count_1s<Max15>(b);
Code: Select all
// Enemy knights safe checks
b = pos.attacks_from<KNIGHT>(ksq) & ei.attackedBy[Them][KNIGHT] & safe;
if (b)
attackUnits += KnightCheckBonus * count_1s<Max15>(b);
-
rbarreira
- Posts: 900
- Joined: Tue Apr 27, 2010 3:48 pm
Re: SF 191 Why not clear TT?
For testing purposes, it might be a bad idea to make games dependent by not clearing the hash (thus breaking the elo model).
-
Eelco de Groot
- Posts: 4693
- Joined: Sun Mar 12, 2006 2:40 am
- Full name: Eelco de Groot
Re: SF 191 Why not clear TT?
Hello Ralph,Ralph Stoesser wrote:It's proven that there are hash hits from previous games, and the ELO difference isEelco de Groot wrote:Seeking an explanation in a bit different direction, I don't know anything about operating systems but is it not possible that clearing the hash might cause the operating system, presumably Windows if it's a match against Rybka, change the priority of the thread with the engine? A chessprogram will not always have the same priority if you start it up, I believe Bob posted that, it may take several tries of starting up before you get a good speed and this has to do with the priority given by the OS. Rybka is a process, not a threaded application and that might make another difference maybe. At least, something like this sounds a bit more probable to me than the engine getting hash hits from a previous game?
Regards, Eelco
evident. I think Marco is right here.
Talkchess was very slow this morning, also ChessUSA was off the air for short periods so it must have been the provider or the connection to there and my reply had to wait. My thoughts this morning were that I supposed Marco's theory is possible, in theory
Best, Eelco
Debugging is twice as hard as writing the code in the first
place. Therefore, if you write the code as cleverly as possible, you
are, by definition, not smart enough to debug it.
-- Brian W. Kernighan
place. Therefore, if you write the code as cleverly as possible, you
are, by definition, not smart enough to debug it.
-- Brian W. Kernighan