Crazy exchange sacrifices

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

Moderator: Ras

User avatar
michiguel
Posts: 6401
Joined: Thu Mar 09, 2006 8:30 pm
Location: Chicago, Illinois, USA

Re: Crazy exchange sacrifices

Post by michiguel »

jdart wrote:It's a difficult issue but not insoluble. Larry Kaufman's article:

http://home.comcast.net/~danheisman/Art ... alance.htm

has been the starting point for many programmers, although I don't think it is 100% reliable.
Thanks Jon, see my reply to Sam. The concept is good, but their weights maybe wrong. The other problem is that a bishop is worth a value + its positional value (mobility etc). This is not that simple.

Miguel
User avatar
michiguel
Posts: 6401
Joined: Thu Mar 09, 2006 8:30 pm
Location: Chicago, Illinois, USA

Re: Crazy exchange sacrifices

Post by michiguel »

Eraserheads wrote:Cool games from Gaviota! It is interesting to see yet another engine who plays with such 'disregard' for its material count! In my observation engines who have this kind of style and understanding have the potential to become top class, exciting performers on the board. Are you planning to develop Gaviota even further in this direction?

Where can I find the latest Gaviota?
The last version will be available as soon as I port it to Windows (now it is Linux). It won't be a lot of work because I designed everything in a way that I have to modify only one file, but since this is a hobby sometimes I do not have all the time... It is my priority now, get this out the door.

Honestly, it was never my intention to have any particular style. For some reason, it became like this. My goal now will be to work on the search (I only have nullmove). It should not change the style too much, I believe.

Miguel
jdart
Posts: 4406
Joined: Fri Mar 10, 2006 5:23 am
Location: http://www.arasanchess.org

Re: Crazy exchange sacrifices

Post by jdart »

Large king safety scores can easily cause "crazy" behavior. Sometimes the sacs "work", but sometimes they don't and you just end up down material. Maybe you like that style of play but if not, you need to moderate the king safety values and ensure that if they are high, there's a very good possibility of a winning attack. I've recently put in some fixes that could cause my king scores to go near 5 pawns in value - not a common case but some positions caused that.
BubbaTough
Posts: 1154
Joined: Fri Jun 23, 2006 5:18 am

Re: Crazy exchange sacrifices

Post by BubbaTough »

Just for kicks, here is my previous tournament. It was 6 rounds a I think LearningLemming sacrificed in 3 games: http://www.talkchess.com/forum/viewtopic.php?t=25301

-Sam
User avatar
michiguel
Posts: 6401
Joined: Thu Mar 09, 2006 8:30 pm
Location: Chicago, Illinois, USA

Re: Crazy exchange sacrifices

Post by michiguel »

BubbaTough wrote:
Cool games from Gaviota! It is interesting to see yet another engine who plays with such 'disregard' for its material count! In my observation engines who have this kind of style and understanding have the potential to become top class, exciting performers on the board. Are you planning to develop Gaviota even further in this direction?
This is probably because crazy sacrificing programs usually have eval functions written from scratch by strong chess players :). Those that borrow eval ideas and weights from other programs end up with something well tuned not to sacrifice too much, and those that are not as strong at chess often underweight the factors that would cause one to sacrifice.


Miguel,

I have found tuning this kind of issue is very difficult. I had a version of LearningLemming that would do positional queen for rook sacrifices....awful but mesmerizing games. The last version sacrificed pieces for pawns way too often. My 2nd to last tournament for example it sacrificed a piece in over half its games. Tuning this stuff out is so tough because it is rare there is just one factor you can change...instead you have to change lots of things. For example, if you boost the value of a rook, it changes its opinion of 2 rooks vs. a queen....not just exchange saqs. If you decrease the value of minor pieces it starts unjustified piece saqs for attacks or endgame passed pawns. If you increase the value of a rook but decrease the value of rook activation, it may stop developing the rook well. Anyway, good luck. If I spot any good / bad exchange saqs in our ICC games I will message you (to help you build a test set, which is usually my first step when trying to tune this type of issue).

-Sam
Two more examples to two the pros and cons.

Unsuccessful story

Learning Lemming :-) vs Gaviota
Black is not good, there will be an attack on Q side, but Rxd5 is not really the way to go in this position. Eliminates the dangerous wB, keeps the bB, keeps bishop pair, and recovers one pawn... still the move hurts my eyes.

I will later study carefully all the weights and parameter in this particular position.

[d]2kr1b1r/pbp2ppp/1p3nq1/P2P4/2BP4/8/1P1N1PPP/R1BQ1RK1 b - - 0 17

Successful story

Gaviota vs Tinker
Here Gaviota could play Rfd1, but e5! is bolder

[d]r4rk1/pb1p1ppp/4pn2/2p5/2P1PP2/P1NBB1nP/1P4P1/R4RK1 w - - 0 19

After few forced moves we have the following position. For the exchange, white has pair of bishops, a pawn, space and active pieces. I think here the sacrifice may be justified. Gaviota thinks it is +0.88. Gaviota won a very nice game (see below). 34 e6! and 36 fxg6! show the tremendous power of the pair of bishop with open diagonals.

[d]r1r3k1/pb1p1pnp/4p1p1/4P3/2PB1PP1/P1NB3P/1P5K/5R2 b - - 2 24


These are the games

[Event "ICS rated blitz match"]
[Site "207.99.83.228"]
[Date "2009.08.23"]
[Round "-"]
[White "LearningLemming"]
[Black "Gaviota"]
[Result "1-0"]
[WhiteElo "2760"]
[BlackElo "2665"]
[TimeControl "300+1"]

1.d4 d5 2.c4 dxc4 3.e3 e6 4.Nd2 Qd5 5.Ne2 Qc6 6.a4 b6 7.Nc3 Ba6 8.Be2 Nf6 9.Bf3
Nd5 10.O-O Nd7 11.Nxd5 exd5 12.e4 Qg6 13.exd5 O-O-O 14.Be2 Bb7 15.Bxc4 Nf6 16.
a5 Rxd5 17.Bxd5 Bxd5 18.Nf3 b5 19.Re1 h6 20.Bf4 Bb4 21.Re3 Qg4 22.Qc1 c6 23.Bg3
Kb7 24.a6+ Ka8 25.Ne5 Qc8 26.Nd3 Bf8 27.f3 Bc4 28.Ne5 Bd5 29.Rc3 Bb4 30.Rc2 Qf8
31.Nxc6 Bd6 32.Ne5 Rg8 33.Rc6 Bb8 34.Rc5 Qd8 35.Rxb5 Qe8 36.Raa5 Qe6 37.Nxf7
Bxg3 38.hxg3 Re8 39.Rc5 Rg8 40.Ne5 Rb8 41.Rxd5 Nxd5 42.Qc4 Nf4 43.gxf4 Qxc4 44.
Nxc4 1-0


[Event "ICS rated blitz match"]
[Site "207.99.83.228"]
[Date "2009.08.20"]
[Round "-"]
[White "Gaviota"]
[Black "Tinker"]
[Result "1-0"]
[WhiteElo "2530"]
[BlackElo "2584"]
[TimeControl "180+2"]

1.d4 Nf6 2.c4 e6 3.Nf3 b6 4.a3 Ba6 5.Qc2 Bb7 6.Nc3 c5 7.e4 cxd4 8.Nxd4 Bc5 9.
Nb3 Nc6 10.Bd3 O-O 11.O-O Ng4 12.Nxc5 bxc5 13.f4 Nd4 14.Qd1 Qh4 15.h3 Nf6 16.
Be3 Qg3 17.Qe1 Nf5 18.Qxg3 Nxg3 19.e5 Nxf1 20.Rxf1 Nh5 21.Kh2 g6 22.g4 Ng7 23.
Bxc5 Rfc8 24.Bd4 Ne8 25.b3 Rd8 26.Ne4 Bxe4 27.Bxe4 Rab8 28.Rb1 d5 29.cxd5 exd5
30.Bd3 Rb7 31.f5 Nc7 32.b4 Ne8 33.Re1 Nc7 34.e6 fxe6 35.fxg6 hxg6 36.Bxg6 Nb5
37.Bc5 Nxa3 38.Rxe6 Nc4 39.h4 Nd2 40.Bc2 Rc7 41.h5 d4 42.Bd3 Kf7 43.Re2 Nf3+
44.Kg3 Ng5 45.Rf2+ Kg7 46.h6+ Kh8 47.Rf6 Rcd7 48.Kh4 Rg8 49.Kh5 Nh7 50.Rf5 Rgd8
51.g5 Nxg5 52.Kxg5 Ra8 53.Rf4 Rad8 54.Kh4 Kg8 55.Rg4+ Kh8 56.Kh3 1-0
User avatar
michiguel
Posts: 6401
Joined: Thu Mar 09, 2006 8:30 pm
Location: Chicago, Illinois, USA

Re: Crazy exchange sacrifices

Post by michiguel »

BubbaTough wrote:Just for kicks, here is my previous tournament. It was 6 rounds a I think LearningLemming sacrificed in 3 games: http://www.talkchess.com/forum/viewtopic.php?t=25301

-Sam
That reminds me of the problem that earlier versions of Gaviota had with king safety. Gaviota would do anything to take the opponent king for a walk. But more often than not, there were no justification. It allowed to beat good programs once in a while because it caught them unaware, though. The danger was beyond the horizon and the extreme speculative (and crude) king safety parameters allowed gaviota to predict the problems. Not very good overall.

Miguel
jdart
Posts: 4406
Joined: Fri Mar 10, 2006 5:23 am
Location: http://www.arasanchess.org

Re: Crazy exchange sacrifices

Post by jdart »

FYI this is one of the positions that caused extreme score values:

[d] r3r3/pb1n1p2/1p1p1nB1/q1pPp3/2P2PkN/2P1PR2/P1Q3PP/5RK1 b - - 0 1

White *is* winning, in fact has a forced mate, but search will find that. The attack scores for White should show an advantage but there should be a limit to that.
Uri Blass
Posts: 10890
Joined: Thu Mar 09, 2006 12:37 am
Location: Tel-Aviv Israel

Re: Crazy exchange sacrifices

Post by Uri Blass »

In the case of your succesful story I think that every strong program is going to sacrifice.

checked rybka toga and stockfish and all of them play e5 with evaluation of clear advantage for white

Gaviota - Tinker, ICS rated blitz match 2009
r4rk1/pb1p1ppp/4pn2/2p5/2P1PP2/P1NBB1nP/1P4P1/R4RK1 w - - 0 1

Analysis by Stockfish 1.4 JA:

19.Be3xc5 Ng3xf1 20.Bc5xf8 Ra8xf8 21.Ra1xf1
+- (1.67) Depth: 2 00:00:00
19.Be3xc5 Ng3xf1 20.Bc5xf8 Ra8xf8 21.Ra1xf1
+- (1.67) Depth: 3 00:00:00
19.Be3xc5 Rf8-c8 20.Rf1-f3 Nf6xe4
² (0.50) Depth: 4 00:00:00
19.e4-e5 Bb7-e4 20.Nc3xe4 Nf6xe4 21.Rf1-d1
² (0.64) Depth: 4 00:00:00
19.e4-e5 Bb7-e4 20.Nc3xe4 Nf6xe4 21.Rf1-d1 Ra8-b8
² (0.44) Depth: 5 00:00:00
19.Rf1-d1 Ng3xe4 20.Bd3xe4 Nf6xe4 21.Rd1xd7
² (0.66) Depth: 5 00:00:00
19.Rf1-d1 Rf8-b8 20.e4-e5 Nf6-e4 21.Ra1-c1 Bb7-c6
² (0.56) Depth: 6 00:00:00 11kN
19.Rf1-d1 Rf8-b8 20.e4-e5 Nf6-e4 21.Ra1-c1 Bb7-c6 22.Nc3-b5
² (0.54) Depth: 7 00:00:00 17kN
19.e4-e5 Ng3xf1 20.Ra1xf1 Nf6-h5 21.Be3xc5 Rf8-c8 22.b2-b4 Nh5-g3
² (0.66) Depth: 7 00:00:00 24kN
19.e4-e5 Ng3xf1 20.Ra1xf1 Nf6-h5 21.Be3xc5 Rf8-c8 22.b2-b4 Nh5-g3 23.Rf1-e1
² (0.64) Depth: 8 00:00:00 33kN
19.e4-e5
± (0.84) Depth: 9 00:00:01 54kN
19.e4-e5 Ng3xf1 20.Ra1xf1 Nf6-h5 21.Kg1-h2 f7-f6 22.g2-g4 Nh5xf4 23.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xb4 Ra8-a3 28.Kh2-g2
± (1.31) Depth: 17 00:00:21 14401kN

(so k, 05.09.2009)
Uri Blass
Posts: 10890
Joined: Thu Mar 09, 2006 12:37 am
Location: Tel-Aviv Israel

Re: Crazy exchange sacrifices

Post by Uri Blass »

I think that it is wrong to decide based on the result if the sacrifice is good or bad.

I think that gaviota won against tinker for the simple reason that tinker is weaker and not because the sacrifice is correct and it also lost against toga because toga is stronger and at some point in the game the position was equal.

49.Qd3 against toga was a blunder and I do not think that black is better after 49.h5.

analysis by rybka after possible 49.h5 that is suggested by rybka and many other programs

Gaviota - TogaII, ICS rated standard match 2009
[d]4r2k/1b4rp/p4pP1/Pp1PpP1P/1Bq1B3/2P1Q3/7K/3R4 b - - 0 1

Analysis by Rybka 3 1-cpu 32-bit :

49...Rg7-d7
= (-0.04) Depth: 2 00:00:00
49...Rg7-d7
= (-0.24) Depth: 3 00:00:00
49...Rg7-d7
³ (-0.44) Depth: 3 00:00:00
49...Rg7-d7
³ (-0.46) Depth: 3 00:00:00
49...Rg7-d7
³ (-0.51) Depth: 4 00:00:00
49...Rg7-d7 50.h5-h6
³ (-0.45) Depth: 5 00:00:00
49...Rg7-d7 50.h5-h6 h7xg6
= (0.19) Depth: 6 00:00:00 15kN
49...Rg7-d7 50.h5-h6 h7xg6 51.f5xg6 Bb7xd5 52.g6-g7+ Kh8-g8
= (0.09) Depth: 7 00:00:00 19kN
49...Rg7-d7 50.h5-h6 h7xg6 51.f5xg6 Bb7xd5 52.Rd1xd5 Rd7xd5 53.Qe3-f2
= (0.03) Depth: 8 00:00:01 36kN
49...Rg7-d7 50.h5-h6 Rd7xd5 51.Be4xd5 Bb7xd5 52.Rd1-d4 Qc4-a2+ 53.Rd4-d2 Qa2-c4 54.Kh2-g3 Kh8-g8
² (0.31) Depth: 9 00:00:04 149kN
49...Rg7-d7
= (0.11) Depth: 10 00:00:08 300kN
49...Rg7-d7 50.h5-h6 Bb7xd5 51.Qe3-b6 Rd7-d6 52.Qb6-a7 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Post by michiguel »

Uri Blass wrote:I think that it is wrong to decide based on the result if the sacrifice is good or bad.
I think that both were positive!
I cannot say good or bad in absolute terms. They created an imbalance in which gaviota knew how to take advantage of it and I like that.

I think that gaviota won against tinker for the simple reason that tinker is weaker and not because the sacrifice is correct and it also lost against toga because toga is stronger and at some point in the game the position was equal.

49.Qd3 against toga was a blunder and I do not think that black is better after 49.h5.
I know. Gaviota dominated the game until that point and shoudl have won if it was not badly outsearched. I think gaviota had even better chances before reaching this point.

Miguel

analysis by rybka after possible 49.h5 that is suggested by rybka and many other programs

Gaviota - TogaII, ICS rated standard match 2009
[d]4r2k/1b4rp/p4pP1/Pp1PpP1P/1Bq1B3/2P1Q3/7K/3R4 b - - 0 1

Analysis by Rybka 3 1-cpu 32-bit :

49...Rg7-d7
= (-0.04) Depth: 2 00:00:00
49...Rg7-d7
= (-0.24) Depth: 3 00:00:00
49...Rg7-d7
³ (-0.44) Depth: 3 00:00:00
49...Rg7-d7
³ (-0.46) Depth: 3 00:00:00
49...Rg7-d7
³ (-0.51) Depth: 4 00:00:00
49...Rg7-d7 50.h5-h6
³ (-0.45) Depth: 5 00:00:00
49...Rg7-d7 50.h5-h6 h7xg6
= (0.19) Depth: 6 00:00:00 15kN
49...Rg7-d7 50.h5-h6 h7xg6 51.f5xg6 Bb7xd5 52.g6-g7+ Kh8-g8
= (0.09) Depth: 7 00:00:00 19kN
49...Rg7-d7 50.h5-h6 h7xg6 51.f5xg6 Bb7xd5 52.Rd1xd5 Rd7xd5 53.Qe3-f2
= (0.03) Depth: 8 00:00:01 36kN
49...Rg7-d7 50.h5-h6 Rd7xd5 51.Be4xd5 Bb7xd5 52.Rd1-d4 Qc4-a2+ 53.Rd4-d2 Qa2-c4 54.Kh2-g3 Kh8-g8
² (0.31) Depth: 9 00:00:04 149kN
49...Rg7-d7
= (0.11) Depth: 10 00:00:08 300kN
49...Rg7-d7 50.h5-h6 Bb7xd5 51.Qe3-b6 Rd7-d6 52.Qb6-a7 Rd6-d7 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