# Comparing the Sharpness of Openings

Evaluating Sharpness Part 2

If you haven’t seen my first post on this topic, I would suggest that you check it out before in order to understand the context.
One important thing to add about last week’s post is that the LC0 team has posted on twitter that they are working on something similar and they are currently using the following formula:

Comparing it to my formula, theirs certainly is much more elegant and the range of values is different, so I decided to multiply the output of my formula by 0.4 in order to make them easier to compare. When looking at a graph with a fixed win rate at 350 and a variable loss rate you can see that the formulas are quite similar:

The values differ slightly but the general shape of the functions is similar. My function has a slight bump at 350 which is caused by my use of the minimum of the win and loss rates, which makes the function less “nice” (the derivative isn’t continues for x=350). But the reason I used the minimum is to avoid evaluating one sided positions as very sharp which the LC0 function doesn’t do, i. e. a completely winning position gets a very sharp score.

### Comparing Openings

The first thing I thought of when I started working on this project was comparing different openings with each other. So I looked at the sharpness of a couple of different openings and compared them:

There are many interesting takeaways from the chart. First of all, the sharpness scores agree that the Berlin Defense is more drawish than the Morphy Defense. Both are also less sharp than the starting position, which probably means that they are less sharp than the “average” opening.
The scores also rate the Open Sicilian and especially the King’s Gambit is very sharp which is certainly true. One surprising thing is that the King’s Indian Defense isn’t estimated to be very sharp, the difference between it and the Queen’s Gambit Declined is very small which seems wrong to me. This could be due to the general dislike of the KID by engines and that they don’t think that black has many winning chances.

While I was comparing many more openings, I noticed that the differences early on are generally very small. Maybe the small differences are still meaningful but I wouldn’t be sure if a difference of 0.1 means that an opening is really sharper than another one or if the difference is negligible like a difference of 0.2 in the evaluation of an opening.

### Choosing a Line

One thing I often struggle with is finding a line with which I’m comfortable against a rare gambit. Usually the “best” line according to the engine is also very sharp and the opponent probably knows at least something in this line. So it would be nice if the sharpness scores could guide you to a specific line and help to find a quieter line that still leaves you with a good position.

I looked at a line which I first saw in a game by Shakhriyar Mamedyarov: 1.d4 Nf6 2.c4 e6 3.g4!?

Black to play

When I looked at it with my version of Leela, it gave 6 different moves with an evaluation greater than 50% for black. Since this is a rare opening, it’s probably better to find a line which leads to a quieter position than the main line where you may need to remember a lot of moves. Looking at the sharpness scores for each move might help in deciding on a line:

Taking the pawn with 3…Nxg4 is the most challenging move (according to Leela) but it’s also the sharpest which means that it might be more difficult for black to keep white’s initiative under control. Looking at the sharpness scores of the different moves shows that the modest 3…h6 should be a “safe” option. This might be a good line to look into if you are worried about this gambit, although there is obviously no guarantee that it really is quieter than other options.

### Decisions in the Opening

A final common situation I want to look at is when an engine evaluates two moves early on as roughly equal and you are unsure what to do. In such situations, the sharpness scores can help you to get an idea of the kind of game you can expect after each of the two moves.

I have chosen a recent game of mine as an example. The position isn’t really theoretical since I was out of book early on but my opponent (black) was faced with a choice in the following position:

Black to play

Both 11…Nxg6 and 11…gxf6 are given roughly the same evaluation by Stockfish but looking at the sharpness scores shows that the resulting positions differ quite a bit:

Move My Score LC0 Score
11...Nxf6 0.64 0.90
11...gxf6 1.04 1.25

For most experienced players it’s clear that 11…gxf6 is a sharper option but it’s still nice that the scores agree and can also be helpful in less clear situations.

If you have any questions, feel free to ask them on twitter. I plan to write another post where I want to look at different decisions during a game and how the scores can help to understand choices made by players.