How I Beat Stockfish, The World’s Strongest Chess Program

Finally, I was able to discover a weakness of Stockfish 9 in its opening strategy to secure my first victory over the best Chess Engine. 

During my chess days, I studied French Defense with the help of an International Master (a French Defense Expert) and with the help of numerous chess books available during that time including a collection of Botvinnik’s selected games.

Botvinnik (former World Chess Champion) has many instructive games using the French Defense and this inspired me to play the Tarrasch Variation because other variations seem to favor Black.

According to, the number one chess engine today is Stockfish 9 with an ELO rating of 3452. The highest ELO rating so far is 2882 by current World Chess Champion Magnus Carlsen.

During my childhood days  I used to play chess against computers like Novag, Kasparov, and Fritz. All of these computers have a common weakness: They can not make an accurate evaluation of their King’s safety. Nowadays, we have more advance technology and those chess programmers might have already corrected some programming errors regarding King’s safety.

I wanted to test whether the issue of King’s safety has already been resolved. When Stockfish replied e6 to my e4 move, I decided to apply my old effective strategy against Stockfish 9.

I made my annotations especially for beginners and intermediate players. Those experts have a better understanding and probably have different views, opinions, or analysis about chess positions.

Here are the moves of my game against Stockfish 9 (100% playing strength):

French Defense

White (michaelnel)   Black (Stockfish 9)

1. e4                         e6

2. d4                         d5

3. Nd2                      Nf6

4. e5                         Nfd7

5. Ngf3                     c5

6. c3                          Be7

7. Bd3                       O-O

8. O-O                       b6

9. Qc2                        h6 (White threatens Bxh7+)

position after 9….h6

Let us just assume that this is the last move of the opening. At first glance you will see that the two bishops are directed towards Black’s King side. White’s two Knights can easily join the attack after accurate maneuvers. White’s two rooks can also join the attack via e-file but I decided to make it different by using g-file and h-file for the rooks.

Now let us do some Math. If you count your minor and major pieces available for attack against Black’s King, it is greater than the available Black’s pieces necessary for immediate defense because his Queen side pieces are not yet developed. Similarly, in basketball, a two vs one situation will almost surely be converted to a basket.

In my opinion, Black’s problems with most variations of French Defense are:

a) development of Queen’s Bishop.

b) weakness on the Kingside defense due to unsatisfactory position of minor pieces.

c) weakness of g and h pawns depending on how Black moves these pawns. These pawns are vulnerable against White’s active pieces.

10. Re1                      Ba6

Black found a way to develop his Queen’s Bishop and exchanged this to White’s active King’s Bishop.

11. Nf1                      Bxd3

12. Qxd3                    Nc6

13. a3                         c4

In my opinion, after this move which is locking the queen-side pawns, Black lost his chance of counter-play on the queenside.

14. Qc2                      b5

15. g4!

position after 15. g4!

Before I made this move, I remembered that Stockfish lost to Alpha Zero because of many unusual moves that the Stockfish program did not expect. I tried to emulate Alpha’s playing style in the hope that I might confuse the  Stockfish engine.

Based on this position, using our intuition, all of White’s forces are available to launch a King-side attack. I decided to use a pawn roller just like in my Kings Indian Defense game against Stockfish (50% strength). The strength does not matter in that case because my purpose on that blog post is to play with less thinking or without thinking too much of variations and sub-variations.

However, in this game (100% strength), I will explain to you that it is also possible to find the best move with less thinking and still win the game.

15.                   ……..Re8

16. Ng3                  Nf8

17. Kg2                   Na5 (obvious pork threat of Nb3 )

18. Be3

I avoided the Knight pork threat because I wanted to preserve the Bishop for possible attack against the Black’s King.

18.                       …..Nb3

19. Rad1                  Ng6

20. Rh1                    a5

21. h4!

This time I tried to imitate Alpha’s positional pawn sacrifice. Let us do again some Math. You can see in this position that White’s forces are greater than Black’s because his Queen’s Rook and Queen’s Knight are somewhat unavailable for immediate defense. This Math is always my basis if an attack will succeed or not.

21.                      …….Nxh4

22. Nxh4                  Bxh4

23. Rh3

Threatening to double the rooks on the h-file.

23.                        ……Bg5 (hoping to exchange the Bishop to reduce the pressure on h6)

24. f4!

Another unusual move because this move somewhat exposed White’s King. I Avoided the Bishop exchange because I wanted to maximize the forces necessary for the Kingside attack.

24.                          ……..Bh4

25. Rdh1

This is the only logical move. It threatens Rxh4.

25.                         …….Bxg3

26. Rxg3!

position after 26. Rxg3!

Another unusual move because it reduces the pressure of White’s double rooks. But it is effective because it has the potential to control the g-file.

26.                       ………Kf8 (Black realizes the danger)

27. f5                          Ke7 (He is moving away)

28. g5                         Kd7

29. fxe6                       fxe6

30. gxh6                      gxh6

31. Rxh6

position after 31.  Rxh6

Now White has regained his pawn. Let us go back to basics: Force, Mobility, and Safety. Forces are equal, White has more mobility, and for safety I think Black’s King is in a more dangerous position than White. We will now exploit this weakness by including the Queen to attack against the King.

31.                       ……..Kc7 (still looking for a safe square).

32. Qh7+                   Kb6 (now, the King is safe but not the e6 pawn).

33. Rg7

Now, Black is almost in Zugzwang, he can not move anything.

33.                         …..a4

34. Rb7+                   Ka6

During our childhood days we always look for a check because this move makes your opponent nervous (LOL).

35. Qf7

This is the only logical move. Attacking the weak e6 pawn.

35.                       …….Na5 (attacking the rook).

36. Rd7

Now its my turn to attack the Queen and preventing her to penetrate my King-side that can possibly draw the game by repetition of moves.

36.                         …..Qc8

37. Rxe6+                  Nc6

38. R(e)d6

Attacking the weak d5 pawn.

38.                         …..Ka5

39. Qxd5

Capturing another pawn and attacking the Knight. Now White has a two-pawn advantage.

39.                         ….Ne7 (you must always be aware of Knight moves).

40. Qe4                     Rg8+

41. Kf2                       Rf8

42. Ke1                      Nf5 (attacking the Rook).

43. Rd5                      Nxe3

44. Qxe3                    Qb8

45. R(5)d6                  Rc8

In this  won position, it is better to exchange major pieces to avoid complications. There are many possible continuations but I thought a pawn advance and opening of diagonal for my Queen will make my opponent “nervous” again.

46. d5                         Ra6

47. Qa6                       Rxd6 (Black can not avoid the exchange).

48. Qxd6                     Qxd6

49. Rxd6                      Rh8

50. e6                          Rh5

There are many ways to win this game. I prefer to move my King closer to the battle. That would be much safer.

51. Kd2                        Re5

52. Rd7                        b4 (Black has no better moves?)

53. cxb4+                    Kb5

54. Rb7+                     Ka6

55. Rd7                        Kb5

56. Kc3                        Re3+

57. Kd4                        Rd3+

58. Ke5                         c3

59. bxc3                       Rxc3

60. e7                           Re3+

61. Kd6                         Kc4

62. Rd8                         Rh3

63. e8 = Q                    Kb3

The rest is technique.

64. Ra8                          Ka2

65. Qxa4                        Rh6+

66. Kc5                           Rh2

67. b5                             Kb2

68. Qb4+                        Ka1

69. Qc3+                         Rb2

70. Rh8                            Ka2

71. Qc4+                          Ka1

72. Rh1                             Rb1

73. Qc3+                           Ka2

74. Rh2+                            Rb2

75. Qxb2 mate

final position



I was able to win against Stockfish 9 but it does not necessarily mean that I am the better player. It so happens that there is a software bug (evaluation of King’s safety) that chess programmers have a hard time to correct. That is the reason why the Stockfish Team continuously update their program to yield better results. Another reason why I won is because Stockfish is not prepared to defend against unusual but effective moves.

If you can still remember the millennium bug, programmers did not expect that year 2000 which has /00/ value, will produce problems in date computations. Similarly, chess programmers did not expect that unusual moves of human can still be effective against a computer program.

In Basic Programming, another sub-routine will be added into the program like for example:

IF this position arises, THEN GOTO Subroutine xxxx, where subroutine xxxx is a new algorithm for solving a specific position that the program has lost.

In my opinion, that system of program insertion could be easier because you just have to add an algorithm whenever the program lost the game. A chess expert is necessary to determine in what particular point of the game the program made a mistake.

I would like also to add that it is very difficult to beat Stockfish under tournament time control. I use only my free time to play chess.

It is fun to play against Stockfish. I hope you have some fun too.


Chess diagram: ChessX

featured image source: pixabay



3 thoughts on “How I Beat Stockfish, The World’s Strongest Chess Program

  • at 8:21 pm

    Neat blog! Is your theme custom made or did you download it from somewhere? A design like yours with a few simple adjustements would really make my blog jump out. Please let me know where you got your theme. Kudos

    • at 11:57 pm

      It is a free download theme from colormag.


Leave a Reply

Your email address will not be published. Required fields are marked *

%d bloggers like this: