@Discord guys: What is modern chess programming about?

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

Moderators: hgm, Rebel, chrisw

connor_mcmonigle
Posts: 543
Joined: Sun Sep 06, 2020 4:40 am
Full name: Connor McMonigle

Re: @Discord guys: What is modern chess programming about?

Post by connor_mcmonigle »

It's entirely unclear why a search idea being unrelated to chess somehow diminishes said idea. Most search ideas have little to do with chess and generalize quite well to other chess-like games.
Viz
Posts: 119
Joined: Tue Apr 09, 2024 6:24 am
Full name: Michael Chaly

Re: @Discord guys: What is modern chess programming about?

Post by Viz »

connor_mcmonigle wrote: Sun Apr 28, 2024 1:41 am It's entirely unclear why a search idea being unrelated to chess somehow diminishes said idea. Most search ideas have little to do with chess and generalize quite well to other chess-like games.
For example shogi engines were using more or less stockfish search vebratim and payed back with NNUE, isn't this pretty incredible?
User avatar
Rebel
Posts: 7040
Joined: Thu Aug 18, 2011 12:04 pm
Full name: Ed Schröder

Re: @Discord guys: What is modern chess programming about?

Post by Rebel »

Yep, NNUE changed everything.
90% of coding is debugging, the other 10% is writing bugs.
connor_mcmonigle
Posts: 543
Joined: Sun Sep 06, 2020 4:40 am
Full name: Connor McMonigle

Re: @Discord guys: What is modern chess programming about?

Post by connor_mcmonigle »

Rebel wrote: Sun Apr 28, 2024 7:03 am Yep, NNUE changed everything.
I agree that NNUE was a paradigm shift. However, my point was that most search heuristics are not specific to chess and this has been the case since the inception of chess programming. Therefore, comments like "There’s no chess involved, all that got done years ago" are non sequiturs.
User avatar
towforce
Posts: 11751
Joined: Thu Mar 09, 2006 12:57 am
Location: Birmingham UK

Re: @Discord guys: What is modern chess programming about?

Post by towforce »

connor_mcmonigle wrote: Sun Apr 28, 2024 1:41 am It's entirely unclear why a search idea being unrelated to chess somehow diminishes said idea. Most search ideas have little to do with chess and generalize quite well to other chess-like games.

Let's add to that: in 1776, Adam Smith, the first economist, published his classic book, "The Wealth Of Nations". In it, he wrote about how larger companies were able to have people who specialised in different areas (link).

So... "modern chess programming" is about applying the observations Adam Smith made in 1776 to the development of chess software.

Everything is awesome
Everything is cool when you're part of a team..


The simple reveals itself after the complex has been exhausted.
smatovic
Posts: 2798
Joined: Wed Mar 10, 2010 10:18 pm
Location: Hamburg, Germany
Full name: Srdja Matovic

Re: @Discord guys: What is modern chess programming about?

Post by smatovic »

chrisw wrote: Sun Apr 28, 2024 1:09 am [...]
Given the low ratio of “successful” patches to patches, can we describe this search improvement process as alike the 50 monkeys with 50 keyboards and 50 years? Or is there a rational process by means of which we can describe the progress of the patch army as based on judgement rather than luck?
I could describe my first backgammon program as 50 monkey jog, small net, random perturb weights, keep a fraction of the perturbation if winning, repeat. The overall process had rationality, the individuals steps were random plus luck.
An example of old school chess guided development would be a mobility function. We understand mobility is good, we can take a shot at measuring mobility in various ways. Hey this works.
The monkey and the keyboard metaphor is a good one for the try and error approach.

A room with 12 monkeys + 12 typewriters + infinity -> a lot of Shakespeare.

I implemented a handful of search algorithms on GPU, and looking back, it was pretty much monkey like ;) to stubbornly explore different branches, try and error.

A room with 12 monkeys + 12 keyboards + infinity -> a lot of chess engines ;)

--
Srdja

PS: https://en.wikipedia.org/wiki/Infinite_monkey_theorem
chrisw
Posts: 4360
Joined: Tue Apr 03, 2012 4:28 pm

Re: @Discord guys: What is modern chess programming about?

Post by chrisw »

connor_mcmonigle wrote: Sun Apr 28, 2024 1:41 am It's entirely unclear why a search idea being unrelated to chess somehow diminishes said idea. Most search ideas have little to do with chess and generalize quite well to other chess-like games.
Of course chess search ideas generalise to Chinese Chess and Japanese Chess. Apart from drop pieces the games are more or less identical but with specifically minor different move maps. Chess search ideas are mostly specific to chess (material, mobility, alternating play). Anything pruning/extending against alpha or beta (which is a major part of search) involves material concept and check king safety concept, including null move and probcut. SEE is very chess specific. Hanging pieces/forks/new attacks/mate threats likewise. LMR rules contain material elements and check/activity elements. Historical statistics in search are dependent on things not changing too much if a few different moves get played and that is going to be a function of the game type. Chess succumbs, but just try it with Othello.
Transfer to other two player games is problematic, and transfer to other chess forms requires rewrites of the testing criteria.
Certainly we used and thought about chess when developing all this stuff. Hash and minimax (ab) algorithm don’t require chess thoughts and calculations, but the other stuff surely does.

Anyway, we’re not trying to diminish ideas, but it’s worth pointing out that the original chess based ideas were based on human thinking power, while many of the 0.5 Elo “ideas” and just the result of getting lucky on the occasional random 50 monkey shot. Actually the why of any one working to 0.5 Elo is not even human explainable. It just luckily does, based on a trillion other interactions.
So there’s the difference, you either think the idea up, based on chess and knowledge, in which case the change is explicable, or you get lucky with a random monkey strike. Increasingly the latter.
connor_mcmonigle
Posts: 543
Joined: Sun Sep 06, 2020 4:40 am
Full name: Connor McMonigle

Re: @Discord guys: What is modern chess programming about?

Post by connor_mcmonigle »

chrisw wrote: Mon Apr 29, 2024 2:27 pm
connor_mcmonigle wrote: Sun Apr 28, 2024 1:41 am It's entirely unclear why a search idea being unrelated to chess somehow diminishes said idea. Most search ideas have little to do with chess and generalize quite well to other chess-like games.
Of course chess search ideas generalise to Chinese Chess and Japanese Chess. Apart from drop pieces the games are more or less identical but with specifically minor different move maps. Chess search ideas are mostly specific to chess (material, mobility, alternating play). Anything pruning/extending against alpha or beta (which is a major part of search) involves material concept and check king safety concept, including null move and probcut. SEE is very chess specific. Hanging pieces/forks/new attacks/mate threats likewise. LMR rules contain material elements and check/activity elements. Historical statistics in search are dependent on things not changing too much if a few different moves get played and that is going to be a function of the game type. Chess succumbs, but just try it with Othello.
Transfer to other two player games is problematic, and transfer to other chess forms requires rewrites of the testing criteria.
Certainly we used and thought about chess when developing all this stuff. Hash and minimax (ab) algorithm don’t require chess thoughts and calculations, but the other stuff surely does.

Anyway, we’re not trying to diminish ideas, but it’s worth pointing out that the original chess based ideas were based on human thinking power, while many of the 0.5 Elo “ideas” and just the result of getting lucky on the occasional random 50 monkey shot. Actually the why of any one working to 0.5 Elo is not even human explainable. It just luckily does, based on a trillion other interactions.
So there’s the difference, you either think the idea up, based on chess and knowledge, in which case the change is explicable, or you get lucky with a random monkey strike. Increasingly the latter.
That's why I said chess-like games. However, late move pruning, late move reductions, static null move pruning, singular extensions, etc are not specific to chess - they're far more abstract and even applicable to relatively "non-chess-like" two player board games such as ataxx. The most impactful ideas in chess engine programming are those that are entirely decoupled from chess.

Developers are not a monolith, though I agree that the "0.5 Elo monkey patches" you refer to are a real phenomenon. For example, here's a recent Seer patch where I use an online learning scheme to dynamically adjust the evaluation based on a semantic hash of the internal NN representation of the position state (where the dynamic adjustment is updated based on search results):

https://github.com/connormcmonigle/seer ... 9ba4f5ac1f

This passed on the first try, following a fair bit of qualitative analysis of different semantic hashing schemes. I'd argue this has nothing to do with chess.
Viz
Posts: 119
Joined: Tue Apr 09, 2024 6:24 am
Full name: Michael Chaly

Re: @Discord guys: What is modern chess programming about?

Post by Viz »

Also note that despite me coding correction history looking at seer code implementation of it in stockfish that eventually passed looks nothing like seers or literally any other engine in details - normal stats instead of running average, filtering out positions with captures, using it as a quadratic function and not linear, etc.
chrisw
Posts: 4360
Joined: Tue Apr 03, 2012 4:28 pm

Re: @Discord guys: What is modern chess programming about?

Post by chrisw »

Viz wrote: Mon Apr 29, 2024 3:54 pm Also note that despite me coding correction history looking at seer code implementation of it in stockfish that eventually passed looks nothing like seers or literally any other engine in details - normal stats instead of running average, filtering out positions with captures, using it as a quadratic function and not linear, etc.
What is correction history?