Why you need opening book for Stockfish!

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

Moderators: hgm, Rebel, chrisw

Nay Lin Tun
Posts: 708
Joined: Mon Jan 16, 2012 6:34 am

Why you need opening book for Stockfish!

Post by Nay Lin Tun »

[pgn][Event "CCC 7: Blitz Bonanza Final (5|2)"] [Site "?"] [Date "2019.04.09"] [Round "1"] [White "Lc0"] [Black "Stockfish"] [Result "1-0"] [ECO "B07"] [GameDuration "00:13:29"] [GameEndTime "2019-04-09T18:09:21.341 PDT"] [GameStartTime "2019-04-09T17:55:51.834 PDT"] [Opening "Pirc defense"] [PlyCount "163"] [TimeControl "300+2"] 1. e4 d6 2. d4 Nf6 3. Nc3 g6 4. Be3 Bg7 5. Qd2 O-O 6. f3 c6 7. O-O-O h5 8. g4 hxg4 9. h4 b5 10. h5 Nxh5 11. Bh6 f6 12. Bd3 e5 13. fxg4 Bxg4 14. Be2 Qd7 15. Rh4 Bxe2 16. Ngxe2 Kh7 17. Bxg7 Qxg7 18. Kb1 Kg8 19. Rxh5 gxh5 20. Rg1 Qxg1+ 21. Nxg1 a6 22. a3 Ra7 23. Nf3 a5 24. Nh4 b4 25. Nd1 Rg7 26. Nf5 Rh7 27. axb4 exd4 28. Qxd4 Nd7 29. bxa5 Ne5 30. Nf2 Rd7 31. Qe3 h4 32. Nxh4 Rb8 33. b3 Rh7 34. Nf5 Ra8 35. Nxd6 Rd8 36. Nf5 Ra8 37. Nd3 Nxd3 38. Qxd3 Kf7 39. b4 Kg6 40. Kb2 Raa7 41. Qg3+ Kf7 42. e5 Ke6 43. Nd4+ Kd5 44. exf6 Kxd4 45. Qd6+ Ke4 46. Qxc6+ Ke5 47. Qc3+ Kd5 48. Qd3+ Kc6 49. Qc4+ Kd6 50. Qf4+ Kd5 51. c4+ Ke6 52. c5 Kd5 53. Kb3 Ke6 54. Ka4 Raf7 55. Qe4+ Kxf6 56. a6 Rhg7 57. b5 Rd7 58. Ka5 Rg1 59. c6 Ra1+ 60. Kb6 Rd6 61. Qe8 Ra4 62. Qf8+ Ke5 63. Qg7+ Kf5 64. Qh7+ Kf6 65. Qh6+ Ke5 66. Qxd6+ Kxd6 67. a7 Ra3 68. c7 Kd7 69. Kb7 Rxa7+ 70. Kxa7 Kxc7 71. b6+ Kd6 72. b7 Kd5 73. b8=Q Ke4 74. Qc8 Kf4 75. Kb6 Ke3 76. Kc5 Kd3 77. Qe8 Kc2 78. Kc4 Kd2 79. Qe6 Kc1 80. Kc3 Kd1 81. Qe8 Kc1 82. Qe1# 1-0[/pgn]


At move 7. Stockfish played 7..... h5 assuming black is ok
cap4.png


However within 4 moves later at move 11. ... f6,
she knows that she is dead!






On the reverse game, at move 4, SF played 4. Nf3?? It is really a questionable move because it develops piece immediately but it blocks further attack on centre or king side. Eventually the game ended as draw.
[pgn][Event "CCC 7: Blitz Bonanza Final (5|2)"] [Site "?"] [Date "2019.04.09"] [Round "1"] [White "Stockfish"] [Black "Lc0"] [Result "*"] [ECO "B08"] [GameStartTime "2019-04-09T17:39:29.964 PDT"] [Opening "Pirc"] [Termination "unterminated"] [TimeControl "300+2"] [Variation "Classical (Two knights) system"] 1. e4 d6 2. d4 Nf6 3. Nc3 g6 4. Nf3 Bg7 5. Bg5 O-O 6. Be2 c5 7. dxc5 Qa5 8. O-O Qxc5 9. Be3 Qa5 10. h3 Nc6 11. a3 Bd7 12. Qd3 Rfc8 13. Nd5 Ne8 14. c4 Bxb2 15. Rab1 Qxa3 16. Qc2 Bg7 17. Rxb7 Rd8 18. Rb3 Qa5 19. Bd2 Qa6 20. Rfb1 Qc8 21. Bg5 Kf8 22. Qd2 Be6 23. Be3 Kg8 24. Ng5 Nc7 25. h4 Na6 26. h5 Nc5 27. Bxc5 dxc5 28. hxg6 hxg6 29. Qf4 Bh6 30. Qh4 Kg7 31. Nxe6+ Qxe6 32. Rh3 g5 33. Qg3 Rd6 34. Rf1 Rh8 35. f4 Kf8 36. fxg5 Bg7 37. Bh5 Nd8 38. Qf3 Be5 39. g6 a5 40. Qd1 Bg7 41. Qe2 Qe5 42. gxf7 Ne6 43. Kh1 Rh6 44. Rf5 Qa1+ 45. Rf1 Qe5 46. Qg4 Qg5 47. Qd1 Nd4 48. Nf4 Nc6 49. Qe2 a4 50. g3 Be5 51. Qh2 Bg7 52. e5 Qxe5 53. g4 Qg5 54. Qe2 Be5 55. Nd3 Rhf6 56. Nxc5 Nd4 57. Rb1 Qxh5 58. Rxh5 Nxe2 59. Rxe5 Rf2 60. Ne4 Rh6+ 61. Rh5 Rxh5+ 62. gxh5 Rf5 63. h6 Kxf7 64. Kg2 a3 65. Ra1 Ra5 66. Kf2 Nd4 67. h7 Kg7 68. Rh1 Kh8 69. Ke3 Nc6 70. c5 Nd8 71. Kd4 a2 72. Ra1 Ne6+ 73. Ke5 Nc7 74. Kd4 Ra4+ 75. Kd3 Nd5 76. Ng5 Rg4 77. Ne6 Ra4 78. Kc2 Ra6 79. Ng5 Rg6 80. Ne4 Rg4 81. Nd2 Rg3 82. c6 Kxh7 83. c7 Rc3+ 84. Kb2 Rxc7 85. Rxa2 Ne3 86. Ra3 Nd1+ 87. Kb3 Kg6 88. Ra6+ Kf5 89. Ra5+ Kf4 90. Ra4+ Ke3 91. Nc4+ Ke4 92. Nb2+ Kf3 93. Nxd1 1/2-1/2[/pgn]

Conclusion! Book move as up to move 3, and just out of book move , SF played several sub-optimal moves in opening and died at move 11 which could have been saved if there is opening book up to move 12. This is an example of how SF is horrible in opening phase. A lot of Leela advantage come from opening phase and the result of testing will differ much on the depth of opening book.
Nay Lin Tun
Posts: 708
Joined: Mon Jan 16, 2012 6:34 am

Re: Why you need opening book for Stockfish!

Post by Nay Lin Tun »

cap4.png
pic at move 11. f6
MikeGL
Posts: 1010
Joined: Thu Sep 01, 2011 2:49 pm

Re: Why you need opening book for Stockfish!

Post by MikeGL »

I think I have also seen h5 or its transpositions played by top GM's but current engines would punish this move with hairstrand accuracy.
Usually arises in sicilian dragons too. I feel like that h5 of SF10 was previously played too.
I told my wife that a husband is like a fine wine; he gets better with age. The next day, she locked me in the cellar.
Nay Lin Tun
Posts: 708
Joined: Mon Jan 16, 2012 6:34 am

Re: Why you need opening book for Stockfish!

Post by Nay Lin Tun »

Capture (2).PNG
I think it is not a good idea to do 0-0 without any initiate attack in queen side, better delay castling. ( Leela doesnt like those 4 moves from move 4 to 6).
After move 7... instead of h5, it would be better to start attacking back on white queen side as quick as possible.

Here is a game with my gtx 1060, approx 10 secs per move, how leela will respond as black in that position,
[pgn][Event "Computer chess game"] [Site "DESKTOP-U9VVTOA"] [Date "2019.04.11"] [Round "?"] [White "Nay Lin Tun"] [Black "Nay Lin Tun"] [Result "*"] [BlackElo "2400"] [ECO "B07"] [Opening "Pirc"] [Time "20:30:06"] [Variation "150 Attack, 4.Be3 Bg7 5.Qd2"] [WhiteElo "2400"] [TimeControl "300+2"] [Termination "unterminated"] [PlyCount "30"] [WhiteType "human"] [BlackType "human"] 1. e4 d6 2. d4 Nf6 3. Nc3 g6 4. Be3 Bg7 5. Qd2 O-O 6. f3 c6 7. O-O-O b5 8. Bh6 Qa5 9. h4 Be6 10. Bxg7 Kxg7 11. h5 b4 12. Nb1 Nbd7 13. g4 Qxa2 14. Bd3 c5 15. hxg6 fxg6 * [/pgn]
jp
Posts: 1470
Joined: Mon Apr 23, 2018 7:54 am

Re: Why you need opening book for Stockfish!

Post by jp »

Nay Lin Tun wrote: Thu Apr 11, 2019 12:26 am This is an example of how SF is horrible in opening phase. A lot of Leela advantage come from opening phase and the result of testing will differ much on the depth of opening book.
Yes, all the testing points to that. It's not satisfying at all to me.
Nay Lin Tun
Posts: 708
Joined: Mon Jan 16, 2012 6:34 am

Re: Why you need opening book for Stockfish!

Post by Nay Lin Tun »

jp
Posts: 1470
Joined: Mon Apr 23, 2018 7:54 am

Re: Why you need opening book for Stockfish!

Post by jp »

What does he mean by 'reverse analysis'?
supersharp77
Posts: 1242
Joined: Sat Jul 05, 2014 7:54 am
Location: Southwest USA

Re: Why you need opening book for Stockfish!

Post by supersharp77 »

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1-0[/pgn]

At move 7. Stockfish played 7..... h5 assuming black is ok
cap4.png


However within 4 moves later at move 11. ... f6,
she knows that she is dead!


On the reverse game, at move 4, SF played 4. Nf3?? It is really a questionable move because it develops piece immediately but it blocks further attack on centre or king side. Eventually the game ended as draw.


Conclusion! Book move as up to move 3, and just out of book move , SF played several sub-optimal moves in opening and died at move 11 which could have been saved if there is opening book up to move 12. This is an example of how SF is horrible in opening phase. A lot of Leela advantage come from opening phase and the result of testing will differ much on the depth of opening book.
Game #1 was interesting (F3 attack line vs Pirc defense)...for one thing Stockfish does not play the Pirc without being forced to by the opening book...that line (f3 attack line) is not played too often and is quite complex similar to the Dragon variation. The pawn capture hxg4 is at best questionable and at worse..losing....LC0 excels at these sort of positions...hxg4 not found in my million games database at all (mostly GM games)...black wants to play on the queenside..not in front of his kingside.... :) :wink:

Pirc Games
http://s000.tinyupload.com/?file_id=048 ... 6791520061


ps. Game #2 Thats how Stockfish plays such positions...
MikeGL
Posts: 1010
Joined: Thu Sep 01, 2011 2:49 pm

Re: Why you need opening book for Stockfish!

Post by MikeGL »

supersharp77 wrote: Thu Apr 11, 2019 9:44 pm
Nay Lin Tun wrote: Thu Apr 11, 2019 12:26 am [pgn][Event "CCC 7: Blitz Bonanza Final (5|2)"] 1. e4 d6 2. d4 Nf6 3. Nc3 g6 4. Be3 Bg7 5. Qd2 O-O 6. f3 c6 7. O-O-O h5 8. g4 hxg4 9. h4 b5 10. h5 Nxh5 11. Bh6 f6 12. Bd3 e5 13. fxg4 Bxg4 14. Be2 Qd7 15. Rh4 Bxe2 16. Ngxe2 Kh7 17. Bxg7 Qxg7 18. Kb1 Kg8 19. Rxh5 gxh5 20. Rg1 Qxg1+ 21. Nxg1 a6 22. a3 Ra7 23. Nf3 a5 24. Nh4 b4 25. Nd1 Rg7 26. Nf5 Rh7 27. axb4 exd4 28. Qxd4 Nd7 29. bxa5 Ne5 30. Nf2 Rd7 31. Qe3 h4 32. Nxh4 Rb8 33. b3 Rh7 34. Nf5 Ra8 35. Nxd6 Rd8 36. Nf5 Ra8 37. Nd3 Nxd3 38. Qxd3 Kf7 39. b4 Kg6 40. Kb2 Raa7 41. Qg3+ Kf7 42. e5 Ke6 43. Nd4+ Kd5 44. exf6 Kxd4 45. Qd6+ Ke4 46. Qxc6+ Ke5 47. Qc3+ Kd5 48. Qd3+ Kc6 49. Qc4+ Kd6 50. Qf4+ Kd5 51. c4+ Ke6 52. c5 Kd5 53. Kb3 Ke6 54. Ka4 Raf7 55. Qe4+ Kxf6 56. a6 Rhg7 57. b5 Rd7 58. Ka5 Rg1 59. c6 Ra1+ 60. Kb6 Rd6 61. Qe8 Ra4 62. Qf8+ Ke5 63. Qg7+ Kf5 64. Qh7+ Kf6 65. Qh6+ Ke5 66. Qxd6+ Kxd6 67. a7 Ra3 68. c7 Kd7 69. Kb7 Rxa7+ 70. Kxa7 Kxc7 71. b6+ Kd6 72. b7 Kd5 73. b8=Q Ke4 74. Qc8 Kf4 75. Kb6 Ke3 76. Kc5 Kd3 77. Qe8 Kc2 78. Kc4 Kd2 79. Qe6 Kc1 80. Kc3 Kd1 81. Qe8 Kc1 82. Qe1# 1-0[/pgn]

At move 7. Stockfish played 7..... h5 assuming black is ok
cap4.png


However within 4 moves later at move 11. ... f6,
she knows that she is dead!


On the reverse game, at move 4, SF played 4. Nf3?? It is really a questionable move because it develops piece immediately but it blocks further attack on centre or king side. Eventually the game ended as draw.


Conclusion! Book move as up to move 3, and just out of book move , SF played several sub-optimal moves in opening and died at move 11 which could have been saved if there is opening book up to move 12. This is an example of how SF is horrible in opening phase. A lot of Leela advantage come from opening phase and the result of testing will differ much on the depth of opening book.
Game #1 was interesting (F3 attack line vs Pirc defense)...for one thing Stockfish does not play the Pirc without being forced to by the opening book...that line (f3 attack line) is not played too often and is quite complex similar to the Dragon variation. The pawn capture hxg4 is at best questionable and at worse..losing....LC0 excels at these sort of positions...hxg4 not found in my million games database at all (mostly GM games)...black wants to play on the queenside..not in front of his kingside.... :) :wink:

Pirc Games
http://s000.tinyupload.com/?file_id=048 ... 6791520061


ps. Game #2 Thats how Stockfish plays such positions...
Million Base DB posted and updated by Rebel Programmer Ed Schroder includees the game.
I think it is correspondence game.

[pgn] [Event "cr."] [Site "cr."] [Date "1993.01.01"] [Round "1"] [White "Slawinski"] [Black "Machycek, L."] [Result "1-0"] 1.e4 d6 2.d4 Nf6 3.Nc3 g6 4.Be3 Bg7 5.Qd2 O-O 6.f3 c6 7.h4 h5 8.O-O-O b5 9.g4 hxg4 10.h5 Nxh5 11.Bh6 f6 12.fxg4 Bxg4 13.Be2 Qd7 14.Rh4 Be6 15.Bxh5 gxh5 16.Nf3 Bg4 17.Rg1 Rf7 18.Nh2 b4 19.Nxg4 bxc3 20.Qg2 Qb7 21.bxc3 Kf8 22.Rxh5 e6 23.Nxf6 Bxh6+ 24.Rxh6 Na6 25.Qg6 1-0 [/pgn]

[Event "cr."]
[Site "cr."]
[Date "1993.01.01"]
[Round "1"]
[White "Slawinski"]
[Black "Machycek, L."]
[Result "1-0"]

1.e4 d6 2.d4 Nf6 3.Nc3 g6 4.Be3 Bg7 5.Qd2 O-O 6.f3 c6 7.h4 h5 8.O-O-O b5
9.g4 hxg4 10.h5 Nxh5 11.Bh6 f6 12.fxg4 Bxg4 13.Be2 Qd7 14.Rh4 Be6 15.Bxh5
gxh5 16.Nf3 Bg4 17.Rg1 Rf7 18.Nh2 b4 19.Nxg4 bxc3 20.Qg2 Qb7 21.bxc3 Kf8
22.Rxh5 e6 23.Nxf6 Bxh6+ 24.Rxh6 Na6 25.Qg6 1-0

[d]rnbq1rk1/p3ppb1/2pp1np1/1p6/3PP1pP/2N1BP2/PPPQ4/2KR1BNR w - - 0 10
There are probably similar games, but you should search using position/ or transposition and not the exact moves.
Maybe many other games without the b5 push but similar position at K-side of the board.
I can also remember similar two games of GM Wesley So where he played with this assault g4! hxg4 h5!, but i think it was a dragon. Against GM Akobian and GM Li Chao. I mean, g4 hxg5 of black is not new.
I told my wife that a husband is like a fine wine; he gets better with age. The next day, she locked me in the cellar.
Nay Lin Tun
Posts: 708
Joined: Mon Jan 16, 2012 6:34 am

Re: Why you need opening book for Stockfish!

Post by Nay Lin Tun »

jp wrote: Thu Apr 11, 2019 6:11 pm What does he mean by 'reverse analysis'?
It is Bryan's Invention. A kind of compairing backward, forward manual analysis. Only he can tell in detail.