Crafty uses insertion sort in next.c (2 places I think). It uses a plain bubble sort, but with an early exit (if no two values are exchanged it terminates rather than going for N-1 iterations regardless...michiguel wrote:The shocking fact is that someone is using bubble sortDann Corbit wrote:It can be safely said that Crafty's code is beyond reproach.bob wrote:I hold the copyright on _the_ bubble sort in crafty, yes. Not on the bubble sort idea, but on that specific code, along with everything else in there that I wrote. That was simple, wawsn't it. What PD code was in the Crafty that was copied into Fruit? Today's crafty certainly has Pradu's magic move generation code, attributed to him in the comments. The version copied and used in Rybka certainly did not. Please identify any PD code in Crafty, by specific source file name and line numbers, for the 19.0 version used as the basis for Rybka's bitboard code...Milos wrote:So it means you hold copyright on bubble sort in Crafty?bob wrote:Here's the problem, "there is NO public domain code in either program."
Interesting, I thought the very same implementation of bubble sort you copied verbatim from Knuth...
Clearly you are lying (since there is obviously quite a bit of PD code in Crafty), so why would anyone trust you when you make your usual baseless accusations?
ball is in your court... You certainly ought to be able to go to "sorting and searching" by Knuth and cite the exact page where the code was copied "verbatim", correct? Actually, if you look carefully, Crafty uses _TWO_ different types of sorts, depending on whether it is a full-width node or a quiiece-only node. And the code looks nothing like the code you claim I copied "verbatim".
But, your turn...
BTW, you are now trying to justify your "Robolito/etc/Houdini is legal" on the real "stretch" that all Houdart copied into Houdini was the sort code from Crafty? Are you sure that code is in Robolito?Did you see my _explicit_ reference to the bitboard code (particularly the initialization) that is in Robolito?
We've done been down this road once in the Fruit / Rybka discussion. Same lame arguments Each was disproved, over time, by massive evidence. Houdini's day will come, too. Yuri has already commented on it. But don't let that disturb your thinking... Nor any of the other posts concerning Robo and Houdini. Hang on to that dream for as long as you can...
All contributed code is clearly documented. The historical commentary found in main.c is the example for all programmers to follow.
It would be a benefit to mankind if not just every computer chess program but every program in general were programmed and documented in this way.
As far as the implementation of bubble sort, it is also obvious that Dr. Hyatt has copyright on his own implementation. Failure to understand this is failure to understand what "copyright" means.
Yes, I am a Dr. Hyatt fan, I freely admit. However, that has nothing to do with my opinion on this matter.
Is Crafty using bubble sort or this is one the gazillion Byzantine discussions we see in CCC?
I bet the latter.
Miguel
On Crafty...
Moderator: Ras
-
- Posts: 20943
- Joined: Mon Feb 27, 2006 7:30 pm
- Location: Birmingham, AL
Re: On Crafty...
-
- Posts: 782
- Joined: Wed Mar 08, 2006 9:22 pm
Re: On Crafty...
Milos wrote:
Even though you are acting in the best will and with best intentions seams sometimes you are totally unaware of the bias most of the ppl have towards authority...
Hello Milos,
Wrong person.
If you have followed discussions on this board you will find numerous examples where I have questioned the treatment of the so called derivatives and the apparently unfair handling of Rybka when it seems now that it is not as pure as it appeared to be.
I have questioned the handling of Houdini etc. and by extension the treatment of its author. More than once too.
I have questioned leaving out certain engines from testing queues whilst leaving in others.
I ask questions because I want to know, not to serve authority (whatever that would mean) or out of bias.
Incidentally, more often than not, I actually read what you write.
Believe as you wish I suppose....
Later.
-
- Posts: 20943
- Joined: Mon Feb 27, 2006 7:30 pm
- Location: Birmingham, AL
Re: On Crafty...
root.c is irrelevant, of course. Done exactly once per search or once per moveMilos wrote:My, my, a lot of ppl here seams to be afraid of "big" authority, but it's really time to show them the "emperor is naked".bob wrote:I hold the copyright on _the_ bubble sort in crafty, yes. Not on the bubble sort idea, but on that specific code, along with everything else in there that I wrote.
ball is in your court... You certainly ought to be able to go to "sorting and searching" by Knuth and cite the exact page where the code was copied "verbatim", correct? Actually, if you look carefully, Crafty uses _TWO_ different types of sorts, depending on whether it is a full-width node or a quiiece-only node. And the code looks nothing like the code you claim I copied "verbatim".
So let's see your "copyrighted" bubble sort code (lol for using it, believe it or not Miguel he is really using it, as Knuth (the real authority not a fake one like you) says: "In short, the bubble sort seems to have nothing to recommend it, except a catchy name and the fact that it leads to some interesting theoretical problems.")
From Crafty 23.4, root.c 135-148 and quiesce.c 162-176:Code: Select all
do { done = 1; for (i = 0; i < lastm - rmoves - 1; i++) { if (sort_value[i] < sort_value[i + 1]) { temp = sort_value[i]; sort_value[i] = sort_value[i + 1]; sort_value[i + 1] = temp; temp = rmoves[i]; rmoves[i] = rmoves[i + 1]; rmoves[i + 1] = temp; done = 0; } } } while (!done);
Code: Select all
do { done = 1; sortv = tree->sort_value; for (movep = tree->last[ply - 1]; movep < tree->last[ply] - 1; movep++, sortv++) if (*sortv < *(sortv + 1)) { temp = *sortv; *sortv = *(sortv + 1); *(sortv + 1) = temp; temp = *movep; *movep = *(movep + 1); *(movep + 1) = temp; done = 0; } } while (!done);
OK, let's take your crap, point by point.That much about two different types of sorts. You don't even know your own code. Both textbook bubble sort.
Now regarding Knuth, in his The Art of Computer Programming - Volume 3 - Sorting and Searching, 2nd ed. page 107 there is a code which is in his pseudo machine language. The code is identical to yours except variable names, his "done" is called "t" and has initial value of 0 and if there was a swap than it gets value 1. The format is the same "do..while" meaning the same post-test loop type. The minimal difference is in comparison since his sorting is in raising order, your in falling, but that's a trivial difference. Now, I really don't intend to type it from the paper book. Anyone, who is at least a bit of programmer has the book on its shelf and can check what I'm talking about. Instead here is the same implementation in little bit more recognizable fashion (for those who are not so experienced with programming)
Wikipedia on bubble sort:Looks familiar doesn't it???Code: Select all
do swapped = false for each i in 1 to length(A) - 1 inclusive do: if A[i-1] > A[i] then swap( A[i-1], A[i] ) swapped = true end if end for while swapped
So when are you planning to sue wikipedia for stealing your copyrighted code, since a haven't seen a single reference of you on that page, ha?
Oh, yes, you have a swap implementation, they don't so that one must be copyrightable then, right?![]()
1. I copied from Knuth "verbatim". Verbatim: word by word, exactly. Can you show me the _exact_, word by word, character by character code I copied? That example from Knuth looks _nothing_ like the example in Crafty. Different variable names. No "swap()" function. Loops are done differently (he uses simple counter, I use a pointer). In other words. "not even close." Strike 1.
2. You asked when I am going to sue wiki for copyright. Do you understand "copyright". Does the code in the wiki look _exactly_ like the code in Crafty? Not to me, so how can I sue them for copyright infringement when they didn't copy my code exactly? You can't copyright "ideas". Surely you get that. Strike 2.
3. Nothing to recommend the bubble sort, EXCEPT when you have 2 or 3 values to sort. Then it is more efficient. Wonder why I use it in the q-search? Of course you don't. You don't have a clue. So here's one: There are not very many non-losing captures in the q-search. This is faster for that reason. steee-rike 3... you are outta here... Once again...
About the only thing you have proven is your ignorance is more significant that I had originally thought. Knuth's code is not in Crafty.Completely irrelevant. The point is, you do use PD CODE in your Crafty (as I've just proven) and your attempt to claim it as your copyright is just pure BS despite what any apple-polisher here says.What PD code was in the Crafty that was copied into Fruit? Today's crafty certainly has Pradu's magic move generation code, attributed to him in the comments. The version copied and used in Rybka certainly did not. Please identify any PD code in Crafty, by specific source file name and line numbers, for the 19.0 version used as the basis for Rybka's bitboard code...
One day you will start to read first. I said "rotated bitboard attacks initialization." Look again.Of course I did, that's why I called yours writing here a slander referring to yours "hundreds of lines of verbatim copied code".Did you see my _explicit_ reference to the bitboard code (particularly the initialization) that is in Robolito?
So lets see, rotation tables are the same, but sorry there they are not copyrightable, good try, more luck next time.
I didn't say the tables, did I? I said "initialization code". The rotated tables are not constants, they are initialized at program start-up. And the code to do so is somewhat messy. strike 4. Wait, you are already out...
Initialization of piece attack tables:
-pawn attacks - different
-knight attacks - same, but that's more than trivial, even more trivial than "your" bubble sort implementation
-rook attacks - different
-bishop attacks - different
So could you please show us these "hundreds of verbatim copied lines" referring to line numbers in your Crafty 19.0 and Robbo (pick up a version that you like)? Otherwise your writing is nothing more than slander.
The ball is in your court, professor...
-
- Posts: 4190
- Joined: Wed Nov 25, 2009 1:47 am
Re: On Crafty...
I know you do, that's why my conclusion is not addressed directly to you but to overall atmosphere that sometimes prevails in these threads (and I'm not saying that any of that is your fault, on the contrary).Roger Brown wrote:Milos wrote:
Even though you are acting in the best will and with best intentions seams sometimes you are totally unaware of the bias most of the ppl have towards authority...
Hello Milos,
Wrong person.
If you have followed discussions on this board you will find numerous examples where I have questioned the treatment of the so called derivatives and the apparently unfair handling of Rybka when it seems now that it is not as pure as it appeared to be.
I have questioned the handling of Houdini etc. and by extension the treatment of its author. More than once too.
I have questioned leaving out certain engines from testing queues whilst leaving in others.
-
- Posts: 20943
- Joined: Mon Feb 27, 2006 7:30 pm
- Location: Birmingham, AL
Re: On Crafty...
So which is it? You originally said "verbatim." which has a specific meaning. Now you say "functionally equivalent" which means the two "ideas" are the same, They are certainly not "semantically equivalent." I have already explained why.Milos wrote:I neither seek for any recognition nor I think you are idiot or layman. I just had a very strong impression you didn't read my post at all.Roger Brown wrote:I am not totally surprised but it is disappointing when someone of your obvious abilities and intelligence resorts to arrogance, sneering and childish put downs, particularly when you know better.
Let me categorically state that you are my superior in every way related to computerchess. Compared to you I am a bumbling idiot. Let that be a given. I have no issues at all in acknowledging another my better, none at all, and I am quite willing to bow low before you if that is required.
Side by side comparison for ppl who are not computer programmers is worth only when 2 pieces of code are written in the same programming language (of the same level of complexity). As I already stated up there, Knuth gives his code in pseudo assembler language.I am asking you the questions precisely because you seem to have the answers. Sneering does not answer the questions.
I asked you to show the evidence of the verbatim copying. It would have been much easier to show the side by side comparisons to help fools like me see your point clearly but no, Milos must make the point of trampling even an ignoramus like me in the dust. What could be the point of that?
The code is functionally equivalent to Hyatt's C code (not just equivalence of idea, but equivalence of implementation).
So there is no difference in "for (i=0; i<n;i++)" and
for (mv = first[ply]; mv < last[ply]; mv++) where first and last are _pointers_?
they are no where near "equivalent" except in terms of the idea. That's why I called it a bubble-sort. It is a well-known idea.
The differences I've already pointed out, and they are at the level of triviality such as variable name change. I gave you the reference where you can find the code and I really don't intend to type it down from the book. Instead I gave more visually appealing (but again functionally same) code from wikipedia.
The same is valid for any of ICGA panel claims about Rybka/Crafty or Rybka/Fruit connection. Since Rybka is disassembled you would not find a single piece of code where just by visual inspection you can deduce equality unless you understand the assembler. So my question is, why are you asking detailed comparison from me, but under very same conditions you've never asked anything similar from Hyatt???
Everyone has questioned the assembly to C "decompilation" idea. So what are you talking about. It is straightforward.
Sorry but this is a direct proof of biased approach. You would never make the similar kind of "suspection" for the other side of discussion...As usual though, I suspect that you will believe only in the correctness of your perceptions and not the facts before you.
Even though you are acting in the best will and with best intentions seams sometimes you are totally unaware of the bias most of the ppl have towards authority...
-
- Posts: 4190
- Joined: Wed Nov 25, 2009 1:47 am
Re: On Crafty...
Well then none of the Rybka code is not verbatim copy of Crafty or Fruit. You are changing definitions as it suits you. Sorry, logical fallacy. You seams to be incapable of making any argument without logical fallacies. Again you fail.bob wrote:1. I copied from Knuth "verbatim". Verbatim: word by word, exactly. Can you show me the _exact_, word by word, character by character code I copied? That example from Knuth looks _nothing_ like the example in Crafty. Different variable names. No "swap()" function. Loops are done differently (he uses simple counter, I use a pointer). In other words. "not even close." Strike 1.
None of the Rybka code looks exactly like any of Fruit of Crafty code. You fail again.2. You asked when I am going to sue wiki for copyright. Do you understand "copyright". Does the code in the wiki look _exactly_ like the code in Crafty? Not to me, so how can I sue them for copyright infringement when they didn't copy my code exactly? You can't copyright "ideas". Surely you get that. Strike 2.
There is absolutely no case weather having 1, 10 or million elements where bubble sort is more efficient that insertion sort. Period. If you knew anything about programming you would know that. Any undergrad CS student from a respectable university knows that, and you seams not... For a professor of CS that's just sad!3. Nothing to recommend the bubble sort, EXCEPT when you have 2 or 3 values to sort. Then it is more efficient. Wonder why I use it in the q-search? Of course you don't. You don't have a clue. So here's one: There are not very many non-losing captures in the q-search. This is faster for that reason. steee-rike 3... you are outta here... Once again...
Btw. what kind of a serious man uses stupid baseball analogies???

Knuths code is in Crafty in the same logic as Crafty's/Fruit's code is in Rybka. You fall into your only logic trap. I'm sorry you've not being smart enough to see itAbout the only thing you have proven is your ignorance is more significant that I had originally thought. Knuth's code is not in Crafty.

Bla, bla, bla. Just blabbing and never providing any side by side code comparison. As usual hoping ppl will just believe blind authority. Sorry, but not this time. Either put up the code or shut up.One day you will start to read first. I said "rotated bitboard attacks initialization." Look again.
-
- Posts: 4190
- Joined: Wed Nov 25, 2009 1:47 am
Re: On Crafty...
Nope, I originally said copyright. Agian you are changing subject and topic as it suits you. For claiming your own copyright it's not enough to just change variable names and you know it. You are just playing dumb.bob wrote:So which is it? You originally said "verbatim." which has a specific meaning. Now you say "functionally equivalent" which means the two "ideas" are the same, They are certainly not "semantically equivalent." I have already explained why.
-
- Posts: 20943
- Joined: Mon Feb 27, 2006 7:30 pm
- Location: Birmingham, AL
Re: On Crafty...
Are you a programmer type? Do you know what you are doing? Because just looking at the loop initialization/termination code would show you that what is in Crafty is _not_ in Knuth's code.Milos wrote:Well then none of the Rybka code is not verbatim copy of Crafty or Fruit. You are changing definitions as it suits you. Sorry, logical fallacy. You seams to be incapable of making any argument without logical fallacies. Again you fail.bob wrote:1. I copied from Knuth "verbatim". Verbatim: word by word, exactly. Can you show me the _exact_, word by word, character by character code I copied? That example from Knuth looks _nothing_ like the example in Crafty. Different variable names. No "swap()" function. Loops are done differently (he uses simple counter, I use a pointer). In other words. "not even close." Strike 1.
for (movep = tree->last[ply - 1]; movep < tree->last[ply] - 1; movep++, sortv++)
Hmm. I am using pointers. Knuth uses a simple integer subscript. I even increment two values in the loop, while Knuth uses just one variable for the loop counter. Yeah, those are _identical_.
Sorry. But there are a couple of well-known bugs in Crafty 19.0. They are present in Rybka 1.6.1. There is no doubt that code was copied, as there is no possible reason those two bugs would have been written by another programmer, for reasons long since explained... Try again.None of the Rybka code looks exactly like any of Fruit of Crafty code. You fail again.2. You asked when I am going to sue wiki for copyright. Do you understand "copyright". Does the code in the wiki look _exactly_ like the code in Crafty? Not to me, so how can I sue them for copyright infringement when they didn't copy my code exactly? You can't copyright "ideas". Surely you get that. Strike 2.
Why don't you _try_ it rather than guessing? You might figure out that I did. The code is shorter. It is less "branchy". And again, for 2 or 3 values, it is almost impossible to beat it...There is absolutely no case weather having 1, 10 or million elements where bubble sort is more efficient that insertion sort. Period. If you knew anything about programming you would know that. Any undergrad CS student from a respectable university knows that, and you seams not... For a professor of CS that's just sad!3. Nothing to recommend the bubble sort, EXCEPT when you have 2 or 3 values to sort. Then it is more efficient. Wonder why I use it in the q-search? Of course you don't. You don't have a clue. So here's one: There are not very many non-losing captures in the q-search. This is faster for that reason. steee-rike 3... you are outta here... Once again...
Then I guess you are not going to ever retract that "verbatim copy" nonsense for starters? Didn't think so...
Btw. what kind of a serious man uses stupid baseball analogies???![]()
Knuths code is in Crafty in the same logic as Crafty's/Fruit's code is in Rybka. You fall into your only logic trap. I'm sorry you've not being smart enough to see itAbout the only thing you have proven is your ignorance is more significant that I had originally thought. Knuth's code is not in Crafty..
I believe I asked you do do that first. So far you have not...Bla, bla, bla. Just blabbing and never providing any side by side code comparison. As usual hoping ppl will just believe blind authority. Sorry, but not this time. Either put up the code or shut up.One day you will start to read first. I said "rotated bitboard attacks initialization." Look again.
-
- Posts: 20943
- Joined: Mon Feb 27, 2006 7:30 pm
- Location: Birmingham, AL
Re: On Crafty...
So I just imagined this direct quote from the first post in this specific thread:Milos wrote:Nope, I originally said copyright. Agian you are changing subject and topic as it suits you. For claiming your own copyright it's not enough to just change variable names and you know it. You are just playing dumb.bob wrote:So which is it? You originally said "verbatim." which has a specific meaning. Now you say "functionally equivalent" which means the two "ideas" are the same, They are certainly not "semantically equivalent." I have already explained why.
Milos wrote: Interesting, I thought the very same implementation of bubble sort you copied verbatim from Knuth...
That "verbatim" is my imagination???
-
- Posts: 4190
- Joined: Wed Nov 25, 2009 1:47 am
Re: On Crafty...
You are intentionally comparing this one, but not the other one from root.c. Coincidence? No I don't think so.bob wrote:Are you a programmer type? Do you know what you are doing? Because just looking at the loop initialization/termination code would show you that what is in Crafty is _not_ in Knuth's code.
for (movep = tree->last[ply - 1]; movep < tree->last[ply] - 1; movep++, sortv++)
Hmm. I am using pointers. Knuth uses a simple integer subscript. I even increment two values in the loop, while Knuth uses just one variable for the loop counter. Yeah, those are _identical_.
Btw. there is no concept of "pointer" in assembler code. There are just different types of addressing. Strange that you don't know that.
Having no reason for bugs is not enough to prove verbatim copying, at least not according to your definition. And btw. in Crafty 19.0 you use pointers, there are no pointers in disassembled Rybka 1.6.1. So again no verbatim coping. Again you fall in your own trap.Sorry. But there are a couple of well-known bugs in Crafty 19.0. They are present in Rybka 1.6.1. There is no doubt that code was copied, as there is no possible reason those two bugs would have been written by another programmer, for reasons long since explained... Try again.
And you know that by what, your hunch?Why don't you _try_ it rather than guessing? You might figure out that I did. The code is shorter. It is less "branchy". And again, for 2 or 3 values, it is almost impossible to beat it...
All that probability analysis Knuth gives is nothing compared to your hunch, right?

You are the one who resorts to changing definitions on the way how it suits him. For Crafty/Rybka, Fruit/Rybka, Houdini/Robbo, etc. you have one definition, and for Knuth/Crafty you have another. Sorry, but that's not acceptable.Then I guess you are not going to ever retract that "verbatim copy" nonsense for starters? Didn't think so...
I believe I asked you do do that first. So far you have not...
You have actually never showed any code comparison by yourself on this forum. At least not in last two years. It was always someone else you was doing it. And you as usual just rely on your authority for ppl to believe you. Sorry, not this time.