Cheese - Lc0 1 - 0 TCEC

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

Moderator: Ras

Plutie
Posts: 20
Joined: Sun Jan 30, 2022 6:14 am
Full name: Evan Engler

Re: Cheese - Lc0 1 - 0 TCEC

Post by Plutie »

hgm wrote: Thu Jan 26, 2023 5:01 pm
Plutie wrote: Thu Jan 26, 2023 4:31 pm to explain what exactly happened: this version of leela is using a newer form of contempt based on the elo difference between players. the general idea behind it is to transform the network's WDL output to more accurately represent the chances of winning based on the opponent's skill. unfortunately, at such a high elo difference, leela expects that almost anything can be played and still finish in a win. in this case, with a 660 elo difference (internally treated as 60% of that value,) the contempt, with how high it was, ended up giving not only the book exit, but also the position after multiple unreasonable piece sacs, an 80% win chance for black. bottom line is: it couldn't exactly handle such a high elo difference, so it played really poorly as black. there's now a cap to how high the elo difference used by leela can be, at 420 elo. (note: currently not in effect at TCEC, since there probably won't be an update allowed.)

a more in-depth explanation can be found here, I'm just going off of my surface level knowledge -
It means there is something fundamentally wrong in the way you correct the winning probability for the Elo difference. For one, it is not so much the Elo difference that matters, but the Elo of the weak player. When you are in KQK it doesn't really matter whether the bare King is handled by a 1500-Elo player or a 3500-Elo one, and it doesn't matter whether the Queen is handled by a 1000-Elo player or a 2500-Elo one.

Of course it also points to a gigantic Leela flaw, that it thinks it can be in any way best to sacrifice material because it thinks 'it will win anyway'. This is exactly the same flaw as that makes it play embarrasingly indecisive in won positions when playing without any contempt. It just doesn't know how to win won positions, and will often bungle them.
regarding that first paragraph: that's what changing the target draw rate is meant to do (taking account the opponent's actual rating, not just the difference). the problem is that it was set for the full list of engines playing, not just the weakest ones - there's no way to set it on a per-opponent basis. the whole KQvK argument is irrelevant, as there's no uncertainty in the game's outcome, it's won no matter what for whichever side has the queen - contempt would play no part in the way it plays there
User avatar
hgm
Posts: 28426
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Cheese - Lc0 1 - 0 TCEC

Post by hgm »

There would be uncertainty if the player handling the Queen is so weak that he doesn't know how to win. There is no fundamental difference between KQK and any other won position; in a won position the outcome is certain: it will be a win. This is what Leela imagines when it is ahead enough, or the opponent is weak enough. Only when it would leave some room for uncertainty it would realize that it is a bad idea to blunder away pieces, as that would make the uncertainty grow. It should always prefer having a bigger advantage over a smaller one, against the same opponent. No matter how weak the opponent is. Contempt should discourage it to simplify in non-won positions, to drag out the game to allow the opponent more opportunity to blunder. It should never encourage blundering away material.

And anothe rpoint: It seems you are saying that you set the contempt (wrongly implemented as it is...) to tune it for the average opponent. That is a mistake in itself; you should optimize it for the strongest participant. That is your competitor, and it is most important to beat that. If you are the best you would beat the weak ones anyway.
User avatar
M ANSARI
Posts: 3734
Joined: Thu Mar 16, 2006 7:10 pm

Re: Cheese - Lc0 1 - 0 TCEC

Post by M ANSARI »

I don't see why the ELO of the opponent should even be factored. Just set up the engine where it plays what it thinks is the best move ... every move. I know that this might probably lead to more draws in general and maybe a drop in ELO points when playing against other engines, but lobotomizing the engine just seems wrong. I mean I can understand accepting a lesser move where both moves are drawing because one move gives more chances to err ... but looking at the game it seems like black is just sacrificing material with zero compensation. I would never in a million years think that LC0 is on the black side if I had not been told so.
User avatar
M ANSARI
Posts: 3734
Joined: Thu Mar 16, 2006 7:10 pm

Re: Cheese - Lc0 1 - 0 TCEC

Post by M ANSARI »

Damir wrote: Thu Jan 26, 2023 1:36 pm
Jouni wrote: Thu Jan 26, 2023 9:17 am https://tcec-chess.com/#div=sw4&game=36&season=24

What happened??
Garbage opening moves, sacrificing pawns in the opening for nothing... :) :)
Actually it was sacrificing a few pawns and exchanges and even pieces :D
Krzysztof Grzelak
Posts: 1587
Joined: Tue Jul 15, 2014 12:47 pm

Re: Cheese - Lc0 1 - 0 TCEC

Post by Krzysztof Grzelak »

Plutie wrote: Thu Jan 26, 2023 4:51 pm well, it's been fixed in this commit, but since the event already started, I don't think there will be a chance to update it.
What version do you propose that will fix this bug.
sarona
Posts: 127
Joined: Tue Oct 29, 2019 4:14 pm
Location: Canada
Full name: Ron Doughie

Re: Cheese - Lc0 1 - 0 TCEC

Post by sarona »

Krzysztof Grzelak wrote: Wed Feb 01, 2023 11:54 am
Plutie wrote: Thu Jan 26, 2023 4:51 pm well, it's been fixed in this commit, but since the event already started, I don't think there will be a chance to update it.
What version do you propose that will fix this bug.
Krzysztof, I am pretty certain it is here (Pull request #1791 - WDL Conversion for more realistic WDL and contempt): https://ci.appveyor.com/project/LeelaCh ... s/46066049

Image

The net used in that TCEC game is here: https://drive.google.com/file/d/1ERjfPE ... qZwTx/view
Krzysztof Grzelak
Posts: 1587
Joined: Tue Jul 15, 2014 12:47 pm

Re: Cheese - Lc0 1 - 0 TCEC

Post by Krzysztof Grzelak »

sarona wrote: Thu Feb 02, 2023 3:29 am Krzysztof, I am pretty certain it is here (Pull request #1791 - WDL Conversion for more realistic WDL and contempt): https://ci.appveyor.com/project/LeelaCh ... s/46066049

Image

The net used in that TCEC game is here: https://drive.google.com/file/d/1ERjfPE ... qZwTx/view
Thank you for your answer, only if this version will support BT2-3250000.