Where's the joy in writing a chess engine?

Discussion of anything and everything relating to chess playing software and machines.

Moderators: hgm, Rebel, chrisw

sandermvdb
Posts: 160
Joined: Sat Jan 28, 2017 1:29 pm
Location: The Netherlands

Re: Where's the joy in writing a chess engine?

Post by sandermvdb »

I can think of the following reasons why writing a chessengine is fun (for me atleast)

- challenging
- competetive, so you can compare the latest version to older versions and to other engines of course (or even compare to humans)
- program can be divided in 3 different parts: board representation, eval function and search
- program a game that you can play yourself, and suddenly its waaaaay better than you are
- lots of variety: profiling, automatic eval tuning, low-level optimizing, perfect perft, etc...
- probably forgetting some more reasons

My job is being a programmer, but most of the time that is way different!
Dann Corbit
Posts: 12537
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Re: Where's the joy in writing a chess engine?

Post by Dann Corbit »

Some people think their jobs are fun jobs.
Some programmers enjoy programming.

Writing a chess engine is a challenge. Everyone likes a challenge.

I like mathematics, so I write math functions for fun. I guess that 99.99% of normal people will think I am ill because of that. But it is fun for me anyway.

I don't think writing a chess engine is a good way to make money. You can make a lot more money with the same skill level doing something else. But for those that enjoy the challenge, it can be a fun experience.

I have seen several engines go commercial and then the authors eventually give up chess programming altogether. And there are some chess programmers who can make a decent living at it.

But the French say, "To each his tastes" ("à chacun ses goûts").
Taking ideas is not a vice, it is a virtue. We have another word for this. It is called learning.
But sharing ideas is an even greater virtue. We have another word for this. It is called teaching.
PK
Posts: 893
Joined: Mon Jan 15, 2007 11:23 am
Location: Warsza

Re: Where's the joy in writing a chess engine?

Post by PK »

Chess programming has nothing to do with my job! I studied history of literature, worked as a proofreader, editor, occasional graphic designer, lectured at university, published a couple of books, wrote tons of educational materials and got my current job by telling the story of Miguel Najdorf during the interview. I play some chess and learned programming specifically with the goal of creating a chess engine, not knowing how difficult it is.

For me the most rewarding part is when the engine does something smart and unexpected. When it seems to play like a human (that's why Rodent allows creating various personalities). When it finds a good exchange sacrifice, or when I run it through a couple of initial positions after a long session of automatic tuning, and see opening choices that do not seem computer-like (Rossolimo against the Sicilian, accelerated Dragon when I force 3.d4).
duncan
Posts: 12038
Joined: Mon Jul 07, 2008 10:50 pm

Re: Where's the joy in writing a chess engine?

Post by duncan »

Rebel wrote:
Tony P. wrote:Even then, it puzzles me that some people like to have a hobby that reminds them of their jobs. I'd rather have a hobby that's orthogonal to the job, to forget about the job at least for a while.
I can't imagine a programming job that is more creative than chess prgramming.
more than go programming ?
Henk
Posts: 7216
Joined: Mon May 27, 2013 10:31 am

Re: Where's the joy in writing a chess engine?

Post by Henk »

I don't know what is more complicated making a good original painting or making a good original chess engine assuming you have no talent for painting.
Henk
Posts: 7216
Joined: Mon May 27, 2013 10:31 am

Re: Where's the joy in writing a chess engine?

Post by Henk »

Tony P. wrote:I have a conjecture that I'd like to check with the forum residents.

Namely, writing an engine can only be enjoyed by someone who already does software development as a job.

The thing is that the actual development is too stressful for an uninitiated person. Algorithm design in terms of pseudocode is much easier than making code actually work fast and as intended on real-life hardware. The latter is a huge problem that constrains one's fantasy.

Thus I suppose that coding an engine can only be enjoyable if one is already very disciplined at debugging and testing and has a very strong mindset that's not ruined by numerous bugs that inevitably happen (and, to make things worse, in chess programming, bugs tend to harm the engine's strength subtly instead of making it crash).

The reason why there are people who enjoy this utterly stressful hobby is perhaps that their main jobs are even more stressful and this hobby is something that sounds familiar but provides 'relative relaxation' because bugs in toy software like non-commercial chess engines don't have a monetary impact and thus don't place responsibility.

Even then, it puzzles me that some people like to have a hobby that reminds them of their jobs. I'd rather have a hobby that's orthogonal to the job, to forget about the job at least for a while.

Or am I missing something?

Anyway, thanks a lot to engine authors for suffering in order to provide us, mere mortals, with entertainment :!:
I think stress means stop immediately and run away before it gets worse and worse. But I don't know if that's right conclusion.
User avatar
cdani
Posts: 2204
Joined: Sat Jan 18, 2014 10:24 am
Location: Andorra

Re: Where's the joy in writing a chess engine?

Post by cdani »

I work as CIO but I do also a lot of programming (relatively small company), but is not really complicated and I need something more serious.

Chess programming is a nice challenge, not very complicated but a good long lasting project with the concrete reward to see it improving. Is better than playing Candy Crush for months or years :-)

The worst is when you see clearly that advancing is more dependent of the resources available than nothing else, once your engine is relatively strong. This kills a bit the creativity vein (spanish idiom), or at least slows down it a lot down to a test (hours/day) pace.
User avatar
cdani
Posts: 2204
Joined: Sat Jan 18, 2014 10:24 am
Location: Andorra

Re: Where's the joy in writing a chess engine?

Post by cdani »

cdani wrote: Chess programming is a nice challenge, not very complicated...
I worked on Andscacs for thousands of hours, so is not easy also :-)
Tony P.
Posts: 216
Joined: Sun Jan 22, 2017 8:30 pm
Location: Russia

Re: Where's the joy in writing a chess engine?

Post by Tony P. »

Stan Arts wrote:Every chess programming layman must start out at some point thinking they can write something much better than what is currently around.

It's a trap.
This is so true :cry:

That there's a fine line between genius and insanity doesn't mean that insanity has a more than tiny likelihood of being genius.
Richard Allbert
Posts: 792
Joined: Wed Jul 19, 2006 9:58 am

Re: Where's the joy in writing a chess engine?

Post by Richard Allbert »

Tony P. wrote: Namely, writing an engine can only be enjoyed by someone who already does software development as a job.
I don't agree with this - it was the ambition to write an engine that got me started in programming.

I was studying Engineering at university, and decided it would be amazing to be able to write a program that played chess - so I started reading up and trying to write C :).

It took two years(!) for an initial horrible slow program, which I love dearly, and then many more years after were taken absorbed by the hobby. I remember spending hours going through Dann Corbit's old Repo (way back in the early 2000s)

It remains one of the best things I ever did. Added to that the community is fantastic, so helpful, and I'll never forget the trips to tournaments that Richard Pijl held, where I was able to meet some of the people on here in person.

It doesn't matter what strength your program is, what becomes fascinating is the tinkering / testing / watching it play (or self mate), studying other code (implementing the same stuff and seeing it not work) etc.

I did have a program running in FICS using a Raspberry Pi Zero for a while recently as well :)

Sadly, life has got in the way in recent years, and time is limited. I've tried to make my own contribution in recent years, I hope the community continues for many years to come.