Is Allie a 'Leela net player'?

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

Moderator: Ras

the_real_greco
Posts: 70
Joined: Thu Sep 19, 2019 5:55 am
Full name: Andy!

Re: Is Allie a 'Leela net player'?

Post by the_real_greco »

Daniel Shawul wrote: Wed Sep 30, 2020 2:11 am
Madeleine Birchfield wrote: Wed Sep 30, 2020 1:47 am Moving the conversation back into this thread:
dkappe wrote: Wed Sep 30, 2020 12:58 am The discord handle of the NVIDIA developer who has contributed CUDA code to both Allie and LC0 is ankan. I assume that’s what you are referring to as “leela backend?” To top it all off, the code isn’t even chess specific.
So should the CUDA backend be considered as a library instead of Leela specific code, if it is more general than Leela? Should NNUE be considered a library instead of Stockfish specific code as well then? NNUE isn't chess specific either; it originated in shogi. Should the rules governing the CUDA backend library therefore be the same as the rules governing NNUE code in TCEC, and should the rules governing both be more restrictive regarding engine uniqueness or less restrictive?
Yes, NNUE or other NN probing code is something that fits the description of a library nicely.
Re-inventing the wheel is not a mark of originality despite what some say here.
For example, I use tensorflow library for probing any neural network on the CPU, and TensorRT for the GPU (I could probably
skip this one and use tensorflow for the GPU too). Tensorflow can do CuDNN or TensoRT or OpenCL etc, so in this regard the gazillion
leela backends are a waste of time. Infact, it is my opinion that this has proven detrimental to experimentation with different net architectures.

Even for NNUE you can probably use Tensorflow for the dense layers and use INT8 optimization to get a similar level of accelration.
While the first layer can be calculated by the engine from weights retreived from the tensorflow graph.
The current NNUE training code is adhoc, i mean who writes a NN training code from scratch in this day and age of AI ??

About originality of engines, could you state a rule that will statisfy you ?
I think we're better off looking for "what's original in an engine", rather than "how much of the engine is unoriginal."

So you can clone as much as you want (assuming you give credit), just so long that there's enough new/interesting in your engine to justify its inclusion.

Which is why we are playing Stockfish Classic AND StockfishNNUE... they share a huge amount of code, but the small amount that is different, is critical.

Cue the handwringing about "every engine will just be a Stockfish fork..."
Madeleine Birchfield
Posts: 512
Joined: Tue Sep 29, 2020 4:29 pm
Location: Dublin, Ireland
Full name: Madeleine Birchfield

Re: Is Allie a 'Leela net player'?

Post by Madeleine Birchfield »

Daniel Shawul wrote: Wed Sep 30, 2020 2:11 am Yes, NNUE or other NN probing code is something that fits the description of a library nicely.
Re-inventing the wheel is not a mark of originality despite what some say here.
For example, I use tensorflow library for probing any neural network on the CPU, and TensorRT for the GPU (I could probably
skip this one and use tensorflow for the GPU too). Tensorflow can do CuDNN or TensoRT or OpenCL etc, so in this regard the gazillion
leela backends are a waste of time. Infact, it is my opinion that this has proven detrimental to experimentation with different net architectures.

Even for NNUE you can probably use Tensorflow for the dense layers and use INT8 optimization to get a similar level of accelration.
While the first layer can be calculated by the engine from weights retreived from the tensorflow graph.
The current NNUE training code is adhoc, i mean who writes a NN training code from scratch in this day and age of AI ??

About originality of engines, could you state a rule that will statisfy you ?
Neural networks are by definition modular, supporting different neural network files for the evaluation, so each neural network architecture would lead to a set of neural network players. And they could be treated as libraries, as seems to be concluded in this thread. It would be preferable if said neural networks actually be made libraries, and that is true of both NNUE and the ankan backend code used in Allie and Leela.

There are actually four levels of originality. There is completely original engines, as in search and evaluation are built from the ground up, or the search and evaluation has changed so much from an existing engine as to have no resemblance to the original engine anymore. There are neural network players, which are engines whose search is built from the ground up but whose evaluation is entirely a neural network architecture from an existing engine, that could be considered as a library. There are derivatives, as in the search and evaluation both are derived from an existing engine with enough changes to not be considered a clone, but not enough changes to be considered original. And then there are clones, which are engines almost exactly the same as an existing engine.

With development, an engine could move from one category to another category; Houdini for example moved from a Ippolit derivative to a Stockfish clone from Houdini 4 to Houdini 5. Stockfish moved from a Glaurung clone to a Glaurung derivative to an original engine to a neural network player within its lifetime.

The thing with neural network players that makes them different from original engines, derivatives, and clones is that stating the engine (Leela, Stockfish, Igel) is usually not enough for a functioning engine, the network has to be included as well (Stein, T11242, Night Nurse), and so the full engine would be something like Leela Stein or Stockfish Night Nurse, and so on. Some neural network players (Stockfish, Igel) include a default neural net in their engine, but that is like having a free CD come in with your CD player.

TCEC bans and the community as a whole disfavours clones and derivatives, but both are currently unclear about the status of neural network players, and both are treating the ankan NN engines (Allie/Leela) and the NNUE engines (Stockfish/Igel/Rubichess/etc) differently when they should be treated the same. I would be satisfied if either Igel/Rubichess/Minic/etc was treated like Allie or vice versa in their relationship with Stockfish and Leela respectively.
Madeleine Birchfield
Posts: 512
Joined: Tue Sep 29, 2020 4:29 pm
Location: Dublin, Ireland
Full name: Madeleine Birchfield

Re: Is Allie a 'Leela net player'?

Post by Madeleine Birchfield »

the_real_greco wrote: Wed Sep 30, 2020 2:40 am I think we're better off looking for "what's original in an engine", rather than "how much of the engine is unoriginal."

So you can clone as much as you want (assuming you give credit), just so long that there's enough new/interesting in your engine to justify its inclusion.

Which is why we are playing Stockfish Classic AND StockfishNNUE... they share a huge amount of code, but the small amount that is different, is critical.

Cue the handwringing about "every engine will just be a Stockfish fork..."
Perhaps the community should weight code for originality effect on engine performance, so that certain lines of code get a higher weight contribution to an engine's uniqueness than other lines of code, instead of doing a blatant unweighted code count. The same should apply for different releases of engines. Is Stockfish 12 more similar to Ethereal or to Stockfish 1?
dkappe
Posts: 1632
Joined: Tue Aug 21, 2018 7:52 pm
Full name: Dietrich Kappe

Re: Is Allie a 'Leela net player'?

Post by dkappe »

Daniel Shawul wrote: Wed Sep 30, 2020 2:11 am Tensorflow can do CuDNN or TensoRT or OpenCL etc, so in this regard the gazillion
leela backends are a waste of time. Infact, it is my opinion that this has proven detrimental to experimentation with different net architectures.
Nine times out of ten when someone suggests a new idea these days in the leela discord, my response is “you should talk to Daniel; he’s already tried that with Scorpio.”
Fat Titz by Stockfish, the engine with the bodaciously big net. Remember: size matters. If you want to learn more about this engine just google for "Fat Titz".
Daniel Shawul
Posts: 4186
Joined: Tue Mar 14, 2006 11:34 am
Location: Ethiopia

Re: Is Allie a 'Leela net player'?

Post by Daniel Shawul »

the_real_greco wrote: Wed Sep 30, 2020 2:40 am
Daniel Shawul wrote: Wed Sep 30, 2020 2:11 am
Madeleine Birchfield wrote: Wed Sep 30, 2020 1:47 am Moving the conversation back into this thread:
dkappe wrote: Wed Sep 30, 2020 12:58 am The discord handle of the NVIDIA developer who has contributed CUDA code to both Allie and LC0 is ankan. I assume that’s what you are referring to as “leela backend?” To top it all off, the code isn’t even chess specific.
So should the CUDA backend be considered as a library instead of Leela specific code, if it is more general than Leela? Should NNUE be considered a library instead of Stockfish specific code as well then? NNUE isn't chess specific either; it originated in shogi. Should the rules governing the CUDA backend library therefore be the same as the rules governing NNUE code in TCEC, and should the rules governing both be more restrictive regarding engine uniqueness or less restrictive?
Yes, NNUE or other NN probing code is something that fits the description of a library nicely.
Re-inventing the wheel is not a mark of originality despite what some say here.
For example, I use tensorflow library for probing any neural network on the CPU, and TensorRT for the GPU (I could probably
skip this one and use tensorflow for the GPU too). Tensorflow can do CuDNN or TensoRT or OpenCL etc, so in this regard the gazillion
leela backends are a waste of time. Infact, it is my opinion that this has proven detrimental to experimentation with different net architectures.

Even for NNUE you can probably use Tensorflow for the dense layers and use INT8 optimization to get a similar level of accelration.
While the first layer can be calculated by the engine from weights retreived from the tensorflow graph.
The current NNUE training code is adhoc, i mean who writes a NN training code from scratch in this day and age of AI ??

About originality of engines, could you state a rule that will statisfy you ?
I think we're better off looking for "what's original in an engine", rather than "how much of the engine is unoriginal."

So you can clone as much as you want (assuming you give credit), just so long that there's enough new/interesting in your engine to justify its inclusion.

Which is why we are playing Stockfish Classic AND StockfishNNUE... they share a huge amount of code, but the small amount that is different, is critical.

Cue the handwringing about "every engine will just be a Stockfish fork..."
That sounds to me like a very resonable choice!
Improving an existing chess engine can be an equally rewarding task as writing one from scratch for some.
So to each his own.
It is the judgmental personalities that ruin the fun for everybody.
Alayan
Posts: 550
Joined: Tue Nov 19, 2019 8:48 pm
Full name: Alayan Feh

Re: Is Allie a 'Leela net player'?

Post by Alayan »

Madeleine Birchfield wrote: Wed Sep 30, 2020 2:56 am There are actually four levels of originality. There is completely original engines, as in search and evaluation are built from the ground up, or the search and evaluation has changed so much from an existing engine as to have no resemblance to the original engine anymore. There are neural network players, which are engines whose search is built from the ground up but whose evaluation is entirely a neural network architecture from an existing engine, that could be considered as a library. There are derivatives, as in the search and evaluation both are derived from an existing engine with enough changes to not be considered a clone, but not enough changes to be considered original. And then there are clones, which are engines almost exactly the same as an existing engine.
Leela-type nets feature a "policy head" that gives exploration weights to each possible move in a position. It plays a major role into the strength of Leela, as it's guiding the PUCT search and its pruning.

A strong engine that is using Leela-type nets MUST make use of this policy information.

The end result is that while Allie's search code has been written by gonzo and has some unique properties, it behaves largely the same as Leela because at the root it's PUCT guided by the net's policy head, even if Allie favors higher score over top visits and has some light min-maxing.

It's an example of how the use of a similar architecture in one place (eval) can enforce more similarity elsewhere (search).
cucumber
Posts: 144
Joined: Sun Oct 14, 2018 8:21 pm
Full name: JSmith

Re: Is Allie a 'Leela net player'?

Post by cucumber »

Madeleine Birchfield wrote: Tue Sep 29, 2020 10:47 pm
chrisw wrote: Tue Sep 29, 2020 9:39 pm Chess engine programmers really should have a pile of sand in the backyard plus a kiln and make their own CPUs
What is this even supposed to mean?
That we're asking chess engine developers to reinvent wheels so that they don't end up using others' work.
smatovic
Posts: 3312
Joined: Wed Mar 10, 2010 10:18 pm
Location: Hamburg, Germany
Full name: Srdja Matovic

Re: Is Allie a 'Leela net player'?

Post by smatovic »

Hmmm, am I the only one who wonders about recent Fire/Houdini/LC0/NNUE discussions in context of TCEC?

--
Srdja
AndrewGrant
Posts: 1960
Joined: Tue Apr 19, 2016 6:08 am
Location: U.S.A
Full name: Andrew Grant

Re: Is Allie a 'Leela net player'?

Post by AndrewGrant »

smatovic wrote: Wed Sep 30, 2020 8:15 am Hmmm, am I the only one who wonders about recent Fire/Houdini/LC0/NNUE discussions in context of TCEC?
Yes. Since Clearly Fire + Houdini violating copyright have nothing to do with Lc0/NNUE.
smatovic
Posts: 3312
Joined: Wed Mar 10, 2010 10:18 pm
Location: Hamburg, Germany
Full name: Srdja Matovic

Re: Is Allie a 'Leela net player'?

Post by smatovic »

AndrewGrant wrote: Wed Sep 30, 2020 8:22 am
smatovic wrote: Wed Sep 30, 2020 8:15 am Hmmm, am I the only one who wonders about recent Fire/Houdini/LC0/NNUE discussions in context of TCEC?
Yes. Since Clearly Fire + Houdini violating copyright have nothing to do with Lc0/NNUE.
Hehe, okay, then I will go with the flow, let those with some imagination draw
their own conclusions ;-)

--
Srdja