New Engine

Discussion of chess software programming and technical issues.

Moderator: Ras

User avatar
Evert
Posts: 2929
Joined: Sat Jan 22, 2011 12:42 am
Location: NL

Re: New Engine

Post by Evert »

ChrisFlorin wrote: Also, Blackmail only saves PV nodes, and actual CUT nodes in the hashtable (even if the nodetype is CUT, if it does not actually produce a cutoff, then it is not saved).
That has got to hurt. It's true that you can't store a "best move", but you can still store a search bound that may give you a cutoff later. Why would you do this?
User avatar
Evert
Posts: 2929
Joined: Sat Jan 22, 2011 12:42 am
Location: NL

Re: New Engine

Post by Evert »

ChrisFlorin wrote:Is he not allowed to use mate_in/mated_in macros? If his engine IS GPL, why wouldn't he use the macros? Am I allowed to use them?
Of course he is allowed, and of course you are too. The idea is not GPL, just the code. He probably
How different does the code have to be?
Doesn't need to be different at all, it just needs to not be copied.
I will say Tord's idea of processing PV and nonPV nodes differently is pretty cool
It doesn't look different to me, given that at non-PV nodes alpha=beta-1.
kbhearn
Posts: 411
Joined: Thu Dec 30, 2010 4:48 am

Re: New Engine

Post by kbhearn »

I don't oppose plagiarism, but I sort of assumed some things that I guess I shouldn't have assumed. In college (and high school a little) composition classes, they are very strict with plagiarism and giving credit to original authors, but nobody teaches this in engineering. I know enough to know that it's obviously illegal to copy computer programs, but the line is blurry with respect to computer code. Yes, Stockfish is GPL, blah blah blah, but what about tutorials? Example code? Forum posts asking how to do something? MSDN code? What if there's just not another way to do something that is easy and intuitive? For example, the code I use to disable buffering that I originally found in Beowulf, and stumbled across in the MSDN looking for something else completely unrelated?
As a general rule, anything someone has written is protected by copyright law. They have to explicitly mark something public domain for it not to be copyrighted. The GPL gives a set of conditions under which copyrighted code to which it applies can be modified and redistributed, but the original author maintains the copyright for that section. Code that does not come with a license attached and is not marked public domain you would need to ask permission to reuse technically.

Important exception: tasks that are so basic that they would not reasonably be done any other way cannot be viewed as copyrighted. So for instance when you look up how to disable buffering, and it comes down to a couple library calls with constant parameters, that would not be viewed as copyrighted.

If there's an algorithm you need, and you read someone else's code, and then rewrite it for yours using your own variable names/coding style/etc you should be fine for the most part. There's obviously a point when rewriting the entirety of a program would still be considered plagiarism.
mcostalba
Posts: 2684
Joined: Sat Jun 14, 2008 9:17 pm

Re: New Engine

Post by mcostalba »

ChrisFlorin wrote:No, I'm not sure of this. I changed it to not save the pt, and to set pt to PAWN every iteration and am currently testing an elo change.
Of course you can decide that for SEE this little speed up could be more rewarding than accuracy (although I have some doubts), but it is important that you are aware that your approach could miss some attacker in some cases. I'd suggest to use a way to easily detect if a change has an impact on functionality. We use the follwing command

Code: Select all

./stockfish bench
As a a rule of thumb, that works in most cases, if the number of searched nodes is the same before and after the change it means the patch does not introduce any functionality change, for instance a clean up patch. This is a very easy and quick test but is invaluable to immediately spot nasty bugs, otherwise very difficult to find.
ChrisFlorin wrote: I took the download down.
Too late, I have already downloaded Blackmail :-) I have to say that at a first glance your search is really original, I have never saw an approach like that before. Very interesting.
ChrisFlorin wrote: The interview promptly ended.
With the frequency of one interview every year even Linus Torvalds would have problems in finding a job as a software developer :-)
ChrisFlorin
Posts: 11
Joined: Tue Oct 25, 2011 7:35 pm
Location: Orlando, Florida, United States

Re: New Engine

Post by ChrisFlorin »

Because my testing showed that it helped. I could test it again since I've made more changes to my engine since, but I believe not storing results for actual ALL nodes was a large elo difference; enough to stick out in my mind anyway.
User avatar
Don
Posts: 5106
Joined: Tue Apr 29, 2008 4:27 pm

Re: New Engine

Post by Don »

ChrisFlorin wrote:
Don wrote:I do not think your honor is in question. You are doing fine.
Thank you.
You are victim of the pro-clone propaganda, they hammer you with FUD in order to make it seem that these issues are too complicated to resolve and that everything needs to be changed. In a sense they have won if you now feel frustrated.
Yes, last night, I was very tired and frustrated.
I am not aware of any computer chess idea that is patented. These ideas are all in the public domain and the do not belong to anyone in particular. Getting an idea does not make you "owner" of the idea.
Thank god, but how would someone "own" an idea should they have one?
This is where a patent would come in. Of course a patent can be challenged or deemed too general, etc. You would probably find it not worth the effort unless the idea was pretty substantial and different from anything else we are doing. I seriously doubt there is anything in any chess program that could legitimately be patented.
However CODE is copyrighted, not patented. But keep in mind that copyright and patents are two different things. This is a big source of confusion. If you don't understand that distinction, you will be victim of all the silly arguments which are based on refusing to acknowledge the difference.
I do not understand this distinction at all, perhaps this is a problem.
The straw man they have constructed in a nutshell (which I am going to exaggerate to make the point) is that if you oppose plagiarism, it's because you are old-fashioned and petty and do not want others to make progress or share ideas. Of course that is not our position at all, but that is the straw man they like to attack.
I don't oppose plagiarism, but I sort of assumed some things that I guess I shouldn't have assumed. In college (and high school a little) composition classes, they are very strict with plagiarism and giving credit to original authors, but nobody teaches this in engineering. I know enough to know that it's obviously illegal to copy computer programs, but the line is blurry with respect to computer code. Yes, Stockfish is GPL, blah blah blah, but what about tutorials? Example code? Forum posts asking how to do something? MSDN code? What if there's just not another way to do something that is easy and intuitive? For example, the code I use to disable buffering that I originally found in Beowulf, and stumbled across in the MSDN looking for something else completely unrelated?
Please don't let them confuse you or hold you back from having fun with computer chess.
Confuse me, yes. Hold me back? We'll see. My original intention with respect to releasing code was to release a "shell" of an engine, complete with protocol communication, board representation, move generation, the most basic PVS search, and material evaluation, etc. i.e. everything required to get a basic engine working under another gui.

I have rewritten Blackmail from scratch 7 times since my hard drive failure. This 7th time, I didn't even write a search function, evaluation, anything until my perft times beat those of Stockfish. And I still made improvements to it during search/evaluation development. Every step of the way, if anything slowed Blackmail too much, I scrapped it or rewrote it several times. Blackmail still has no concept of center/square control simply because I cannot implement it efficiently.

But, I never wanted to be accused of cloning. I had a dream last night in my frustration, Vasij accused me of cloning Rybka in a tournament, and I pulled out a usb drive and told him to put up or shut up. I don't even know what he looks like, it's funny how the brain fills information in.
We need more diversity, not less, and
As does any genetic algorithm :P
I hope to see some good stuff from you.
You will.

The code has been pulled from download since technically, I guess I can't even release Blackmail under GPL until I resolve all of the issues with example code I copied, mostly from chessprogramming.wikispaces.com. This site should really come with some disclaimers. Anyway, I'll be working on that. Any code that I simply get out of my head, such as the SEE code will be rewritten in assembly. I fully intend on releasing example code for public domain; I simply don't understand or see the point in copyrighting "tutorial class" code. I would love to make a copy of my code/engine to the authors of Crafty, Stockfish and Beowulf to look over; not only for integrity purposes, but perhaps they can learn something from an engine written by someone who has reviewed their code pretty thoroughly.
chessprogramming.wikispaces.com wrote:Just be careful, and don't copy the code and say it is your own! Clones are frowned upon by the computer chess community as a whole.
I found this in the Getting Started section, but am too lazy to look comprehensively. I'm not convinced this is warning enough to not copy code from the website to the average programmer. Although it does warn against clones, not every programmer is aware of code copyright laws as I have demonstrated. There should be an ethics for engineers class or something :P

Anyway, when I make the required changes for release, I'll let you guys know. Until then, I would recommend anybody who downloaded my code to delete it and not distribute it since it contains illegal code and distribution of it would be illegal. Hopefully the FBI isn't watching.
User avatar
Evert
Posts: 2929
Joined: Sat Jan 22, 2011 12:42 am
Location: NL

Re: New Engine

Post by Evert »

ChrisFlorin wrote:Because my testing showed that it helped. I could test it again since I've made more changes to my engine since, but I believe not storing results for actual ALL nodes was a large elo difference; enough to stick out in my mind anyway.
I would suspect there's a bug somewhere, in that case: all storing the score of an ALL-node should do is give you a cutoff when the current bounds and the remaining depth say it's fine to take the value from the TT, which saves time. If the result from the table can't be used, you end up in the same situation you're in now.
It would be good to know why this isn't working correctly for you.
ChrisFlorin
Posts: 11
Joined: Tue Oct 25, 2011 7:35 pm
Location: Orlando, Florida, United States

Re: New Engine

Post by ChrisFlorin »

mcostalba wrote:
ChrisFlorin wrote:No, I'm not sure of this. I changed it to not save the pt, and to set pt to PAWN every iteration and am currently testing an elo change.
Of course you can decide that for SEE this little speed up could be more rewarding than accuracy (although I have some doubts), but it is important that you are aware that your approach could miss some attacker in some cases.
274.0/491 179-122-190 (+42 elo) still in favor of not checking xray attacks.
mcostalba wrote:Too late, I have already downloaded Blackmail :-) I have to say that at a first glance your search is really original, I have never saw an approach like that before. Very interesting.
I'm glad you think it's interesting. Let me know in a PM if you'd like to discuss some of the reasons I did certain things or why I do them the way I do.
ChrisFlorin
Posts: 11
Joined: Tue Oct 25, 2011 7:35 pm
Location: Orlando, Florida, United States

Re: New Engine

Post by ChrisFlorin »

Evert wrote:I would suspect there's a bug somewhere, in that case: all storing the score of an ALL-node should do is give you a cutoff when the current bounds and the remaining depth say it's fine to take the value from the TT, which saves time. If the result from the table can't be used, you end up in the same situation you're in now.
It would be good to know why this isn't working correctly for you.
I'll give it another test. In the case that an ALL node or CUT node does not produce a cutoff, I store NO_MOVE in the hashtable, and alpha as an upper bound. I'll post the results as soon as I get something worthwhile.
asanjuan
Posts: 214
Joined: Thu Sep 01, 2011 5:38 pm
Location: Seville, Spain

Re: New Engine

Post by asanjuan »

My understanding is that this is actually pretty simple: whoever writes the code owns the copyright to the code.
¿How is it?
I claim that this line of code is mine:

Code: Select all

 printf("Helo world"); 
All you have to pay me!
:D
Sorry, here in spain we make tones of jokes.