@Discord guys: What is modern chess programming about?
Moderators: hgm, chrisw, Rebel
-
- Posts: 544
- Joined: Sun Sep 06, 2020 4:40 am
- Full name: Connor McMonigle
Re: @Discord guys: What is modern chess programming about?
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.
-
- Posts: 223
- Joined: Tue Apr 09, 2024 6:24 am
- Full name: Michael Chaly
Re: @Discord guys: What is modern chess programming about?
For example shogi engines were using more or less stockfish search vebratim and payed back with NNUE, isn't this pretty incredible?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.
-
- Posts: 7256
- Joined: Thu Aug 18, 2011 12:04 pm
- Full name: Ed Schröder
Re: @Discord guys: What is modern chess programming about?
Yep, NNUE changed everything.
90% of coding is debugging, the other 10% is writing bugs.
-
- Posts: 544
- Joined: Sun Sep 06, 2020 4:40 am
- Full name: Connor McMonigle
Re: @Discord guys: What is modern chess programming about?
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.
-
- Posts: 12106
- Joined: Thu Mar 09, 2006 12:57 am
- Location: Birmingham UK
- Full name: Graham Laight
Re: @Discord guys: What is modern chess programming about?
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..
Want to attract exceptional people? Be exceptional.
-
- Posts: 3021
- Joined: Wed Mar 10, 2010 10:18 pm
- Location: Hamburg, Germany
- Full name: Srdja Matovic
Re: @Discord guys: What is modern chess programming about?
The monkey and the keyboard metaphor is a good one for the try and error approach.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.
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
-
- Posts: 4585
- Joined: Tue Apr 03, 2012 4:28 pm
- Location: Midi-Pyrénées
- Full name: Christopher Whittington
Re: @Discord guys: What is modern chess programming about?
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.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.
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.
-
- Posts: 544
- Joined: Sun Sep 06, 2020 4:40 am
- Full name: Connor McMonigle
Re: @Discord guys: What is modern chess programming about?
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.chrisw wrote: ↑Mon Apr 29, 2024 2:27 pmOf 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.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.
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.
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.
-
- Posts: 223
- Joined: Tue Apr 09, 2024 6:24 am
- Full name: Michael Chaly
Re: @Discord guys: What is modern chess programming about?
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.
-
- Posts: 4585
- Joined: Tue Apr 03, 2012 4:28 pm
- Location: Midi-Pyrénées
- Full name: Christopher Whittington
Re: @Discord guys: What is modern chess programming about?
What is correction history?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.