What's Strelka's Secret Sauce?

Discussion of chess software programming and technical issues.

Moderator: Ras

User avatar
Steve Maughan
Posts: 1276
Joined: Wed Mar 08, 2006 8:28 pm
Location: Florida, USA

What's Strelka's Secret Sauce?

Post by Steve Maughan »

So Strelka has released its source code. Has anyone sifted through the code to see if there are any new ideas? It seems to be quite compact so it must be doing something well.

Cheers,

Steve
Nid Hogge

Re: What's Strelka's Secret Sauce?

Post by Nid Hogge »

I think it's time so start referring to it as Rybka. or at least modified Rybka clone.

http://rybkaforum.net/cgi-bin/rybkaforu ... l?tid=3006

As to the code itself .. Here's Anthony C (Zappa) take:

"Hello,

I took a look at the Strelka sources (sorry, couldn't contain my curiosity). I do sympathize with your legal issues and hope you can work something out. IIRC disassembly is legal but I can't imagine that releasing source code is. The worst part is that I think it will be very difficult to prevent this in the future. I looked into some of these things and unfortunately obfuscation seems to be theoretically impossible, although at least you can waste some of Osipov's time. However, you can take heart that there isn't really anything your competitors can learn from Strelka anyway

Which is why I'm surprised no one is talking about the actual source code, which by your own admission is very similar to Rybka 1.0. I know a lot of the people here are basically chess players and not programmers, but that no one has taken the time to spend an hour examining the most dominant chess program in 5 years?

I expected that Rybka was going to be a fast simple program with an obfuscated node count, but I had no idea just how right that was going to be. On my machine the 32-bit Strelka gets 1.2 million nps or so, which means a 64 bit compile would get 2.5M, or about 5X as fast as my poor little Zappa. In terms of knowledge, there is very little that is not in well known except for the material tables, which should be very fast. I'm also pretty amazed at how aggressively the search prunes. Not only will Strelka drop straight into the q-search on a depth-3 search search, but because it orders all captures first, it will reduce almost all noncapture/check moves.

Anyway, in my professional opinion Strelka is basically Fritz5 + history reductions + bigger (but not more) mobility/passed pawn terms + super-vasik-material evaluation. What's amazing to me is how well it works. I don't know whether to laugh at the silliness of all the speculation surrounding Rybka and how horribly wrong it was, or congratulate you for taking a completely different path than everyone else.
cheers,

anthony"
Guetti

Re: What's Strelka's Secret Sauce?

Post by Guetti »

Ok, I give it a try to get this discussion starting. So what secrets of Rybka 1.0 beta haven been revealed by the publication of the Strelka sources?
Judging by the vivid discussion in this thread, and from the statement of Anthony, very little.
There is a discrepancy however, there is a lot of discussion about the damage done to Vasik by the release of Strelka in other subfora. But if the Strelka source contain little secrets, how can there be much damage?
User avatar
Steve Maughan
Posts: 1276
Joined: Wed Mar 08, 2006 8:28 pm
Location: Florida, USA

Re: What's Strelka's Secret Sauce?

Post by Steve Maughan »

Andreas,

I agree that there seems to be little new stuff in Strelka. The fact that Rybka is actually a fast searcher that is also very selective may change the direction that programmers take their engines. For me (and I'm not alone) Fruit showed that simplicity and lack of bugs is the way to go. Then Rybka came along and the low nps, short PVs and IM title of the author implied that improvements to the evaluation code were the way to go. I think that balloon has now been burst. As Christophe Theron has said for many years - the search is by far and away the most important factor in determining the strength of a program. I think we'll start to see highly selective engines emerging as a result of the Strelka release.

Anyone found anything implementable in Strelka's source?

Just my 2 cents.

Cheers,

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

Re: What's Strelka's Secret Sauce?

Post by Uri Blass »

Guetti wrote:Ok, I give it a try to get this discussion starting. So what secrets of Rybka 1.0 beta haven been revealed by the publication of the Strelka sources?
Judging by the vivid discussion in this thread, and from the statement of Anthony, very little.
There is a discrepancy however, there is a lot of discussion about the damage done to Vasik by the release of Strelka in other subfora. But if the Strelka source contain little secrets, how can there be much damage?
I disagree that very little.

Strelka is a fast searcher so it may be possible to learn from strelka how to write a fast searcher.

Another point is that strelka use material table that give score for every material combination.

As sommebody who never has a bitboard program and do not use many bitboards in movei I can certainly learn from it to write a bitboard program.

Uri
Guetti

Re: What's Strelka's Secret Sauce?

Post by Guetti »

Uri Blass wrote:
Guetti wrote:Ok, I give it a try to get this discussion starting. So what secrets of Rybka 1.0 beta haven been revealed by the publication of the Strelka sources?
Judging by the vivid discussion in this thread, and from the statement of Anthony, very little.
There is a discrepancy however, there is a lot of discussion about the damage done to Vasik by the release of Strelka in other subfora. But if the Strelka source contain little secrets, how can there be much damage?
I disagree that very little.

Strelka is a fast searcher so it may be possible to learn from strelka how to write a fast searcher.

Another point is that strelka use material table that give score for every material combination.

As sommebody who never has a bitboard program and do not use many bitboards in movei I can certainly learn from it to write a bitboard program.

Uri
Ok, "very little" maybe not. But how much? this is what i want to investigate. I don't deny that you can learn something from the sources. But what about Morsch, Uniacke, SMK, etc?
Sources that use bitboards are numerous, so I don't think most programmers can learn a lot from Strelka specifically.
There are also publications about the use of material tables, but I agree that Rybka/Strelka is probably one of the only sources that shows the implementation of these tables.

So lets try to summarize the most important Strelka secrets:
1. Aggressive pruning using Bitboards
2. Implementation of material tables
3. ???
Uri Blass
Posts: 10798
Joined: Thu Mar 09, 2006 12:37 am
Location: Tel-Aviv Israel

Re: What's Strelka's Secret Sauce?

Post by Uri Blass »

Guetti wrote:
Uri Blass wrote:
Guetti wrote:Ok, I give it a try to get this discussion starting. So what secrets of Rybka 1.0 beta haven been revealed by the publication of the Strelka sources?
Judging by the vivid discussion in this thread, and from the statement of Anthony, very little.
There is a discrepancy however, there is a lot of discussion about the damage done to Vasik by the release of Strelka in other subfora. But if the Strelka source contain little secrets, how can there be much damage?
I disagree that very little.

Strelka is a fast searcher so it may be possible to learn from strelka how to write a fast searcher.

Another point is that strelka use material table that give score for every material combination.

As sommebody who never has a bitboard program and do not use many bitboards in movei I can certainly learn from it to write a bitboard program.

Uri
Ok, "very little" maybe not. But much? I don't deny that you can learn something from the sources. But how about Morsch, Uniacke, SMK?
Sources that use bitboards are numerous, so I don't think most programmers can learn a lot from Strelka specifically.
There are also publications about the use of material tables, but I agree that Rybka/Strelka is probably one of the only sources that shows the implementation of these tables.

So lets try to summarize the most important Strelka secrets:
1. Aggressive pruning using Bitboards
2. Implementation of material tables
3. ???
Morsch, Uniacke, SMK?
They are commercial competitors and they probably know more than most
programmers.

There are many sources that use bitboards but I guess that strelka use them better(otherwise it could not be the best).

Uri
User avatar
Steve Maughan
Posts: 1276
Joined: Wed Mar 08, 2006 8:28 pm
Location: Florida, USA

Re: What's Strelka's Secret Sauce?

Post by Steve Maughan »

"Aggressive Pruning"

AFAIK Anthony Cozzie is the only one that has really commented on this. He said that Strelka can drop from depth 3 to the q search in some cases. Has anyone dissected and would like to share the pruning rules in Strelka?

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

Re: What's Strelka's Secret Sauce?

Post by Uri Blass »

Steve Maughan wrote:"Aggressive Pruning"

AFAIK Anthony Cozzie is the only one that has really commented on this. He said that Strelka can drop from depth 3 to the q search in some cases. Has anyone dissected and would like to share the pruning rules in Strelka?

Steve
Based on my understanding of the code
pruning rules in strelka are the following when the king is not under threat:
1)if the evaluation is smaller than beta-125 and depth=1
goto qsearch
2)if the evaluation is smaller than beta-300 and depth<=3
goto qsearch.

I have no time for testing strelka but I guess that strelka can be improved by reducing 125 and 300 to smaller numbers because I know that later versions of rybka after rybka beta were weaker in test suites but better in games and I think that this can be achieved by more aggresive pruning.

Uri
User avatar
Steve Maughan
Posts: 1276
Joined: Wed Mar 08, 2006 8:28 pm
Location: Florida, USA

Re: What's Strelka's Secret Sauce?

Post by Steve Maughan »

Uri,
Uri Blass wrote:1)if the evaluation is smaller than beta-125 and depth=1
goto qsearch
2)if the evaluation is smaller than beta-300 and depth<=3
goto qsearch.
Interesting. Are you sure it's beta-xxxx and not alpha-xxxx? Using beta-xxxx you can drop to the qsearch in the PV. Maybe that's what's happening but it seems a little odd.

Steve