What's Strelka's Secret Sauce?

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

Karlo Bala
Posts: 373
Joined: Wed Mar 22, 2006 10:17 am
Location: Novi Sad, Serbia
Full name: Karlo Balla

Re: What's Strelka's Secret Sauce?

Post by Karlo Bala »

Onno Garms wrote:I think there is one more ingredient which has not been mentioned so far: fine-grained evaluation.

evaluate() uses units of 1/3200 pawn internally. Most weights are not divisible by 32. This is nice to know, but is only useful when you know how to adjust the weights. This secret is not revealed by the Strelka sources. Having only the sources of Strelka's evaluate function is fairly useless unless you want to clone the evaluate function. Appart from material imbalance it contains only well known terms.

I think it's also worthwhile to note what I did not find. AFAIR Rajlich stated that Rybka prunes differently depending on whether the player to move is the same on the current node and the root node or not. Does Strelka do that? I did not find that (but I read search.c less thoroughly then eval.c).
Rajlich stated lot of things :?
What you see in Strelka about pruning is what is in R1.0 :wink:
Best Regards,
Karlo Balla Jr.
ernest
Posts: 2041
Joined: Wed Mar 08, 2006 8:30 pm

Re: What's Strelka's Secret Sauce?

Post by ernest »

Karlo Bala wrote:Rajlich stated lot of things :?
What you see in Strelka about pruning is what is in R1.0 :wink:
Can you post the reference (link...) of what you say?
Karlo Bala
Posts: 373
Joined: Wed Mar 22, 2006 10:17 am
Location: Novi Sad, Serbia
Full name: Karlo Balla

Re: What's Strelka's Secret Sauce?

Post by Karlo Bala »

ernest wrote:
Karlo Bala wrote:Rajlich stated lot of things :?
What you see in Strelka about pruning is what is in R1.0 :wink:
Can you post the reference (link...) of what you say?
No, I can not :wink:
You can believe me or not, but there is nothing interesting in R1.0 that is not already in Strelka 8-)

I'm not asm expert and I can't tell you anything about eval, but search calls is very easy to spot...
Best Regards,
Karlo Balla Jr.
Uri Blass
Posts: 10410
Joined: Thu Mar 09, 2006 12:37 am
Location: Tel-Aviv Israel

Re: What's Strelka's Secret Sauce?

Post by Uri Blass »

Karlo Bala wrote:
ernest wrote:
Karlo Bala wrote:Rajlich stated lot of things :?
What you see in Strelka about pruning is what is in R1.0 :wink:
Can you post the reference (link...) of what you say?
No, I can not :wink:
You can believe me or not, but there is nothing interesting in R1.0 that is not already in Strelka 8-)

I'm not asm expert and I can't tell you anything about eval, but search calls is very easy to spot...
I disagree about it.

I believe that there are clearly interesting things in rybka that are not in strelka.
significant name of variables may be one of them.

Less ugly code when you replace many magic numbers by constants may be another one of them.

I think that if Vasik release the code of rybka1.0 he can lose from it not because of the fact that there are new things that are not in strelka but because it is going to be easier for people to understand the code and use the ideas.

I also think that the main secret of strelka or rybka is simply understanding fruit.

There are certainly original ideas in strelka but I think that thinking of original good ideas is an easier task relative to the task of understanding the code of other people.

The lesson from strelka is that people should not underestimate the value of understanding the source of other programs.

Last note about strelka is that I discovered more than one bug in strelka but I think that it is a bad idea to tell the public what are the bugs.

It is better to use the bugs to help to detect strelka clones in the future.

Uri
Karlo Bala
Posts: 373
Joined: Wed Mar 22, 2006 10:17 am
Location: Novi Sad, Serbia
Full name: Karlo Balla

Re: What's Strelka's Secret Sauce?

Post by Karlo Bala »

Uri Blass wrote:
Karlo Bala wrote:
ernest wrote:
Karlo Bala wrote:Rajlich stated lot of things :?
What you see in Strelka about pruning is what is in R1.0 :wink:
Can you post the reference (link...) of what you say?
No, I can not :wink:
You can believe me or not, but there is nothing interesting in R1.0 that is not already in Strelka 8-)

I'm not asm expert and I can't tell you anything about eval, but search calls is very easy to spot...
I disagree about it.

I believe that there are clearly interesting things in rybka that are not in strelka.
significant name of variables may be one of them.

Less ugly code when you replace many magic numbers by constants may be another one of them.

I think that if Vasik release the code of rybka1.0 he can lose from it not because of the fact that there are new things that are not in strelka but because it is going to be easier for people to understand the code and use the ideas.

I also think that the main secret of strelka or rybka is simply understanding fruit.

There are certainly original ideas in strelka but I think that thinking of original good ideas is an easier task relative to the task of understanding the code of other people.

The lesson from strelka is that people should not underestimate the value of understanding the source of other programs.

Last note about strelka is that I discovered more than one bug in strelka but I think that it is a bad idea to tell the public what are the bugs.

It is better to use the bugs to help to detect strelka clones in the future.

Uri
Yes, you are right about names. Also, lot of function in strelka are inlined, but in rybka source they are probably not (repetition detection, HT probes, etc.). But, I think that most interesting stuff are in eval, not in the search. Search is clear, fruit/glaurung search + 2-3 tricks. When I said that there is nothing new it was concerning search and pruning and I think it is obvious from strelka source.
Best Regards,
Karlo Balla Jr.
Uri Blass
Posts: 10410
Joined: Thu Mar 09, 2006 12:37 am
Location: Tel-Aviv Israel

Re: What's Strelka's Secret Sauce?

Post by Uri Blass »

Karlo Bala wrote:
Uri Blass wrote:
Karlo Bala wrote:
ernest wrote:
Karlo Bala wrote:Rajlich stated lot of things :?
What you see in Strelka about pruning is what is in R1.0 :wink:
Can you post the reference (link...) of what you say?
No, I can not :wink:
You can believe me or not, but there is nothing interesting in R1.0 that is not already in Strelka 8-)

I'm not asm expert and I can't tell you anything about eval, but search calls is very easy to spot...
I disagree about it.

I believe that there are clearly interesting things in rybka that are not in strelka.
significant name of variables may be one of them.

Less ugly code when you replace many magic numbers by constants may be another one of them.

I think that if Vasik release the code of rybka1.0 he can lose from it not because of the fact that there are new things that are not in strelka but because it is going to be easier for people to understand the code and use the ideas.

I also think that the main secret of strelka or rybka is simply understanding fruit.

There are certainly original ideas in strelka but I think that thinking of original good ideas is an easier task relative to the task of understanding the code of other people.

The lesson from strelka is that people should not underestimate the value of understanding the source of other programs.

Last note about strelka is that I discovered more than one bug in strelka but I think that it is a bad idea to tell the public what are the bugs.

It is better to use the bugs to help to detect strelka clones in the future.

Uri
Yes, you are right about names. Also, lot of function in strelka are inlined, but in rybka source they are probably not (repetition detection, HT probes, etc.). But, I think that most interesting stuff are in eval, not in the search. Search is clear, fruit/glaurung search + 2-3 tricks. When I said that there is nothing new it was concerning search and pruning and I think it is obvious from strelka source.
I think that both are interesting.
I will mention one idea that is new for me and I wonder if it is used by fruit glaurung crafty or another engine with free source.

Strelka in the qsearch does not generate all the captures but only captures of pieces that are heavy enough(for example pawn captures are not generated if the evaluation is smaller than alpha-margin-pawn_value).

I wonder if this idea is used by another chess program with free source code.

Uri
Tony

Re: What's Strelka's Secret Sauce?

Post by Tony »

Uri Blass wrote:
Karlo Bala wrote:
Uri Blass wrote:
Karlo Bala wrote:
ernest wrote:
Karlo Bala wrote:Rajlich stated lot of things :?
What you see in Strelka about pruning is what is in R1.0 :wink:
Can you post the reference (link...) of what you say?
No, I can not :wink:
You can believe me or not, but there is nothing interesting in R1.0 that is not already in Strelka 8-)

I'm not asm expert and I can't tell you anything about eval, but search calls is very easy to spot...
I disagree about it.

I believe that there are clearly interesting things in rybka that are not in strelka.
significant name of variables may be one of them.

Less ugly code when you replace many magic numbers by constants may be another one of them.

I think that if Vasik release the code of rybka1.0 he can lose from it not because of the fact that there are new things that are not in strelka but because it is going to be easier for people to understand the code and use the ideas.

I also think that the main secret of strelka or rybka is simply understanding fruit.

There are certainly original ideas in strelka but I think that thinking of original good ideas is an easier task relative to the task of understanding the code of other people.

The lesson from strelka is that people should not underestimate the value of understanding the source of other programs.

Last note about strelka is that I discovered more than one bug in strelka but I think that it is a bad idea to tell the public what are the bugs.

It is better to use the bugs to help to detect strelka clones in the future.

Uri
Yes, you are right about names. Also, lot of function in strelka are inlined, but in rybka source they are probably not (repetition detection, HT probes, etc.). But, I think that most interesting stuff are in eval, not in the search. Search is clear, fruit/glaurung search + 2-3 tricks. When I said that there is nothing new it was concerning search and pruning and I think it is obvious from strelka source.
I think that both are interesting.
I will mention one idea that is new for me and I wonder if it is used by fruit glaurung crafty or another engine with free source.

Strelka in the qsearch does not generate all the captures but only captures of pieces that are heavy enough(for example pawn captures are not generated if the evaluation is smaller than alpha-margin-pawn_value).

I wonder if this idea is used by another chess program with free source code.

Uri
IMO the difference is just an optimization.

Please explain to me how this is relevantly different from generating the moves but not trying them if currentEval+pieceValue[capturedPiece]+MARGIN<alpha ? ( Also know for a couple of years as Delta pruning )

Tony
Uri Blass
Posts: 10410
Joined: Thu Mar 09, 2006 12:37 am
Location: Tel-Aviv Israel

Re: What's Strelka's Secret Sauce?

Post by Uri Blass »

Tony wrote:
Uri Blass wrote:
Karlo Bala wrote:
Uri Blass wrote:
Karlo Bala wrote:
ernest wrote:
Karlo Bala wrote:Rajlich stated lot of things :?
What you see in Strelka about pruning is what is in R1.0 :wink:
Can you post the reference (link...) of what you say?
No, I can not :wink:
You can believe me or not, but there is nothing interesting in R1.0 that is not already in Strelka 8-)

I'm not asm expert and I can't tell you anything about eval, but search calls is very easy to spot...
I disagree about it.

I believe that there are clearly interesting things in rybka that are not in strelka.
significant name of variables may be one of them.

Less ugly code when you replace many magic numbers by constants may be another one of them.

I think that if Vasik release the code of rybka1.0 he can lose from it not because of the fact that there are new things that are not in strelka but because it is going to be easier for people to understand the code and use the ideas.

I also think that the main secret of strelka or rybka is simply understanding fruit.

There are certainly original ideas in strelka but I think that thinking of original good ideas is an easier task relative to the task of understanding the code of other people.

The lesson from strelka is that people should not underestimate the value of understanding the source of other programs.

Last note about strelka is that I discovered more than one bug in strelka but I think that it is a bad idea to tell the public what are the bugs.

It is better to use the bugs to help to detect strelka clones in the future.

Uri
Yes, you are right about names. Also, lot of function in strelka are inlined, but in rybka source they are probably not (repetition detection, HT probes, etc.). But, I think that most interesting stuff are in eval, not in the search. Search is clear, fruit/glaurung search + 2-3 tricks. When I said that there is nothing new it was concerning search and pruning and I think it is obvious from strelka source.
I think that both are interesting.
I will mention one idea that is new for me and I wonder if it is used by fruit glaurung crafty or another engine with free source.

Strelka in the qsearch does not generate all the captures but only captures of pieces that are heavy enough(for example pawn captures are not generated if the evaluation is smaller than alpha-margin-pawn_value).

I wonder if this idea is used by another chess program with free source code.

Uri
IMO the difference is just an optimization.

Please explain to me how this is relevantly different from generating the moves but not trying them if currentEval+pieceValue[capturedPiece]+MARGIN<alpha ? ( Also know for a couple of years as Delta pruning )

Tony
I agree that the difference is only optimization but optimization is one of the ways to make programs stronger and it can be considered as something new if this optimization is not used in known source code.

Uri
Tony

Re: What's Strelka's Secret Sauce?

Post by Tony »

Uri Blass wrote:
Tony wrote:
Uri Blass wrote:
Karlo Bala wrote:
Uri Blass wrote:
Karlo Bala wrote:
ernest wrote:
Karlo Bala wrote:Rajlich stated lot of things :?
What you see in Strelka about pruning is what is in R1.0 :wink:
Can you post the reference (link...) of what you say?
No, I can not :wink:
You can believe me or not, but there is nothing interesting in R1.0 that is not already in Strelka 8-)

I'm not asm expert and I can't tell you anything about eval, but search calls is very easy to spot...
I disagree about it.

I believe that there are clearly interesting things in rybka that are not in strelka.
significant name of variables may be one of them.

Less ugly code when you replace many magic numbers by constants may be another one of them.

I think that if Vasik release the code of rybka1.0 he can lose from it not because of the fact that there are new things that are not in strelka but because it is going to be easier for people to understand the code and use the ideas.

I also think that the main secret of strelka or rybka is simply understanding fruit.

There are certainly original ideas in strelka but I think that thinking of original good ideas is an easier task relative to the task of understanding the code of other people.

The lesson from strelka is that people should not underestimate the value of understanding the source of other programs.

Last note about strelka is that I discovered more than one bug in strelka but I think that it is a bad idea to tell the public what are the bugs.

It is better to use the bugs to help to detect strelka clones in the future.

Uri
Yes, you are right about names. Also, lot of function in strelka are inlined, but in rybka source they are probably not (repetition detection, HT probes, etc.). But, I think that most interesting stuff are in eval, not in the search. Search is clear, fruit/glaurung search + 2-3 tricks. When I said that there is nothing new it was concerning search and pruning and I think it is obvious from strelka source.
I think that both are interesting.
I will mention one idea that is new for me and I wonder if it is used by fruit glaurung crafty or another engine with free source.

Strelka in the qsearch does not generate all the captures but only captures of pieces that are heavy enough(for example pawn captures are not generated if the evaluation is smaller than alpha-margin-pawn_value).

I wonder if this idea is used by another chess program with free source code.

Uri
IMO the difference is just an optimization.

Please explain to me how this is relevantly different from generating the moves but not trying them if currentEval+pieceValue[capturedPiece]+MARGIN<alpha ? ( Also know for a couple of years as Delta pruning )

Tony
I agree that the difference is only optimization but optimization is one of the ways to make programs stronger and it can be considered as something new if this optimization is not used in known source code.

Uri
Well in that case, your compiler has also written a lot of new things then.

Tony
Uri Blass
Posts: 10410
Joined: Thu Mar 09, 2006 12:37 am
Location: Tel-Aviv Israel

Re: What's Strelka's Secret Sauce?

Post by Uri Blass »

Tony wrote:
Uri Blass wrote:
Tony wrote:
Uri Blass wrote:
Karlo Bala wrote:
Uri Blass wrote:
Karlo Bala wrote:
ernest wrote:
Karlo Bala wrote:Rajlich stated lot of things :?
What you see in Strelka about pruning is what is in R1.0 :wink:
Can you post the reference (link...) of what you say?
No, I can not :wink:
You can believe me or not, but there is nothing interesting in R1.0 that is not already in Strelka 8-)

I'm not asm expert and I can't tell you anything about eval, but search calls is very easy to spot...
I disagree about it.

I believe that there are clearly interesting things in rybka that are not in strelka.
significant name of variables may be one of them.

Less ugly code when you replace many magic numbers by constants may be another one of them.

I think that if Vasik release the code of rybka1.0 he can lose from it not because of the fact that there are new things that are not in strelka but because it is going to be easier for people to understand the code and use the ideas.

I also think that the main secret of strelka or rybka is simply understanding fruit.

There are certainly original ideas in strelka but I think that thinking of original good ideas is an easier task relative to the task of understanding the code of other people.

The lesson from strelka is that people should not underestimate the value of understanding the source of other programs.

Last note about strelka is that I discovered more than one bug in strelka but I think that it is a bad idea to tell the public what are the bugs.

It is better to use the bugs to help to detect strelka clones in the future.

Uri
Yes, you are right about names. Also, lot of function in strelka are inlined, but in rybka source they are probably not (repetition detection, HT probes, etc.). But, I think that most interesting stuff are in eval, not in the search. Search is clear, fruit/glaurung search + 2-3 tricks. When I said that there is nothing new it was concerning search and pruning and I think it is obvious from strelka source.
I think that both are interesting.
I will mention one idea that is new for me and I wonder if it is used by fruit glaurung crafty or another engine with free source.

Strelka in the qsearch does not generate all the captures but only captures of pieces that are heavy enough(for example pawn captures are not generated if the evaluation is smaller than alpha-margin-pawn_value).

I wonder if this idea is used by another chess program with free source code.

Uri
IMO the difference is just an optimization.

Please explain to me how this is relevantly different from generating the moves but not trying them if currentEval+pieceValue[capturedPiece]+MARGIN<alpha ? ( Also know for a couple of years as Delta pruning )

Tony
I agree that the difference is only optimization but optimization is one of the ways to make programs stronger and it can be considered as something new if this optimization is not used in known source code.

Uri
Well in that case, your compiler has also written a lot of new things then.

Tony
I agree but I consider improvements when you do not need hardware knowledge to understand them as more interesting.

The fastest way to calculate simple functions like pop_count to count bits of a bitboard may be dependent on the structure of the computer when it seems obvious that not generating all captures is an improvement regardless of the computer that you use.

Uri