Where's the joy in writing a chess engine?

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

Moderators: bob, hgm, Harvey Williamson

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
sandermvdb
Posts: 157
Joined: Sat Jan 28, 2017 12:29 pm
Location: The Netherlands

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

Post by sandermvdb » Tue Sep 19, 2017 7:52 pm

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: 10189
Joined: Wed Mar 08, 2006 7:57 pm
Location: Redmond, WA USA
Contact:

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

Post by Dann Corbit » Tue Sep 19, 2017 7:57 pm

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: 834
Joined: Mon Jan 15, 2007 10:23 am
Location: Warsza
Contact:

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

Post by PK » Tue Sep 19, 2017 8:38 pm

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: 10503
Joined: Mon Jul 07, 2008 8:50 pm

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

Post by duncan » Tue Sep 19, 2017 9:03 pm

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: 5832
Joined: Mon May 27, 2013 8:31 am

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

Post by Henk » Tue Sep 19, 2017 9:07 pm

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: 5832
Joined: Mon May 27, 2013 8:31 am

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

Post by Henk » Tue Sep 19, 2017 9:29 pm

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: 2104
Joined: Sat Jan 18, 2014 9:24 am
Location: Andorra
Contact:

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

Post by cdani » Tue Sep 19, 2017 9:53 pm

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: 2104
Joined: Sat Jan 18, 2014 9:24 am
Location: Andorra
Contact:

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

Post by cdani » Tue Sep 19, 2017 10:09 pm

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: 81
Joined: Sun Jan 22, 2017 7:30 pm
Location: Russia

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

Post by Tony P. » Wed Sep 20, 2017 2:03 am

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: 770
Joined: Wed Jul 19, 2006 7:58 am

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

Post by Richard Allbert » Wed Sep 20, 2017 4:17 am

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.

Post Reply