AlphaZero vs Stockfish

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

Moderators: hgm, Rebel, chrisw

MikeGL
Posts: 1010
Joined: Thu Sep 01, 2011 2:49 pm

Re: AlphaZero vs Stockfish

Post by MikeGL »

AdminX wrote:
Lion wrote:I looked again the game in which AlphaZero sacrifices a knight on h6.
I don’t believe this is brute force calculation so it makes what AlphaZero did even more impressive!
I viewed the game in question, and felt AlphaZero's play was almost Paul Morphy like in style. Beautiful play resulting in wonderful game to behold.
Indeed. Those games have so many test positions which are very deep.
One of them is the following,

[d]r2q1rk1/pb1nbppp/2p1p3/1p2P3/1PpPN1Q1/2B3P1/P4PBP/R4RK1 w - - 6 17
After 16...Nd7 of black, it is almost impossible for top engines to consider 17.Nc5 because
the Ne4 is already well placed and should not be exchanged.

But the idea by AlphaZero is very deep, this Nc5 move would trap the light-square Bishop
of black and will require a lot of time to free up, but wasn't freed up even until the end of the
game. It remained hemmed in to its own pawns.

So in my opinion, this 17.Nc5!! move is a very deep positional move which was understood
by AlphaZero, but not by current top engines. Because why would current engines exchange
a well placed piece?

Following is the game where the above position arised.

[pgn]
[Event "?"]
[Site "?"]
[Date "2017.12.06"]
[Round "8"]
[White "AlphaZero"]
[Black "Stockfish 8"]
[Result "1-0"]
[TimeControl "40/1260:300"]
[Termination "normal"]
[PlyCount "135"]
[WhiteType "human"]
[BlackType "human"]

1. d4 Nf6 2. c4 e6 3. Nf3 b6 4. g3 Bb7 5. Bg2 Bb4+ 6. Bd2 Be7 7. Nc3 c6 8.
e4 d5 9. e5 Ne4 10. O-O Ba6 11. b3 Nxc3 12. Bxc3 dxc4 13. b4 b5 14. Nd2 O-O
15. Ne4 Bb7 16. Qg4 Nd7 17. Nc5 Nxc5 18. dxc5 a5 19. a3 axb4 20. axb4 Rxa1
21. Rxa1 Qd3 22. Rc1 Ra8 23. h4 Qd8 24. Be4 Qc8 25. Kg2 Qc7 26. Qh5 g6 27.
Qg4 Bf8 28. h5 Rd8 29. Qh4 Qe7 30. Qf6 Qe8 31. Rh1 Rd7 32. hxg6 fxg6 33.
Qh4 Qe7 34. Qg4 Rd8 35. Bb2 Qf7 36. Bc1 c3 37. Be3 Be7 38. Qe2 Bf8 39. Qc2
Bg7 40. Qxc3 Qd7 41. Rc1 Qc7 42. Bg5 Rf8 43. f4 h6 44. Bf6 Bxf6 45. exf6
Qf7 46. Ra1 Qxf6 47. Qxf6 Rxf6 48. Ra7 Rf7 49. Bxg6 Rd7 50. Kf2 Kf8 51. g4
Bc8 52. Ra8 Rc7 53. Ke3 h5 54. gxh5 Kg7 55. Ra2 Re7 56. Be4 e5 57. Bxc6
exf4+ 58. Kxf4 Rf7+ 59. Ke5 Rf5+ 60. Kd6 Rxh5 61. Rg2+ Kf6 62. Kc7 Bf5 63.
Kb6 Rh4 64. Ka5 Bg4 65. Bxb5 Ke7 66. Rg3 Bc8 67. Re3+ Kf7 68. Be2 1-0
[/pgn]
Vinvin
Posts: 5228
Joined: Thu Mar 09, 2006 9:40 am
Full name: Vincent Lejeune

Re: AlphaZero vs Stockfish

Post by Vinvin »

Lyudmil Tsvetkov
Posts: 6052
Joined: Tue Jun 12, 2012 12:41 pm

Re: AlphaZero vs Stockfish

Post by Lyudmil Tsvetkov »

MikeGL wrote:
AdminX wrote:
Lion wrote:I looked again the game in which AlphaZero sacrifices a knight on h6.
I don’t believe this is brute force calculation so it makes what AlphaZero did even more impressive!
I viewed the game in question, and felt AlphaZero's play was almost Paul Morphy like in style. Beautiful play resulting in wonderful game to behold.
Indeed. Those games have so many test positions which are very deep.
One of them is the following,

[d]r2q1rk1/pb1nbppp/2p1p3/1p2P3/1PpPN1Q1/2B3P1/P4PBP/R4RK1 w - - 6 17
After 16...Nd7 of black, it is almost impossible for top engines to consider 17.Nc5 because
the Ne4 is already well placed and should not be exchanged.

But the idea by AlphaZero is very deep, this Nc5 move would trap the light-square Bishop
of black and will require a lot of time to free up, but wasn't freed up even until the end of the
game. It remained hemmed in to its own pawns.

So in my opinion, this 17.Nc5!! move is a very deep positional move which was understood
by AlphaZero, but not by current top engines. Because why would current engines exchange
a well placed piece?

Following is the game where the above position arised.

[pgn]
[Event "?"]
[Site "?"]
[Date "2017.12.06"]
[Round "8"]
[White "AlphaZero"]
[Black "Stockfish 8"]
[Result "1-0"]
[TimeControl "40/1260:300"]
[Termination "normal"]
[PlyCount "135"]
[WhiteType "human"]
[BlackType "human"]

1. d4 Nf6 2. c4 e6 3. Nf3 b6 4. g3 Bb7 5. Bg2 Bb4+ 6. Bd2 Be7 7. Nc3 c6 8.
e4 d5 9. e5 Ne4 10. O-O Ba6 11. b3 Nxc3 12. Bxc3 dxc4 13. b4 b5 14. Nd2 O-O
15. Ne4 Bb7 16. Qg4 Nd7 17. Nc5 Nxc5 18. dxc5 a5 19. a3 axb4 20. axb4 Rxa1
21. Rxa1 Qd3 22. Rc1 Ra8 23. h4 Qd8 24. Be4 Qc8 25. Kg2 Qc7 26. Qh5 g6 27.
Qg4 Bf8 28. h5 Rd8 29. Qh4 Qe7 30. Qf6 Qe8 31. Rh1 Rd7 32. hxg6 fxg6 33.
Qh4 Qe7 34. Qg4 Rd8 35. Bb2 Qf7 36. Bc1 c3 37. Be3 Be7 38. Qe2 Bf8 39. Qc2
Bg7 40. Qxc3 Qd7 41. Rc1 Qc7 42. Bg5 Rf8 43. f4 h6 44. Bf6 Bxf6 45. exf6
Qf7 46. Ra1 Qxf6 47. Qxf6 Rxf6 48. Ra7 Rf7 49. Bxg6 Rd7 50. Kf2 Kf8 51. g4
Bc8 52. Ra8 Rc7 53. Ke3 h5 54. gxh5 Kg7 55. Ra2 Re7 56. Be4 e5 57. Bxc6
exf4+ 58. Kxf4 Rf7+ 59. Ke5 Rf5+ 60. Kd6 Rxh5 61. Rg2+ Kf6 62. Kc7 Bf5 63.
Kb6 Rh4 64. Ka5 Bg4 65. Bxb5 Ke7 66. Rg3 Bc8 67. Re3+ Kf7 68. Be2 1-0
[/pgn]
that would only confirm my theory about 2 friendly pawns on advanced ranks across a file, like e5 and c5 are after the exchange, being an asset and very strong at that.
Lyudmil Tsvetkov
Posts: 6052
Joined: Tue Jun 12, 2012 12:41 pm

Re: AlphaZero vs Stockfish

Post by Lyudmil Tsvetkov »

MikeGL wrote:
Lyudmil Tsvetkov wrote:
Lion wrote:I looked again the game in which AlphaZero sacrifices a knight on h6.
I don’t believe this is brute force calculation so it makes what AlphaZero did even more impressive!
But actually, my games vs the top engines are even deeper and more extravagant.
Care to provide a link to your PGN collection so I can update my crafty.lrn learn file?
Still not available for download to everyone; some people have it, I still have not decided how to tackle that issue with the associated copyright on the books.
But you can find many of my games by browsing different threads here.

I doubt however this can help the play of an engine, as they strongly misplay such positions.
BrendanJNorman
Posts: 2526
Joined: Mon Feb 08, 2016 12:43 am
Full name: Brendan J Norman

Re: AlphaZero vs Stockfish

Post by BrendanJNorman »

MikeGL wrote:
AdminX wrote:
Lion wrote:I looked again the game in which AlphaZero sacrifices a knight on h6.
I don’t believe this is brute force calculation so it makes what AlphaZero did even more impressive!
I viewed the game in question, and felt AlphaZero's play was almost Paul Morphy like in style. Beautiful play resulting in wonderful game to behold.
Indeed. Those games have so many test positions which are very deep.
One of them is the following,

[d]r2q1rk1/pb1nbppp/2p1p3/1p2P3/1PpPN1Q1/2B3P1/P4PBP/R4RK1 w - - 6 17
After 16...Nd7 of black, it is almost impossible for top engines to consider 17.Nc5 because
the Ne4 is already well placed and should not be exchanged.

But the idea by AlphaZero is very deep, this Nc5 move would trap the light-square Bishop
of black and will require a lot of time to free up, but wasn't freed up even until the end of the
game. It remained hemmed in to its own pawns.

So in my opinion, this 17.Nc5!! move is a very deep positional move which was understood
by AlphaZero, but not by current top engines. Because why would current engines exchange
a well placed piece?

Following is the game where the above position arised.

[pgn]
[Event "?"]
[Site "?"]
[Date "2017.12.06"]
[Round "8"]
[White "AlphaZero"]
[Black "Stockfish 8"]
[Result "1-0"]
[TimeControl "40/1260:300"]
[Termination "normal"]
[PlyCount "135"]
[WhiteType "human"]
[BlackType "human"]

1. d4 Nf6 2. c4 e6 3. Nf3 b6 4. g3 Bb7 5. Bg2 Bb4+ 6. Bd2 Be7 7. Nc3 c6 8.
e4 d5 9. e5 Ne4 10. O-O Ba6 11. b3 Nxc3 12. Bxc3 dxc4 13. b4 b5 14. Nd2 O-O
15. Ne4 Bb7 16. Qg4 Nd7 17. Nc5 Nxc5 18. dxc5 a5 19. a3 axb4 20. axb4 Rxa1
21. Rxa1 Qd3 22. Rc1 Ra8 23. h4 Qd8 24. Be4 Qc8 25. Kg2 Qc7 26. Qh5 g6 27.
Qg4 Bf8 28. h5 Rd8 29. Qh4 Qe7 30. Qf6 Qe8 31. Rh1 Rd7 32. hxg6 fxg6 33.
Qh4 Qe7 34. Qg4 Rd8 35. Bb2 Qf7 36. Bc1 c3 37. Be3 Be7 38. Qe2 Bf8 39. Qc2
Bg7 40. Qxc3 Qd7 41. Rc1 Qc7 42. Bg5 Rf8 43. f4 h6 44. Bf6 Bxf6 45. exf6
Qf7 46. Ra1 Qxf6 47. Qxf6 Rxf6 48. Ra7 Rf7 49. Bxg6 Rd7 50. Kf2 Kf8 51. g4
Bc8 52. Ra8 Rc7 53. Ke3 h5 54. gxh5 Kg7 55. Ra2 Re7 56. Be4 e5 57. Bxc6
exf4+ 58. Kxf4 Rf7+ 59. Ke5 Rf5+ 60. Kd6 Rxh5 61. Rg2+ Kf6 62. Kc7 Bf5 63.
Kb6 Rh4 64. Ka5 Bg4 65. Bxb5 Ke7 66. Rg3 Bc8 67. Re3+ Kf7 68. Be2 1-0
[/pgn]
I think it's more a case of the following:

1. "Normal" engines consider that white always has the option of playing Nc5 (since ...c5 isn't coming soon and ...a5 can be met by a3).

2. So they look for other options because chess theory generally says, yes, that to exchange pieces against a cramped opponent is bad.

On the other hand, this concept of playing Nc5 and playing against the b7 bishop isn't new to strong players, even if engines haven't fully given the theme its full weight.

In these Slav/Semi-Slav type structures the idea is very common and even I myself used a very similar idea to dominate a 2400 IM in an otb tournament game once (I offered a draw in a much better position which was accepted though - lack of confidence at the time).

Sometimes, once those pawns are on e5 and d6 (after ...Bxc5 dxc5), white can place a rook on d6 as an exchange sacrifice offer, and if taken, he has a killer passed pawn on d6 and a super powerful b2 bishop as well.

All these ideas have been seen before, but perhaps not yet in computer chess.
shrapnel
Posts: 1339
Joined: Fri Nov 02, 2012 9:43 am
Location: New Delhi, India

Re: AlphaZero vs Stockfish

Post by shrapnel »

BrendanJNorman wrote:All these ideas have been seen before, but perhaps not yet in computer chess.
All the more amazing. A Program using human ideas and STILL beating another Program ! And all this after a few hours of self-training !
Awesome.
Mr Tsvetkov may make all the clever arguments he wants, but the writing is clearly on the wall.
i7 5960X @ 4.1 Ghz, 64 GB G.Skill RipJaws RAM, Twin Asus ROG Strix OC 11 GB Geforce 2080 Tis
MikeGL
Posts: 1010
Joined: Thu Sep 01, 2011 2:49 pm

Re: AlphaZero vs Stockfish

Post by MikeGL »

You have valid points Brendan.

There's another strange move played by AlphaZero which is beyond current engines.

[d]3rr1k1/1b2nnp1/1p3p2/pP1p1P1p/P1pP2P1/q1N1P1QP/2R2RB1/5NK1 w - h6 0 35
After 34...h5, the move of AlphaZero 35.Qc7! is almost impossible for current strong engines.
Ok, at shallow depth 35.Qc7 is considered, but at higher depths it just returns 0.00 for this move.

Then a funny thing happened, a trap was setup by SF8 giving up an en-prise Bb7 but of course it was
not captured, the 35.Qc7 move only forces a Q exchange which would be difficult for current
engines since their own Q are valued much higher than opponent Q during eval and search.

Winning a closed-game by grabbing pawns one at a time.
Quiet game, but also an impressive one.

Following is the complete game where the above position arised,
[pgn]
[Event "?"]
[Site "?"]
[Date "2017.12.06"]
[Round "7"]
[White "AlphaZero"]
[Black "Stockfish 8 Linux version"]
[Result "1-0"]
[TimeControl "40/1260:300"]
[Termination "normal"]
[PlyCount "199"]
[WhiteType "human"]
[BlackType "human"]

1. d4 Nf6 2. c4 e6 3. Nf3 b6 4. g3 Bb7 5. Bg2 Bb4+ 6. Bd2 Bxd2+ 7. Qxd2 d5
8. O-O O-O 9. cxd5 exd5 10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 Bf1 97. Rf5 Bg2 98. Rf4 Rc1 99. Kb2
Rh1 100. a6 1-0
[/pgn]
MikeGL
Posts: 1010
Joined: Thu Sep 01, 2011 2:49 pm

Re: AlphaZero vs Stockfish

Post by MikeGL »

One might argue that AlphaZero will just directly play 33.Qxd6 after 32...Qd6 of SF8 to exchange Queens quickly if that is really the main aim of AlphaZero.
But there's a very subtle difference made by AlphaZero by delaying the forced exchange! It won 1 tempo!

[d]3rr1k1/1b2nnpp/1p1q1p2/pP1p1P2/P1pP2P1/2N1P1QP/3N1RB1/2R3K1 w - - 1 33
after 32...Qd6 of black, if A0 played 33.Qxd6 Rxd6 34.Nf1 h5 35.Rc2 (now it is blacks turn! SF8 didn't lose a tempo with direct exchange of Q)
[d]4r1k1/1b2nnp1/1p1r1p2/pP1p1P1p/P1pP2P1/2N1P2P/2R2RB1/5NK1 b - - 1 35
Position after 35.Rc2 of white, blacks turn to play. This is similar position but black didn't lose a tempo on above line.

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
but if white played the text move (by AlphaZero) which happened in the game,
32...Qd6 33.Nf1!! Qa3 34.Rc2 h5 35.Qc7! Qd6 36.Qxd6 Rxd6 (now it's whites (AlphaZero) turn! with the same position above but AlphaZero stole one tempo.)
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
[d]4r1k1/1b2nnp1/1p1r1p2/pP1p1P1p/P1pP2P1/2N1P2P/2R2RB1/5NK1 w - - 0 37
After 36...Rd6 of black in actual game, it is whites turn.
Vinvin
Posts: 5228
Joined: Thu Mar 09, 2006 9:40 am
Full name: Vincent Lejeune

Re: AlphaZero vs Stockfish

Post by Vinvin »

And now, AlphaZero Vs Stockfish: Hammer Discusses : https://www.youtube.com/watch?v=RqU9Q211A68
Spliffjiffer
Posts: 416
Joined: Thu Aug 02, 2012 7:48 pm
Location: Germany

Re: AlphaZero vs Stockfish

Post by Spliffjiffer »

like everytime there is a "point of no return" and as far as i can tell 27...bxe4!?(instead of 27...bg6? ) was the last chance to head towards a draw imo:
[d]rn3r2/p3b1kp/2p5/1p3bp1/4B3/q1P1B1P1/P4P2/3RR1KQ b
bm 27...bxe4
...at least my efforts were leading nowhere.

my mainline:
1. Qxe4 Kg8 2. Bd4 Rf7 3. Qg4 Na6 4. Re5 Qd6 5. Re6 Qd5 6. Rde1 Nc7 7. R1e5 Qxe6 8. Rxe6 Nxe6 9. Qxe6 c5 10. Be3 Rd8 11. Qa6 b4 12. cxb4 cxb4 13. Qxa7 Rd6...its a draw imo
Wahrheiten sind Illusionen von denen wir aber vergessen haben dass sie welche sind.