Rybka 1.0 source code

Discussion of anything and everything relating to chess playing software and machines.

Moderator: Ras

Adam Hair
Posts: 3226
Joined: Wed May 06, 2009 10:31 pm
Location: Fuquay-Varina, North Carolina

Re: Rybka 1.0 source code

Post by Adam Hair »

Rebel wrote:
Harvey Williamson wrote:
Rebel wrote:
bob wrote: Jaap has NOT "stalled an investigation."
I did not mention names, simply said that it is stalled.
Fabien filed a written protest.
When if I may ask.

Before, after or at the same moment Fabien wrote his Rybka complaint ?

A date would be nice.

Thanks in advance.
After.
Harvey,

Fabien's Rybka complaint was dated: Mon, 28 Feb 2011 and action was taken soon after.

So it would show transparency if you give us the exact date of Fabien's LOOP complaint.

I mean, the ICGA investigating the ICGA is an already hard to understand concept.
After April 17, 2011. On that day, I shared my pairwise analysis here. I believe that Mark Watkins read my post, for the next day he posted some information concerning what he saw from a quick inspection of Loop. I assume that this information was then relayed to Fabian.
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: Rybka 1.0 source code

Post by bob »

Adam Hair wrote:
Rebel wrote:
Harvey Williamson wrote:
Rebel wrote:
bob wrote: Jaap has NOT "stalled an investigation."
I did not mention names, simply said that it is stalled.
Fabien filed a written protest.
When if I may ask.

Before, after or at the same moment Fabien wrote his Rybka complaint ?

A date would be nice.

Thanks in advance.
After.
Harvey,

Fabien's Rybka complaint was dated: Mon, 28 Feb 2011 and action was taken soon after.

So it would show transparency if you give us the exact date of Fabien's LOOP complaint.

I mean, the ICGA investigating the ICGA is an already hard to understand concept.
After April 17, 2011. On that day, I shared my pairwise analysis here. I believe that Mark Watkins read my post, for the next day he posted some information concerning what he saw from a quick inspection of Loop. I assume that this information was then relayed to Fabian.
Since we are getting specific, the first email I have was dated April 19. But that was just a "notice" of Mark's comments, not anything from Fabien. I believe the original complaint by Fabien was early July.
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: Rybka 1.0 source code

Post by bob »

Don wrote:
bob wrote:
towforce wrote:
michiguel wrote:
bob wrote:1. Nobody, and I do mean nobody, types "if ( 0.0 < movetime) instead of "if (movetime >= 0.0)
Not true!

First of all, ( 0.0 <= movetime) if equivalent of (movetime >= 0.0)

Second, some people, including myself, write many times I place the constant on the left and there are very good reasons to do that. In fact, many recommend it!
O.T.: I am currently working with some Japanese Java code, and these coders often put the constant on the left. However - I cannot say that they are using good coding practice, because of the number of times I have seen:

if (true = variable) instead of if (variable)
It would make the code read VERY strange IMHO.

If I want to know if x is greater than zero, and I write "if (0 <= x)" it loses some of it's readability to me, and the #1 goal of a programmer has to be to write code that can be read, comprehended, so that it can be maintained. If someone walks up to you and says my age is greater than 30 and less than 40, I grasp that instantly. If they walk up and say 30 is less than my age, and 40 is greater than my age, I have to stop and think about it for a minute.
That's only because you are used to thinking of it that way, not because it's inherently unnatural or awkward. It's like RPN or reciting the alphabet backwards, it's only more "natural" because you decided that it was and don't do it any other way.

However I agree that for code to be readable you need to stick with a standard way of doing things. In Komodo I get this deal all the time with whether some value is greater than, or greater than or equal and so on. Or if I tell Larry that we do high depth forward pruning between depths x and y there is always a question of what that means, does it INCLUDE x and y? With our half ply extensions it's even more confusing but we now pretty much speak in half depth language now.

Don
It can be worse. For Heinz, he started using depth=0 as the last full-width ply. Caused me a lot of grief until I looked carefully at the pseudo-code he was posting... For me, remaining depth=1 is the last full-width ply, unless a move checks the opponent to leave the remaining depth unchanged...

And then we have had the UPPER/LOWER hash entry naming confusion. Etc...
User avatar
Don
Posts: 5106
Joined: Tue Apr 29, 2008 4:27 pm

Re: Rybka 1.0 source code

Post by Don »

bob wrote:
Don wrote:
bob wrote:
towforce wrote:
michiguel wrote:
bob wrote:1. Nobody, and I do mean nobody, types "if ( 0.0 < movetime) instead of "if (movetime >= 0.0)
Not true!

First of all, ( 0.0 <= movetime) if equivalent of (movetime >= 0.0)

Second, some people, including myself, write many times I place the constant on the left and there are very good reasons to do that. In fact, many recommend it!
O.T.: I am currently working with some Japanese Java code, and these coders often put the constant on the left. However - I cannot say that they are using good coding practice, because of the number of times I have seen:

if (true = variable) instead of if (variable)
It would make the code read VERY strange IMHO.

If I want to know if x is greater than zero, and I write "if (0 <= x)" it loses some of it's readability to me, and the #1 goal of a programmer has to be to write code that can be read, comprehended, so that it can be maintained. If someone walks up to you and says my age is greater than 30 and less than 40, I grasp that instantly. If they walk up and say 30 is less than my age, and 40 is greater than my age, I have to stop and think about it for a minute.
That's only because you are used to thinking of it that way, not because it's inherently unnatural or awkward. It's like RPN or reciting the alphabet backwards, it's only more "natural" because you decided that it was and don't do it any other way.

However I agree that for code to be readable you need to stick with a standard way of doing things. In Komodo I get this deal all the time with whether some value is greater than, or greater than or equal and so on. Or if I tell Larry that we do high depth forward pruning between depths x and y there is always a question of what that means, does it INCLUDE x and y? With our half ply extensions it's even more confusing but we now pretty much speak in half depth language now.

Don
It can be worse. For Heinz, he started using depth=0 as the last full-width ply. Caused me a lot of grief until I looked carefully at the pseudo-code he was posting... For me, remaining depth=1 is the last full-width ply, unless a move checks the opponent to leave the remaining depth unchanged...

And then we have had the UPPER/LOWER hash entry naming confusion. Etc...
Yes. my program is like yours, depth 0 is the first ply of quies. There there is the ply number which Komodo tracks. Is the root node a ply 0 or a ply 1 node?

Another non-standard confusing thing is where you call the evaluation function. You can call it as one of the first things you do, or right after making the move.

Cilkchess due to how we did parallelism called the search with a move giving code that looked like this:

int search( position *p, int move )
{
make_move(move);
....
}


All of these little differences can affect how you think about the code.
wgarvin
Posts: 838
Joined: Thu Jul 05, 2007 5:03 pm
Location: British Columbia, Canada

Re: Rybka 1.0 source code

Post by wgarvin »

Rebel wrote:
Rebel wrote:Without much doubt it also explains how the Rybka 3 hackers created Ippolit as the original Ippolit source code came in one long C-file created by the Hex-rays decompiler, like the source code of Rybka 1.0 Beta offered on this page comes as one long C-code file. It confirms what many already noticed, parts of the Ippolit source code are computer generated and indeed the Hex-rays decompiler does exactly that.
Update: I removed that sentence, it's worded too strong. A comparison between Ippo and Rybka 3 basic endgame knowledge showed too much fundamental differences. Besides, mentioning Ippo is a byroad and a subject of its own not related to the intention of the page to offer the decompiled Rybka 1 source code.

http://www.top-5000.nl/sourcecode.htm
If you want to offer decompiled Rybka 1 source code, I suggest you just put up Strelka 2.0 for download. In the places where I checked (eval and move generation), it was a very close match. [edit: I think the search functions were a pretty close match too. When I needed to put labels on the functions in a Rybka 1.0 disassembly, I seem to recall that Strelka contained a corresponding function for every search function from Rybka, and I just used the Strelka names for them.]

However, there are a few little differences -- the one I remember was that Strelka has some code added to generate underpromotion moves, which Rybka 1.0 Beta did not have.

Still, for understanding a disassembly of Rybka 1.0 Beta, the Strelka source code is a very handy crib sheet. You just have to double-check to make sure the bits of code you see in Strelka are also actually there in the Rybka disassembly, and they still have the same semantics.
wgarvin
Posts: 838
Joined: Thu Jul 05, 2007 5:03 pm
Location: British Columbia, Canada

Re: Rybka 1.0 source code

Post by wgarvin »

Don wrote:
José Carlos wrote:
bob wrote: I have been unable to find a single person that types inverted comparisons.
Just for the record, I do type those inverted comparisons in some cases. It makes life easier.
The point of doing this is defensive programming. If you do this by accident:

if ( x = 7 ) { do something ... }

then you have assigned the value of 7 to x

but if you do:

if ( 7 = x ) { do something ... }

you will get a compiler error.
Of course, sensible people just set their compiler so that "warnings are errors" and make sure that particular warning message is enabled, and then they go ahead and write

if ( x == 7 ) { ... }

and when they miss one of the = characters, the compiler politely informs them. :lol:


[Edit: But being serious for a moment... I see this justification all the time, and I can't recall a single instance in over 10 years of writing production code where I wrote a bug like that (accidental assignment), or anybody I worked with mentioned that they had written a bug like that... ever since compilers started warning about it many years ago, it has not been a serious problem.]
Last edited by wgarvin on Fri Feb 10, 2012 12:57 am, edited 1 time in total.
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: Rybka 1.0 source code

Post by bob »

wgarvin wrote:
Rebel wrote:
Rebel wrote:Without much doubt it also explains how the Rybka 3 hackers created Ippolit as the original Ippolit source code came in one long C-file created by the Hex-rays decompiler, like the source code of Rybka 1.0 Beta offered on this page comes as one long C-code file. It confirms what many already noticed, parts of the Ippolit source code are computer generated and indeed the Hex-rays decompiler does exactly that.
Update: I removed that sentence, it's worded too strong. A comparison between Ippo and Rybka 3 basic endgame knowledge showed too much fundamental differences. Besides, mentioning Ippo is a byroad and a subject of its own not related to the intention of the page to offer the decompiled Rybka 1 source code.

http://www.top-5000.nl/sourcecode.htm
If you want to offer decompiled Rybka 1 source code, I suggest you just put up Strelka 2.0 for download. In the places where I checked (eval and move generation), it was a very close match. [edit: I think the search functions were a pretty close match too. When I needed to put labels on the functions in a Rybka 1.0 disassembly, I seem to recall that Strelka contained a corresponding function for every search function from Rybka, and I just used the Strelka names for them.]

However, there are a few little differences -- the one I remember was that Strelka has some code added to generate underpromotion moves, which Rybka 1.0 Beta did not have.

Still, for understanding a disassembly of Rybka 1.0 Beta, the Strelka source code is a very handy crib sheet. You just have to double-check to make sure the bits of code you see in Strelka are also actually there in the Rybka disassembly, and they still have the same semantics.

I think posting the source is about the same level of usefulness as poking a hole in the bottom of a sinking ship, to let all that water drain out. :) I don't think ANY of this is helping Vas. In fact, the longer the discussions continue, the worse things get because more and more evidence is added...
User avatar
michiguel
Posts: 6401
Joined: Thu Mar 09, 2006 8:30 pm
Location: Chicago, Illinois, USA

Re: Rybka 1.0 source code

Post by michiguel »

wgarvin wrote:
Don wrote:
José Carlos wrote:
bob wrote: I have been unable to find a single person that types inverted comparisons.
Just for the record, I do type those inverted comparisons in some cases. It makes life easier.
The point of doing this is defensive programming. If you do this by accident:

if ( x = 7 ) { do something ... }

then you have assigned the value of 7 to x

but if you do:

if ( 7 = x ) { do something ... }

you will get a compiler error.
Of course, sensible people just set their compiler so that "warnings are errors" and make sure that particular warning message is enabled, and then they go ahead and write

if ( x == 7 ) { ... }

and when they miss one of the = characters, the compiler politely informs them. :lol:


[Edit: But being serious for a moment... I see this justification all the time, and I can't recall a single instance in over 10 years of writing production code where I wrote a bug like that (accidental assignment), or anybody I worked with mentioned that they had written a bug like that... ever since compilers started warning about it many years ago, it has not been a serious problem.]
Sensible people would also understand that x == 7 is not more readable than 7 == x ;-)

Anyway, there are many times that you write "inverted" comparisons for other reasons. For instance, I find more readable

0 <= x && x < MAX_RANGE1

than

x >= 0 && x < MAX_RANGE1

So, if you are accustomed, in a series of "ifs" you will end up writing

MAX_RANGE1 <= x && x < MAX_RANGE2
MAX_RANGE2 <= x // last range

etc.
Miguel
User avatar
Graham Banks
Posts: 44629
Joined: Sun Feb 26, 2006 10:52 am
Location: Auckland, NZ

Re: Rybka 1.0 source code

Post by Graham Banks »

JuLieN wrote:Image
(To both sides).

Hopefully, the next moderation team will keep all those crazy threads were they belong: in the engines origin subforum.

Because right now, this is boring the vast majority of people and turning people against each others.

Lots of people are leaving the scene. Two years ago, a Talkchess election would gather more than 200 votes. Now it's about 70 voters only. You even drove away important people of the community like Dann Corbit :(

Both sides are acting irrationally because this has become personal. You'll never solve this problem with this kind of useless threads. If you REALLY want to solve the problem, use the enormous amount of time you're wasting in these endless threads in a more useful way: write a complete report will all the arguments, pros and cons.
August 2007 - 168 voters
November 2007 - 159 voters
May 2008 - 137 voters
November 2008 - 137 voters
June 2009 - 146 voters
January 2010 - 197 voters
June 2011 - 113 voters (first team election - only one team)
January 2011 - 66 voters (second team election - only one team)
July 2011 - 73 voters (third team election - only one team)

Tells a story really. :wink:
gbanksnz at gmail.com
User avatar
JuLieN
Posts: 2949
Joined: Mon May 05, 2008 12:16 pm
Location: Bordeaux (France)
Full name: Julien Marcel

Re: Rybka 1.0 source code

Post by JuLieN »

Graham Banks wrote:
JuLieN wrote: August 2007 - 168 voters
November 2007 - 159 voters
May 2008 - 137 voters
November 2008 - 137 voters
June 2009 - 146 voters
January 2010 - 197 voters
June 2011 - 113 voters (first team election - only one team)
January 2011 - 66 voters (second team election - only one team)
July 2011 - 73 voters (third team election - only one team)

Tells a story really. :wink:
Thanks for the figures, Graham! :) And my memory didn't fail me too much: 197 is nearly "more than 200 voters", if not technically it ^^

This decrease in active members is really impressive and show how sick the hobby has become. Casual visitors are probably scared and/or annoyed by the aggressive (or obsessive) tone they see in our forums nowadays.

Still, we're actually doing a little bit better right now (78 voters). Maybe because there's a slight competition this time and individual elections?
"The only good bug is a dead bug." (Don Dailey)
[Blog: http://tinyurl.com/predateur ] [Facebook: http://tinyurl.com/fbpredateur ] [MacEngines: http://tinyurl.com/macengines ]