Using Neural Network or Syzygy tables

Discussion of chess software programming and technical issues.

Moderator: Ras

JacquesRW
Posts: 124
Joined: Sat Jul 30, 2022 12:12 pm
Full name: Jamie Whiting

Re: Using Neural Network or Syzygy tables

Post by JacquesRW »

OliverBr wrote: Wed Jun 04, 2025 12:41 pm I partly agree. But on the other hand a engine with Texel's tuning methods needs at least a decent evaluation method.
I don't see those in a lot of recent "shooting stars".
Being uninterested in HCE is simply a personal preference, and of these "shooting stars" that do show an interest they become incredibly strong with HCE anyway:
Integral (which then adopted NNUE after the linked release): https://computerchess.org.uk/ccrl/404/c ... l_4_64-bit
Sirius: https://computerchess.org.uk/ccrl/404/c ... 8_0_64-bit
Perseus: https://computerchess.org.uk/ccrl/404/c ... 1_1_64-bit
OliverBr wrote: Wed Jun 04, 2025 12:41 pm 3. Use any NN
Taking an NN from another engine is not something that is accepted. Your engine will simply not be tested at any rating lists if you do so and if you interact with the engine dev community on discord you'll be directed to immediately ditch the copied net and to train one yourself.
OliverBr
Posts: 751
Joined: Tue Dec 18, 2007 9:38 pm
Location: Munich, Germany
Full name: Dr. Oliver Brausch

Re: Using Neural Network or Syzygy tables

Post by OliverBr »

JacquesRW wrote: Wed Jun 04, 2025 4:44 pm Taking an NN from another engine is not something that is accepted. Your engine will simply not be tested at any rating lists if you do so and if you interact with the engine dev community on discord you'll be directed to immediately ditch the copied net and to train one yourself.
I see. So every engine has to create an NN of its own. This sound sensible.
Does this engine need an evaluation function to create the NN?
Does it need code to create the NN?
Chess Engine OliThink: http://brausch.org/home/chess
OliThink GitHub:https://github.com/olithink
JacquesRW
Posts: 124
Joined: Sat Jul 30, 2022 12:12 pm
Full name: Jamie Whiting

Re: Using Neural Network or Syzygy tables

Post by JacquesRW »

OliverBr wrote: Wed Jun 04, 2025 8:53 pm Does this engine need an evaluation function to create the NN?
You can train from a randomly initialised network or similar if you so wish, its simply a gimmick that will become unnoticeable after a few iterations of data generation. I think most people probably start with their HCE anyway.
OliverBr wrote: Wed Jun 04, 2025 8:53 pm Does it need code to create the NN?
For training, no. I am the author of bullet (https://github.com/jw1912/bullet) which is the most popular training library among the top 50 chess engines by some large margin. You may write your own training code if you wish, but it is time consuming and there simply doesn't exist any trainer that can compete with bullet in terms of training speed for NNUE training (thanks to e.g. https://github.com/jw1912/bullet/blob/m ... -fusion.md) and ease-of-use/features. Shameless plug over.

It is generally widely accepted that an engine developer should write their own code to use the neural network in their actual engine (efficient updates and inference), though there's few distinct ways to do that so you will find little variation.

The real point of contention is whether an engine should produce its own data. Many engines use data produced by leela chess zero. Regardless of where you fall on this there is still a lot of variety/experimentation that can be achieved simply in the training process itself.

At the end of the day modern chess engine dev is an extremely communal activity (reminder to join the discord servers that are 1000x more active than this site!) so there is bound to be a high degree of convergence between top engines - but that does not mean that new engine devs are simply copy-pasting and giving nothing back.
User avatar
lithander
Posts: 915
Joined: Sun Dec 27, 2020 2:40 am
Location: Bremen, Germany
Full name: Thomas Jahn

Re: Using Neural Network or Syzygy tables

Post by lithander »

JacquesRW wrote: Thu Jun 05, 2025 7:57 pm The real point of contention is whether an engine should produce its own data. Many engines use data produced by leela chess zero. Regardless of where you fall on this there is still a lot of variety/experimentation that can be achieved simply in the training process itself.
Generating and filtering quality training data is an art in itself! There are many variables. I've used selfplay matches from Leorik's HCE for the first NNUE version. But then it struck me as more beautiful to create a strong net from nothing: Start with a random mover, label each position in these stumbling and bumbling games with it's eventual outcome (Win/Draw/Loss) and train a neural network on that. Use that network's evaluation and search to bias the random choices towards what seems winning for the side to move and record more games. Repeat the process for a dozen generations and watch your computer program rediscover, and ultimately surpass, human chess knowledge. (most recently my data seems to be en par with what's sourced from Leela chess zero which I'm a bit proud of)
JacquesRW wrote: Thu Jun 05, 2025 7:57 pm At the end of the day modern chess engine dev is an extremely communal activity so there is bound to be a high degree of convergence between top engines - but that does not mean that new engine devs are simply copy-pasting and giving nothing back.
Imho the shooting star devs show a lot of deep understanding of the state of the art of computer chess programming. And that's the foundation of any meaningful contribution to the field. That they share a tool like bullet doesn't mean they outsource critical parts of chess engine development. There are 35 forks of that trainer and 367 closed pull requests. Bullet just a demonstration of how collaboration advances a field beyond what a bunch of grizzled lonewolfs could achieve on their own! ;)
Minimal Chess (simple, open source, C#) - Youtube & Github
Leorik (competitive, in active development, C#) - Github & Lichess
OliverBr
Posts: 751
Joined: Tue Dec 18, 2007 9:38 pm
Location: Munich, Germany
Full name: Dr. Oliver Brausch

Re: Using Neural Network or Syzygy tables

Post by OliverBr »

JacquesRW wrote: Thu Jun 05, 2025 7:57 pm
For training, no. I am the author of bullet (https://github.com/jw1912/bullet) which is ...
This a really a great achievement and I am taking off my hat.
You really are a game changer.
...the most popular training library among the top 50 chess engines by some large margin.
I know. And there lies my issue a little. All those "top" engines they rely on your genius. Could they do it (3600 ELO) without your software?
This is the question not yet answered.

Crafty, Glaurung and finally Stockfish, even Fruit... they didn't relay on a third party software to be one of the greatest engines ever= Everything was original.. developped in decades.
Chess Engine OliThink: http://brausch.org/home/chess
OliThink GitHub:https://github.com/olithink
OliverBr
Posts: 751
Joined: Tue Dec 18, 2007 9:38 pm
Location: Munich, Germany
Full name: Dr. Oliver Brausch

Re: Using Neural Network or Syzygy tables

Post by OliverBr »

lithander wrote: Fri Jun 06, 2025 12:31 pm That they share a tool like bullet doesn't mean they outsource critical parts of chess engine development.
There is probably some misunderstanding, because I don't call in to question all those engines using bullet and bringing them to top performance. They make a tremendous effort. But, also, they actually do outsource parts of the science. This is just my opinion. Whenever I git cloned such engine, calling "make" results in some net being downloaded, too.

There is nothing wrong in itself with it, every engine I have checked, they mention the outsourcing.
But: Can they be compared to other engines, who don't use this methods? All those CCRL List don't differentiate.
Chess Engine OliThink: http://brausch.org/home/chess
OliThink GitHub:https://github.com/olithink
JacquesRW
Posts: 124
Joined: Sat Jul 30, 2022 12:12 pm
Full name: Jamie Whiting

Re: Using Neural Network or Syzygy tables

Post by JacquesRW »

OliverBr wrote: Fri Jun 06, 2025 5:30 pm Could they do it (3600 ELO) without your software?
I think bullet is playing primarily a mechanical role, just providing the tools to do things quickly (both in training and development time). Without it top engine devs would adapt by e.g. writing a pytorch-based trainer - it would simply be much slower and there'd by 50 versions of tooling in existence. The core training process is not inherently that complicated and most of the finesse in producing a high elo network is not being supplied by me directly - I just make it run fast.
There is some argument to be made that many new devs will verbatim copy some of the examples (https://github.com/jw1912/bullet/tree/main/examples) or other engines' training process - though recently there's been a tendency for top engine devs to keep their training process private.
op12no2
Posts: 545
Joined: Tue Feb 04, 2014 12:25 pm
Location: Gower, Wales
Full name: Colin Jenkins

Re: Using Neural Network or Syzygy tables

Post by op12no2 »

I agree; bullet turns ideas into reality, just like a compiler does; using it is a time-saving decision, not a an outsourcing of ideas.

(And the NN idea-space is far richer than HCE).
JacquesRW
Posts: 124
Joined: Sat Jul 30, 2022 12:12 pm
Full name: Jamie Whiting

Re: Using Neural Network or Syzygy tables

Post by JacquesRW »

op12no2 wrote: Fri Jun 06, 2025 9:32 pm I agree; bullet turns ideas into reality, just like a compiler does;
Part of bullet is an optimising ML compiler :), albeit a little lacking in the codegen department at the moment (mostly network graph-level optimisations).
Shortly I'll acquire a lot more free time (finishing uni) and I aim to improve that aspect much further.
op12no2
Posts: 545
Joined: Tue Feb 04, 2014 12:25 pm
Location: Gower, Wales
Full name: Colin Jenkins

Re: Using Neural Network or Syzygy tables

Post by op12no2 »

OliverBr wrote: Fri Jun 06, 2025 5:44 pm But: Can they be compared to other engines, who don't use this methods? All those CCRL List don't differentiate.
Yes, absolutely they can; there is an infinite space of ideas available within NN and using an off-the-shelf trainer that can accommodate your ideas just saves you time (in my case two orders of magnitude!).

I have to admit though, that I would like to see more classification within the rating lists, but when you start thinking about it, it's a can of worms...