LMR and sacrifices

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

jwes
Posts: 778
Joined: Sat Jul 01, 2006 7:11 am

LMR and sacrifices

Post by jwes »

I was wondering what methods people use in distinguishing between between sacrifices that appear to lose material but should not be reduced and bad moves which do lose material and should be reduced.
User avatar
cdani
Posts: 2204
Joined: Sat Jan 18, 2014 10:24 am
Location: Andorra

Re: LMR and sacrifices

Post by cdani »

Mostly when the static evaluation compensates the material.
Vinvin
Posts: 5228
Joined: Thu Mar 09, 2006 9:40 am
Full name: Vincent Lejeune

Re: LMR and sacrifices

Post by Vinvin »

jwes wrote: Sun Nov 04, 2018 9:22 pm I was wondering what methods people use in distinguishing between between sacrifices that appear to lose material but should not be reduced and bad moves which do lose material and should be reduced.
The answer could solve a lot of problems brought by LMR.
Some old engines still more efficient than current top engines in some very wild positions.
I'll try to post some of these positions soon.

Vincent
Vinvin
Posts: 5228
Joined: Thu Mar 09, 2006 9:40 am
Full name: Vincent Lejeune

Re: LMR and sacrifices

Post by Vinvin »

Vinvin wrote: Tue Nov 06, 2018 11:45 am
jwes wrote: Sun Nov 04, 2018 9:22 pm I was wondering what methods people use in distinguishing between between sacrifices that appear to lose material but should not be reduced and bad moves which do lose material and should be reduced.
The answer could solve a lot of problems brought by LMR.
Some old engines still more efficient than current top engines in some very wild positions.
I'll try to post some of these positions soon.

Vincent
Here are 4 positions where non LRM engines do better :
[d]1r3r2/4bpkp/1qb1p1p1/3pP1P1/p1pP1Q2/PpP2N1R/1Pn1B2P/3RB2K w - - bm Qf6+;
[d]2r2rk1/2q2p1p/p1p1nPpQ/3p4/4p1B1/8/PPP3PP/R4R1K w - - bm Rf5; c0 "mate in 6";
[d]3r1r1k/pp5p/4b1pb/6q1/3P4/4p1BP/PP2Q1PK/3RRB2 b - - bm Qxg3+; id "arasan19.137"; c0 "Apicella-Lautier, Clichy 2001";
[d]8/3P3k/n2K3p/2p3n1/1b4N1/2p1p1P1/8/3B4 w - - bm Nf6+; c0 "study by Van Breukelen";
Vinvin
Posts: 5228
Joined: Thu Mar 09, 2006 9:40 am
Full name: Vincent Lejeune

Re: LMR and sacrifices

Post by Vinvin »

jwes wrote: Sun Nov 04, 2018 9:22 pm I was wondering what methods people use in distinguishing between between sacrifices that appear to lose material but should not be reduced and bad moves which do lose material and should be reduced.
The most absurd position I know.
Mate in 8 :
[d]rnbq3r/pppp4/3b1pkp/5p2/2BP4/4P3/PPP2PPP/RN1QK2R w KQ - bm Qh5+;
User avatar
xr_a_y
Posts: 1871
Joined: Sat Nov 25, 2017 2:28 pm
Location: France

Re: LMR and sacrifices

Post by xr_a_y »

Well, I guess there is no way a queen sacrifice can be compensate by static evaluation even with attack table.
Maybe simply not applying LMR on moves that are checks may help to find tricky wins.
Vinvin
Posts: 5228
Joined: Thu Mar 09, 2006 9:40 am
Full name: Vincent Lejeune

Re: LMR and sacrifices

Post by Vinvin »

xr_a_y wrote: Mon Dec 10, 2018 2:55 pm Well, I guess there is no way a queen sacrifice can be compensate by static evaluation even with attack table.
Maybe simply not applying LMR on moves that are checks may help to find tricky wins.
Yes, in that kind of position, an average human chessplayer (around 1800) can be superior to an engine rated 3200+.
That's really a weak point of current engines.
As a human thinks : "1) hmmm, this queen sacrifice attracts the king in a dangerous area where my pieces control a lot of squares. 2) Let's verify if I can mate this king there. 3) yes, I see a forced mate : 1-0 "
smcracraft
Posts: 737
Joined: Wed Mar 08, 2006 8:08 pm
Location: Orange County California
Full name: Stuart Cracraft

Re: LMR and sacrifices

Post by smcracraft »

User avatar
xr_a_y
Posts: 1871
Joined: Sat Nov 25, 2017 2:28 pm
Location: France

Re: LMR and sacrifices

Post by xr_a_y »

Vinvin wrote: Mon Dec 10, 2018 1:48 pm
jwes wrote: Sun Nov 04, 2018 9:22 pm I was wondering what methods people use in distinguishing between between sacrifices that appear to lose material but should not be reduced and bad moves which do lose material and should be reduced.
The most absurd position I know.
Mate in 8 :
[d]rnbq3r/pppp4/3b1pkp/5p2/2BP4/4P3/PPP2PPP/RN1QK2R w KQ - bm Qh5+;
Was wonderig how much time it take to get it (without any pruning : "matefinder" mode) with Minic, here's the anwser

Code: Select all

# FEN rnbq3r/pppp4/3b1pkp/5p2/2BP4/4P3/PPP2PPP/RN1QK2R w KQ - 0 1
#
# Info  2018-12-10 14:27:49-483: msecPerMove   86400000
# Info  2018-12-10 14:27:49-483: msecWholeGame -1
# Info  2018-12-10 14:27:49-483: msecInc       -1
# Info  2018-12-10 14:27:49-483: nbMoveInTC    -1
# Info  2018-12-10 14:27:49-483: Search Sync
# Info  2018-12-10 14:27:49-483: Wait for workers to be ready
# Info  2018-12-10 14:27:49-483: ...ok
# Info  2018-12-10 14:27:49-483: Calling main thread search
# Info  2018-12-10 14:27:49-483: Search launched 0
# Info  2018-12-10 14:27:49-483: Search called
# Info  2018-12-10 14:27:49-483: currentMoveMs 86400000
# Info  2018-12-10 14:27:49-483: requested depth 18
# Info  2018-12-10 14:27:49-483: Init stat
# Info  2018-12-10 14:27:49-483: Init killers
# Info  2018-12-10 14:27:49-483: Init history
1 -169 0 40 2 40 0      O-O  EBF: 40
2 -207 0 133 3 133 0    O-O h8e8  EBF: 3.325
3 -172 0 413 6 412 0    O-O h8e8 b1c3  EBF: 3.10526
4 -194 1 5567 8 463 0   c4d3 d6b4 b1c3 b4c3 b2c3 h8e8  EBF: 13.4794
5 -171 2 11216 10 509 0         c4d3 h8g8 b1c3 g8e8 O-O  EBF: 2.01473
6 -172 9 70882 13 770 1         c4d3 h6h5 g2g4 g6g7 d3f5 h5g4  EBF: 6.31972
7 -141 23 263985 14 1123 9      c4d3 g6g7 d3f5 h8e8 O-O b8c6 b1c3  EBF: 3.72429
8 -125 50 813519 18 1617 32     c4d3 h6h5 d1f3 g6g7 f3f5 h8h6 O-O b8c6  EBF: 3.08169
9 -126 121 2802143 18 2313 90   c4d3 c7c5 d4c5 d6e5 d1g4 g6f7 g4h5 f7g7 d3f5 e5b2 h5g6  EBF: 3.44447
10 -116 285 7484911 19 2618 257         c4d3 c7c5 d4c5 d6e5 b1c3 h6h5 e3e4 f5e4 d3e4 f6f5 e4d5  EBF: 2.67114
11 -118 914 23431193 21 2562 997        c4d3 c7c5 d4c5 d6e5 b1c3 h6h5 d1f3 d7d6 c5d6 e5c3 b2c3 d8d6  EBF: 3.13046
12 -110 5184 127396231 23 2457 4916     c4d3 c7c5 d4d5 h8g8 d1g4 g6f7 g4h5 f7e7 O-O d6e5 h5h6 e5b2 h6h7 e7f8 h7h6  EBF: 5.43704
13 -111 19436 470218463 28 2419 21507   c4d3 c7c5 d4d5 g6g7 d3f5 d8b6 b2b3 h8d8 d1g4 g7h8 g4g6 d6f8 O-O f8g7  EBF: 3.69099
14 -107 80296 2011420214 29 2504 98292  c4d3 b8c6 d1g4 g6f7 g4f5 c6e7 f5h5 f7f8 O-O d8e8 h5f3 e8f7 b1c3 f8g8 f3g4 f7g7 d3c4  EBF: 4.27763
15 -112 366788 9457385145 30 2578 511128        c4d3 b8c6 d1g4 g6f7 g4f5 c6e7 f5h5 f7g7 b1c3 f6f5 d3f5 e7f5 h5f5 h
8f8 f5e4 f8e8 e4f5  EBF: 4.70184
16 9984 2863826 71599300708 33 2500 4364448     d1h5 g6h5 c4f7 h5h4 b1d2 d6b4 c2c3 f5f4 d2f3 h4g4 e3e4 b4c3 b2c3 b8c6 h2h3  EBF: 7.57073
8 hours ...