Win-Draw-Loss analysis – Leela Chess Zero
Historically, laptop chess engines evaluated place when it comes to pawns.
This can be a handy selection, as materials is a basis of place analysis, which is true additionally amongst people.
Conditions the place the significance of positional side strongly outweights materials are sometimes thought as lovely exceptions moderately than the rule.
It’s nevertheless not essentially the most logical technique to rating a place.
Utilizing pawns sounds arbitrary, and it’s additionally not linear and the identical step has completely different meanings:
whereas going from 0 to 1 pawn benefit retains the place fairly holdable, going from 1 to 2 often makes it largely misplaced.
Going from 10 to 11 makes no distinction in any respect.
Utilizing chances
What different values can be utilized as an analysis of the place?
The pure selection seems to be utilizing of likelihood of successful.
Likelihood of successful is the analysis methodology that DeepMind selected for his or her AlphaGo and later AlphaZero engines.
It’s additionally what LCZero used as much as July 2019.
Internally, LCZero has at all times used chances, however as chess engine protocol UCI requires worth in pawns, it simply transformed its output utilizing the next perform:
You might have already seen the issue with this method: it doesn’t account for attracts.
Not like Go, chess video games has three attainable outcomes: win, loss and draw.
Each AlphaZero and pre-July-2019 LCZero work round that by assuming that draw has “½ of successful likelihood”.
With this assumption, the that means of analysis modifications from “likelihood of successful” to anticipated recreation rating.
WDL head
However nothing stops us from predicting all three attainable outcomes individually, and that’s what we did!
All networks ranging from July 2019 have the so-called WDL head, and are able to predicting win, draw, and loss chances individually.
Sadly, as of at present, most chess GUIs nonetheless anticipate analysis in (centi) pawns, and it’s not attainable to show WDL chances there.
However when you’ll be able to see them, it opens up one other necessary instrument for place evaluation and perception into Leela’s considering.
Listed here are some examples:
TCEC 17 Superfinal Sport 53
This recreation led to a draw. Stockfish confirmed eval of 0.0 for all strikes ranging from transfer 22.
Nevertheless, from Leela perspective it was not that boring in any respect. Right here is the WDL graph of this recreation:
As you’ll be able to see, as much as transfer 50, each side have strong successful possibilities, and draw likelihood was saved beneath 0.5.
TCEC 17 Superfinal Sport 71
That’s additionally a draw, but it surely’s a really completely different draw. This time, it’s a “useless draw” from early on:
It was an extended and boring recreation, and Leela knew that from the very starting!
TCEC 17 Superfinal Sport 16
Sport 16 Leela misplaced, however you’ll be able to see from the graph that this recreation was fairly an eventful:
GUI with WDL help
Lc0 will not be the one engine that may output WDL chances.
Stoofvlees additionally helps this output kind.
Nevertheless, there are only a few chess GUIs that help displaying WDL. Those I’m conscious of are:
- Nibbler, the GUI made particularly for Lc0.
- Banksia GUI
- Fritz 17 (as I hear), that has it enabled for his or her distribution of Lc0 known as Fats Fritz.
If you happen to’d wish to have this characteristic in your favourite chess GUI (or your favourite chess engine competitors), think about submitting a characteristic request to the writer of the GUI or administator or the competitors.
A little bit of technical particulars
In case you are a chess GUI developer, here’s a little bit of technical particulars for you:
- When an engine helps WDL output, it has the UCI parameter known as
UCI_ShowWDL
- When
UCI_ShowWDL
is about totrue
, thedata
line containswdl <win_prob> <draw_prob> <loss_prob>
, the place chances are in integer permille and at all times add as much as 1000.
Instance:
data time 2329 nodes 184 rating cp 33 wdl 395 324 281 nps 2875 pv d2d4 d7d5
^^^^^^^^^^^^^^^
Notice: it isn’t part of the rating parameter. The next can be legitimate: data wdl 395 324 281 rating cp 33
.