Do chess engines understand sacrifices?

Sort:
Flameus1110

I sacrificed my knight to open up an attack on the king in one of my games recently but the engine just counted it as losing material.

Martin_Stahl
Flameus1110 wrote:

I sacrificed my knight to open up an attack on the king in one of my games recently but the engine just counted it as losing material.

 

Engines are excellent at understanding tactics and likely your sacrifice wasn't good with best defense and that's why the engine didn't like it. 

CraigIreland

Yeah, it "understands" sacrifices better than humans. The engine looks forward many moves. If it didn't like your sacrifice then the attack didn't lead to a winning line.

Flameus1110

So even though i won, my sacrifice should've cost me the game?

CraigIreland

I found the match. The sacrifice wasn't a good one but your opponent made 1 mistake and 2 blunders after it, leading to Checkmate. A stronger player would've defended against your attack and won the match. It's worth remembering that the analysis tool judges based upon best play. It doesn't consider probabilities that either of you will make subsequent mistakes.

Flameus1110

ok thanks cause i was wondering if the analysis was messing up or something

CraigIreland

I'd say that you're on the right lines though. It's worth practicing those types of sacrifices even if they don't always work out. Attacking a castled King is an important skill. It's not always easy to calculate an attack like that. A rule of thumb which I use is that you should at least be able to force 2 pawn compensation plus an exposed King for a sacrificed Knight or Bishop. From there, with the right conditions, there's a good chance that you can turn threats on the King into a victory.

Flameus1110

Any other sacrifice advice?

CraigIreland

You'd be better off searching the internet for advice. I'm not sure how well it can be taught and I'm certainly not the best person to teach it.

chessboombang

sacrifices can either be objectively strong moves or simply confuse your opponent and induce future mistakes

1g1yy

I remember seeing an Alpha Zero game a long time ago where AZ sacrificed 3 pawns in the opening against SF I believe, and went on to win.  It was unbelievable, but obviously AZ 'felt' it was positionally correct and it turned out to be so.

Keep in mind, depth of analysis can affect the evaluation a lot, but for the most part, engines are spot on if you give them enough time to work on the position. 

1g1yy
Flameus1110 wrote:

So even though i won, my sacrifice should've cost me the game?

I recall a game a long time ago where I sac'ed a B and the engine said I was crazy.  Eval was terrible, and it was right.  I did go on to win, but my sac wasn't the thing that won the game.  It said I was like -3.5 or something.  I try not to do that any more unless I have a visible followup. Down a piece is a bad place to be.  

marqumax

At your level they do perfectly. But it's an interesting question when it comes to correspondence chess like for example the king's indian defence where these very loooooong term sacrifices are often misevalueted by engines until much later. But at your level just trust what is says

1g1yy

I was doing a few endgame lessons on Chessable just yesterday and the course author showed the solution of a puzzle as Nx then Nx, then K moves and this is a well known draw.  It was super complicated and went way over my head, and even with the position in front of me I didn't understand it.  I opened the engine and the engine (I was playing white in the puzzle) said -4.2 or something in the 4s.  What???  I thought that's not a draw!  Well, I followed the engine only a few more moves and yep, it's a draw!  Lol.  

Some stuff might confuse an engine and it'll give an eval you can't rely on, but that's usually in endgames and complicated positions.  For most stuff they're spot on. 

zone_chess

Yes, the engine is right. At a higher level, your sacrifice would never work. You need to kind of 'engineer' your way into the kingside, making every move accurate and unlocking the next step towards mate. Otherwise it just fizzles out, the king escapes and you have a disadvantage.

It's precise like cracking a safe.

You start by learning which lines are most powerful toward a kingside attack - for example opening the h-file often works, even at the cost of a knight. There's various combinations of lines, diagonals and knight maneuvers that typically lead to a strong attack. Qb3 and Ne5, for example is often worth saccing the other knight for on f7 or h7. But later on you learn to calculate specific coordinates.

For now focus on only sacrificing when you can 'see' a winning line, taking into account the opponent's defenses. And you are >50% sure it will work.

I would definitely recommend trying out sacrificial play in general - at the cost of short-term elo loss you will gain chess ability and get to a new level in the long term - once you learn to calculate along with your optimism, and your playing strength catches up with your risk-taking behavior.

If you look at Tal, Euwe, Ivanchuk, Kamsky, even modern players like Dubov and Mamedyarov, they often sacrifice even if it's slightly unsound - it complicates the position to such an extent that with their knowledge of these specific jumbled positions, they can swindle out an advantage.

I would be interested though in seeing an engine evaluation that includes criticality level - how much better is the best move compared against the second and third? If a move is marginally worse but complicates the position greatly -in other words, requiring extremely precise counterplay - this is often the most interesting move to play. We don't want chess to evolve only toward computer chess, do we.

 

1g1yy
zone_chess wrote:

 

If you look at Tal, Euwe, Ivanchuk, Kamsky, even modern players like Dubov and Mamedyarov, they often sacrifice even if it's slightly unsound - it complicates the position to such an extent that with their knowledge of these specific jumbled positions, they can swindle out an advantage.

Dubov plays a lot of objectively unsound sacs and makes them work, but he's a rare bird.  But he also enjoys losses at great chess more than he enjoys draws, so there is that. 

1e4c6_O-1

Some positions are very scary for humans, but no problem, or even winning for engines, and so it marks your move as a mistake

Vegosiux

Thing is; an engine will assume some sort of perfect play from your opponent. In reality, players who are faced with a move they simply don't understand will often blunder.

Hell, Kasparov lost against Deep Blue once because he assumed that a blunder made by DB was part of some grand plan, while another engine would not have made such an assumption.

orrin14

if you can see a mate with the sacrifice like greek gift the computer will see it