Not logged inRybka Chess Community Forum
Up Topic Rybka Support & Discussion / Rybka Discussion / What does "copy" mean?
1 2 3 4 5 Previous Next  
- - By Ugh (*****) Date 2013-08-29 08:14
Bob, scenario and a question for you ....

You and I are taking a computer science exam, we are sitting next to each other. You have a crib sheet and are cheating. Either you wrote notes on the palm of your hand or you have a little piece of paper with notes on it. Anyway, you are acting suspiciously and it attracts my attention, sitting next to you, I glance at the palm of your hand, which you are 'secretly' reading. I notice it says "mobility=sum of pseudo legal moves". I know this "fact" already, I've been writing programs with it in and talking to people about it in the past.

I carry on with my exam, and get to question 7. Define "mobility". I write down mobility=sum of pseudo legal moves.

Of course, you cheated, it was in your crib sheet. But did I cheat? I would say not, I answered from my own knowledge. We'll ignore whether I report you to the invigilator or not.

Same is with Vas and Fruit mobility. Sure, the definition of mobility is contained within Fruit source code. But, being such a simple concept, Vas knew it already. So, how can you say he "copied" Fruit's mobility when he already knew it? Doesn't Vas have to be pretty dumb to even NEED to copy all those simple things from the Fruit evaluation, things that chess programmers can do standing on their heads? Double pawns? Open files? Just how does "copy" apply to things you already know about?
Parent - - By bob (Gold) Date 2013-08-29 15:57
This gets on the fringe of law.  Another similar example.  Someone is on the roof of the building (call him A).  Someone is inside that intends to harm the guy (call him B).  A is depressed and jumps off the roof.   B sees him falling and shoots him.  Did B kill him?  Or was he already dead because once he hits the ground from 60 floors up he will certainly die?  The legal system uses this sort of "test" case to explain the concept "intent".  Yes, B is guilty of murder.  He fired a shot that was fatal.  He had the requisite intent to kill him. 

For your cheating question, I was clearly cheating.  I had some sort of cheat-sheet handy.  You saw it.  If you had used something you did NOT know, then you would have to intend to use that to be guilty of cheating.  However, I would add, this would be a tough one to prove if the instructor SAW you looking at the cheat sheet and compared the answer to your test.

For a chess program, I think it is a little confusing to be kind, but also there are some rational guidelines.  What is a chess program?  I collection of algorithms (blocks of code, specifically) ordered in a specific way, to do specific tasks as defined by the programmer.  If you look at the "big picture" of a program, for example, the description of chess 4.x as presented by Slate, and then you start writing code, I would call that original, because even though Slate gives a good description, there is no code, there is no structure, there is no organization, there is nothing specific enough that you can just copy it and have a working program.  If you look at fruit, and write a sort of "flow-chart" as you go over the source, then you write the code yourself to fill in that flow-chart, that's a tough one.  One so tough to define the ICGA has never tried and I doubt anyone would be willing to try to analyze that program for originality.  So we look for two things, specifically.  The first is obviously copied code, where there are few if any differences, period.  the go_parse() is an example for 1.0.  Or the recently mentioned transposition/refutation table code.  The second is translated code, as necessitated by moving from mailbox to bit boards. 

One of the key things that helps is "signatures".  We've caught MANY crafty copiers by looking for a few well-known quirks that are in the code.  Quirks that someone could not possibly write for themselves because the circumstances that caused that code no longer exist (the EP test for table bases, etc.)  Quirks are dead giveaways.

Let's take the hashing issue Richard raised.  Fruit does not force the hash table alignment to a 64 byte boundary.  Crafty has for 15 years.  When Vas copied Crafty to create the early Rybkas, "his" hash table was correctly forced to a 64 byte alignment to match cache memory blocks.  When he "wrote" 1.0 beta, mysteriously, he forgot that step.  Richard mentioned "it would be damning if he did align in 1.6.1 since he did not in 1.0 beta.  We now know he did in 1.6.1 and did not in 1.0 beta.  That's odd.  There is a hole in fruit's tt entry, as there is in Vas'.  Both use two bounds, when that is only useful if you use mtd(f) according to anyone that has tested it.  So some of the code in 1.0 beta looks quirky, and matches fruit.  The fact that Vas optimized the code and took the usual "store()" function (which has to store UPPER, LOWER or EXACT) and broke it up into different store functions, one to store UPPER, one for LOWER, etc, does NOT change the code significantly, and is actually something an inlining compiler might do automatically.  We end up with some code, as in evaluate() where many of the terms are done in exactly the same way, looking at exactly the same conditions, excepting for the differences necessitated by the differences between mailbox and bitboards.  Then we have  code (such as the tt stuff) that looks to be copied pretty much directly.

You can make of it what you want.  I believe, with no doubts, that Rybka is NOT original.  Certainly not as required by ICGA rule 2.  Given previous behavior as in 1.4-1.6.1, I believe he has shown a pattern of cutting corners and violating rules.  If you find it acceptable, that's perfectly OK with me.

Let me ask you if this is OK, since this is an absolutely true story, and I (and others) saw it unfold.  ICGA/ACM rules (we used same rules for both sets of events, the WCCC and the former annual ACM tournaments) explicitly forbid operator interference.  What would you do/say if you were playing against a program, and multiple times during the game you saw the operator for your opponent hit a key and the program moved instantly?  Clear rule violation?  Who is violating the rule?  The operator is NOT the author.  I believed it was the operator that was guilty.  More than one author watched this happen at this particular ACM event.  We ALL approached IM Mike Valvo and told him what was going on.  Rather than DQ the program, we suggested he talk with the operator and tell him "one more time and you forfeit all games..."  The problem went away so far as I know, or else the operator became more subtle...  Just for fun, the program was "Chessmachine Schroder".  There is a clear and precise rule about operator duties.  Do you believe this was a violation of that rule?  Should it be allowed to continue?  Each rule in the ICGA rule set was written for a specific reason, to exclude a specific behavior from the events....

original code is no different.  It is just much more complex to define than operator duties.
Parent - - By Rebel (****) Date 2013-08-29 16:46
Let's take the hashing issue Richard raised.

You have been given the origin of the Rybka TT, Vas using MTD (f) needing 2 scores back in 2003/4.

2004 - http://www.stmintz.com/ccc/index.php?id=377371 (discussion involved Fabien).

2005 - http://www.stmintz.com/ccc/index.php?id=432374

2005 - http://www.stmintz.com/ccc/index.php?id=469209

I could add the TT issue to the The obfuscation thread. I (Vas) need to hide that I copied Fruit, let's see, hmmm.... ok, let's re-order the TT contents. Now I am safe.

Yawn........
Parent - - By bob (Gold) Date 2013-08-29 16:59
Yawn...

wonder why fruit had it?  Wonder why, since 1.0 beta is NOT mtd(f) he left it in?  I did a mtd(f) version of Crafty back when Don was at MIT and suggesting it was the best thing since sliced bread.  I spent a good bit of time on it, and could not get it to converge fast enough to be faster than my original.  But I did do a lot of new things in that version that I wanted to keep.  I removed mtd(f) driver, I removed the double-bound hash table stuff.  I ended up with a (once again) traditional PVS searcher.  Why didn't vas remove the extra code if he was so hyper on optimization?

The details do NOT match the supposition.  BTW reordering the tt contents does NOT make him "safe"...
Parent - - By Alkelele (****) Date 2013-08-29 17:04
From the links you didn't follow:

"I also use two bounds together with PVS, it seems simpler. There might be some
_extremely_ rare difference in cases where you do three re-searches from the
root, but if your driver opens the window completely after an initial fail
low/high at the root, then I guess it make absolutely no difference.

The real reason I do this is I still have some secret hopes to later use smaller
aspiration windows from the root (or even MTD (f) :))."
Parent - - By bob (Gold) Date 2013-08-29 17:50
The only reason for 2 bounds is mtd(f).

I use small aspiration windows.  However, that is irrelevant to the dual-bound issue.  You don't fail high, increase beta, then fail low, since you didn't change alpha.  That second bound is not useful.  Doesn't hurt (other than make the tt entry larger) but it doesn't help.

Interestingly, both Fruit AND Rybka do the same thing.  Same way.  Same quirks.

Just a little "too convenient" IMHO.
Parent - - By Alkelele (****) Date 2013-08-29 18:20
You asked:

"Wonder why, since 1.0 beta is NOT mtd(f) he [Vas] left it in?"    [BTW, here you use language ("left") that assumes a certain process, so the question is invalid, similar to "when did you stop beating your wife".]

"Why didn't vas remove the extra code if he was so hyper on optimization?"    [Same thing as above, but now you also try raise further suspicion using flawed straw man logic.]

The point is that Vas explained his approach, 8 years ago, in a public discussion (and, btw, you were even one of the participants).

It is also evident from those links that Vas investigated various approaches and formed and shared opinions about their ins and outs. This doesn't fit your "too convenient" interpretation, at all.

BTW, why were the many, many public discussions where Vas participated never used as evidence about how Vas approached things back then? My suspicion is that you never did this since it didn't fit your whole "too convenient" agenda where you try to paint a "copy-modify" picture of how Vas did things.
Parent - - By bob (Gold) Date 2013-08-29 21:47
Discussions are irrelevant when looking for copying.  One can talk about doing something without actually doing it, or one can talk about not doing something while actually having done it.  But if, as BFL has repeatedly claimed, Vas spent all that time on optimizing, I would think he would have optimized his hash stuff equally.  It is executed twice for every node, once to look up, once to store...
Parent - - By Alkelele (****) Date 2013-08-29 22:29
You write:

"Discussions are irrelevant when looking for copying."

This doesn't seem to fit into the fact that you spend so much time being anal about how to interpret certain Vas quotes.

My understanding is that you are very interested in quotes that help your "Vas is guilty" case, but you want to claim that everything else is irrelevant.
Parent - - By bob (Gold) Date 2013-08-30 04:13
My point was, since it apparently went WAY over your head, was that when you are comparing code, it doesn't matter what that particular author MIGHT have discussed before he wrote or copied the code.  If he copied, the discussion doesn't mean a thing...
Parent - - By Alkelele (****) Date 2013-08-30 10:14
Let me just ask you this to clarify if I understand you correctly: Are you saying that the following quote of Vas is irrelevant?

"I also use two bounds together with PVS, it seems simpler. There might be some
_extremely_ rare difference in cases where you do three re-searches from the
root, but if your driver opens the window completely after an initial fail
low/high at the root, then I guess it make absolutely no difference.

The real reason I do this is I still have some secret hopes to later use smaller
aspiration windows from the root (or even MTD (f) :))."
Parent - - By bob (Gold) Date 2013-08-30 17:09
Yes.  No mtd(f) algorithm to be found in 1.0 beta.  Why make tt entries larger than is useful if he was such a great "optimizer"?  Why all the SAME quirks as in Fruit? FOUR depths, for example?
Parent - - By Alkelele (****) Date 2013-08-30 22:08
1) In 2005, in a neutral discussion, Vas explained why he used the PVS + 2 bounds "quirk". The explanation is given right above your above post where you, for some weird reason, repeat your questions about this even though you had just been alerted to the explanation (again).

2) For all we know, the 4 depths "quirk" could have a similarly simple and mundane explanation. You just don't seem to be willing to entertain this possibility.

3) In the links (that you maybe didn't follow yet), you can see examples of two other engine authors (apart from Vas and Fabien) who experimented with the PVS + 2 bounds approach. Did they also copy Fruit?

4) Vas discussed these things at length with Fabien and others in 2004 and 2005. So, it seems that whatever Vas did in Rybka 1.0 was a conscious DECISION between various commonly known options (some of which were used in Fruit, and some not) rather than the zombie-like "just copy Fruit" approach that you are so fond of promoting.

5) There are undoubtedly many "quirks" in Fruit that are not in Rybka, and vice versa. So you are wrong when you say "Why all the SAME quirks as in Fruit".

6) And, just for good measure: How many of the "quirks" discussed here are present in Rybkas that participated in WCCCs?
Parent - - By bob (Gold) Date 2013-08-31 00:19
"Occam's razor".  The simplest explanation is most likely the correct explanation...

Repeated enough times and it is hard to discount what happened and say "just coincidence".
Parent - By John (**) Date 2013-08-31 08:50
Shouldn't we redefine "Occam's razor" in this case to "Hyatt razor"? Because once again you are not answering some serious questions and contra arguments here.

It clearly is a pity that somebody with tunnel vision could be in charge of such an important inquiry. To me, you have fully disqualified yourself, you are a person that cannot be trusted.
Parent - - By turbojuice1122 (Gold) Date 2013-08-31 10:54

>  "Occam's razor".  The simplest explanation is most likely the correct explanation...


You forget the important qualifier: "All other things being equal, the simplest explanation is usually the correct explanation."  This means that you cannot ignore all of the information out there.  If you ignore this important qualifier, most of modern science would be out the window.
Parent - By Kappatoo (*****) Date 2013-08-31 12:20
It's amazing how many versions of Occam's razor seem to be out there.
The original is really quite different from both of these formulations.
When it comes to the idea behind what Occam said, then of course any explanation needs to take into account all the evidence.
Parent - - By Banned for Life (Gold) Date 2013-09-03 07:05
But if, as BFL has repeatedly claimed, Vas spent all that time on optimizing, I would think he would have optimized his hash stuff equally.

You must have gotten hit in the head again...

For the hundredth time, Anthony Cozie claimed that Vas expended a lot of effort on optimization of Rybka 1.0 Beta, resulting in an engine that was three times faster than Zappa. Vas denied this which infuriated Anthony. I have not expressed an opinion on this matter.
Parent - - By bob (Gold) Date 2013-09-03 15:36
Eh?  better re-read your comments on the hashing topic.  You went on and on about Vas "optimizing" his code...
Parent - - By Banned for Life (Gold) Date 2013-09-04 17:39
No, you should learn to read. Or take your medicine. Or hit yourself in the face with a baseball bat a few more times...

Anthony claimed that Vas had pursued extreme optimization measures after reviewing Strelka 2. Vas denied it. I copied the exchange here, but never offered an opinion on the matter.
Parent - - By bob (Gold) Date 2013-09-04 20:27
You "kept citing that".  That would mean you are using it as a fact.  That would mean you believe it.  Yet we see stuff WITHIN the tt that is NOT optimized at all.  The structure in both fruit AND rybka is incorrectly laid out.  You should start with the longest data types and work down to the chars.  That preserves alignment that makes access faster.  Faster to access 4 bytes on an address with rightmost 2 bits zero as opposed to any of the other three possibilities.  So the structure is poorly done.  The alignment of the whole table was first good, then reverted to bad.  Then he supposedly "optimized the hash table access code by splitting it into 4 parts".  Something an optimizing compiler might do.  Something that is certainly trivial to do.  Question is, why split tt store into 4 different pieces, but leave the structure arranged poorly as well as the tt starting address on a non-64 byte aligned address, and all of the access/store/age/etc code matches fruit perfectly?

That's about a half-dozen coincidences, each with a VERY low probability, yet here they ALL happened?  :)

Keep trying.  Not buying it.
Parent - By Banned for Life (Gold) Date 2013-09-04 23:48
You "kept citing that".  That would mean you are using it as a fact.  That would mean you believe it.

I cited a discussion between two guys with very divergent viewpoints. One of them might have been right, or the truth might have been somewhere in the middle. My opinion, rarely expressed, was that Vas optimized algorithms and heuristics but rarely code.

Yet we see stuff WITHIN the tt that is NOT optimized at all.  The structure in both fruit AND rybka is incorrectly laid out.  You should start with the longest data types and work down to the chars.  That preserves alignment that makes access faster.  Faster to access 4 bytes on an address with rightmost 2 bits zero as opposed to any of the other three possibilities.

You are agreeing with Vas and disagreeing with Anthony. That's fine. Your explanation of why it's better to store larger operands in a structure first is incorrect for newer Intel processors. The major remaining issue is the store forwarding stall, which is made worse by not putting larger operands first, but isn't an access issue.

The alignment of the whole table was first good, then reverted to bad.

The hash lines were not hash alligned in Rybka until R2.3.2. The testbed used Crafty's TT structure and code. Vas didn't like this and never used it in code he wrote.

Then he supposedly "optimized the hash table access code by splitting it into 4 parts".

WRONG. He optimized the processing that was done in the four different cases. The TT access code was a tiny part of this, and was only optimized to the extent that unnecessary tests were removed. An optimizing compiler would never ever make the algorithmic changes that Vas instituted between the four different processing strings.

Question is, why split tt store into 4 different pieces, but leave the structure arranged poorly as well as the tt starting address on a non-64 byte aligned address, and all of the access/store/age/etc code matches fruit perfectly?

As he told Anthony, he split the processing not for code efficiency, but because he wanted to implement significantly different processing in each of the cases. As you've noted, the speed increase that Anthony noted was NOT due to efficient coding.

That's about a half-dozen coincidences, each with a VERY low probability, yet here they ALL happened?  :)

You're an idiot if you think any of the splitting stuff came from Fruit. It isn't there. This was Vas' method of making it easy to handle each case in an optimal manner from an algorithmic and heuristic standpoint. This is why Rybka 1.0 Beta is still stronger than Crafty on equal hardware eight years later.
Parent - - By Rebel (****) Date 2013-08-30 08:16
wonder why fruit had it?

Read the URL's I posted!

The origin of the Rybka 1.0 beta TT is in there.

BTW reordering the tt contents does NOT make him "safe"...

That is what your copy+modify model stands for. The assumption he re-ordered the TT contents to hide the Fruit origin.

Why didn't vas remove the extra code if he was so hyper on optimization?

This again proofs you didn't read the 3 old CCC threads.

BTW (1) - how convienient of you not to point to Richard's analysis of the TT code (totally different than Fruit)

BTW (2) - I am just about smart enough to realize that you are intelligent enough to get the point of the The obfuscation story thread. Please don't pretend that you didn't get the point. That would be an insult to your own intellect.
Parent - - By bob (Gold) Date 2013-08-30 16:57
DOES NOT answer my question.  I've talked about mtd(f) experiments in the past.  I'd be happy to send you a version (12.0x) that was never released, which used mtd(f).  I have a version of 23.0 that someone else sent to me that used the mtd(f) framework.  NONE of that code was ever released in a normal version because I never had any success.  So claiming that "experimenting with mtd(f), expanding the tt entry to hold two bounds, and such, and then leaving that in" really is not a reasonable explanation.  Particularly when you look at the tt structure carefully...

struct entry_t {
   uint32 lock;
   uint16 move;
   sint8 depth;
   uint8 date;
   sint8 move_depth;
   uint8 flags;
   sint8 min_depth;
   sint8 max_depth;
   sint16 min_value;
   sint16 max_value;
};

Take a look at the fields.  What's "normal"?  32 bit "lock" (hash signature)?  Common.  Best move.  depth (draft).  "date" (age) common too.  flags.  Then two bounds and drafts for those bounds.  What about "move_depth"???  Don't see that in any version of my code, even the mtd(f) version.  Don't see it in later Rybkas because it doesn't make a lot of sense.  But it is in both Fruit and Rybka, and no other program I could find, unless you pick those known to be derivatives (such as Toga, etc).

If you have a min depth and a max depth (draft for the two bounds so that you can decide if either is useful) why do you have "depth" and "move_depth"?

Those look to be "to close for an accident, the structure of the tt entries in Fruit is unusual, to say the least.  And the same structure is used in Rybka.  Whether Vas moved the bounds up in the structure has absolutely no effect on the unusual "look" of tt entries.  I don't believe that is original in Rybka, period.  It's not a huge piece of code, but it is beyond any reasonable doubt "original to fruit, appearing in Rybka."  Make of it what you want.  Try to find any difference to claim it didn't come from Fruit.  But it is one of those "unusual quirks" that to me, makes copying easier to detect.  Are there more?  Let's wait for Richard.  I consider this to be a pretty important example, because there is no bitboard stuff to divert the argument in that direction. 

BTW, I DID point to Richard's analysis.  And again, you want to try to find ANY difference and say "not copied"

If one does this:

call X;

where X looks like:

do thing A;
do thing B;

And the other has

call X;
call Y;

where X looks like

do thing A;

and Y looks like

do thing B;

Those are NOT different.  Optimizing someone else's code does NOT make that optimized version original.  It just makes it an optimized copy.  Yet you want to claim it is original, by only looking at the surface.  Again.   Why 4 depth values in one TT entry?  Think about it.  I've stored one in every released version of Crafty.  I used two when I stored two bounds playing with mtd(f).  FOUR?  Never.  Never seen it done by anyone else either.  EXCEPT for rybka and fruit.  And you don't think that is anything more than just random coincidence???  Don't forget the other quirks.  1.6.1 and earlier correctly forced the tt to a 64 byte alignment.  1.0 beta did not.  Neither did Fruit.  Similarity after similarity after similarity.  Richard even took the multiple store() functions and reassembled them into one.  Guess what they resemble?  :)

I don't believe Vas obfuscated code.  I DO believe he obfuscated search output.  Whether to hide any similarities to Fruit, whether to hide details of changes he made (new ideas), whether to hide the underlying concepts in Rybka (wanted everything to think it was a high-knowledge slow-NPS searcher when in reality it was exactly the opposite) I won't venture a guess.  I don't believe he obfuscated his source, however, because he took the EXTRA step of stripping his executables of all symbols, which makes it very difficult to start the RE process with no idea of what the procedure names are and where they start in memory.  I doubt he gave that code obfuscation much thought.  If he had, he would have certainly cleaned up the tt stuff.
Parent - - By user923005 (****) Date 2013-08-31 02:30
Most chess programs have a hash table entry that looks something like this:

struct hash_rec
{
    hashcode key;
    short score;
    char type;
    unsigned char depth;
    move bmove;
    int flags;
};

There are double entries in Vas' hash table entry because he uses two bounds.  He explained that in forum posts.  I don't see the problem.
Parent - - By bob (Gold) Date 2013-08-31 04:39
There is more.  You see ONE depth in your code.  You would find two depths/bounds in the mtd(f) version of Crafty.  Fruit/Rybka have FOUR depths.  Wonder what they do and why?  Perhaps you might check the fruit source?

I assume "type" is really "age" since most don't have a "type" AND "flags".  Fruit/Rybka both have an age field.  Both use exactly the same details in what is stored, how it is used, all a basic part of the replacement policy.  There are so many replacement policies that have been used.  I could probably produce at least a half-dozen different things I have used in Crafty over the years.  One thing most of us have used over the years, however, is a properly aligned hash table starting address to efficiently map into cache.  Hm..  Rybka 1.4-1.6.1 used an aligned tt, copied from Crafty.  1.0 beta does NOT align the tt.  Neither does fruit.  Yet it is a well-known improvement.

I see an interesting "problem".  A quirky structure, only used in two programs that I am aware of, and I have lost count of the number of programs I have looked at, the number that have been sent to me to examine some specific feature or other.  I've not looked at every program in existence, but I have looked at a lot over the years.  Nothing looked like Fruit, TT-wise...

By itself, I would not give that much thought to this specific feature either.  But another match to fruit.  Richard also mentioned repetition detection.  There are multiple ways people have done this.  Fruit/Rybka use the simple list of hash signatures approach.  By itself, meaningless.  But taken in conjunction with all the other existing similarities, it simply adds up...  The number of "hints" becomes larger.
Parent - - By user923005 (****) Date 2013-08-31 04:58
Suppose (just for a moment) that someone had spent time studying the Fruit program.  They saw and understood how and why 4 depths were used and liked the idea.
When they wrote their own version, what would we see?

In what way is this different from composing our hash in exactly the manner described by Zobrist?

I do honestly agree that there is a lot of fruitlike stuff in the Rybka 1.0 beta.  But I could see it explained as someone analyzing fruit {as Vas explained in his beta notes} and writing their own version, or by copying fruit and modifying it until it suits their purpose.

Don't forget that Vas is an IM.  Chess experts on that level have prodigious memory and are able to do things like play a great number of people simultaneously while blindfolded.

I am not in the Vas is guilty camp.  I am not in the Vas is innocent camp.  I am in the "it has not been proven if Vas is innocent or guilty" camp.  I see nothing so far that would change my mind.
Parent - - By bob (Gold) Date 2013-08-31 05:05
If you now want to claim that he studied fruit and wrote Rybka while having fruit open in another window, I'd buy that.  But that is NOT original programming, so we end up back at square zero by a different path.  That's still copying.

And I would not be surprised at that, because of Vas' incredibly stupid definition of "original source code" (code that I typed myself).  If you look at a Fruit function, and type it character for character, I do not call that "original" yet Vas did exactly that...  A truly remarkable (and truly wrong) definition of "original at the source code level."  How is that any different from cut and paste, other than effort required?
Parent - - By user923005 (****) Date 2013-08-31 05:11
I don't think he needed fruit in another open window.  I think he could do it directly from the concepts.
I guess that he is pretty smart, considering the strength of Rybka.

Would you need fruit in another open window to do that after having studied fruit?

Just for the sake of argument, assume that he is just as smart as you are.

I already know that you could do it and I know that because I could do it and I am not smarter than you are.
Parent - - By bob (Gold) Date 2013-09-01 15:34
I have looked at fruit source for I have no idea how long now, thanks to this investigation.  I have zero chance of writing an eval that matches fruit right now.  If I studied fruit's eval for a week, then put it aside and started writing, I STILL would not be able to match anywhere even remotely close to what Vas did.

No, I do not believe that is practical.   There are HUNDREDS of specific details one has to remember.  Not just a couple.  HUNDREDS.  I could not rewrite my OWN current evaluation from memory and end up with something that is reasonably close.  My own code...
Parent - - By Rebel (****) Date 2013-09-01 19:08
Just a small reminder Vas got his information from, the notes he made starting in 2003 from various sources. Heck even my programmer-page is mentioned.

http://www.top-5000.nl/notes.gif
http://www.top-5000.nl/notes2.jpg
http://www.top-5000.nl/notes3.jpg
Parent - - By bob (Gold) Date 2013-09-02 00:32
IF he took specific notes about Fruit, and then wrote code, THAT is still non-literal copying.  Can you take "cliff notes" and get the gist of a book and write another and call it original?

Again, all of these old quotes and stuff are meaningless given the context of the various Rybkas and the comparison to fruit...
Parent - - By Rebel (****) Date 2013-09-02 12:15
IF he took specific notes about Fruit, and then wrote code, THAT is still non-literal copying.

Then by your logic the moment you took the evaluation interpolation algorithm from Fruit and put it everywhere in Crafty 22.2 (november 2008) is non-literal copying also.
Parent - - By bob (Gold) Date 2013-09-02 16:05
1.  Did you read what I wrote?  If he took SPECIFIC notes about fruit, and then wrote code, THAT is non-literal copying.  That is not "saying here's a neat idea, I'm going to go code this in my program."  That is "here is the EXACT things that are done, I am going to do the same exact things in my code."

2.  I didn't take any notes on Fruit's eval.  I don't do the same things.  The things that we do have in common I don't do in the same way.  There IS a difference. 

3.  The idea "compute two scores and interpolate" is a general concept.  HOW do you interpolate?  Material?  Some function based on material?  Is there some minimum amount of material that has to come off before the interpolation?  That's the DIFFERENCE between using someone's idea and using someones CODE...
Parent - - By Rebel (****) Date 2013-09-02 18:51
Making notes is not code :razz:

No copying, just your pink VIG glasses.

Next one please.
Parent - - By bob (Gold) Date 2013-09-02 21:45
Ever taken a computer science course in your life?  Ever talked about things like flow-charts, or pseudo-code, as a first step before writing code?

Taking notes CAN capture exactly what the code does.  That IS "copying code".

Can you make enough notes from a book so that you can write a very accurate reproduction?  I can.
Parent - - By Rebel (****) Date 2013-09-03 08:26
Taking notes CAN capture exactly what the code does. That IS "copying code".

So according to you:

1. Reading the IGCA journal making notes IS "copying code".

2. Reading the CPW making notes IS "copying code".

3. Reading instructive web-pages (Bruce, mine etc.) making notes IS "copying code".

4. Reading fora making notes IS "copying code".

5. Reading open source code making notes IS "copying code".
Parent - - By turbojuice1122 (Gold) Date 2013-09-03 10:16
Maybe I should move bob's post back to the beginning of the thread, as he is creating his own definition of "copy" again. :roll:
Parent - By Venator (Silver) Date 2013-09-03 15:17
Yeah, good idea. Everybody should read this posting by Bob.
Parent - By Rebel (****) Date 2013-09-03 15:55
Bob - Taking notes CAN capture exactly what the code does. That IS "copying code".

Stored it in my notes as a classic.

It's indeed a dirty copy.

:wink:
Parent - - By bob (Gold) Date 2013-09-03 15:26
According to ME, taking a source program, making detailed notes about everything that is done, and then using that to "write" your own code is NOT ORIGINAL.  Journal articles generally don't include a complete chess engine source.

Nothing to do with the Wiki.

Nothing to do with web pages.  Yours for example.  You don't give data structures, detailed code, precise values, precise things to do, etc...

Nothing to do with reading fora

#5 is correct.
Parent - - By Ugh (*****) Date 2013-09-03 15:41
BS.

You don't give data structures

Rybka didn't use Fruit data structures, data structures are entirely different

detailed code

Rybka didn't use Fruit code, there is no direct copied code, nor is there your non-literal copied code for that matter

precise values

Rybka didn't use Fruit weights, Rybka uses own entirely different weights

precise things to do

Rybka didn't use Fruit data manipulation algorithms (see bishop mobility for example), the different data structure has to be manipulated by different algorithms (population counts, not looping on rays, bitwise, bytewise eg)

#5 is WRONG. Your argument is BS.

Face it Hyatt, whatever Vas did, you would call it copying. Because you were out to get him. Facts never got in your way.
Parent - - By bob (Gold) Date 2013-09-03 15:54
Eh?  Did you LOOK at Richard's RE of Rybka's hashing?  REALLY LOOK?  Did you see the HT structure?  dual bounds?  FOUR draft values?  Did you look at Fruit?  Did you look at the code Rybka gave for the "trans_store_exact()" procedure?  Did you look at Fruit's code?

Did you see Richard's "comment"?  Hint: I will leave the comparison to Fruit code for the reader...   Did you "read and compare?"  :)

Let's just say "it is interesting".  Take a look.  Spend 30 minutes.  Then repeat "there is no direct copied code".  :)

I call "copying" "copying".  Nothing more, nothing less.  This is an example of "literal copying" BTW...
Parent - By bob (Gold) Date 2013-09-03 16:25 Edited 2013-09-03 16:28
Thought I would save you some trouble, since you refuse to go to any "trouble" and never look unless forced to.

Here is Richard's store() procedure as he disassembled it from 1.0 beta.  Note.  I removed all blank lines and comments to try to make it as compact as possible.  No other changes to what Richard posted here.

void trans_store_exact(short move, int depth, int value)
{
  int best_score = 0;
  entry_t *best_entry;
  entry_t *entry = &trans.table[trans.mask & board.state.hashkey];
  for (int i = 0; i < ClusterSize; i++, entry++) {
    if (entry->lock == board.state.hashkey) {
      entry->date = trans.date;
      if (depth > entry->depth)
        entry->depth = depth;
      if (depth >= entry->move_depth) {
        entry->move_depth = depth;
        entry->move = move;
      }
      if (depth >= entry->min_depth) {
        entry->min_depth = depth;
        entry->min_value = value;
      }
      if (depth >= entry->max_depth) {
        entry->max_depth = depth;
        entry->max_value = value;
      }
      return;
    }
    int score = trans.age[entry->date] - entry->depth;
    if (score > best_score) {
      best_entry = entry;
      best_score = score;
    }
  }
  best_entry->lock = HIDWORD(board.state.hashkey);
  best_entry->date = trans.date;
  best_entry->depth = depth;
  best_entry->move_depth = depth; 
  best_entry->move = move;        
  best_entry->min_depth = depth;  
  best_entry->min_value = value;  
  best_entry->max_depth = depth;  
  best_entry->max_value = value;  
}

Now, here is the trans_store() function direct from Fruit 2.1.  I removed all comments, all ASSERTS, and the hash statistics gathering since Rybka does not gather/display that information (note that others do the same.  I removed this code from Crafty many years ago, it costs some time, the information is not very informative, so I removed it in a search for speed.  Here's the fruit code:

void trans_store(trans_t * trans, uint64 key, int move, int depth, int min_value, int max_value) {
   entry_t * entry, * best_entry;
   int score, best_score;
   int i;
   best_entry = NULL;
   best_score = -32767; // this is actually age of entry, not a "score" in the usual sense.
   entry = trans_entry(trans,key);
   for (i = 0; i < ClusterSize; i++, entry++) {
      if (entry->lock == KEY_LOCK(key)) {
         entry->date = trans->date;
         if (depth > entry->depth)
           entry->depth = depth;
         if (move != MoveNone && depth >= entry->move_depth) {
            entry->move_depth = depth;
            entry->move = move;
         }
         if (min_value > -ValueInf && depth >= entry->min_depth) {
            entry->min_depth = depth;
            entry->min_value = min_value;
         }
         if (max_value < +ValueInf && depth >= entry->max_depth) {
            entry->max_depth = depth;
            entry->max_value = max_value;
         }
         return;
      }
      score = trans->age[entry->date] * 256 - entry->depth;
      if (score > best_score) {
         best_entry = entry;
         best_score = score;
      }
   }
   entry = best_entry; // compiler eliminates this, uses "best_entry"
   entry->lock = KEY_LOCK(key);
   entry->date = trans->date;
   entry->depth = depth;
   entry->move_depth = (move != MoveNone) ? depth : DepthNone;
   entry->move = move;
   entry->min_depth = (min_value > -ValueInf) ? depth : DepthNone;
   entry->max_depth = (max_value < +ValueInf) ? depth : DepthNone;
   entry->min_value = min_value;
   entry->max_value = max_value;
}

I inserted a couple of comments.  Near the bottom, the compiler eliminates one assignment and uses the assignment source rather than the destination to avoid an unnecessary instruction and memory write.

Notice any similarities?  :)

Call that purely original?

For fun, here is an "alternative" store() routine from another well-known bitboard program:

void HashStore(TREE * RESTRICT tree, int ply, int depth, int wtm, int type,
    int value, int bestmove) {
  HASH_ENTRY *htable, *replace = 0;
  HPATH_ENTRY *ptable;
  uint64_t word1, temp_hashkey;
  int entry, draft, age, replace_draft, i, j;
  word1 = transposition_age;
  word1 = (word1 << 2) | type;
  if (value > MATE - 300)
    value += ply - 1;
  else if (value < -MATE + 300)
    value -= ply - 1;
  word1 = (word1 << 21) | bestmove;
  word1 = (word1 << 15) | depth;
  word1 = (word1 << 17) | (value + 65536);
  temp_hashkey = (wtm) ? HashKey : ~HashKey;
  if (!replace) {
    replace_draft = 99999;
    htable = trans_ref + (temp_hashkey & hash_mask);
    for (entry = 0; entry < 4; entry++, htable++) {
      age = htable->word1 >> 55;
      draft = (htable->word1 >> 17) & 0x7fff;
      if (age != transposition_age && replace_draft > draft) {
        replace = htable;
        replace_draft = draft;
      }
    }
    if (!replace) {
      htable = trans_ref + (temp_hashkey & hash_mask);
      for (entry = 0; entry < 4; entry++, htable++) {
        draft = (htable->word1 >> 17) & 0x7fff;
        if (replace_draft > draft) {
          replace = htable;
          replace_draft = draft;
        }
      }
    }
  }
  }
  replace->word1 = word1;
  replace->word2 = temp_hashkey ^ word1;
  if (type == EXACT) {
    ptable = hash_path + (temp_hashkey & hash_path_mask);
    for (i = 0; i < 16; i++, ptable++) {
      if (ptable->path_sig == temp_hashkey ||
          ((transposition_age - ptable->hash_path_age) > 1)) {
        for (j = ply; j < tree->pv[ply - 1].pathl; j++)
          ptable->hash_path_moves[j - ply] = tree->pv[ply - 1].path[j];
        ptable->hash_pathl = tree->pv[ply - 1].pathl - ply;
        ptable->path_sig = temp_hashkey;
        ptable->hash_path_age = transposition_age;
        break;
      }
    }
  }
}

Look anything like Fruit/Rybka?

"no code literally copied - indeed."  :)

Edit:  remove blank lines in code again.  picked up a couple in the copy/paste somehow.
Parent - - By Ugh (*****) Date 2013-09-03 16:41
I told you several days ago, having watched you front running and "interpreting" Richard Vida's material that I was not going to read it or comment on it until he was finished. I don't think it is fair on him that his material is subject to running battles between both sides immediately as it is publsihed, with you desperately eager to find anything to back your case. I also don't think it fair on the audience to be immediately hit with what can only be biased interpretation, the audience should also be left to digest the material without your monochrome world view being stamped all over it. I also note RV asked to be allowed to publish his stuff without the threads disappearing under clouds of smoke. Out of respect, I stay silent. Until he is finished. Then I read it and think about it.

Perhaps you would kindly respect that?
Parent - - By bob (Gold) Date 2013-09-03 16:47 Edited 2013-09-03 16:53
Aha.  Don't like factual evidence.  When have I heard this response to a post of mine previously:  "This question is not for today?"  :)

You seem to be perfectly happy to discuss Zach's stuff.  You don't want to discuss anything new, particularly when it shows literal copying rather than the non-literal copying related to the bitboard stuff?

Ostrich defense doesn't work.  We are in a separate thread from Richard's stuff.  He can read or not.  He gave a "clue" with his "I will leave the comparison..." comment.

BTW I posted both tt store functions (rybka and fruit) above.  There is NO "interpretation" required.  A quick look (5 mins or less) is all one needs to see what happened in this particular piece of code.  Give it a whirl...
Parent - - By Ugh (*****) Date 2013-09-03 17:05
Richard Vida wrote:

First, I apologize for opening a new thread, but the one where this post would apply is already cluttered beyond repair ;)
If someone will try to push me to WII or WIG camp - I will go away.


I take that to mean that he doesn't want to see his posts cluttered with arguing. I also read an implied threat that he will "go away" under certain circumstances. Maybe he already has? I didn't see him post for a while.

If you want to insult me and accuse me of lying when I tell you why I won't discuss this yet, well, feel free. Just more evidence for me that you get nastier the more desperate you become.
Parent - - By bob (Gold) Date 2013-09-03 17:19
What he said was "he did not want to get into the debate."  He is NOT in the current debate, is he?  Nobody is asking him to proclaim anything at all.  He provided the tt code, I think it sensible to discuss it.

BTW this discussion is NOT in his thread at all, you did notice???

The ONLY thing I believe relative to you is that you don't want to discuss anything factual.  This is about literal copying, which is not open to interpretation, abstraction, or anything else.  Just a pure 1:1 comparison, line by line.  Try it...
Parent - - By Ugh (*****) Date 2013-09-03 19:00
I'm reading around the topic, but I note you never answered Ed's post?

http://rybkaforum.net/cgi-bin/rybkaforum/topic_show.pl?pid=481354#pid481354
Parent - By bob (Gold) Date 2013-09-03 20:21
What's to answer?  Those "discussions" don't mention the points I've raised.  FOUR depths.  Same values in the structure.  Same ageing mechanism, completely different from the mechanism used in Rybka 1.4-1.6.1...  Richard's point about crafty aligning tt correctly, as did 1.6.1, while 1.0b does not.  And now we have the disassembled/converted-to-C code from Richard which is "mildly interesting" to be kind...

I didn't see anything to say following his post.  If he can't offer concrete details, he always reverts back to the VII/VIG nonsense...
Up Topic Rybka Support & Discussion / Rybka Discussion / What does "copy" mean?
1 2 3 4 5 Previous Next  

Powered by mwForum 2.27.4 © 1999-2012 Markus Wichitill