Is chess programming now boring ???

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

Dann Corbit
Posts: 12583
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Re: Is chess programming now boring ???

Post by Dann Corbit »

I will never be bored with chess.
I can get bored of watching two computers "slug each other stupid" to a draw over and over.
But that's not the same thing.
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.
AndrewGrant
Posts: 1793
Joined: Tue Apr 19, 2016 6:08 am
Location: U.S.A
Full name: Andrew Grant

Re: Is chess programming now boring ???

Post by AndrewGrant »

Chess programming is only boring when you spend too long traveling the already beaten path.

The real joy is when you find something novel for yourself, that is not out in the wild. Sometimes that can mean strength improvements that are not yet known by the rest of the community -- or maybe that just means granting your engine some functionality that provides value to a human user.

If you find yourself getting bored, I would encourage you to take a step back and starting thinking weirder
#WeAreAllDraude #JusticeForDraude #RememberDraude #LeptirBigUltra
"Those who can't do, clone instead" - Eduard ( A real life friend, not this forum's Eduard )
Dann Corbit
Posts: 12583
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Re: Is chess programming now boring ???

Post by Dann Corbit »

I think some believe the sizzle is gone because eval calculation is now fully automatic. It's just computers gobbling up electricity for hours and hours and spitting out a pile of nodes to figure out whether a move is good or not.
I think that change is wonderful. Chess programmers were frightfully jealous of their eval functions, imagining that they were the only ones to think about things like king safety and bishop pairs. Every eval term in every engine was already discussed in books and papers but people really got their nose out of joint if you used some term from their eval.

Fortunately, all of the science of chess programming is in the search. Reduce the branching factor without throwing away the good nodes and you have advanced the art. But please don't throw a cross-eyed hissy fit if someone uses your idea (you do have the right to be furious if they cut and paste, and especially if they do not credit you in the code and in their release notes).

With the new architecture of AMD, it will be possible for GPUs and CPUs to transparently access the same memory. Now THAT is exciting. It offers opportunities to do things that were unimaginable without that ability. You could use the GPUs for "ludicrous speed" move generation. Imagine, if you will, Ankan Ban's GPU perft algorithm adopted to an AND/OR search to find mates. It might be possible to find mate in 30 in a fraction of a second, with proof that it is minimal. The perft calculation part could be pure GPU and the search could be multi-threaded CPU proof search.

To me, the one thing that really irritated me about chess programming (the jealous guarding of the eval) is now thrust into the dust bin. Except for those that imagine that only engine X can use nodes generated by engine X, because, after all, that math belongs to the author.
Another illness that will probably pervade the scene for decades.

I wonder if someone has tried using Bojun Guo's gigantic analysis file to tune a network. I bet it would produce a dandy.
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.
laurietunnicliffe
Posts: 19
Joined: Wed Nov 17, 2021 1:19 am
Full name: Laurie Tunnicliffe

Re: Is chess programming now boring ???

Post by laurietunnicliffe »

If 2 chess players where to look ahead, say 6 moves and then open a huge database to look up what the resulting position
was worth......well it wouldn't really be chess, and the winner would be the one who could look ahead the furthest.
I guess it comes down to....we get the most success with computers using brute force rather than "thinking".
I don't see that as creative programming anymore.
Dann Corbit
Posts: 12583
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Re: Is chess programming now boring ???

Post by Dann Corbit »

laurietunnicliffe wrote: Fri Mar 29, 2024 3:31 am If 2 chess players where to look ahead, say 6 moves and then open a huge database to look up what the resulting position
was worth......well it wouldn't really be chess, and the winner would be the one who could look ahead the furthest.
This has always been the case, including when humans are playing.
I guess it comes down to....we get the most success with computers using brute force rather than "thinking".
I don't see that as creative programming anymore.
Chess engines have never been thinking. If it ever does happen, that will be a long way off.
The invention of alpha-beta was very creative.
The invention of null move heuristic was very creative.
The invention of multi-cut was very creative.
The invention of prob-cut was very creative.
The invention of futility pruning was very creative.
The invention of LMR was extremely creative.

The invention of bishop pair evaluation was ancient and just had to be typed into the computer
The invention of king safety evaluation was ancient and just had to be typed into the computer
The invention of space bonus was ancient and just had to be typed into the computer
The invention of control of the center was ancient and just had to be typed into the computer
The invention of mobility was ancient and just had to be typed into the computer.
I will admit that the invention of material imbalance calculations was recent and creative, that data point is a sport
Piece square tables are kind of new, but not very exciting in my opinion
If your idea of creative computing is typing stuff in from some chess book, then yes, chess programming is doomed.
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.
User avatar
hgm
Posts: 27879
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Is chess programming now boring ???

Post by hgm »

Sorry, Dann, but mot of that is complete nonsense. Of course Chess books would advice you to keep your King safe, but that is a long way from having an algorithm to calculate a number that roughly corresponds to the human intuitive idea of safety. And that the value of a piece could depend on its location (=PST) is ancient knowledge: all chess books advise you to not put Knights on endge squares.

Having to design methods for calculating King safety does require great creativity, and in fact no one succeeded very well in it, as evidenced by the fact that NNUE does it so much better. It is not comparable with always using the same evaluation function

Code: Select all

int Eval(){for(int i=0;i<=1e6;i++){for(int s=B[i],j=0;j<N[i];j++)s+=W[i][j]*A[INP[i][j]];A[i]=(char)s;}return A[1e6];}
and showing that a million positions where the King was apparently safe because in the end it was not checkmated.

Chess players will use alpha-beta all the time, and when analyzing a position will look at you like you are crazy when you ask them a question about a variation that alpha-beta would prune. (A: "I cannot move my Pawn to that unprotected square; he would just capture it! ". B: "Are you sure? If he refrains from capturing the Pawn, but directly goes for your King, you might even get checkmated in 5 moves." A: "Uhh? Isn't losing a Pawn not bad enough for you, then?" )

Likewise, chess players have always been using null move, for detect threats and planning their own multi-move goals.
Dann Corbit
Posts: 12583
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Re: Is chess programming now boring ???

Post by Dann Corbit »

Of course you're right. The big mistake I have been making in this thread is thinking what is most interesting to me is the most interesting to other people. I do remember some years ago a very promising chess programmer quit in disgust saying, "The winning program is the one that has collected the most tricks." And the Mint programmer said, "Don't write chess engines, choose life!" So Lauri is not alone in her irritation with chess programming.
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.
Dann Corbit
Posts: 12583
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Re: Is chess programming now boring ???

Post by Dann Corbit »

P.S. I have read Knuth's "Sorting and Searching" several times and done all the exercises in mix. I wrote the sorting chapter for the book "C Unleashed." And I work for a database company where I often write sorting and searching algorithms. I have written a radix sort that will sort 8 byte integers in 2*N operations, and a merge sort that never reads and writes the data more than twice, no matter how many items are in the original data set. I wrote a sort of magical btree that beats a hash table unless the data set is enormous. So as you can see, sorting and searching is in my blood.
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.
User avatar
hgm
Posts: 27879
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Is chess programming now boring ???

Post by hgm »

Dann Corbit wrote: Fri Mar 29, 2024 5:03 pm Of course you're right. The big mistake I have been making in this thread is thinking what is most interesting to me is the most interesting to other people. I do remember some years ago a very promising chess programmer quit in disgust saying, "The winning program is the one that has collected the most tricks." And the Mint programmer said, "Don't write chess engines, choose life!" So Lauri is not alone in her irritation with chess programming.
Well, the list you presented was not about what we think is interesting, but which were brilliant discoveries versus implementation of ancient knowledge. Which is not nearly as subjective. Personally search has always appealed to me much more than evaluation too.

But training neural networks has nothing to do with programming. It is data analysis. And LC0 shapes the search with the aid of a NN too, so the search innovations you mentioned also no longer play a role there.
Dann Corbit
Posts: 12583
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Re: Is chess programming now boring ???

Post by Dann Corbit »

hgm wrote: Fri Mar 29, 2024 6:15 pm {snip}
And LC0 shapes the search with the aid of a NN too, so the search innovations you mentioned also no longer play a role there.
I was not aware of that. I remember the original paper on NN evaluation also suggested using an NN to direct the search.
Fascinating that this has happened.
I wonder if that technique is generalized for other searching problems.
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.