Glaurung 0.1.5 source code

Programming Topics (Computer Chess) and technical aspects as test techniques, book building, program tuning etc

Moderator: Andres Valverde

Giving and Taking

Postby Dann Corbit » 04 Dec 2004, 21:18

In my view, the real issue boils down to giving and taking. Truthfully, everyone who writes a good chess engine has done a lot of taking. Almost every good idea in the program will have come from another person's hard work. Whether the idea came from a paper or from reading the source code is really irrelevant. Will that person also be giving something back?

There are many ways to give back. It does not have to be source code or papers. It can be web sites (Bruce, Ed). It can be helping other people improve their programs with suggestions. It can be giving the finished product of your labor away for free. It can be giving helpful instructions in newsgroups or programming forums.

I do not buy the argument that exposing the source of a powerful program is bad because of temptation. The same thing is true of powerful academic ideas. Should (therefore) all information be hidden?

Imagine a pretty girl, walking down the street in a short dress. A certain man decides to rape her, becuase she is very attractive and he "cannot help himself because of her provocative dress."

I maintain that the rapist is 100% at fault and the girl is 0% at fault. We are all responsible to control ourselves. If excellence of a program is licence to steal, then excellence of a technical paper is license to plaguarize and excellence of possessions is a license to steal.

It all boils down to personal responsibility.

Now, as to the stealing of powerful source for a chess program -- yes, it has happened several times. In each case (I believe) those who took the ideas were largely ignorant [which is not an excuse]. So to some degree it is an education problem. For instance, I do not think that Eugene (El Chinito) or some of the others really understood that their actions were incorrect. There seems to be a different attitude in Europe and South America (from what I gather) about the use of open source and what is legitimate.

To me, people who are willing to share information are heros. Also, people who are willing to share the fruits of their labors (or their labor itself) are also heros. Those who only take and who do not want to give anything -- not so much. Do not imagine that this is a dig at Richard (Smirf author) because he has shared a great deal of information on his web site. I only want to make clear that I think it is better to give than to take, and the more the balance is on the side of giving, the better.

That is why Robert Hyatt (source code, papers, helpful posts, coding assistance, etc.) is a great hero to me [for instance]. The exposing of the crafty code is not a disservice to anyone, despite its admitted excellence.

Those who take it cannot help themselves? Hogwash. It is the criminal to blame for the criminal act. The diamonds in the jewelry store window are not an excuse to throw a brick.
Dann Corbit
 

Re: Glaurung 0.1.5 source code

Postby Reinhard Scharnagl » 04 Dec 2004, 22:38

Hi Dan and Dann,
Dan: Your English is excellent, you can't get away with that excuse

you would not argue like that if you could see me always flicking cross my dictionary.
Dan: I further get the feeling that the only one who is going to condemn me is you.

I am of course not at all an instance to condemn anyone. I just have tried to explain my feelings about that theme and maybe to argue for me not to publish my chessprogram's source code.
Dann: Should (therefore) all information be hidden?

The reality is quite contradictionary to that. Because a compiled chess program could not be analysed by a normal user whether it was based on foreign sources or not, this hardly could be compared to publishing a scientific article, where explicite quoting is necessary.
Dann: Imagine a pretty girl ...

Well I am not a muslim but sexuality has a power an attractive girl should not underestimate. When I would be (nearly impossible to imagine) such a nice woman, I would avoid special places and bad company. Because in the case of rape it would not really help me to know that I have had the right to look as sexy as I could.
Dann: I only want to make clear that I think it is better to give than to take

But giving is not always helpful. Unconditioned feeding millions of poor people in some african regions could lead to an unability to care for themself. Giving free access to weapons in the USA is not to be understood here in Europe. And spreading (successful!) chess source code to anonymus recipients might be misunderstood as an invitation for cheating.

Reinhard.
Reinhard Scharnagl
 
Posts: 608
Joined: 01 Oct 2004, 08:36
Location: Klein-Gerau, Germany

A bit more

Postby Dann Corbit » 04 Dec 2004, 22:55

Reinhard Scharnagl wrote:Hi Dan and Dann,
Dan: Your English is excellent, you can't get away with that excuse

you would not argue like that if you could see me always flicking cross my dictionary.
Dan: I further get the feeling that the only one who is going to condemn me is you.

I am of course not at all an instance to condemn anyone. I just have tried to explain my feelings about that theme and maybe to argue for me not to publish my chessprogram's source code.


I will agree that there is totally nothing wrong with not publishing your source code. I have not even the tiniest problem with that. I think Stallman's position is really very absurd.

Dann: Should (therefore) all information be hidden?

The reality is quite contradictionary to that. Because a compiled chess program could not be analysed by a normal user whether it was based on foreign sources or not, this hardly could be compared to publishing a scientific article, where explicite quoting is necessary.
Dann: Imagine a pretty girl ...

Reinhard Scharnagl wrote:Well I am not a muslim but sexuality has a power an attractive girl should not underestimate. When I would be (nearly impossible to imagine) such a nice woman, I would avoid special places and bad company. Because in the case of rape it would not really help me to know that I have had the right to look as sexy as I could.


It is true that the girl (in some instances) could be guilty of bad judgement -- IOW, bad clothes choices, bad location choices, bad time of day choices. None of those things is an excuse for the conduct of someone else to be bad.

Dann: I only want to make clear that I think it is better to give than to take

But giving is not always helpful. Unconditioned feeding millions of poor people in some african regions could lead to an unability to care for themself. Giving free access to weapons in the USA is not to be understood here in Europe. And spreading (successful!) chess source code to anonymus recipients might be misunderstood as an invitation for cheating.
Reinhard.[/quote]

Excellence of information is not a license to steal it. I do admit that human nature is a factor in things. (IOW, if I leave a sack full of hundred dollar bills on my desk and go away for a week, it will be a bigger temptation than a sack of nickels). However, I will conduct myself as though everyone were clothed in excellence.

I believe that every cheater will eventually become unmasked.
Just ask Barry Bonds.
Dann Corbit
 

Re: Glaurung 0.1.5 source code

Postby Sune Fischer » 04 Dec 2004, 23:08

Dann: There seems to be a different attitude in Europe and South America (from what I gather) about the use of open source and what is legitimate.


Perhaps, or perhaps there just aren't that many americans interested in computer chess.

A lot could be done to prevent cloning though, e.g. release the source but without the header files!

Reconstucting headers can be done but it is tough, the average cloner wouldn't go that far I think.

-S.
User avatar
Sune Fischer
 
Posts: 126
Joined: 07 Oct 2004, 11:12
Location: Denmark

The average cloner

Postby Dann Corbit » 04 Dec 2004, 23:29

Must we release information designed to prevent a nitwit from acting like an idiot?

The printed articles are probably even more revealing:
ftp://cap.connx.com/pub/chess-papers/

Why is it that we are so afraid of these things? Shall we not get angry if someone uses all of these excellent ideas presented in the papers?

Maybe it is the competition that is the problem. There must be some reason why some people are so motivated to cheat that they are willing to lie and steal and do any crazy thing and others are so motivated to hide information because they are afraid that others will use it.

I do see the depth of the problem, as I do know that Dr. Hyatt has been quite annoyed with those Belgian projects and some others.

The same things are starting to happen in other areas too (e.g. database, mathematics and science). Maybe it is some sort of counter-reaction to the open source movement.

So what is the mechanism by which knowledge can advance?
Do we want everyone to build an airplane starting with iron ore?

I find the whole situation rather strange.
Dann Corbit
 

Re: Glaurung 0.1.5 source code

Postby Sune Fischer » 04 Dec 2004, 23:51

I belive you are confusing the academic world with the "real" world :)

Everybody tries to stay one step ahead of the competition, it's been that way since the dawn of time, Darwinism anyone?

So sharing or not, I'm sure nothing will hold back evolution, don't worry so much Dann :)

-S.
User avatar
Sune Fischer
 
Posts: 126
Joined: 07 Oct 2004, 11:12
Location: Denmark

Re: Glaurung 0.1.5 source code

Postby Reinhard Scharnagl » 04 Dec 2004, 23:56

Hi Dann,
I find the whole situation rather strange

such is the human species. Imagine aliens would be watching us. They for sure would be wondering that this crazy civilization still exits at all.

Reinhard.
Reinhard Scharnagl
 
Posts: 608
Joined: 01 Oct 2004, 08:36
Location: Klein-Gerau, Germany

Re: A bit more

Postby Dan Honeycutt » 05 Dec 2004, 00:50

Dann Corbit wrote:Stallman's position is really very absurd.

Hi Dann:
I'm not familiar with him. Who is Stallman?

Thanks
Dan H.
Dan Honeycutt
 
Posts: 167
Joined: 28 Sep 2004, 15:49
Location: Atlanta Georgia, USA

Re: Glaurung 0.1.5 source code

Postby Dan Honeycutt » 05 Dec 2004, 01:02

Reinhard Scharnagl wrote:I am of course not at all an instance to condemn anyone. I just have tried to explain my feelings about that theme and maybe to argue for me not to publish my chessprogram's source code.

Hi Reinhard:
I accept that. My perception was based on your vanity comment. I do take pride in my efforts, but I'm really not a vain person. My motivation for sharing my source follow what Dann said:
Truthfully, everyone who writes a good chess engine has done a lot of taking.

That would be me if he'd leave out the word "good" chess engine. Others have helped me. I feel some debt to help others. Plus it's nice to do.

Dan H.
Dan Honeycutt
 
Posts: 167
Joined: 28 Sep 2004, 15:49
Location: Atlanta Georgia, USA

Re: The average cloner

Postby Pallav Nawani » 05 Dec 2004, 07:27

Dann Corbit wrote:Maybe it is the competition that is the problem. There must be some reason why some people are so motivated to cheat that they are willing to lie and steal and do any crazy thing and others are so motivated to hide information because they are afraid that others will use it.


Exactly my point. I will give you an concrete example. In Natwaral I have implemented something that I call combination extension. I thought it was a nice extension that would increase the strength of my program quite a bit, so I did not release the source to Natwarlal 0.08 lest somebody steal my idea. For sometime I considered releasing the source without the extension, but I got over it, and did release the source to Natwarlal 0.09.

Its quite another matter that combination extension (as I have implemented it) dosen't really work, but I am sure some clever programmers here may find a better way to use it.

People (me included) don't like it when their program gets bashed all the time. So they hide the information they might have collected. This does raise the barrier for other programs. Much like 'trade secrets' which corporations don't want to reveal. Like coke's secret recipe.

Free sharing of information does allow others to come up to speed quite quickly. That's something you have to live with.

Of course releasing the code does allow clones. As long as the cloner gives due credit, I don't mind.

Pallav
User avatar
Pallav Nawani
 
Posts: 147
Joined: 26 Sep 2004, 20:00
Location: Dehradun, India

Re: A bit more

Postby Pallav Nawani » 05 Dec 2004, 16:23

Dan Honeycutt wrote:
Dann Corbit wrote:Stallman's position is really very absurd.

Hi Dann:
I'm not familiar with him. Who is Stallman?

Thanks
Dan H.


The man who started the whole free software thing. Richard M Stallman (or RMS in short).
http://www.stallman.org

pallav
User avatar
Pallav Nawani
 
Posts: 147
Joined: 26 Sep 2004, 20:00
Location: Dehradun, India

Re: Glaurung 0.1.5 source code

Postby Anthony Cozzie » 05 Dec 2004, 19:38

Pallav:

I could have told you that wouldn't work :) It is a cute idea (most extensions are) but none of them work in the end. IMO the only extension that really works is check (and maybe singular, I haven't made up my mind about SE).

anthony
Anthony Cozzie
 
Posts: 50
Joined: 17 Oct 2004, 19:35

Re: Glaurung 0.1.5 source code

Postby Uri Blass » 05 Dec 2004, 19:55

anthony,
I do not think that check extension is the only extension that works.
For example mate threat extension also works and chessmaster clearly using it.

I did not read pallev's extensions but claiming that no extensions except check (and maybe singular) work at the end is simply wrong.

Uri
User avatar
Uri Blass
 
Posts: 727
Joined: 09 Oct 2004, 05:59
Location: Tel-Aviv

Re: A bit more

Postby Dann Corbit » 06 Dec 2004, 20:27

pallavnawani wrote:
Dan Honeycutt wrote:
Dann Corbit wrote:Stallman's position is really very absurd.

Hi Dann:
I'm not familiar with him. Who is Stallman?

Thanks
Dan H.


The man who started the whole free software thing. Richard M Stallman (or RMS in short).
http://www.stallman.org

pallav


Free software predates Stallman by decades. He is one of the key movers and shakers of GNU, however.

His position is that ALL software MUST be free.
http://www.gnu.org/philosophy/shouldbefree.html
Of course, each and every argument he supplies could just as well apply to literature or music or any other sort of information. So really, his position is that all information must be free. In that respect, I think he is a nitwit or a crackpot.

I do agree with his position on software patents.
Dann Corbit
 

Re: Glaurung 0.1.5 source code

Postby Uri Blass » 07 Dec 2004, 05:11

Reinhard Scharnagl wrote:Hi Dan and Dann,
I am of course not at all an instance to condemn anyone. I just have tried to explain my feelings about that theme and maybe to argue for me not to publish my chessprogram's source code.

Reinhard.


Hi Reinhard,

No problem with the fact that you do not release your source code.
Most programmers do not do it.

There is contradiction between competition and releasing your source code and it is logical that when you compete you do not want to reveal your source code.

The interesting question is if you want the knowledge that you have to be secret even after you stop to compete or you want to help other people.

It is clear that the subject of thinking games is subject that people can always improve programs(even in case that chess will be solved we can talk about chess for a bigger board that will not be solved).

I see that you not only not release your source but also do not want to talk about your ideas and explain how you evaluate positions and what do you use instead of alphabeta.

Of course you do not have to give information about ideas but the question
is if you plan to give more information about it in the future.

Note that some programming tricks are not about better algorithm but about better source code and it can be ideas to do the same thing faster
or clearer.

Programmers do not have to release source code of the full program to explain them but releasing some source code is productive to explain them.

There are also cases that I think that it can be good if in the future all the programmers use the same public source because they seem to be tasks when new ideas are not going to help much.

I am talking about the following examples:

1)code to read pgn(I am not talking about deciding which moves are book moves but only about understanding the pgn when you assume that they already have a function that tell them if a string is a legal move and function to make legal moves or to change the position to fit specific FEN.

2)code to connect with interfaces(when programmers only need to add chess related stuff to support winboard or the UCI protocol).

3)code to generate random numbers(I guess that it is practically impossible to improve good random numbers and the competition can be only in other things).

Uri
User avatar
Uri Blass
 
Posts: 727
Joined: 09 Oct 2004, 05:59
Location: Tel-Aviv

Re: Glaurung 0.1.5 source code

Postby Reinhard Scharnagl » 07 Dec 2004, 08:43

Hi Uri,
but the question is if you plan to give more information about it in the future

I have never refused to discuss (besides from source code) questions of chess programming. And I am already doing that from time to time and also publishing some results on my Web pages when appropriate. For me the question is, whether my ideas really would interest anybody. I do not make that experience. It would not make much sense only to talk on points which might be interesting for others but avoid those which are of importance for me. What is with the themes around simultaneously supporting 8x8 and 10x8 structures? What is with releasing a modern engine protocol? What is in testing Smirf's real strength - where I wonder that properties of a potentially very weak program Smirf would be of interest at all.
code to read pgn

Nevertheless I did that my way in Smirf I am convinced that this would not at all be a really new contribution to the chess programming scene. Thus I do not understand that point to be mentioned here.
code to connect with interfaces

Because UCI or Winboard are neither supporting FRC correctly nor 10x8 extensions like implemented in Smirf, discussing those protocols seems to be no more fruitful for Smirf. One year ago I started discussions to compatibly extend UCI and a compatibly extended FRC-FEN with no sufficient result. Before that I tried to discuss similiar wishes for Winboard but also with even less results than concerning UCI. Finally I had to invent my own TMCI protocol and a matching GUI (because what is a protocol without a targeted GUI), which is presented as it develops at my Smirf beta page, but still without any resulting discussion. I also have published even source code how to generate 8x8 FRC and 10x8 CRC starting arrays to standardize the relation between their identifying numbers and the resulting de facto starting positions as documented in my FRC book. Even this has had nearly zero reaction.
code to generate random numbers

Concerning pseudo number generators there might be no need to discuss them. Nevertheless I wrote my own 32 bit generator (most I have seen do not exceed 31 bits). My improvement as I see it has been in the selection of a special subset of those generated numbers for generating matching keys. Over one year ago I tried to discuss that improvements, but had to read that this filtering would be of no relevance, which of course is a nonsense argument. But it might be understandable that I have been demotivated to further discuss on that point.

Reinhard
Reinhard Scharnagl
 
Posts: 608
Joined: 01 Oct 2004, 08:36
Location: Klein-Gerau, Germany

Re: Glaurung 0.1.5 source code

Postby Uri Blass » 07 Dec 2004, 09:57

Reinhard Scharnagl wrote:Hi Uri,
but the question is if you plan to give more information about it in the future

I have never refused to discuss (besides from source code) questions of chess programming. And I am already doing that from time to time and also publishing some results on my Web pages when appropriate. For me the question is, whether my ideas really would interest anybody. I do not make that experience. It would not make much sense only to talk on points which might be interesting for others but avoid those which are of importance for me. What is with the themes around simultaneously supporting 8x8 and 10x8 structures? What is with releasing a modern engine protocol? What is in testing Smirf's real strength - where I wonder that properties of a potentially very weak program Smirf would be of interest at all.
code to read pgn

Nevertheless I did that my way in Smirf I am convinced that this would not at all be a really new contribution to the chess programming scene. Thus I do not understand that point to be mentioned here.


It is not easy for me to explain it but I will try to do it.

The point is that programmers will be able to start with ready code to read pgn when they can only add some chess functions.

The code that I read at least in Crafty is not built in that way and there is no code that you only need to add some clear defined chess functions to have a code to read pgn.

having some code and telling programmers that they only need to add some functions that are not in the code to be able to read pgn and calculate infromation about it can be productive for programmers.

I wasted a lot of time on trying to understand crafty's code to read pgn
and after doing it the code still need to be modified to do what I want.

I have some functions to calculate information about position like function to calculate the number of legal captures and function to calculate the number of legal moves.

I want based on these functions to calculate the same information on pgn.

When I have perft I want perftpgn that calculate the sum of perft on pgn file.

This was already done but I wanted to do the same also for other functions and the problem is that I understood that my perftpgn and my otherthingspgn are going to share a lot of common code.

I found it ugly and thought how to change it because I do not like to write almost the same code a lot of times.

With good code to read pgn I could avoid that problem.


code to connect with interfaces

Because UCI or Winboard are neither supporting FRC correctly nor 10x8 extensions like implemented in Smirf, discussing those protocols seems to be no more fruitful for Smirf. One year ago I started discussions to compatibly extend UCI and a compatibly extended FRC-FEN with no sufficient result. Before that I tried to discuss similiar wishes for Winboard but also with even less results than concerning UCI. Finally I had to invent my own TMCI protocol and a matching GUI (because what is a protocol without a targeted GUI), which is presented as it develops at my Smirf beta page, but still without any resulting discussions. I also have published even source code how to generate 8x8 FRC and 10x8 CRC starting arrays to standardize the relation between their identifying numbers and the resulting de facto starting positions as documented in my FRC book. Even this has had nearly zero reaction.


The reason is probably lack of interest in programming 10*8 CRC.
I may decide to go for something more general but at least in the near future normal chess is enough for me.

code to generate random numbers

Concerning pseudo number generators there might be no need to discuss them. Nevertheless I wrote my own 32 bit generator (most I have seen do not exceed 31 bits). My improvement as I see it has been in the selection of a special subset of those generated numbers for generating matching keys. Over one year ago I tried to discuss that improvements, but had to read that this filtering would be of no relevance, which of course is a nonsense argument. But it might be understandable that I have been demotivated to further discuss on that point.

Reinhard


I guess that the point is that programmers found that even hash collisions often do not change the move that the program choose so I guess that the practical importance of better random numbers is very small but inspite of it I think that if there are better numbers it is better to use them.

It is not important enough for programmers to spend time on probably less than 1 elo that they can get from it but if there is going to be free random numbers that are better then I see no reason for them not to use them.

Uri
User avatar
Uri Blass
 
Posts: 727
Joined: 09 Oct 2004, 05:59
Location: Tel-Aviv

Re: Glaurung 0.1.5 source code

Postby Reinhard Scharnagl » 07 Dec 2004, 10:34

Hi Uri,
... hash collisions ... It is not important enough for programmers to spend time on probably less than 1 elo

a) elo is not everything, well understood structures are a goal themself
b) there seems to be an ability to know the results before researching for them, really miraculous.
The reason is probably lack of interest in programming 10*8 CRC

indeed, but what is with your philosophy of give and take? Should it be fair and attractive if that for me then would look like a one-way street?
When I have perft I want perftpgn that calculate the sum of perft on pgn file

May be I will include such a facility in Smirf later when finished with more common stuff.

Reinhard.
Reinhard Scharnagl
 
Posts: 608
Joined: 01 Oct 2004, 08:36
Location: Klein-Gerau, Germany

Re: Glaurung 0.1.5 source code

Postby Dan Honeycutt » 11 Dec 2004, 03:56

This is a follow up to my earlier post. I wrote:
I'm going to take some time this weekend to assess how much effort would be involved in taking Bruja and stripping the search and evaluation...

This was somewhat more involved than I expected but not too bad. Simon, as I have dubbed him, needs a little more cleanup and testing but is about done.
I'm going to be pissed if it plays better than Bruja.

At least I'm spared that. I haven't found an engine he can beat - his only hope for a win is if he plays me. Following is an typical example of his play where he's mated by Gerbil in 26 moves:
Code: Select all
[Event "SimonTest"]
[Site "APPLE"]
[Date "2004.12.09"]
[Round "1"]
[White "GERBIL"]
[Black "Simon"]
[Result "1-0"]
[ECO "D21"]
[Opening "QGA"]
[Time "20:24:24"]
[Variation "Ericson Variation"]
[TimeControl "40/300:40/300:40/300"]
[Comment " white engine resigns for black (illegal)"]
[Termination "normal"]
[PlyCount "51"]
[WhiteType "program"]
[BlackType "program"]

1.d4 d5 2.c4 dxc4 3.Nf3 b5 4.e3 Nf6 5.a4 c6 6.axb5 cxb5 7.b3 Qd5 8.bxc4 bxc4
9.Nc3 Qb7 10.Bxc4 Qb4 11.Ne5 e6 12.Bd2 Qb7 13.O-O Bd7 14.Rb1 Qc8 15.Bb5 a6 16.Be2 Nc6
17.Nxd7 Nxd7 18.Qa4 a5 19.Bf3 Ra6 20.Rfc1 e5 21.Nd5 Bd6 22.Be2 Ndb8 23.Bxa6 Qxa6
24.Rxb8+ Bxb8 25.Rxc6 Qc8 26.Rxc8#  {Mate} 1-0


Of course with an evaluation that consists of about 6 lines of code per side, Simon has no knowledge of advanced concepts like "one should castle at the earliest opportune moment". His sum total knowledge of pawn structure is that doubled pawns are bad and, by golly, he didn't saddle himself with any doubled pawns.

I'm still interested in opinions if a public domain "starter" chess program is something worthwhile.

Dan H.
Dan Honeycutt
 
Posts: 167
Joined: 28 Sep 2004, 15:49
Location: Atlanta Georgia, USA

Re: Glaurung 0.1.5 source code

Postby Peter Fendrich » 11 Dec 2004, 22:58

Jos? Carlos wrote: Is alphabeta your own idea? Null move? Hashing? Evaluating chess positions?
Human race is summing ideas all the time. Millions of human minds have put their ideas from a stone wheel to a Formula 1, from an abbacus to a computer. Common knowledge is progress....

Exactly Jos?,
there is some kind of balance between competition and collaboration.
If you think you are way ahead of all the rest you are probably not willing to unveil your secrets.
But all the rest will, in order to catch up!
It's hidden somewhere in our genes to tell others how we solved certain problems. We just want the idea itself to continue to live. Sometimes these ideas are called memes http://www.google.com/search?hl=sv&client=google&rls=GGLD%2CGGLD%3A2004-48%2CGGLD%3Aen&q=define%3Ameme&lr=.
I think that many of our American friends have a much more matured view of concepts like "open source" and "freeware". At least in Sweden I think that my generation haven't grasped the idea fully.
/Peter
User avatar
Peter Fendrich
 
Posts: 193
Joined: 26 Sep 2004, 20:28
Location: Sweden

PreviousNext

Return to Programming and Technical Discussions

Who is online

Users browsing this forum: No registered users and 22 guests