Glaurung 0.1.5 source code

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

Moderator: Andres Valverde

Re: Glaurung 0.1.5 source code

Postby José Carlos » 03 Dec 2004, 20:01

Reinhard Scharnagl wrote:There seems to be only one understandable reason for to publish one's chess program's whole source coude: vainness. But that reason is something one could easily do without.

Reinhard.


Ok, let's summarize:

Reasons for sharing source code:
- Academical:
-Showing examples of algorithms and heuristics
-Showing examples of good programming habbits
-Showing programming tricks
- Scientifical:
-Improving the general knowlede on the field of computer chess programming
-Providing a working starting point for new ideas (for example, Mike Byrnes Crafty variations)
- Psicological
-Vanity

Reasons for forbidding open source:
-There're no good reason to publish source code
-It's a temptation
_____________________________
José Carlos Martínez Galán
User avatar
José Carlos
 
Posts: 102
Joined: 26 Sep 2004, 03:22
Location: Murcia (Spain)

Re: Glaurung 0.1.5 source code

Postby José Carlos » 03 Dec 2004, 20:05

Now I will moderate myself for being sarcastic.
Don't do that again, you're warned.
Sorry, my apology. I won't do that again.
:D

PS.: A bit of humor for a tense discussion :wink:
_____________________________
José Carlos Martínez Galán
User avatar
José Carlos
 
Posts: 102
Joined: 26 Sep 2004, 03:22
Location: Murcia (Spain)

Re: Glaurung 0.1.5 source code

Postby Peter Fendrich » 03 Dec 2004, 20:07

Ok, let's summarize:

Reasons for sharing source code:
- Academical:
-Showing examples of algorithms and heuristics
-Showing examples of good programming habbits
-Showing programming tricks
- Scientifical:
-Improving the general knowlede on the field of computer chess programming
-Providing a working starting point for new ideas (for example, Mike Byrnes Crafty variations)
- Psicological
-Vanity

Reasons for forbidding open source:
-There're no good reason to publish source code
-It's a temptation

One more reason for not publishing:
embarresment - my code is too sloppy to publish... :)
/Peter
User avatar
Peter Fendrich
 
Posts: 193
Joined: 26 Sep 2004, 20:28
Location: Sweden

Re: Glaurung 0.1.5 source code

Postby Martin Giepmans » 03 Dec 2004, 20:31

Sloppy code? So is mine, it's a complete mess. No idea why this mess still can play something that vaguely resembles chess and even win sometimes. And it is Delphi, not C, who can read that?

Jose, no need to moderate yourself, your sarcasm is appreciated. :D
And I shouldn't have mentioned 'temptation'. Can we at least agree that that was a bug?
Martin
Martin Giepmans
 
Posts: 14
Joined: 26 Sep 2004, 23:47
Location: The Netherlands

Re: Glaurung 0.1.5 source code

Postby Dan Honeycutt » 03 Dec 2004, 20:52

Lost in the shuffle was Tord's interesting idea of "swapware". I've always been in the open source camp but I could consider moving to the swapware camp. The only downside I see is it leaves the beginner out in the cold.

Many beginners see starting from scratch as a daunting task so the begin with something like TSCP. I think many are well intentioned, they are not out to clone something. They want something to build on and, once they have done some building, something they can call their own. Even with good intentions, there have been many misunderstandings and hard feelings.

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 and replacing them with a basic alpha-beta search (aka what Bruce has published on his site) and a basic material (plus maybe PST) evaluation. I'd leave the basic bitboard mechanics, move generator and winboard interface. All other whistles and bells like my check generator (newly equipped with discovered checks), my 5 or 6 variously pin-aware SEE functions, etc would be removed. What's left I would release as public domain.

This would allow a beginner who wants to implement bitboards to start with a fully functional chess program that they can call their own from day one. If they want it to play better (I'm going to be pissed if it plays better than Bruja) they do the work. No misunderstandings, clone allegations, hall of shame or the like.

What do others think? Is this a worthwhile endeavor or would it just cause grief for the testers by creating a flood of weak new engines?

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

A fossil replies from the ancient days

Postby Dann Corbit » 03 Dec 2004, 20:59

I started programming in 1976. Back in those days, there was an important body called the ACM (Association of Computing Machinery) that had a regular journal. When someone invented a new algorithm, they would publish it there. Then other people would make comments on it and improvements and things like that. That is where we learned how to sort and make hash tables and compute math functions, etc.

Also, Donald Knuth published a nice series of books on programming. In those books, he not only described the algorithms, but also provided an implementation in a language called MIX (sort of a generic assembly language. I wrote a MIX emulator once just for fun). Anyway, when we got our computing assignments in college, we would crack open the appropriate Knuth volume and look up how to solve the problem. On those rare occasions when we could not find it there, we would trundle down to the Academic Computing Center and look it up in the ACM volume. Anyway, that is how we did things "back in the good old days."

It seems that today, something has changed. If you look at the old code that we wrote back in the dark ages, you will find citations all over the place. We would write things like:
/*
"The Art of Computer Programming"
Volume 1 Fundamental Algorithms
By Donald Knuth
Page: <whatever>
{description of what was used}
*/

Now, people want to pretend that they did it all by themselves or something.

Now, you may say that a thing like:
"ntroduction to Algorihtms"
By Cormen, C. Leiserson, and R. Rivest.
The MIT Press, 1998.

Is as good or better than actual implementations of algorithms (they use pseudocode exclusively). I can tell you that the descriptions are as important or even more important than bare code. But I can also tell you that because they provide only pseudocode, there are bugs in what they have done (and I have reported some of them to them).

At any rate, I pine for the good old days, which are now long gone and never to return.
Dann Corbit
 

Re: Glaurung 0.1.5 source code

Postby Pallav Nawani » 03 Dec 2004, 21:11

Reinhard Scharnagl wrote:There seems to be only one understandable reason for to publish one's chess program's whole source coude: vainness. But that reason is something one could easily do without.

Reinhard.



Of course. Linus made linux open source because he wanted to show off. RMS wrote free compilers because he wanted to show people what a good programmer he was. I think you've hit the nail right on the head there! Free sharing of information has nothing to do with this! Freedom to modify the software to fit your need also has nothing to do with this!

Perhaps a little information about open source and free software is in order:

http://en.wikipedia.org/wiki/Open_source

http://en.wikipedia.org/wiki/Free_software

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

Re: Glaurung 0.1.5 source code

Postby Naum » 03 Dec 2004, 21:35

I like the utopian society Dann described.
Only thing is that at this moment I enjoy sporty competition more then sharing my ideas with the world.
If I hit the plato with my engine before it becomes a top 10, I may switch sides and publish all unique ideas I implemented.
But I will still not do it in the form of a source code.

Alex
Naum
 
Posts: 87
Joined: 10 Oct 2004, 04:23
Location: Toronto

Sharing or not sharing

Postby Dann Corbit » 03 Dec 2004, 21:53

Are equally good in my view.

The thing that is wrong is stealing.

If I publish my code with GPL, then you must abide by GPL.

If I publish my code with Berkeley license, then you must say that you used it.

If I publish my code with public domain, then you can do whatever you want to do with it.

I have published code under all three of those, and I have also kept code to myself.

In my view, there is no shame at all in learning from other people. If you cut and paste without understanding, I think it will only lead to big problems in the long run.

While it is true that there are many who simply do not understand the different licences and regulations behind various published code bases, it is not an effective excuse for not following the rules. The failure to abide by the laws of society (indeed, even the basic rules of human dignity) are the thing that causes all of the problems.

The strangest part to me is that failure to follow the correct guidelines is so perverse. I mean, it is not at all hard to follow them. If you lie and steal and violate the agreements, even if you win, isn't that an incredibly hollow victory? What (after all) are we striving for? Nobody on earth knows about the computer chess competitions besides a tiny pocketful of us geeks. And if I steal some ideas and claim them to be mine and actually win, I cannot fool myself. I will always know that it was not my engine that won, but some stolen copy of another man's work.

How can anyone even find any satisfaction in that? It puzzles me greatly.
Dann Corbit
 

Re: Glaurung 0.1.5 source code

Postby Anthony Cozzie » 03 Dec 2004, 21:57

IMHO, making an engine strong is like building a mountain of dirt one wheelbarrow load at a time. It is all about the number of tricks you use. Use nullmove? get 100 elo. Use checks in q-search? get 30 elo. Bonus for Knight outposts? get 20 elo. Pins in evaluation: 15 elo. Pawn race code? 5 elo. Resolve fail lows? 10 elo. Simple engines like TSCP implement almost no tricks; complicated engines like Shredder use a great many.

A simple engine like Glaurung has very few tricks, so it doesn't really change the knowledge base, it only saves lazy people some work. In fact, in some ways it might be more frustrating for them, because they will _immediately_ be at the amateur wall where search stops giving big improvements and then for the next 3 months they will struggle unsuccessfully to improve the evaluation :)

Personally, I take the academic approach. If someone wants to create an engine with Glaurung as a base, I don't see why that is a problem, as long as they specifically note this on its webpage/credits/whatever. I know The Baron originally started out as TSCP; no one thinks any less of Richard for doing this.

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

Glaurung is simple but...

Postby Dann Corbit » 03 Dec 2004, 22:17

A simple engine like Glaurung has very few tricks, so it doesn't really change the knowledge base, it only saves lazy people some work.

Despite its simplicity, it is stronger than at least 75% of amateur engines.

In fact, in some ways it might be more frustrating for them, because they will _immediately_ be at the amateur wall where search stops giving big improvements and then for the next 3 months they will struggle unsuccessfully to improve the evaluation

You will never change the habits of the lazy. Do you imagine also that smart, hard-working people will also be unable to benefit?
[/quote]
Dann Corbit
 

The Glaurung license conditions

Postby Dann Corbit » 03 Dec 2004, 22:21

License

You are free to use and modify Glaurung's source code in any way you
want as long as you do not share the resulting program with others, and
you do not enter computer chess tournaments with the program. If you
want to redistribute the program or participate in tournaments, you
must observe the following rules:

1. The program must be accompanied by a readme file explaining that
the source code is based on Glaurung. If you run the program on a
chess server, the finger notes must indicate that the program is
based on Glaurung.

2. You are not allowed to sell any program based on Glaurung without
explicit permission from me (Tord Romstad).
Dann Corbit
 

Re: Glaurung 0.1.5 source code

Postby Naum » 03 Dec 2004, 22:25

I came back to this topic one last time to say this, but it seems Dann already said it :)

The main problem with publishing the source code is that encourages the culture of cut&pasters. Benefit of publishing a paper or pseudo-code is that people who want to use the idea will have to think about it and fully understand it before they use it.

Alex
Naum
 
Posts: 87
Joined: 10 Oct 2004, 04:23
Location: Toronto

Re: Glaurung 0.1.5 source code

Postby Reinhard Scharnagl » 04 Dec 2004, 08:32

Please be consequent. If you state that is nearly impossible for someone to write a really competitive chess program by only himself, that would imply that there is no reason to publish the whole source. If someone in fact has a new, good working idea, why not publish that only doing it avoiding using genuine source code. That would be sufficient to distribute one's ideas, if this would be that important for that creative programmer.

Reinhard.

P.S.: publishing genuine source code, especially a whole chess program, is like playing god, placing a forbidden fruit in a garden with free entry for everybody, hoping that manking consists only of saints. That gives me an impression for that to finally establish a diabolish temptation.
Reinhard Scharnagl
 
Posts: 608
Joined: 01 Oct 2004, 08:36
Location: Klein-Gerau, Germany

Re: Glaurung 0.1.5 source code

Postby Dan Honeycutt » 04 Dec 2004, 11:15

Reinhard Scharnagl wrote:Please be consequent.


Hi Reinhard:

Do you mean "consistent"?

I think we have about hammered open source into the ground. Like most things, there is no black or white but rather shades of grey. Pros and cons.

What about Tord's idea of swapware?

What about my idea of a public domain TSCP type program?

Any opinion?

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

Re: Glaurung 0.1.5 source code

Postby Reinhard Scharnagl » 04 Dec 2004, 11:39

Hi Dan,
Do you mean "consistent"?

always bear in mind that English is not my native language. Thus there it easily could be that I am not that precise as necessary.
I think we have about hammered open source into the ground

That is not what I intended. It targets only themes related with a type of sport and challenge, where it would be relevant whether one is fair or not - or where it finally could lead into a kind of software dumping.
What about my idea of a public domain TSCP type program?

If the idea is about to create teams working together - why not, when people would harmonize. But why publish the sources to outstanding people? I often demanded to create a pool of productive programmers which may use and benefit from each other AFTER having contributed something SIGNIFICANT (ideas, tools, money) to that circle. But for what reason spread such pooled knowledge to each and every code hungry person?

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

Re: Glaurung 0.1.5 source code

Postby José Carlos » 04 Dec 2004, 12:01

Reinhard Scharnagl wrote:... that there is no reason to publish the whole source. If someone in fact has a new, good working idea, why not publish that only doing it avoiding using genuine source code. That would be sufficient to distribute one's ideas, if this would be that important for that creative programmer.

I listed all the reasons why publishing source code can be good in a previous post. You might not like them, but they exist.
On the other had, I also like papers, and I also like pseudocode.
I like to learn from others. And of course, always give proper credit. That's how science advances. Study -> create -> study -> create...

Reinhard Scharnagl wrote:P.S.: publishing genuine source code, especially a whole chess program, is like playing god, placing a forbidden fruit in a garden with free entry for everybody, hoping that manking consists only of saints. That gives me an impression for that to finally establish a diabolish temptation.


Myself, I find much more temptating a beautiful girl in bikini in the beach than Crafty. I don't jump on the girl, so I can easily resist Crafty :D
_____________________________
José Carlos Martínez Galán
User avatar
José Carlos
 
Posts: 102
Joined: 26 Sep 2004, 03:22
Location: Murcia (Spain)

Re: Glaurung 0.1.5 source code

Postby Reinhard Scharnagl » 04 Dec 2004, 12:07

Hi Jos?,
Myself, I find much more temptating a beautiful girl in bikini in the beach than Crafty. I don't jump on the girl, so I can easily resist Crafty

well, there always are saints, but only few. ;-)

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

Re: Glaurung is simple but...

Postby Alessandro Scotti » 04 Dec 2004, 12:12

Dann Corbit wrote:
A simple engine like Glaurung has very few tricks, so it doesn't really change the knowledge base, it only saves lazy people some work.

Despite its simplicity, it is stronger than at least 75% of amateur engines.



A while ago I wrote somewhere that "good code... has to reach its goals in the simplest and cleanest possible way". I've looked at Glaurung code and I think that its simplicity it deceptive in the sense that it implements very well a number of extremely good ideas, and make them look easy.
More than simple, this looks very elegant to me.
User avatar
Alessandro Scotti
 
Posts: 306
Joined: 20 Nov 2004, 00:10
Location: Rome, Italy

Re: Glaurung 0.1.5 source code

Postby Dan Honeycutt » 04 Dec 2004, 20:58

Reinhard Scharnagl wrote:always bear in mind that English is not my native language. Thus there it easily could be that I am not that precise as necessary.

Hi Reinhard:
Your English is excellent, you can't get away with that excuse :)

Actually I wasn't sure what you meant. My guess was Alex saying Dann had already said it (sharing and not sharing are equally good) was not consistent with his earlier anti-sharing statements. If that was what you meant, I don't agree.

In his first post Alex seemed strongly opposed to shared source, but he tempered and clarified his view in following posts. I did not view his statement agreeing with Dann as inconsistent. I get the feeling Alex is not going to share his source but he's not going to condemn me if I do. I further get the feeling that the only one who is going to condemn me is you. But thats OK too.

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

PreviousNext

Return to Programming and Technical Discussions

Who is online

Users browsing this forum: No registered users and 31 guests