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 Reinhard Scharnagl » 03 Dec 2004, 17:06

Hi Jos?,
Is alphabeta your own idea? Null move? Hashing? Evaluating chess positions?

alphabeta
well I did my first chess program first on a Z80 learning platine then on a Sharp MZ80K with a high performing 1 MHz CPU using assembler language. Later I met some chess programmers on a Computer Chess World Championship at a CeBit and mentioned that alpha-beta would not be the most effective approach to evaluate a chess tree, but they only ignored - which is understandable not seeing ever a program of mine (they hardly would remember me). When making Smirf ready in a hurry before the GC championship I implemented a kind of alpha beta, but that finally will be replaced.
Null move
I do not like the idea of integrating nullmoves in the search tree. Their value is in the process of scaling the positional move evaluation. I do not use them in Smirf's search tree, I think there are more efficient heuristics.
Hashing
This is an old method, not only applied to chess positions. Here I am using a special subset of random numbers using a self written pseudo random number generator. Here this special subset might be relevant, though no one had been interested when I tried to discuss that. Also I do not know, which other implementings of a cache would allow the simultaneous storing of differently aspects at different levels for the same position and that combined with a genuine replacement scheme.
Evaluating chess positions
As I already often mentionend I do not use piece-coordinate tables but instead calculating interdependences between the pieces. I think this is somehow different from that what I have heared.

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 » 03 Dec 2004, 17:40

Reinhard Scharnagl wrote:Hi Jos?,
Is alphabeta your own idea? Null move? Hashing? Evaluating chess positions?

alphabeta
well I did my first chess program first on a Z80 learning platine then on a Sharp MZ80K with a high performing 1 MHz CPU using assembler language. Later I met some chess programmers on a Computer Chess World Championship at a CeBit and mentioned that alpha-beta would not be the most effective approach to evaluate a chess tree, but they only ignored - which is understandable not seeing ever a program of mine (they hardly would remember me). When making Smirf ready in a hurry before the GC championship I implemented a kind of alpha beta, but that finally will be replaced.

Reinhard.


I believe that there are addition to alphabeta that should be used that programs do not use them but I still did not try to implement it in movei.

The idea of alphabeta is not to analyze obvious illogical lines and the idea of not wasting too much time about illogical lines cannot be relaced.

If I find that 1.e4 is 0.1 pawns for white and 1.d4 Nf6 is only 0.09 pawns for white than 1.e4 is better than 1.d4 and wasting a lot of time about 1.d4 with other replies of black is a bad idea.

This is basically the idea of the alphabeta and I do not believe that there is a logical alternative that does not use that idea.

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 » 03 Dec 2004, 17:51

Hi Uri,
I do not believe that there is a logical alternative

concerning alpha-beta the goal is to find an optimal way through the search tree. Alpha beta will find it, but it is not the only way to do it efficiently. Of course there will be similarities because of the nature of the to be optimized tree. But you have not to mix up that nature with the algorithm itself.

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

Re: Glaurung 0.1.5 source code

Postby Martin Giepmans » 03 Dec 2004, 18:11

One problem that I have with open source code (of a strong engine) is that it discourages programmers who want to develop an engine on their own. If you go that way you know that your engine will be weak for a long time. You will have to figure out all the details (what should I evaluate and what are the weights, for instance) yourself. If you start with a good example you can do it much faster, also if you don't copy-paste.

I have never studied open source and I don't regret it. Apart from general well known techniques (alfabeta and so on) SpiderChess is entirely my own brain child and that feels good. But I think that many programmers who could write an engine from scrap (which is ultimately much more rewarding and maybe, who knows, you'll find new techniques) will not do it, because the price - not being competitive for a long time to come - is too high. And that's a pity.

Open source? Please no, unless it's very fundamental.
Martin
Martin Giepmans
 
Posts: 14
Joined: 26 Sep 2004, 23:47
Location: The Netherlands

Re: Glaurung 0.1.5 source code

Postby Reinhard Scharnagl » 03 Dec 2004, 18:18

Hi Martin,
... because the price - not being competitive for a long time to come - is too high

it depends to what you are comparing the strength of your program. You will not compare a Formula 1 car to a soap box. (Nevertheless the driver of a soap box is allowed to dream of driving a real racing car.) I will try to make my soap box Smirf always better step by step.

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 » 03 Dec 2004, 18:24

Martin Giepmans wrote:One problem that I have with open source code (of a strong engine) is that it discourages programmers who want to develop an engine on their own. If you go that way you know that your engine will be weak for a long time. You will have to figure out all the details (what should I evaluate and what are the weights, for instance) yourself. If you start with a good example you can do it much faster, also if you don't copy-paste.

I have never studied open source and I don't regret it. Apart from general well known techniques (alfabeta and so on) SpiderChess is entirely my own brain child and that feels good. But I think that many programmers who could write an engine from scrap (which is ultimately much more rewarding and maybe, who knows, you'll find new techniques) will not do it, because the price - not being competitive for a long time to come - is too high. And that's a pity.

Open source? Please no, unless it's very fundamental.


What about playing human chess? Please, no more theory books. I have to study for two many years to be competitive! Better lower the level of all the other players to give my own ideas a chance.
Of course not. Competition is hard. You must know what the others know, and still create new ideas!
_____________________________
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 milix » 03 Dec 2004, 18:33

Hi Jose!
Are we talking about publishing ideas or publishing full source code? I think Martin is talking about copying parts of other chess engines, which I think is not the proper way for being competitive.
milix
 
Posts: 54
Joined: 04 Nov 2004, 19:36
Location: Greece

Re: Glaurung 0.1.5 source code

Postby Martin Giepmans » 03 Dec 2004, 18:41

There is a difference, Jose. You have to work hard when you study new openings, to make them your own. A programmer who pseudo-copy-pastes Crafty (reprogramming it in his own "words") doesn't need to work hard. And I suspect that this practice of pseudo-copy-pasting is quite common nowadays. First p-c-p, then change a few things, and then you have your 'own' engine ....
Easy!
Martin
Martin Giepmans
 
Posts: 14
Joined: 26 Sep 2004, 23:47
Location: The Netherlands

Re: Glaurung 0.1.5 source code

Postby Naum » 03 Dec 2004, 18:41

It seems that opinions on this issue are mixed, and I think everyone is partialy right.
We all agree that open source progs are bad from the sporting perspective, because it makes everyone implement the same thing, so engines that implement only common ideas get very close in strength.
Of course, it is bad from the computer science perspective, because some people want to follow the latest and greatest developments and maybe even try them in their own engines.

I said I hate Crafty. What I ment is I hate it from the sporting (and cloning problem) perspective, but I still see the scientific purpose of publishing it's code. Prof. Hyatt is using it to show his ideas. And since I am slowly developing multi-threaded version of my engine, I intend to read all his papers and even look at Crafty's code, because he has such a great experience with parallel programming. Of course, I just want to see the idea he used, and would prefer to read his paper rather then go look into his code.

I agree with Reinhard and Millix that if you want to discuss fresh new idea, that's fine. You don't need to publish source code. You could just right a paper on it, and maybe even provide simplified pseudo-code.

Implementing someone else's ideas is what all engine authors are doing. No one could single handedly come up with all those hashing, IIT, SEE, null move, and other algorithms.

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

Re: Glaurung 0.1.5 source code

Postby José Carlos » 03 Dec 2004, 18:56

In all my post I'm assuming a honest use of open source. Maybe I was not clear enough. I repeat:
- Everything on earth can be use with dishonest intentions. A uses a knife to cut meat. B uses a knife to kill a man. The knife is not guilty, B is guilty.
- A uses open source as an example of ideas, and gets the idea. B uses open source to clone. Open source is not guilty. B is guilty again.

Now, assuming we are talking about honest use of open source:
...
my latest posts here
...
_____________________________
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 » 03 Dec 2004, 19:02

Hi Jos?,
honest use of open source

the open source Idea is only serious, if the product could be customized and the programmers would be able to earn money at that customizing project. Or the Idea is to generate a huge common application. But a chessprogram is neither to be made customizable to each player, nor a huge common application. So making chess program open source is always bad, because it is inviting to 'patchwork' clones and pseudoclones. If it would be done to publish ideas, why not publish each idea seperately, why must it finally be a complete program?

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

Re: Glaurung 0.1.5 source code

Postby Martin Giepmans » 03 Dec 2004, 19:08

Okay, the publisher of source code is not guilty. And programmers often publish code with the best of intentions. I think Bob Hyatt is a good example.
But I completely agree with what Naum wrote:

Code: Select all
 You don't need to publish source code. You could just write a paper on it, and maybe even provide simplified pseudo-code.
Martin
Martin Giepmans
 
Posts: 14
Joined: 26 Sep 2004, 23:47
Location: The Netherlands

Re: Glaurung 0.1.5 source code

Postby Martin Giepmans » 03 Dec 2004, 19:10

Oops, that was a quote, not code of course .. :D
Martin
Martin Giepmans
 
Posts: 14
Joined: 26 Sep 2004, 23:47
Location: The Netherlands

Re: Glaurung 0.1.5 source code

Postby José Carlos » 03 Dec 2004, 19:13

Hi Reinhard and Martin.

"You don't need to" and "you must not" are two different things.
Maybe it's not necessary to publish source code. But that doesn't imply it is bad to do so.
You both don't see a good reason to publish source code. I do see it.
But so far, I haven't seen a solid argument why publishing source code is bad.
_____________________________
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 Uri Blass » 03 Dec 2004, 19:32

Reinhard Scharnagl wrote:Hi Jos?,
honest use of open source

the open source Idea is only serious, if the product could be customized and the programmers would be able to earn money at that customizing project. Or the Idea is to generate a huge common application. But a chessprogram is neither to be made customizable to each player, nor a huge common application. So making chess program open source is always bad, because it is inviting to 'patchwork' clones and pseudoclones. If it would be done to publish ideas, why not publish each idea seperately, why must it finally be a complete program?

Reinhard.


Hi reinhard,
Open source is not done only to publish ideas.

The problem is that after you have ideas you need to translate them to a program and source code can help in understanding how people do it
and there are some tricks to do code more understandable or faster that not experienced programmers may not think about them if they do not see example in a different source code.

My opinion is that it can be more productive for programmers if somebody does not share only source code but also share all the process of the design before writing the source code.

The problem is that I find source code hard to understand and practically inspite of the fact that open source code helped me I did not read most of the source code.

I think that it could be more interesting for me to read the process of all the design that leaded to writing the source code.

The problem is that when I see a big source code of a good programmer with a lot of files I do not know where to start to read and it is hard to understand.

Starting by following the same logical process that leaded the programmer to write his source code can be more productive.

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

Re: Glaurung 0.1.5 source code

Postby Martin Giepmans » 03 Dec 2004, 19:35

You must not ... let's rephrase that:

Thou shallt not publish thy source code.

Why not? Because published code is a temptation, that's why.
Solid argument?
Martin
Martin Giepmans
 
Posts: 14
Joined: 26 Sep 2004, 23:47
Location: The Netherlands

Re: Glaurung 0.1.5 source code

Postby Pallav Nawani » 03 Dec 2004, 19:35

Honestly, I cannot see why people feel open source programs are bad. Maybe because it allows others to get up to speed quickly? Whoa, just now released psuedo is bashing up Natwarlal (my program) badly! I feel that this sense of competetiveness is one of the major things that causes chess programmers to oppose open source programs.

Other reason is also pyschological. Your chess program somehow becomes a 'baby' of yours and you don't like to see others poaching from it. This makes chess programming completely different from, say, writing a HTML parser.

In any case, even though Reinhard has his own version of alpha beta, hash tables, he is hardly the person who invented them. For that matter, everybody's program has a slightly different implementation of these techniques.

Quote Newton:
If I have been able to see farther than others, it is because I was standing on the shoulders of giants.


Just my 2 cents.
User avatar
Pallav Nawani
 
Posts: 147
Joined: 26 Sep 2004, 20:00
Location: Dehradun, India

Re: Glaurung 0.1.5 source code

Postby Pallav Nawani » 03 Dec 2004, 19:43

Martin Giepmans wrote:You must not ... let's rephrase that:

Thou shallt not publish thy source code.

Why not? Because published code is a temptation, that's why.
Solid argument?


Temptation :?: :?: :?:
You seem to imply that reading published code is somehow a sin? Dogmas were never solid arguments, and never will be.
User avatar
Pallav Nawani
 
Posts: 147
Joined: 26 Sep 2004, 20:00
Location: Dehradun, India

Re: Glaurung 0.1.5 source code

Postby José Carlos » 03 Dec 2004, 19:47

Martin Giepmans wrote:You must not ... let's rephrase that:

Thou shallt not publish thy source code.

Why not? Because published code is a temptation, that's why.
Solid argument?


Nah, a knife is a temptation to kill, then, so let's forbid knifes. A beautiful girl is a temptation to... So let's forbid beautiful girls.
No. Honesty must stand over temptations. We can't remove all temptations from the world. People must learn to live with temptations all around and still be honest.
But I'm afraid this discussion is getting to a point where no progress is possible, so let's agree to disagree :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 » 03 Dec 2004, 19:51

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.
Reinhard Scharnagl
 
Posts: 608
Joined: 01 Oct 2004, 08:36
Location: Klein-Gerau, Germany

PreviousNext

Return to Programming and Technical Discussions

Who is online

Users browsing this forum: No registered users and 20 guests

cron