Scaling of Lc0 at high Leela Ratio

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

Moderators: bob, hgm, Harvey Williamson

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
yanquis1972
Posts: 1762
Joined: Tue Jun 02, 2009 10:14 pm

Re: Scaling of Lc0 at high Leela Ratio

Post by yanquis1972 » Wed Nov 28, 2018 4:23 pm

yanquis1972 wrote:
Tue Nov 27, 2018 4:19 pm
curious about test30 scaling; imo it should be much closer to A0, at least at present.

using DM openings, 128MB hash, 3 cores/~7MN/s for SF8 & default settings for Lc0 w/ a GTX 1080 it scored 2W-4L-18D (-28 elo) @ 0+12s in the first batch of 24 games i ran. should be very roughly equivalent to 1s/move A0 matches.
2nd round +1 -2 =21 for test30, overall elo -21 to SF8. Raised TC to 0+15s, since in many positions Lc0 is only searching 4-6kns. After the 3rd round I’ll post opening evolution if there’s anything interesting

A0 was maybe +30 at the equivalent, so I’d assume test30 will surpass it, provided it scales as well.

Uri Blass
Posts: 8586
Joined: Wed Mar 08, 2006 11:37 pm
Location: Tel-Aviv Israel

Re: Scaling of Lc0 at high Leela Ratio

Post by Uri Blass » Wed Nov 28, 2018 5:23 pm

jp wrote:
Wed Nov 28, 2018 9:20 am
Uri Blass wrote:
Wed Nov 28, 2018 4:25 am
I totally dislike the MCTS algorithm because it means that you cannot see simple things like the fact that a move is leading to mate in 2 for the opponent.

Komodo MCTS did not see mate in 2 in the only game that it lost in TCEC when it played 44...Kxf7

I do not believe that the reason for AlphaZero's good results is the fact that they did not use the alphabeta and I believe that alphaZero can be stronger if they fix it to use a better algorithm that can see forced mates with a mate score in the same way that humans see.
But Komodo MCTS is using real MCTS for playing.
A0 & Lc0 are not, so you cannot really compare.
So what is the algorithm of A0 or LC0 and do you see mate scores with LC0(except maybe mate in 1 that even komodo MCTS saw in the game but earlier did a mistake that allowed mate in 2 inspite of having the mate line in the pv)?

Werewolf
Posts: 1193
Joined: Thu Sep 18, 2008 8:24 pm

Re: Scaling of Lc0 at high Leela Ratio

Post by Werewolf » Wed Nov 28, 2018 5:35 pm

jp wrote:
Wed Nov 28, 2018 9:20 am
Uri Blass wrote:
Wed Nov 28, 2018 4:25 am
I totally dislike the MCTS algorithm because it means that you cannot see simple things like the fact that a move is leading to mate in 2 for the opponent.

Komodo MCTS did not see mate in 2 in the only game that it lost in TCEC when it played 44...Kxf7

I do not believe that the reason for AlphaZero's good results is the fact that they did not use the alphabeta and I believe that alphaZero can be stronger if they fix it to use a better algorithm that can see forced mates with a mate score in the same way that humans see.
But Komodo MCTS is using real MCTS for playing.
A0 & Lc0 are not, so you cannot really compare.
can you explain the difference?

chrisw
Posts: 2087
Joined: Tue Apr 03, 2012 2:28 pm

Re: Scaling of Lc0 at high Leela Ratio

Post by chrisw » Wed Nov 28, 2018 5:46 pm

Uri Blass wrote:
Wed Nov 28, 2018 4:25 am
shrapnel wrote:
Tue Nov 27, 2018 1:52 pm
Looks like Lc0 is nowhere near AlphaZero levels.
Wish some AlphaZero team member would give a few anonymous tips the lc0 people, who seem to be floundering.
The wait goes on...
Oh well, let the Stockfishes and Komodos have their days in the Sun....while it lasts... mainly due to an abominable lack of interest in chess shown by the Google Teams.
But, I sense, that the Day is not far when the alpha-beta engines will go the way of the Dinosaurs...
Which will deliver the coup de grâce, lco, AlphaZero or a third, as yet unreleased Engine, remains to be seen...
I totally dislike the MCTS algorithm because it means that you cannot see simple things like the fact that a move is leading to mate in 2 for the opponent.

Komodo MCTS did not see mate in 2 in the only game that it lost in TCEC when it played 44...Kxf7

Every human who is not a beginner is going to see that there is a forced mate after 44...Kxf7 but Komodo played it with 29.91 score after 26 seconds with 185734 nodes.
I guess that A0 also show a similiar behaviour and it is clearly not the way that humans think.

http://legacy-tcec.chessdom.com/archive ... i=4&ga=183

I do not believe that the reason for AlphaZero's good results is the fact that they did not use the alphabeta and I believe that alphaZero can be stronger if they fix it to use a better algorithm that can see forced mates with a mate score in the same way that humans see.

Maybe it is possible to have some combination of alphabeta and MCTS but I find the pure MCTS to be an extremely stupid algorithm if it cannot see mate scores even for mates that humans can easily calculate.
Disagree here. It has been shown that given enough nodes, MCTS and minimax converge. Since alpha beta is just a faster, more efficient, version of minimax, that means alpha beta and MCTS converge too. It's therefore not correct to say that MCTS can't find mate in two. It can, it's a question only of the pruning/extension settings (exploration/exploitation). Also, I forgot to write, the effectiveness of the policy function of the AZ/LC0 neural network. With a 100% effective policy it will find mates and defences to mates. In practise, alpha-beta search nowadays, does masses more pruning than anyone could have imagined possible, and also misses many things. Alpha-beta, in practise, also has a "policy" function, which is also not 100% perfect.

Milos
Posts: 3387
Joined: Wed Nov 25, 2009 12:47 am

Re: Scaling of Lc0 at high Leela Ratio

Post by Milos » Wed Nov 28, 2018 10:22 pm

chrisw wrote:
Wed Nov 28, 2018 5:46 pm
Disagree here. It has been shown that given enough nodes, MCTS and minimax converge. Since alpha beta is just a faster, more efficient, version of minimax, that means alpha beta and MCTS converge too. It's therefore not correct to say that MCTS can't find mate in two. It can, it's a question only of the pruning/extension settings (exploration/exploitation). Also, I forgot to write, the effectiveness of the policy function of the AZ/LC0 neural network. With a 100% effective policy it will find mates and defences to mates. In practise, alpha-beta search nowadays, does masses more pruning than anyone could have imagined possible, and also misses many things. Alpha-beta, in practise, also has a "policy" function, which is also not 100% perfect.
MCTS and minimax might converge with enough nodes, but modern A/B engine search is due to enormous amount of pruning much further from pure minimax than is pure minimax from MCTS. So modern A/B engine search will never converge to MCTS no matter how many nodes you search.

chrisw
Posts: 2087
Joined: Tue Apr 03, 2012 2:28 pm

Re: Scaling of Lc0 at high Leela Ratio

Post by chrisw » Wed Nov 28, 2018 10:51 pm

Milos wrote:
Wed Nov 28, 2018 10:22 pm
chrisw wrote:
Wed Nov 28, 2018 5:46 pm
Disagree here. It has been shown that given enough nodes, MCTS and minimax converge. Since alpha beta is just a faster, more efficient, version of minimax, that means alpha beta and MCTS converge too. It's therefore not correct to say that MCTS can't find mate in two. It can, it's a question only of the pruning/extension settings (exploration/exploitation). Also, I forgot to write, the effectiveness of the policy function of the AZ/LC0 neural network. With a 100% effective policy it will find mates and defences to mates. In practise, alpha-beta search nowadays, does masses more pruning than anyone could have imagined possible, and also misses many things. Alpha-beta, in practise, also has a "policy" function, which is also not 100% perfect.
MCTS and minimax might converge with enough nodes, but modern A/B engine search is due to enormous amount of pruning much further from pure minimax than is pure minimax from MCTS. So modern A/B engine search will never converge to MCTS no matter how many nodes you search.
Sure, the text above agrees. As in “nowadays ....”.
As it stands, now, AB engines (SF) are using statistical pruning, the development criteria (SF) are statistical (if it works, keep it ....). The NN driving AZ and LC0 is a statistical engine by its very nature. What it learns it what it comes across. The explore/exploit function is based on what works (nobody has any chess knowledge reason for tweaking the parameter values). I think i am going to argue that with statistics driving decisions, then MCTS-NN and heavy pruned AB will converge anyway.

User avatar
Laskos
Posts: 9440
Joined: Wed Jul 26, 2006 8:21 pm
Full name: Kai Laskos

Re: Scaling of Lc0 at high Leela Ratio

Post by Laskos » Mon Dec 10, 2018 8:07 pm

For 4 real LTC games, 1 hour + 1 minute increment, between Stockfish 10 on 4 threads and Lc0 v19 ID11261 (still one of the strongest nets) on RTX 2070, I didn't choose balanced openings, as the draw rate will be above 80%, so one would expect all 4 games ending in draw. I have chosen two 2-mover dubious gambits, which introduce almost an ideal disbalance (White advantage). I used Syzygy 6-men TBs only for adjudication in Cutechess. "Leela Ratio" is about 3.0, very high, so one would expect a good result from Lc0, judging from short time control games.



1/ A dubious King's Gambit Declined

1. e4 e5 2. f4 f5 *



This is a borderline opening, with about half White chance of winning and half chance of draw between 2 strong equal opponents. It usually leads to an open game.

The LTC games are here:

a) Stockfish as White:


Stockfish wins quite easily in an open game.


b) Lc0 as White:


Lc0 fails to convert a pretty large advantage in the middlegame, in a protracted Queenless open game.





2/ A dubious pseudo- Queen's Gambit Declined

1. d4 d5 2. c4 b6 *



This is a borderline opening, with about half White chance of winning and half chance of draw between 2 strong equal opponents. It usually leads to a closed game.

The LTC games are here:

a) Stockfish as White:


Stockfish builds steadily its advantage from the opening in a closed game to end with a Win.


b) Lc0 as White:


Although both engines failed to comprehend that the position is blocked, Stockfish manages to hold the blockade, and Lc0 failed to convert its advantage again.

========================



That +2 -0 =2 for SF10 at real LTC in these games with diverse developments, the double failure of Lc0 to convert, indicate again that scaling to real LTC might be not that good for Lc0.

crem
Posts: 122
Joined: Wed May 23, 2018 7:29 pm

Re: Scaling of Lc0 at high Leela Ratio

Post by crem » Mon Dec 10, 2018 10:14 pm

Laskos wrote:
Mon Dec 10, 2018 8:07 pm
That +2 -0 =2 for SF10 at real LTC in these games with diverse developments, the double failure of Lc0 to convert, indicate again that scaling to real LTC might be not that good for Lc0.
Which Lc0 version did you use? The most recent one v0.19.1 (it's just a version rename of v0.19.1-rc2 from 3 days ago so rc2 is fine too) has Cpuct growing with time (taken from AlphaZero paper) and it should help with LTC scalability.

User avatar
Laskos
Posts: 9440
Joined: Wed Jul 26, 2006 8:21 pm
Full name: Kai Laskos

Re: Scaling of Lc0 at high Leela Ratio

Post by Laskos » Mon Dec 10, 2018 10:26 pm

crem wrote:
Mon Dec 10, 2018 10:14 pm
Laskos wrote:
Mon Dec 10, 2018 8:07 pm
That +2 -0 =2 for SF10 at real LTC in these games with diverse developments, the double failure of Lc0 to convert, indicate again that scaling to real LTC might be not that good for Lc0.
Which Lc0 version did you use? The most recent one v0.19.1 (it's just a version rename of v0.19.1-rc2 from 3 days ago so rc2 is fine too) has Cpuct growing with time (taken from AlphaZero paper) and it should help with LTC scalability.
I used Lc0 v0.19.
I saw the new versions just two hours ago, right now I was testing their NPS with NNCache and Batch sizes, such things.
I will perform some tests these days, scaling too. Although going to real long TC is hard with many games, but I might try the same borderline openings as in previous post.

duncan
Posts: 10298
Joined: Mon Jul 07, 2008 8:50 pm

Re: Scaling of Lc0 at high Leela Ratio

Post by duncan » Mon Dec 10, 2018 11:44 pm

crem wrote:
Mon Dec 10, 2018 10:14 pm
Laskos wrote:
Mon Dec 10, 2018 8:07 pm
That +2 -0 =2 for SF10 at real LTC in these games with diverse developments, the double failure of Lc0 to convert, indicate again that scaling to real LTC might be not that good for Lc0.
Which Lc0 version did you use? The most recent one v0.19.1 (it's just a version rename of v0.19.1-rc2 from 3 days ago so rc2 is fine too) has Cpuct growing with time (taken from AlphaZero paper) and it should help with LTC scalability.
How helpful would you consider the latest AlphaZero paper for lc0 ?

Post Reply