Page 1 of 2

Fat Fritz question

Posted: Sun Jul 18, 2021 6:17 pm
by Leo
How did Fat Fritz get so good? Did they steal from Stockfish code?

Re: Fat Fritz question

Posted: Sun Jul 18, 2021 7:10 pm
by brianr
There are two Fat Fritz engines.
The first used the Leela Chess project quite heavily.
The second FF2 used the Stockfish project with the relatively recent NNUE additions.
The primary person developing both is Albert Silver. See:
https://www.chessprogramming.org/Albert_Silver
note the links to Deus X aka Fat Fritz and FF2

Now, there have already been numerous posts about how appropriate these efforts were and I am not commenting on that at all.

However, I would like to point out that training any chess nets, especially strong nets in the top tier of strength, is far from trivial and includes both science and art: the input samples must be selected and the data prepared; the net architecture and sizes must be determined; the training hyper-parameters are also very important; and, the new nets must be measured v the prior nets.

I have been doing this myself since the Giraffe days and represents a major effort.
So, it is fair to say that both Fat Fritzes leveraged better than 90% of both the Lc0 and SF-NNUE project work.
The "value-add" was in the training and testing and takes many months of work.

BTW Lc0 nets are more difficult to train than SF NNUE nets, IMO.

Re: Fat Fritz question

Posted: Sun Jul 18, 2021 8:33 pm
by dkappe
brianr wrote: Sun Jul 18, 2021 7:10 pm
I have been doing this myself since the Giraffe days and represents a major effort..
You are the original developer of giraffe?

Re: Fat Fritz question

Posted: Sun Jul 18, 2021 8:55 pm
by brianr
Of course not, and I'm a bit surprised you don't know.
Matt Lai is the Giraffe author and went on to DeepMind and AZ.

https://www.chessprogramming.org/Giraffe

I got to where I could understand the code enough to get Giraffe training to start.
By the time I figured it out Leela Chess was starting up and everyone moved on at that point, IIRC.

You have trained far more nets than I have so would you say it is a significant amount of work?

Re: Fat Fritz question

Posted: Sun Jul 18, 2021 9:02 pm
by Sopel
brianr wrote: Sun Jul 18, 2021 7:10 pm However, I would like to point out that training any chess nets, especially strong nets in the top tier of strength, is far from trivial and includes both science and art: the input samples must be selected and the data prepared; the net architecture and sizes must be determined; the training hyper-parameters are also very important; and, the new nets must be measured v the prior nets.
It's trivial to train a net within a few elo points to the current best one using the public trainer, public data, and public instructions. It takes about 1 day on a good GPU. This has changed very little since FF2 has been released, as we were able to replicate its strength closely back then with little effort.

Re: Fat Fritz question

Posted: Sun Jul 18, 2021 9:09 pm
by brianr
I would hardly characterize it as trivial, even for the vastly simpler SF-NNUE type nets (as I mentioned).
Naturally, for both types of nets after you have done a few it does become pretty straightforward.

Re: Fat Fritz question

Posted: Sun Jul 18, 2021 9:47 pm
by scchess
Get a decent hardware. Download public data, save it. Get all the tools. Then follow command usage that one can easily find online or Stockfish discord channel. How hard is it as long as there is money for the hardware?

Re: Fat Fritz question

Posted: Sun Jul 18, 2021 10:36 pm
by Leo
brianr wrote: Sun Jul 18, 2021 7:10 pm There are two Fat Fritz engines.
The first used the Leela Chess project quite heavily.
The second FF2 used the Stockfish project with the relatively recent NNUE additions.
The primary person developing both is Albert Silver. See:
https://www.chessprogramming.org/Albert_Silver
note the links to Deus X aka Fat Fritz and FF2

Now, there have already been numerous posts about how appropriate these efforts were and I am not commenting on that at all.

However, I would like to point out that training any chess nets, especially strong nets in the top tier of strength, is far from trivial and includes both science and art: the input samples must be selected and the data prepared; the net architecture and sizes must be determined; the training hyper-parameters are also very important; and, the new nets must be measured v the prior nets.

I have been doing this myself since the Giraffe days and represents a major effort.
So, it is fair to say that both Fat Fritzes leveraged better than 90% of both the Lc0 and SF-NNUE project work.
The "value-add" was in the training and testing and takes many months of work.

BTW Lc0 nets are more difficult to train than SF NNUE nets, IMO.
OK. Thanks a lot. What does IMO stand for?

Re: Fat Fritz question

Posted: Sun Jul 18, 2021 11:02 pm
by dkappe
brianr wrote: Sun Jul 18, 2021 9:09 pm I would hardly characterize it as trivial, even for the vastly simpler SF-NNUE type nets (as I mentioned).
Naturally, for both types of nets after you have done a few it does become pretty straightforward.
As Sopel said, if you take the public data, etc., and just run the scripts, you basically get the master net, plus or minus some random variation. Zzzzzz.

If you use the data from other engines and build a somewhat different training framework (I’ve got a few laying about from non-chess pytorch projects) it’s a bit more challenging, especially if you have an order of magnitude less data than what the SF project brings to bear.

I’ve never been interested in training with stockfish data — there are already hundred or thousands of such nets. Especially with the new architecture, you can train nets that have a distinct style. That is what interests me. My favorite of the nets that I’ve trained is also by far the weakest: the Harmon net, trained on 2300+ FIDE human games with a dash of naive material q-search for sanity.

Re: Fat Fritz question

Posted: Mon Jul 19, 2021 8:18 am
by Tibono
Leo wrote: Sun Jul 18, 2021 10:36 pm OK. Thanks a lot. What does IMO stand for?
in my opinion, I guess.