Rein Halbersma wrote:
It's not a coincidence. The Glaurung source was very clean and readable to begin with, and Marco improved it with great discipline. I think one of the main reasons why Stockfish attracted a community is Marco's skill as a programmer (he sets the bar very high for contributions, which attracts top programmers). Nobody wants to contribute to a mediocre engine, but anyone likes to bask in the glow of successful engine, even if they have only contributed little pieces.
In theory you should be right. In practice, history proves you wrong. By far the most derived/plagiarized/cloned engines are:
* Fruit: by your standard, it must be horrible, because it's written in the most old fashion C. It doesn't use STL/Boost, and doesn't have a nested template class hierarchy with their own STL allocator or whatver the new C++ hype of yours is now... Your criterion for beauty is cleverness, which is precisely my criteria for uglyness. My criteria for beauty is
simplicity.
* Ippolit: well that one is not only pure C, but it's the uglyest code I have ever seen in my life. It makes my eyes bleed when I look at it. I think we can agree on that.
Ugly or not in the the eye of the beholder. Some people actually like Ippolit's coding style (its pseudonym authors must like it otherwise they wouldn't write code like that). And some people appreciate the simplicity and beauty of straight, old fashionned, C code, as performed in Fruit.
In the end, the only thing that people are interested in is ELO strength. Huge efforts have been made to clone/derive/plagiarize the Ippolit/Robbolito/IvanHoe code bases, because they were the strongest open source engines by a very long way (at the time).
And your vision of Glaurung is a bit incorrect. If you look at Glaurung 2.1 from a coding stlye perspective, it is not really the cleanest and simplest code base there is. It is actually a very large and a bit messy codebase. Stockfish has made a lot of "cosmetic" work and, by now, almost entirely rewritten Glaurung. But that's not what matters! Glaurung was the strongest open source engine, it had SMP working and all nice and feature full. The cosmetics of the code will not stop a competent programmer (as in this case Marco) from appreciating what's under the hood.
My opinion, which is biaised by definition, is that DiscoCheck is a simpler codebase than Glaurung 2.1. It's a comparison of Apples and Pears really, because Glaurung also has more features, most notably SMP. But nonetheless, it should be easier for someone to understand DiscoCheck than Glaurung. DiscoCheck has about 3400 lines of code only, which is a record for a 2900 ELO engine. It tries to be a distilation of what is useful and removing all the cruft. So it's designed around simplicity. On the other hand, it doesn't have the touch of a professional programmer like Stockfish does, but I don't think it's anywhere as messy as Ippolit, for example.
Theory and practice sometimes clash. And when that happens, theory loses. Every single time.