6

Do the new chess AIs, such as Alpha Zero and Leela Zero, play gambits?

By gambit, I do not mean a merely nominal gambit like the mainline Queen's Gambit, but rather a genuinely speculative offer of opening material like Evans' Gambit, for example—or like the gambit @Akavall gives below.

1
  • 2
    Good question. But, in order to find answer to your question, one needs to have a database of all games played between Alpha zero and say, Stockfish. Is there such a database available? I could find only 10 games at chessgames.com.
    – user14405
    Commented Apr 11, 2018 at 10:56

5 Answers 5

7

Sure, this line of Queen's Indian came up:

[FEN ""] 
[White "AlphaZero (Computer)"]
[Black "Stockfish (Computer)"]

1. Nf3 Nf6 2. d4 e6 3. c4 b6 4. g3 Bb7 5. Bg2 Be7 6. O-O O-O
7. d5 exd5 8. Nh4 c6 9. cxd5 Nxd5 10. Nf5 Nc7 11. e4 d5
12. exd5 Nxd5 13. Nc3 Nxc3 14. Qg4 g6 15. Nh6+ Kg7 16. bxc3
Bc8 17. Qf4 Qd6 18. Qa4 g5 19. Re1 Kxh6 20. h4 f6 21. Be3 Bf5
22. Rad1 Qa3 23. Qc4 b5 24. hxg5+ fxg5 25. Qh4+ Kg6 26. Qh1
Kg7 27. Be4 Bg6 28. Bxg6 hxg6 29. Qh3 Bf6 30. Kg2 Qxa2 31. Rh1
Qg8 32. c4 Re8 33. Bd4 Bxd4 34. Rxd4 Rd8 35. Rxd8 Qxd8 36. Qe6
Nd7 37. Rd1 Nc5 38. Rxd8 Nxe6 39. Rxa8 Kf6 40. cxb5 cxb5
41. Kf3 Nd4+ 42. Ke4 Nc6 43. Rc8 Ne7 44. Rb8 Nf5 45. g4 Nh6
46. f3 Nf7 47. Ra8 Nd6+ 48. Kd5 Nc4 49. Rxa7 Ne3+ 50. Ke4 Nc4
51. Ra6+ Kg7 52. Rc6 Kf7 53. Rc5 Ke6 54. Rxg5 Kf6 55. Rc5 g5
56. Kd4 1-0

I got this game from chessgames.com: game

4
  • 1
    "Queen's Gambit doesn't count" in the question. I think the question is about dubious gambits where there's no definitive compensation in search horizon. Evan's Gambit is one of those.
    – SmallChess
    Commented Apr 11, 2018 at 3:08
  • 3
    Queen's Gambit is not really gambit most of the time, so I thought this is the reason it was excluded. In the opening that I posted white does not get back the material for a very long time, so I don't think there was any material compensation that the engine could see. I think my answer qualifies for the main part of the question. As for bonus, I don't think 3000+ engine will play an unsound gambit ;), unless we, humans, erred in its evaluation and the gambit is truly sound!
    – Akavall
    Commented Apr 11, 2018 at 3:30
  • 1
    I take the point of the question to be whether AlphaZero would ever play one of the Gambits that we have thought to be unsound. I think the following question is an interesting variation. By whatever iterative process, Alpha Zero has converged on a view of chess in which closed games predominate, so how would it defend against a gambit?
    – Philip Roe
    Commented Apr 11, 2018 at 16:15
  • @Akavall understood my question correctly. I should have worded the question differently. I will edit it now.
    – thb
    Commented Apr 11, 2018 at 19:22
6

Most chess engines don't play dubious gambits, or gambits with serious material loss(like the Halloween gambit.)

I found two games where Stockfish and Houdini played each other to draws in the Evans Gambit at these links:

In fact, Komodo has played the King's Gambit against Stockfish!

[FEN ""]
[White "Komodo (Computer)"]
[Black "Stockfish (Computer)"]

1. e4 e5 2. f4 exf4 3. Nf3 Be7 4. Nc3 Bh4+ 5. Ke2 d6 6. d4 Bg4
7. Bxf4 Nc6 8. Qd3 Nge7 9. Kd2 Bf6 10. e5 Bf5 11. exf6 Bxd3
12. fxe7 Qd7 13. Bxd3 Nxe7 14. Raf1 O-O 15. Kc1 a6 16. h4 b5
17. h5 b4 18. Nd1 Nd5 19. Bd2 a5 20. Nh4 c6 21. Rf3 Nc7
22. Nf5 Ne6 23. d5 cxd5 24. Nde3 Nc5 25. Nxd5 Nxd3+ 26. Rxd3
Rae8 27. Rf1 f6 28. h6 g6 29. Nfe3 f5 30. Nc4 f4 31. Rxf4 Rxf4
32. Bxf4 Re1+ 33. Kd2 Re6 34. b3 Qd8 35. Kc1 g5 36. Rg3 Rg6
37. Be3 Kf7 38. Rf3+ Ke6 39. Ncb6 Rxh6 40. Bd4 g4 41. Rf1 Qh4
42. Nc7+ Ke7 43. Kb2 Qg5 44. a4 bxa3+ 45. Kxa3 Qg6 46. c4 a4
47. Ncd5+ Ke8 48. Re1+ Kd8 49. Re7 Qd3 50. Bc3 1-0

Gambits do happen, just very rarely.

3
  • I like your answer and hope that you will leave it posted. The answer is informative and its example is illuminating. However, my question specifically regards the new chess AIs, the AIs (to the extent to which I understand correctly) whose evaluation and quiescence functions are self-trained recurrent neural networks. Stockfish, Houdini and Komodo are old-style AIs that normally play from opening books as far as I know.
    – thb
    Commented Apr 16, 2018 at 22:32
  • 1
    I haven't seen any of the newer chess AI's(Leela, Alphazero) play serious gambits. That's why I posted these older games.
    – Razetime
    Commented Apr 17, 2018 at 4:08
  • But in these games you posted here the Evans Gambit was chosen by the engines or was played because it was in the opening book? I assume the question is only interesting when the engine plays a gambit out of its opening book.
    – emdio
    Commented May 31, 2020 at 18:54
3

From what we've seen of Alpha Zero, the answer appears to be yes. Its games showed it playing gambits where there was no immediate way to reclaim the material. Often, Alpha Zero's compensation was just long-term active piece play (or some positional edge). As an example, see the game posted by Akavall. In that game, Alpha Zero sacrifices a Knight, and just gets long-term compensation for almost the next 20 moves.

Alpha Zero plays more "intuitive chess" because it is a constructivist machine (it learned the game by playing with itself over and over again). None of its strategies were given by its human programmers, meaning that Alpha Zero must have learned "active piece play" is more important than mere material.

Comparatively, constructionist engines like Stockfish and Houdini (which just follow rules given by their human programmers) are unable to play more intuitively, since they're bound by these rules. The moves they choose are based off their evaluations of positions, and these evaluations must follow strict rules. For example, a Knight is worth "3 points", space advantages of x amount are worth "x points". This severely limits the intuitive capabilities of these engines, which is why they don't tend to play "true" sacrifices as often as constructivist engines like Alpha Zero.

2

Update 31 May 2020

If left alone, the trained Leela nets play a very predictable set of openings. These openings, however, are not gambits - instead they go for the best & most solid lines that never lead to unbalanced positions.

For example, if you let Leela play against itself, there's a good chance you'll see Ruy Lopez Berlins every game (depends on the exact net).

-1

I found a few stockfish vs. alphazero evans gambits.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.