Looking for C developper

Discussion of chess software programming and technical issues.

Moderator: Ras

mvk
Posts: 589
Joined: Tue Jun 04, 2013 10:15 pm

Re: Looking for C developper

Post by mvk »

hgm wrote:I think that is the most important point. You would never attract contributors to a Chess Engine unless it is the best (or at east the best open source, and within striking range of the absolute best).

But even for Fairy-Max I sometimes get contributions (although I don't olicit them). Not often, but it happens. Because it apparently can do things that other open-source programs cannot already do better. To be succesful in this respect you really need to offer something unique, or beat anyone else who offers something similar.
I got a lot of nice feedback about MSCP, and that was literally a rainy Sunday afternoon project. To the craziest things: one person translated it into the scripting language of a RPG engine. Students parallelising it for a course assignment. And ofcourse the unofficial version by JA, with better PC/SQ tables and variable depth search.

Unfortunately, a competitive engine is more like a rainy decade project.

If I would do a new open-source engine, I would write one in javascript. I'm sure such a project would generate sufficient lasting interest to make it worthwhile.
[Account deleted]
User avatar
Rebel
Posts: 7486
Joined: Thu Aug 18, 2011 12:04 pm
Full name: Ed Schröder

Re: Looking for C developper

Post by Rebel »

mvk wrote:
Rebel wrote:
lucasart wrote:I'm starting to be bored of developing DiscoCheck:
  • As with any advanced program, I only use my brain only 1% of the time, and the remaining 99% I use time and electricity...
Image

I share the sentiment, nowadays development (although responsible for hundreds of elo) is boring indeed.

An alternative is the old (romantic) approach, to improve via hundreds of selected positions your engine performs weak (usually because of missing eval knowledge). Using the strategic testset from Swamithan would be a good starting point.

But it will cost you elo points.
I think the trick to keep it interesting is to focus on a niche: At 1elo progress / 4 hours effort, my rate, a 300 elo gap is way too frustrating. So do something different from the others and try to become good at that. Much more satisfying.
It's basically what I am doing nowadays, busy with the side-issues of computer chess, squeezing the last drop of information out of large databases, experiments. Not so interesting for the average elo junk :wink: here but it keeps me out of the pub.
lucasart
Posts: 3243
Joined: Mon May 31, 2010 1:29 pm
Full name: lucasart

Re: Looking for C developper

Post by lucasart »

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.
Rein Halbersma
Posts: 751
Joined: Tue May 22, 2007 11:13 am

Re: Looking for C developper

Post by Rein Halbersma »

lucasart wrote:
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.
Please don't turn every argument into a grudge match about C++ versus C. Your childhood trauma of early exposure to C++ is not relevant for this discussion, and neither are your perceptions of what my criterion for beauty is (hint: simplicity of interface ranks above cleverness, but cleverness ranks above simplicity of implementation when that is required to keep the interface simple). I do find Fruit code pretty and it's quite modern, with all the assert() and other checks for correctness.
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.
I was neither stating my own vision nor your perception thereof, but rather quoting Marco, here's the link and exact quote:
mcostalba wrote: To quickly become productive I think it depends 20% on the language of choice and 80% on how clean and elegant the engine is developed. And here I have to say Tord made a really nice toy: I read other sources before to pick Glaurung and I choose it not because of its strenght but because it was well developed and organized in a logical way, easier for me to understand. I choose it by feeling.

And after I choose Glaurung I never turned back again :-)
Perhaps Marco can explain why he preferred Glaurung over Fruit.
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.
Just for the record: I agree that DiscoCheck has quite pretty code. I had read it before and it looks nice! You use the same Linux-style bracing / 8-spaces indentation as I do, you initialize variables upon first use, take care of const-correctness, etc. There's a lot of good stuff there.

Others have said it already: another great point of attraction is personality. You seem to have a tendency to turn almost every discussion into a personal vendatta against C++. It's simply not pleasant to interact with someone when the slightest technical disagreement leads into name calling. In contrast, I have had many (private) discussions with Marco on coding-style and C++ matters, and I think he agreed with less than 50% and perhaps accepted less than 5-10% of my suggestions. But he was never rude or unfriendly about it, and his arguments were always pragmatic and technical, rather than biased and prejudiced.
lucasart
Posts: 3243
Joined: Mon May 31, 2010 1:29 pm
Full name: lucasart

Re: Looking for C developper

Post by lucasart »

Sorry for the C/C++ grudge. That was a bit off topic. The point I wanted to make is this:
* what makes an open source an attractive base for derivation is not the cleanlyness of its code base, but it's elo. Nothing more. Otherwise how can you explain that the most derived engine is Ippolit ? (which is by far the ugliest code base the world has ever seen, C/C++ aside).

I maintain that Fruit 2.1 is somewhat cleaner than Glaurung 2.1, C/C++ debate aside. But Glaurung is more feature complete and much stronger, in particular SMP, which is the real reason people want to derive from it rather than Fruit. I'm sure if Fruit was stronger than Glaurung and was SMP yet retaining the simplicity caracteristic of Fruit, Marco would have chosen it instead of Glaurung.

Also, I realized that it is pointless to continue an open source chess project. It was fun for a time, and I enjoyed doing it. But nobody other than me (and people I really don't want involved asking for feature and complaining as if I "owed" them bugfixes and regular improvements) cares about it. And it is not likely to change. There is alreayd a strong open source engine, in fact the strongest engine in the world. And it is not only strong (in the position Ippolit was a few years ago), but it is a very clean and elegant codebase. That is, of course, Stockfish. I don't know if anyone can beat that, but I know I can't, nor have the will/patience to try.

I've turned a page and discontinued DiscoCheck. Hopefully it will still have a didactic value to a few people looking at it. Anyway, it taught me lots of things about chess algorithms and was interesting for a time. Now it's boring and pointless to continue. I'm going to explore some unexplored chess variants ;-)
Theory and practice sometimes clash. And when that happens, theory loses. Every single time.
Ralph Stoesser
Posts: 408
Joined: Sat Mar 06, 2010 9:28 am

Re: Looking for C developper

Post by Ralph Stoesser »

There is still a lot to do with standard chess, at least from a chess player's point of view. Better handling of closed positions f.i., of course by gaining, not by losing ELO. Engines that are able to teach chess on a high level, engines that are able to explain why a particular move or plan is the best one, in a way a human master is able to understand and learn from the machine. Highly optimized engines like SF still make stupid errors. The gap between playing extremely strong in most and playing extremely stupid in a few positions is still there and it's annoying because it means chess engines are not yet reliable references despite being extremely strong in practical play against human that do not know how to exploit their weaknesses.
tpetzke
Posts: 686
Joined: Thu Mar 03, 2011 4:57 pm
Location: Germany

Re: Looking for C developper

Post by tpetzke »

I'm going to explore some unexplored chess variants


Maybe you give this one a try :-)
Thomas...

=======
http://macechess.blogspot.com - iCE Chess Engine
yolin
Posts: 30
Joined: Thu Mar 30, 2006 6:12 pm

Re: Looking for C developper

Post by yolin »

lucasart wrote: I'm going to explore some unexplored chess variants ;-)
I think the standard FICS/ICS chess variants are amazingly interesting. There are widespread enough to have general interest and there are some chess engines out there to beat.

Crazyhouse is my personal favourite and I would love to see a new strong crazyhouse engine. Pecularities are: very narrow opening book, very large branching factor. No endgame at all. A few months ago someone posted here a large crazyhouse engine tournament of all known engines. I believe there were less than 10. The best engines are sunsetter and tjchess.
mcostalba
Posts: 2684
Joined: Sat Jun 14, 2008 9:17 pm

Re: Looking for C developper

Post by mcostalba »

lucasart wrote:I'm starting to be bored of developing DiscoCheck:
Hi Lucas,

I wish you best luck with your new effort, but I also think that there is not a single way to have fun with chess engines. Of course I am biased because I hope you will still contribute to SF from time to time. In the past your contributions were among the few that went into the direction of simplifying things (in a non trivial way) and you know very well how much I value that.

If I may comment, I'd think your first motivation to develop an engine (GPL or not) should be to have fun doing it. If you develop to attract people I fear your trip will be short: for long years me (and Joona) had developed SF almost alone, I never thought (or looked for) someone would have joined us and it is just since one year (but I started in 2008) that things changed dramatically thanks to Gary's fishtest.

Now I have very few time, so I am lucky that now I am in a position to act as a maintainer more than an active programmer, because my limited free time would not have allowed me to continue doing it, while instead as a maintainer I think I can still be useful to the project.

But from time to time, when I have time, I still enjoy browsing the sources looking for possible improvements...
jd1
Posts: 269
Joined: Wed Oct 24, 2012 2:07 am

Re: Looking for C developper

Post by jd1 »

lucasart wrote:
The reason I started an open source project, is to build something bigger than myself. Something that will outlive me in the sense that other people will continue to develop it when I am bored of chess programming. So far, I have not seen anyone show interest in DiscoCheck's source code (apart from a few trolls looking for something there to wage a clone war). No one has ever forked my project on github or sent me a pull request. Basically no one cares about DiscoCheck, except myself, and those people (chess fans) I least want involved.
Discocheck is not a failure at all. I certainly have waded through your commits looking for ideas to try myself ...

Jerry