Chess evaluation function I am trying to write a program to learn how to play chess. I have heard of programs that you can enter in a set of weights for certain parameters such as rook value, queen value and bishop mobility. And then, the program will output what move it thinks you should make given the state of the board, based on these weights.

I will then use a genetic algorithm to find some good weights.

Could anyone explain to me how this evaluation function actually works? How does it go from the weights to actually deciding what move it should make?

Or could someone at least link me to such a program?

Maybe there's a simple program out there for didactic purposes, I don't know. But if not, you could have a look at Stockfish, which is open-source, and is a serious, competitive chess engine. You can find the sourcecode on Github.

Also, I bet you could learn more about evaluation functions and find some other pointers by browsing the Chess Programming Wiki.


Good resource for annotated games I'm finding annotated chess games very handy to increase my level of chess knowledge.

Are there any recommendations on good online resources for annotated games?
I've found a few, but the annotations are either not very good, or the ratings of the players are very low.

There are blogs and news sites that regularly publish analysis of recent games. Chess24 also provides a lot of videos with analysis of games, competing in that regard with various youtube channels.

You can also find annotated games on Chessgames.com, most easily in the form of game collections via google "site:chessgames.com annotated".


Tactical difference between chess and Chinese chess Is there any difference in tactics between chess and Chinese chess? If so, which one is the most fun? What are the important things to learn from it?

Douglas Crockford has written an accurate overview of Chinese Chess (or Xiangqi) from the perspective of a chess player. I quote the following:

  The Board

  Xiangqi can be played on a 9 by 10 uncheckered board. The board is
  separated into two territories by a river running horizontally
  through the center of the board. Bishops are unable to cross the
  river. Pawns gain the ability to move horizontally when they cross the
  river. Each of the territories has a 3 by 3 area called the Palace.
  The kings and queens are never permitted to leave the Palace.

  Pieces

  The king (or general) can move one square horizontally or
  vertically. The king is restricted to the nine squares of the palace.
  The King cannot leave the Palace, even to avoid checkmate. Kings act
  as rooks for the purpose of checking: If the two kings are in the same
  file, there must be at least one blocking piece between them. There is
  no castling.

  The queen (or guard) moves one square diagonally (as in Shatranj).
  A queen cannot leave the Palace, even to prevent checkmate. Queens are
  restricted to five of the nine squares in the Palace. Each side has
  two queens.

  The bishop (or elephant or minister) moves exactly two squares
  diagonally (as in Shatranj), but cannot jump. Bishops cannot cross the
  river. There are only seven squares that a bishop can occupy.

  The knight (or horse) moves like the Chess knight, except that it
  cannot jump. It moves one square vertically or horizontally, and then
  one square diagonally.

  The rook (or chariot or car) moves like the Chess rook. It can go
  any number of spaces vertically or horizontally.

  The pawn (or soldier) moves one space forward only. Unlike the
  pawn in Chess, this pawn does not capture diagonally. It does not have
  the option to go two on its first move. There is no en passant
  capture. There is no promotion of pawns into queens. However, once the
  pawn crosses the river, it acquires the power to move sideways. The
  pawn can never move backwards. Each side has five pawns.

  The cannon is unique to Xiangqi. It is the only piece which moves
  differently than it captures. The cannon moves likes a rook. It
  captures by moving like a rook with a jump over one piece. There must
  be exactly one piece of either color between the cannon and the piece
  it captures. The intervening piece is called the gun mount or screen.

  Checkmate and Stalemate

  Check and Checkmate are the same as in Chess. Stalemate is a win,
  not a draw. You cannot avoid defeat by forcing a stalemate.

  Perpetual check and other repetitions are not allowed.

As someone who has played both games, I would say that Xiangqi is more fluid because you are able to move every single piece on the get-go, meaning that there are more variations in the opening move. You can be aggressive by placing your cannon behind the centre pawn or you can be defensive by placing an elephant there. The good thing about not having a row of pawns in front is that you can deploy your chariot in two moves to control the river where early battles will be fought mainly with lower value pieces such as horses and soldiers.

The middlegame strategy usually involves positioning a number of your attacking pieces to exploit your opponent's weakness, perhaps at the flank. Opportunities can be created when you are attacking your opponent, forcing your opponent to move his defensive pieces like the guard and the elephant to the centre, cutting off his more powerful pieces from coming to the rescue. Other strategies involves deploying double cannons at the centre column or placing them at the last row, effectively forcing the opponent's king out into the open.

If both sides are equally matched, then the endgame would be played where fewer pieces are left on the board. The position of the king becomes very important at this stage if there are no chariots on either side. The king who dominates the centreline would limit the other king's movement to just three squares, or a third of the palace if the opponent's king is exposed.

In conclusion, I would say that there are more similarities than differences between Chess and Chinese Chess. Those who are good at Chess would naturally be good in Chinese Chess and vice versa. Strategies used in Chess can certainly be adapted to Chinese Chess as long as you have a flexible mind and can be creative with your attacks and defenses. For those who have not play Chinese Chess, do try it. It is fun.


Queen's Gambit Declined: Why 1.d4 d5 2.c4 e6 rather than 2..Bf5? Why has it become standard to decline the queen's gambit as below:

[fen ""]
1.d4 d5 2.c4 e6

which blocks the bishop, rather than:

[fen ""]
1.d4 d5 2.c4 Bf5

?

By analogy to the king's gambit:

[fen ""]
1.e4 e5 2.f4 Bc5

First, as @RemcoGerlich pointed out extremely well, the analogy is not exactly the same:

  And the analogy to the king's gambit is flawed because there 3. Kg3 isn't a move ;-), and 3. fxe5 is not a threat because 3. ... Qh4+ is devastating. That means in the QG white actually has pressure on the d5 pawn, and in the KG he doesn't, at least not yet. Someone should combine these comments and make an answer, I don't have time... –  RemcoGerlich Sep 9 at 7:38

But the most important reason why this is not played is that there will be too much pressure on the d5 pawn by the natural move Nc3 and even Qb3 in some cases. This means it's not a good time to start developing pieces, not to say breaking the "principle" of knights getting developed before bishops, as the pawn has to be supported.

A good example was provided by @kahen:

  @AlwaysLearningNewStuff 1. d4 d5 2. c4 Bf5 3. Qb3 e5!? is quite messy though. White gets the upper hand more easily with the simple 3. Nc3 e6 4. Nf3 or 3. cxd5 Bxb1 4.Qa4+ Qd7 5.Qxd7+ Nxd7 6.Rxb1 Ngf6 –  kahen Sep 8 at 21:15

Taking a look at the mentioned lines:

[StartPly "4"]
[FEN ""]

1. d4 d5 2. c4 Bf5 3. Nc3 (3. Qb3 e5!?) (3. cxd5 Bxb1 4.Qa4+ Qd7 5.Qxd7+ Nxd7 6.Rxb1 Ngf6) e6 4. Nf3 {This is the main answer to black's second move. Notice how the black bishop can be easily exchanged by one of the knights if white wants to (and gaining the bishop pair in the process), and also how the b7 pawn can be subjected to attack by Qb3, putting further pressure also on d5.}

The thing is, this line gives white too many options concerning developing with tempo and forces black to catch up to him on every move. While not directly losing, it's understandable that modern chess players prefer to avoid such problems by leaving the bishop on its starting square, and seizing the initiative otherwise.


Is the Ulvestad variation playable for black? The Ulvestad variation starts with 1.e4 e5 2.Nf3 Nc6 3.Bc4 Nf6 4.Ng5 d5 5.exd5 b5
Now white's best is 6.Bf1 Nd4 7.c3 leading to this position:

      [FEN ""]
      [StartPly "13"]

      1.e4 e5 2.Nf3 Nc6 3.Bc4 Nf6 4.Ng5 d5 5.exd5 b5 6.Bf1 Nd4 7.c3

Usually play continues 7...Nxd5 8.cxd4 Qxg5 9.Bxb5+ Kd8 10.O-O! Bb7 11.Qf3 and here black has tried both 11...exd4 and 11...Rb8.  I have had a game that continued 11...Rb8 12.dxe5 Ne3 13.Qh3 Qxg2+ 14.Qxg2 Nxg2 15.d4 Nh4 16.Bg5+ Be7 17.Bxh4 Bxh4 18.Nc3 Bf3 19.b3 Rb6 and we arrived at this position.

      [FEN ""]
      [StartPly "38"]

      1.e4 e5 2.Nf3 Nc6 3.Bc4 Nf6 4.Ng5 d5 5.exd5 b5 6.Bf1 Nd4 7.c3 Nxd5 8.cxd4 Qxg5 9.Bxb5+ Kd8 10.O-O Bb7 11.Qf3 Rb8 (11...exd4) 12.dxe5 Ne3 13.Qh3 Qxg2+ 14.Qxg2 Nxg2 15.d4 Nh4 16.Bg5+ Be7 17.Bxh4 Bxh4 18.Nc3 Bf3 19.b3 Rb6

I think that this position is almost winning for white after 20.Bd3 since the checkmate threats are covered.  For example, black can try 20...Rg6+ 21.Bxg6 hxg6 but 22.Rfd1!! and white should now be winning.

      [FEN ""]
      [StartPly "43"]

      1.e4 e5 2.Nf3 Nc6 3.Bc4 Nf6 4.Ng5 d5 5.exd5 b5 6.Bf1 Nd4 7.c3 Nxd5 8.cxd4 Qxg5 9.Bxb5+ Kd8 10.O-O Bb7 11.Qf3 Rb8 (11...exd4) 12.dxe5 Ne3 13.Qh3 Qxg2+ 14.Qxg2 Nxg2 15.d4 Nh4 16.Bg5+ Be7 17.Bxh4 Bxh4 18.Nc3 Bf3 19.b3 Rb6 20. Bd3 Rg6 21. Bxg6 hxg6 22. Rfd1

So my question: is the Ulvestad in trouble, or is there some other variation that makes it playable?  The only real alternative that I have found to the variation I gave above is 12...Nb4!?, but I have had several games as white where I won with 13.d4! Qg6 14.d5! Bxd5 15.Rd1! Rxb5 16.Nc3 followed by Rxd5.

      [FEN ""]
      [StartPly "31"]

      1.e4 e5 2.Nf3 Nc6 3.Bc4 Nf6 4.Ng5 d5 5.exd5 b5 6.Bf1 Nd4 7.c3 Nxd5 8.cxd4 Qxg5 9.Bxb5+ Kd8 10.O-O Bb7 11.Qf3 Rb8 (11...exd4) 12.dxe5 Nb4 13.d4 Qg6 14.d5 Bxd5 15.Rd1 Rxb5 16. Nc3

Is there another option for black that keeps the Ulvestad alive, or should black be playing 5...Na5 or 3...Bc5 instead?

First, I think this is an excellent question for this forum, so thanks for posting it. I'm going to use a mix of computer analysis with stockfish and crafty, and the chesstempo game database to respond.

Your main question: Is Ulvestad playable for black? I think is a definite yes. There are many options unexplored still, but I think even in your specific game black can at least draw with 20. ... f5 to counter 20. Bd3, and it's not a picnic for white, either--they have to play fairly precisely to keep it even. I'll get back to this at the end.

To avoid making this overly long (I can tell it's going to be long!), I'll just point out some of the unexplored options you don't cover in the question. For example, move 8 isn't set in stone with 8. cxd4, there are also:

8. Ne4
8. Nxf7
8. h4

But we'll continue down your line with 8. cxd4 Qxg5 9. Bxb5+ Kd8, after which the options for white look like:

10. O-O Rb8 11. Bc6 exd4 12. d3 Qf5 13. Re1 Nf6 14. Nd2 Qxd3 ... (+0.80 D25 - stockfish)
10. Qf3 exd4 11. Bc6 Nb4 12. Bxa8 Nc2+ 13. Kd1 Bg4 14. Kxc2 Qc5+ ... (+0.56 D25 - stockfish)

After 8. cxd4 Qxg5 9. Bxb5+ Kd8 10. O-O there are another few potential options:

10. ... exd4 11. Bc6 Rb8 12. d3 Qf5 13. Re1 Nf6 14. Nd2 Qxd3 15. Nb3 Qxd1 ...(+0.60 D29 - stockfish)
10. ... Rb8 11. Bc6 exd4 12. d3 Qf5 13. Re1 Nf6 14. Nd2 Qxd3 15. Nb3 Qxd1 ...(+0.60 D29 - stockfish) (transposes to above)
10. ... Bb7 11. Qf3 exd4 12. d3 Qe5 13. Nd2 Bd6 14. g3 a6 15. Ba4 Qf6 ... (+0.72 D29 - stockfish)
10. ... Qg6 11. dxe5 Rb8 12. Nc3 Nf4 13. Qf3 Bb7 14. Qg3 Nxg2 15. d4 Nh4 ...(+.80 D29 - stockfish)
10. ... Bg4 11. Qb3 Nf4 12. dxe5 Bd7 13. Qg3 Qxg3 14. fxg3 Ng6 15. Nc3 Bc5+ ...(+.84 D29 - stockfish)

Again, we'll go with your line, 8. cxd4 Qxg5 9. Bxb5+ Kd8 10. O-O Bb7 11. Qf3, to which there are a few ideas possibly worth looking deeper at:

11. ... Rb8 12. dxe5 Ne3 13. Qh3 Qxg2+ 14. Qxg2 Nxg2 15. d4 Be7 16. Be2 Nh4 (+0.72 D26 - stockfish)
11. ... exd4 12. Re1 Be7 13. d3 Qf6 14. Nd2 Rb8 15. Bc4 Nb6 16. Qxf6 Bxf6 (+0.76 D26 - stockfish)
11. ... Qf4 12. Qxf4 exf4 13. Nc3 Nb4 14. Rb1 Bd6 15. d3 Nc2 16. d5 Nd4 (+1.01 D26 - stockfish)

Again we'll go with your line, 8. cxd4 Qxg5 9. Bxb5+ Kd8 10. O-O Bb7 11. Qf3 Rb8 12. dxe5 Ne3 13. Qh3 Qxg2 14. Qxg2 Nxg2 15. d4, and again black has several responses to explore:

15. ... Be7 16. f4 Nh4 17. Nc3 Nf3+ 18. Kf2 Nxd4 19. Rd1 c5 20. Be3 Bf3 (+0.84 D26 - stockfish)
15. ... f6 16. Be2 Nh4 17. f4 Bb4 18. Nd2 Nf5 19. Nc4 Ke8 20. Rd1 fxe5 (+0.92 D26 - stockfish)
15. ... Nh4 16. Bg5+ Be7 17. Bxh4 Bxh4 18. Nc3 Bf3 19. Rab1 Rb6 20. Bd3 Kc8 (+1.01 D25 - stockfish)
15. ... Kc8 16. f4 Nh4 17. Kf2 c5 18. Be3 Bg2 19. Nc3 Bxf1 20. Rxf1 cxd4 (+1.05 D25 - stockfish)

We're almost to the line you left us, but you can see you probably had several other possibilities. We'll continue with the line: 8. cxd4 Qxg5 9. Bxb5+ Kd8 10. O-O Bb7 11. Qf3 Rb8 12. dxe5 Ne3 13. Qh3 Qxg2 14. Qxg2 Nxg2 15. d4 Nh5 16. Bg5+ Be7 17. Bxh4 Bxh4 18. Nc3 Bf3 19. b3 Rb6 20. Bd3, which presents us with an interesting position.

It looks like my f5 idea was pretty good, as it seems to be a solid draw for black if both sides play perfectly (as far as I can tell). Interestingly enough, computers don't tend to see f5 until they get 30 deep or so. The goal being to get the h8 rook involved ASAP. If white slips up, they can be in for some pain.

There are two reasonable responses to 20. ... f5:

21. Ne2 Rg6+ 22. Ng3 Rf8 23. Rae1 (+0.32 D28 - stockfish)
21. Bxf5 Rc6 22. Nd1 Rf8 23. Ne3 Bg5 24. Bg4 Rg6 25. Bxf3 Bxe3+ 26. Kh1 Bxd4 (+0.00 D28 - stockfish)

The rest look like probable bad news:

21. e6 Rxe6 22. Bxf5 Rc6 23. Rac1 Rf8 24. Bd3 Bg5 25. Rc2 Rf4 (-0.92 D28 - stockfish)
21. exf6 gxf6 22. Bc4 f5 23. Rfe1 Rg6+ 24. Kf1 Rg2 25. Re3 Rxf2+ (-1.53 D28 - stockfish)
21. Rfe1 Rg6+ 22. Kf1 Rg2 23. Re3 Rxf2+ 24. Kg1 f4 25. Rxf3 Rxf3 (-2.14 D28 - stockfish)
21. Rfd1 Rg6+ 22. Kf1 Rg2 23. Rd2 Rxh2 24. Ke1 Bg5 25. Rdd1 c6 (-2.70 D28 - stockfish)

I let stockfish think about this position for several hours, and when it gets to about 30-31 deep, the score for both of the best moves dwindles to 0.00 or 0.08 (which indicates a likely draw). I played out several scenarios which involved different colored bishops and rooks that had easily defended pawns, but that couldn't obviously make progress. Or Rook+Knight vs Rook+Bishop. There were a few times that black had a bishop traded for a couple of pawns, but couldn't do anything with it. Never got to a 6 piece EGTB position--always too many pawns leftover. If someone can find a win for white with 20. ... f5, I'd like to see it!

Update 6-20-2012

21. Bxf5 seems to be a bad choice after 21. ... Rc6 22. Rfc1 Rf8.

I haven't looked at other moves other than 22. Rfc1 deeply yet (such as 22. Rac1 and 22. Nd1), but white doesn't have many good options at 23. 23. Bxh7 looks like it has potential, but after 23. ... g6 the bishop becomes hard to use. 23. Bd3 is in second place so far, 23. Bd4 is in third, and 23. Bb1 is in fourth, but they all score negative with 30 depth.

21. Ne2 looks like it offers white a few chances for draw by repetition several moves in. This line, for example (I need to check some of the others for black to see if there's something better than 21. ... Rg6+, but that seems unlikely): 21. ... Rg6+ 22. Ng3 Rg5 23. Rac1 f4 24. Rc3 Rf8 25. Rfc1 c6 26. Bb5 fxg3 27. hxg3 Bxg3 28. fxg3 Rxg3+ 29. Kh2 Rg2+ 30. Kh3 Rg6 31.Bxc6 Rh6+ 32.Kg3 Rg6+ 33.Kh3 ends with a pretty straightforward draw by repetition drawish looking position:

Another update: 21. Ne2 Rg6+ 22. Ng3 f4 23. Rfc1 Rg5 24. Rc3 Bb7 looks promising for black.

Update: Here is some analysis, if anyone is interested: http://mongochess.skeweredrook.com/ulvestad-variation


Mental models in chess In “Chess as a Behavioral Model for Cognitive Skill Research,” Mechner writes the following about mental representation of the game by blindfold chess masters:

  But the bombshell, which prompts the present reexamination of
  ‘‘visualization,’’ is this: blindfold chess masters consistently
  report that what they visualize are not images of pieces or
  chessboards, but abstractions of these with minimal or no physical
  features. A typical report is, ‘‘I do not visualize real pieces but I
  know where they are.’’

  ...

  The fourteen or so blindfold champions quoted by Hearst and Knott
  describe what they do in these terms: ‘‘no mental pictures,’’
  ‘‘abstract knowledge,’’ ‘‘I know where the pieces are,’’ ‘‘only an
  abstract type of representation,’’ ‘‘only relationships,’’ ‘‘no real
  picture,’’ ‘‘the significance of a piece,’’ ‘‘knowing what combination
  or plan is in progress,’’ ‘‘lines of force,’’ ‘‘pieces are only friend
  or foe, carriers of particular actions,’’ ‘‘sort of formless visions
  of the positions,’’ and so forth. Many of the masters report that they
  have no mental image at all (p.151).

The masters also confirm that blindfold chess improves their performance in normal chess.

However:

  Some of the strongest masters find the actual sight of a chess position to be more distracting than helpful when thinking ahead during a game.

Now, normal chess encourages a physical representation, when the game vision is more like geometry than algebra. That's compelling because humans get used to visual models since childhood. But extending the analogy with mathematics, the "algebraic" form is more powerful.

So in normal chess, a player has to make a choice: developing a visual representation or adopting the blindfold chess relationship model. That's the foundation to build chess memory and calculations on.

What approach is more promising in the long run? Which one do top players use?

I used to try to imagine the whole board and it always seemed my mind would focus more narrowly. Then, one time when I was doing an exhibition in public versus just one opponent, I suddenly saw the chessboard a different way: it was floating in darkness and the board was translucent, so I could move around the board and see it (and the pieces) from different perspectives. I can't say it improved my play a lot, but it was an amazing experience. I hadn't been seeking a better way. It just appeared to me.

I haven't tried to play blindfold very much over the years, but I have studied chess quite a lot and earned the national master title. I guess our imagination is working hard in any of these ways we do chess.


Complete game Szabo-Groszpeter, Kecskemet 1984 I'm looking for the complete game Szabo-Groszpeter, Kecskemet 1984. The following knight endgame was reached and White won eventually with the paradoxal move Kb8!! blocking his b-pawn on b7.

[fen "8/K5p1/1p5k/1P5p/P1n5/5N2/8/8 w - - 0 1"]

1.Nd2 Nxd2 2.a5 bxa5 3.b6 Nf3 4.b7 Ne5 5.Kb8

I searched the complete game in various databases without success: chessgames.com, chess365 and chesstempo.

It looks like the game ended after a5. In Van Perlo's Endgame Tactics (Page 397 - ISBN 978-90-5691-494-3) it is described as following:"Here, at move 61, the game was interrupted, according to the rules applied at the time in the Hungarian Team Championship. The adjourned position was sent in for adjudication and the allgrandmasters committee declared the game a win for White."
He then give two main lines (main line with Kb8).


How does b4 fix pawns in this endgame? Here, it is said that after 1.Re7 Rb8 2.Kd3 a6, white plays b4 to fix the enemy pawns. But I don't understand: how does it fix pawns? How is b3 any different? What does it mean to fix enemy pawns?

It definitely prevents Black from playing ...c5, at least temporarely. I wouldn't say Black pawns are "fixed" though. Anyway, isn't Re7 a much stronger move?


What's the best answer to 1.d4 Nf6 2.c4 e6 3.a3? As title above, What's the best answer to 1.d4 Nf6 2.c4 e6 3.a3? Assuming that I, as Black, am a Nimzo-Indian Player, there is no hope for a Nimzo now. Would you go for 3...d5 (QGD with no particularly useful a3 move by White), or for a Benoni-like structure with 3...c5? (allowing 4.d5), or for a Queen's Indian structure with 3...b6? Or something else?

This really comes down to what you're comfortable with. Both the Benoni and the QGD are good options, precisely because of the reason you mention: a3 isn't really useful for White in those openings, so you'll be playing lines with a tempo up. According to chessgames.com, Black is already better. Which line (3... d5 or 3... c5) is better is just a matter of personal preference.

3... b6 is of course playable, and Black scores 50%, but it allows White to transpose to one of the main lines of the Queen's Indian with 4. Nf3.


Books/resources on Scotch (as white) and Petroff (both sides but mainly as black) Could someone recommend books or online resources on those two openings for intermediate players (about 1800)?

Since my opponents at this level are likely to go out of theory on move 4 or 5, I want to have the knowledge to see why their move isn't that good and how to respond to it.

For example, 1 e4 e5 2 Nf3 Nc6 3 d4 exd4 4 Nxd4 d6. Here I used to trade 5 Nxc6 bxc6, and double black's pawns, but I'm told it actually helps black to open the b file and have an active middle game.

So I would like resources that have more explanations on the opening's idea/planning, not just comprehensive list of variations.

Edit: I bought the book "The Petroff: move by move". After reading for about 30min, I put it down and disliked it. The reasons are

This book is supposed to be an opening book. But it runs all the example games to the end. The author should make a judgement when opening is finished, provide evaluation of the board and plan for middle game, then go on to next example.
On one page, the author writes (for the Cochrane gambit) "(white's) Bc4+ should always be met with d5 since after Be6 Bxe6 Kxe6 black's king is pulled further to the center". And on the next page when white plays Bc4 a move later, black plays Be6, then the game continues Bxe6 Kxe6. No explanation here!
There isn't any dedicated section for game plan/pawn structure/piece placement etc. These advice are scattered in the example games. Moreover, its explanations are more towards "why this GM's move is good", not "guidelines to find good moves".

I can only make recommendations for the Petroff Defence, as I have never played the Scotch:

The Petroff: Move by Move by Cyrus Lakdawala. An engaging author using a question and answer format in annotated games
Petroff Defence by Alexander Raetsky and Maxim Chetverik. This book is more orientated towards Black's point of view, but the explanations are accessible to the club player
thechesswebsite YouTube video on the Petroff Defence


Game engine versus engine from a given position I use Fritz8SE , which allows the following options :

You can let play two engines against each other a normal game.
You can setup a position and let one engine play out the position.

What I would like to do :

  Setting up a position and then let play two engines against each other, ideally with different PLY's.

Does anyone know whether this is possible ? And if yes, how ?

It’s also possible within Chessbase’s Fritz UI, you just save the desired sequence of moves as a database and then define that database as the opening database for the engine match.


Engine evaluating changing after making move suggested by engine I've noticed that the engine (Stockfish 9) evaluates positions as significantly better for white if the evaluation is performed while white is on the move. The difference is sometimes more than half a point.

Someone else has noticed this phenomenon, and anyone has an idea what the reason is (It's not run time, as I've let the engine evaluate above 26 PLY in both cases).

To clarify: The intention here is NOT the same position, just switching who's on the move. I will examplify by the start position. Imagine evaluating it and the engine gives +0.7 and gives the 1. e4 e5. Then you make the move 1.e4 and let the engine evaluate again, and now it gives only +0.2 and recommends 1.. e5.

There's nothing surprising here. Chess engine is not perfect, as you make a move the evaluation will likely change:

The engine now sees something not seen before
The engine can now search deeper
The engine's hash table has relevant entries

This's just how we play chess. Our positional assessment change as we make moves. If that's not the case, there's no need to play the game - we shout out win/loss/draw without making a move.

Hint: If you're using your engine for your game, you'll need to make some moves to get better assessment. Kramnik did that for his win against Aronian:

  The computer doesn’t show it at the beginning, but then once you put it in he starts to like it a lot.

https://chess24.com/en/read/news/berlin-candidates-3-a-kramnik-immortal

Sorry, chess is a hard game.


How do I raise my tactic trainer rating to 2300? I'm currently a 1600 USCF with a tactic rating on chesstempo.com of high 1600. My chess.com tactic rating is 1600 as well. Though my best tactic rating has been high 1700 on chesstempo.com. The problem is that my tactic rating always oscillates between 1600 and high 1700. I can never reach higher tactical levels than 1700. I practice 30 minutes of tactics every day as my chess coach recommended. However, I haven't seen any improvement. Any advice to raise my tactic rating to 2300+?

As noted in the comments, 2300+ tactical ability is a ridiculous goal to aim for, if your current level is 1600-1700. This will only lead to disappointment on your part, as improving your tactical level to 2300+ will probably mean that you will have to raise your overall playing strength by maybe 300-400 rating points. This takes years to accomplish, unless you have lots of time, resources and talent, in which case it will probably still take at least a year.

A suitable primary goal is instead to raise your tactical level by roughly 100 points. Depending on your situation, this can be done in a few weeks. However, just doing tactics problems on problem sites will not accomplish this very efficiently. Exercises are good, but not doing anything else will not improve your play by much.

I suggest you read a good book about tactics if you haven't already. One that I enjoyed very much was "Understanding chess tactics" (I think later editions of the book is called "Chess tactics from scratch") by Martin Weteschnik, containing many good examples and clear explanations of themes. However, it's not the only good tactics book, and if you have a chess coach, that person may have some suggestions on what to read.

You'd probably also want to play against strong opponents (1800+ at your level), as they're very likely to be better than you tactically. This will be good for your overall play and toughness at the board, which goes hand in hand with tactical ability.


Checkmate in two moves White to play and checkmate in two moves.

[fen "5Kbk/6pp/6P1/8/7R/8/8/8 w KQkq - 0 1"]

Is it possible? If so, please write a solution.

1.Rh6

This puts Black in Zugzwang.

If 1...gxh6, 2.g7#

If Black moves the Bishop, 2.Rxh7#


If 1. e4 c6 is considered as a sound defense for black, why is 1. c3 so rare? At 365chess.com, 1.c3 is ranked as the 14th most common first move for white. If the Caro-Kann defense is considered as a sound defense, why is the Saragossa opening so rare for white? After all, white is preparing to play 2. d4 in the next move and transfer into some solid defense systems. For example, one possible line is

c3 e5 2. d4 (reversed Caro-Kann with one extra tempo for white.)

Another possible line is

c3 d5 2. d4 (reversed Slav with one extra tempo for white.)

"Reversed" Openings in general

A black defense and its white mirror counterpart will often play out quite differently (compare the rather sharp Sicilian Defense and the rather quiet English Opening).

The right to move matters, in both ways. By moving, you give away information to your opponent - the set of variations you can choose from shrinks with every opening move. Early moves are usually played to either proactively increase your control over the board or reactively counter your opponent's moves (the best moves do both). This second category of moves only make sense as answer to one of the first category: If your opponent doesn't play a move that you have to react to, you'd want to play a move to advance your own plan rather than a "counter" to a plan your opponent has not committed to yet. Commitment is an important factor here. If you parry right before knowing which side your opponent will commit to, they can now simply swing left and catch you off-balance. Even if they cannot immediately strike that way, you will still have wasted time you could have used for more useful moves. The further in advance your opponent knows what setup you are heading for, the easier it is for them to screw your plan.

Most openings are a series of moves reacting to each other. Simply playing a "reversed" opening won't lead to the same result because the dynamics can be totally different depending on who strikes first.

Caro-Kann vs. 1.c3

The Caro-Kann defense strategically centers around the d5 square. Playing 1...c6 merely is a means to the end of playing 2...d5 next turn and being able to take back on d5 with a pawn if White plays exd5. Playing 1...d5 right away is certainly possible (leading to the Scandinavian Defense), but then Black concedes that he has to take back on d5 with a piece, when he will obtain a half open d- instead of c-file (generally speaking, a half-open c-file and two center pawns are more desirable than a half-open d-file and only one center pawn). Of course, White can refuse to take on d5, but that's the idea.

Now, let's have a look at the same idea, but from the white side. Sure, White can play 1.c3 to prepare 2.d4. But since Black obviously did not have time to play ...e5 yet, this is simply not necessary and White can play 1.d4 right away! Now Black won't even be able to play ...e5 with ease (the best moves: activity as well as prevention). Isn't preventing the black pawn from entering e5 not much better than preparing to attack it with 1.c3 after the fact? And remember, Black did not commit to this pawn move yet anyways and may answer 1.c3 with a completely different move, leaving White look rather silly for preparing against something that may never happen.

On the other hand, if Black does not play ...e5, White doesn't actually have to defend d4 by playing c3 ... and the c-pawn is free to be moved to c4, from where it attacks d5. If it now gets traded for Black's d-pawn, we may actually arrive at a similar situation as in the Caro-Kann exchange variation: White has pawns on both central files and a half-open c-file.

To no surprise (and in contrast to 1.c3), 1. d4 2. c4 is one of the most popular ways to open the game as White of all time. So why not go for a Queen's Gambit if you like the Caro-Kann?


A new AI wins at go. Can a similar AI win at chess? Can it achieve pure self-training? One of the more popular questions asked on this site regards the prospect of a purely self-trained chess AI.

Today, ChessBase is distracted from its coverage of the FIDE Candidates tournament to report that a new AI is, for the first time, beating a leading master of the rather different game of go, which had resisted chess-style AIs for many years. An initial reading of the report suggests that the new go AI is unlike chess AIs, but is more nearly a general-game-playing (GGP) AI. ChessBase's article does not however use the term GGP, but does seem to say that the go AI can win at simple video games.

Is there any reason such a winning go AI could not with minor adjustments also win at chess? If so, does such an AI show promise to achieve the pure self-training the several excellent answers to the earlier question have earlier discussed, which at that time was not yet possible? Why or why not?

I suspect that no really complete, fully informed answer to my question is yet available, so even a partial answer based on related expertise would be appreciated.

For additional reference, see also this related question and answers.

UPDATE

When the above question was first posted five days ago and when some of the fine answers below were given, the first news regarding the victory of the go AI had just appeared. Since then, additional information and commentary have emerged.

Particularly interesting since then has been a quite readable, five-sided roundtable discussion in which one Jonathan Schaeffer remarks:

  Learning from human games helps accelerate the program’s learning. AlphaGo could learn to become a strong player on its own, without using the human games. The learning process would just take longer.

According to the roundtable's host, Schaeffer is "[c]omputer science professor at the University of Alberta and the man who solved checkers"; so, presumably, he might be qualified to comment.

For further information, here is the record of another, open discussion, many of whose participants seem better informed than usual.  The discussion took place during the match.

Further update, a year and a half later: commenter @MarkS. writes:

  This is just a comment because it's about Go, not Chess, but AlphaGo Zero achieved "pure self-training" just from being told who won (and not the final score) and is stronger and vastly more efficient than the AI that beat Lee Sedol. For more information, see deepmind.com/blog/alphago-zero-learning-scratch

Well, well, well! DeepMind have published a paper in which they say they have programmed and trained a neural network computer to beat Stockfish.

With 1 minute thinking time per move their AlphaZero computer beat Stockfish by +25, =25, -0 with white and +3,=47,0- as black.

They "trained" 3 separate computers to play chess, shogi and Go and beat their silicon rivals convincingly.

Here is how the paper describes the training and evaluation -

  Self-play games are generated by using the latest parameters for this
  neural network, omitting the evaluation step and the selection of best
  player.

  AlphaGo Zero tuned the hyper-parameter of its search by Bayesian
  optimisation. In AlphaZero we reuse the same hyper-parameters for all
  games without game-specific tuning. The sole exception is the noise
  that is added to the prior policy to ensure exploration; this is
  scaled in proportion to the typical number of legal moves for that
  game type.

  Like AlphaGo Zero, the board state is encoded by spatial planes based
  only on the basic rules for each game. The actions are encoded by
  either spatial planes or a flat vector, again based only on the basic
  rules for each game (see Methods).

  We applied the AlphaZero algorithm to chess, shogi, and also Go.
  Unless otherwise specified, the same algorithm settings, network
  architecture, and hyper-parameters were used for all three games. We
  trained a separate instance of AlphaZero for each game. Training
  proceeded for 700,000 steps (mini-batches of size 4,096) starting from
  randomly initialised parameters, using 5,000 first-generation TPUs to
  generate self-play games and 64 second-generation TPUs to train the
  neural networks. Further details of the training procedure are
  provided in the Methods.

  Figure 1 shows the performance of AlphaZero during self-play
  reinforcement learning, as a function of training steps, on an Elo
  scale (10). In chess, AlphaZero outperformed Stockfish after just 4
  hours (300k steps); in shogi, AlphaZero outperformed Elmo after less
  than 2 hours (110k steps); and in Go, AlphaZero outperformed AlphaGo
  Lee (29) after 8 hours (165k steps).

  We evaluated the fully trained instances of AlphaZero against
  Stockfish, Elmo and the previous version of AlphaGo Zero (trained for
  3 days) in chess, shogi and Go respectively, playing 100 game matches
  at tournament time controls of one minute per move. AlphaZero and the
  previous AlphaGo Zero used a single machine with 4 TPUs. Stockfish and
  Elmo played at their strongest skill level using 64 threads and a hash
  size of 1GB. AlphaZero convincingly defeated all opponents, losing
  zero games to Stockfish and eight games to Elmo (see Supplementary
  Material for several example games), as well as defeating the previous
  version of AlphaGo Zero (see Table 1).

Their computer used a new form of chip called a "TPU" (Tensor Processing Unit) developed by Google for machine learning tasks.

They also claim their Monte Carlo tree search algorithm is better and more "human like" than the traditional alpha-beta search algorithms -

  We also analysed the relative performance of AlphaZero’s MCTS search
  compared to the state-of-the-art alpha-beta search engines used by
  Stockfish and Elmo. AlphaZero searches just 80 thousand positions per
  second in chess and 40 thousand in shogi, compared to 70 million for
  Stockfish and 35 million for Elmo. AlphaZero compensates for the lower
  number of evaluations by using its deep neural network to focus much
  more selectively on the most promising variations – arguably a more
  “human-like” approach to search, as originally proposed by Shannon.
  Figure 2 shows the scalability of each player with respect to thinking
  time, measured on an Elo scale, relative to Stockfish or Elmo with
  40ms thinking time. AlphaZero’s MCTS scaled more effectively with
  thinking time than either Stockfish or Elmo, calling into question the
  widely held belief that alpha-beta search is inherently superior in
  these domains

Here are some of the games -

[FEN ""]
[White "Stockfish "]
[Black "AlphaZero"]

 1. e4 e5 2. Nf3 Nc6 3. Bb5 Nf6 4. d3 Bc5 5. Bxc6 dxc6
 6. O-O Nd7 7. Nbd2 O-O 8. Qe1 f6 9. Nc4 Rf7 10. a4 Bf8 11. Kh1 Nc5 12. a5 Ne6
 13. Ncxe5 fxe5 14. Nxe5 Rf6 15. Ng4 Rf7 16. Ne5 Re7 17. a6 c5 18. f4 Qe8
 19. axb7 Bxb7 20. Qa5 Nd4 21. Qc3 Re6 22. Be3 Rb6 23. Nc4 Rb4 24. b3 a5
 25. Rxa5 Rxa5 26. Nxa5 Ba6 27. Bxd4 Rxd4 28. Nc4 Rd8 29. g3 h6 30. Qa5 Bc8
 31. Qxc7 Bh3 32. Rg1 Rd7 33. Qe5 Qxe5 34. Nxe5 Ra7 35. Nc4 g5 36. Rc1 Bg7
 37. Ne5 Ra8 38. Nf3 Bb2 39. Rb1 Bc3 40. Ng1 Bd7 41. Ne2 Bd2 42. Rd1 Be3
 43. Kg2 Bg4 44. Re1 Bd2 45. Rf1 Ra2 46. h3 Bxe2 47. Rf2 Bxf4 48. Rxe2 Be5
 49. Rf2 Kg7 50. g4 Bd4 51. Re2 Kf6 52. e5+ Bxe5 53. Kf3 Ra1 54. Rf2 Re1
 55. Kg2+ Bf4 56. c3 Rc1 57. d4 Rxc3 58. dxc5 Rxc5 59. b4 Rc3 60. h4 Ke5
 61. hxg5 hxg5 62. Re2+ Kf6 63. Kf2 Be5 64. Ra2 Rc4 65. Ra6+ Ke7 66. Ra5 Ke6
 67. Ra6+ Bd6 0-1

Game

 [FEN ""]
 [White "Stockfish "]
 [Black "AlphaZero"]

 1. e4 e5 2. Nf3 Nc6 3. Bb5 Nf6 4. d3 Bc5 5. Bxc6 dxc6 6. O-O Nd7 7. c3 O-O
 8. d4 Bd6 9. Bg5 Qe8 10. Re1 f6 11. Bh4 Qf7 12. Nbd2 a5 13. Bg3 Re8 14. Qc2 Nf8 15. c4 c5 16. d5 b6 17. Nh4 g6 18. Nhf3 Bd7 19. Rad1 Re7 20. h3 Qg7 21. Qc3 Rae8 22. a3 h6 23. Bh4 Rf7 24. Bg3 Rfe7 25. Bh4 Rf7 26. Bg3 a4 27. Kh1 Rfe7 28. Bh4 Rf7 29. Bg3 Rfe7 30. Bh4 g5 31. Bg3 Ng6 32. Nf1 Rf7 33. Ne3 Ne7 34. Qd3 h5 35. h4 Nc8 36. Re2 g4 37. Nd2 Qh7 38. Kg1 Bf8 39. Nb1 Nd6 40. Nc3 Bh6 41. Rf1 Ra8 42. Kh2 Kf8 43. Kg1 Qg6 44. f4 gxf3 45. Rxf3 Bxe3+ 46. Rfxe3 Ke7 47. Be1 Qh7 48. Rg3 Rg7 49. Rxg7+ Qxg7 50. Re3 Rg8 51. Rg3 Qh8 52. Nb1 Rxg3 53. Bxg3 Qh6 54. Nd2 Bg4 55. Kh2 Kd7 56. b3 axb3 57. Nxb3 Qg6 58. Nd2 Bd1 59. Nf3 Ba4 60. Nd2 Ke7 61. Bf2 Qg4 62. Qf3 Bd1 63. Qxg4 Bxg4 64. a4 Nb7 65. Nb1 Na5 66. Be3 Nxc4 67. Bc1 Bd7 68. Nc3 c6 69. Kg1 cxd5 70. exd5 Bf5 71. Kf2 Nd6 72. Be3 Ne4+ 73. Nxe4 Bxe4 74. a5 bxa5 75. Bxc5+ Kd7 76. d6 Bf5 77. Ba3 Kc6 78. Ke1 Kd5 79. Kd2 Ke4 80. Bb2 Kf4 81. Bc1 Kg3 82. Ke2 a4 83. Kf1 Kxh4 84. Kf2 Kg4 85. Ba3 Bd7 86. Bc1 Kf5 87. Ke3 Ke6 0-1

White: AlphaZero Black: Stockfish

 [FEN ""]
 [White "AlphaZero "]
 [Black "Stockfish"]

 1. Nf3 Nf6 2. c4 b6 3. d4 e6 4. g3 Ba6 5. Qc2 c5 6. d5 exd5 7. cxd5 Bb7 8. Bg2 Nxd5 9. O-O Nc6 10. Rd1 Be7 11. Qf5 Nf6 12. e4 g6 13. Qf4 O-O 14. e5 Nh5 15. Qg4 Re8 16. Nc3 Qb8 17. Nd5 Bf8 18. Bf4 Qc8 19. h3 Ne7 20. Ne3 Bc6 21. Rd6 Ng7 22. Rf6 Qb7 23. Bh6 Nd5 24. Nxd5 Bxd5 25. Rd1 Ne6 26. Bxf8 Rxf8 27. Qh4 Bc6 28. Qh6 Rae8 29. Rd6 Bxf3 30. Bxf3 Qa6 31. h4 Qa5 32. Rd1 c4 33. Rd5 Qe1+ 34. Kg2 c3 35. bxc3 Qxc3 36. h5 Re7 37. Bd1 Qe1 38. Bb3 Rd8 39. Rf3 Qe4 40. Qd2 Qg4 41. Bd1 Qe4 42. h6 Nc7 43. Rd6 Ne6 44. Bb3 Qxe5 45. Rd5 Qh8 46. Qb4 Nc5 47. Rxc5 bxc5 48. Qh4 Rde8 49. Rf6 Rf8 50. Qf4 a5 51. g4 d5 52. Bxd5 Rd7 53. Bc4 a4 54. g5 a3 55. Qf3 Rc7 56. Qxa3 Qxf6 57. gxf6 Rfc8 58. Qd3 Rf8 59. Qd6 Rfc8 60. a4 1-0


Pieces knocked over in blitz chess In blitz (lightning) chess: If my opponent knocks over a piece when moving then presses his clock before replacing the piece is this illegal? If so do I stop the clock and call the DOP?

According to FIDE Handbook:

  Article 7: Irregularities

  7.4

  If a player displaces one or more pieces, he shall re-establish the
  correct position in his own time. If necessary, either the player or
  his opponent shall stop the chessclock and ask for the arbiter’s
  assistance. The arbiter may penalise the player who displaced the
  pieces.

That means, yes, you can stop the clock and call the arbiter for your assistance if he did not adjust the pieces in his own time.


Can the king step into stalemate? Is it possible that the king can move to a square, and the opponent can move, but no matter where it is a stalemate? If it is impossible, how do you prove that?

If I understand what you are asking how about this
[Event ""]
[Site ""]
[Date "????.??.??"]
[Round ""]
[White ""]
[Black ""]
[Result "*"]
[FEN "6k1/8/3p4/2bPp3/1p1bP3/1Pp3p1/2P3P1/6Kn w - - 0 1"]

1.Kxh1 *

Black's last move was Nf2-h1+


How should I play against the Grunfeld defense as white? What is the best defense as white against the Grunfeld Defense?

I have been playing the Blackmar-Diemer Gambit over and over again, I suspect some opponents notice this, and open up with 1... Nf6, so this gets me off guard.  I usually try to continue the Blackmar-Diemer Gambit, but black normally goes a different route.

First off, 1...Nf6 against 1. d4 is not the Gruenfeld Defense: this opening is defined by an order of moves 3 deep. See the Wikipedia page.

In your case after 1. d4 Nf6 simply play 2. Nc3 and you will be well on your way to getting a Blackmar-Diemer, because if Black doesn't play 2...d5 you will play 3. e4 and you will get your pawn to e4 without having to gambit it: almost like an improved Blackmar-Diemer.

But if Black plays 2...d5 in response to 2. Nc3 then 3. e4 is the Blackmar-Diemer, after 3...dxe4 4. f3, just via a different move order (a "transposition").  See Wikipedia's page for the Blackmar-Diemer.


How is Buchholz score calculated in a Swiss tournament? I would like to know how the Buchholz tiebreak system works, and how it is calculated, taking into consideration other factors such as bye, no show (default win), etc.

The information is hidden away in Standards of Chess Equipment and tournament venue for FIDE Tournaments section 13.4.

  13.4. Buchholz System
  13.4.1. The Buchholz System is the sum of the scores of each of the opponents of a player.
  13.4.2. The Median Buchholz is the Buchholz reduced by the highest and the lowest scores of the opponents.
  13.4.3. The Median Buchholz 2 is the Buchholz score reduced by the two highest and the two lowest scores of the opponents.
  13.4.4. The Buchholz Cut 1 is the Buchholz score reduced by the lowest score of the opponents.
  13.4.5. The Buchholz Cut 2 is the Buchholz score reduced by the two lowest scores of the opponents.

Now it gets complicated.

  how it is calculated, taking into consideration other factors such as
  bye, no show (default win)

Since these pose a problem for all tie breaks which take into account the performance of opponents, in 2012 FIDE introduced the concept of a "virtual opponent" to be used in these cases. The details are spelt out in section 13.14.2

  13.14. Tie-Break Systems using Ratings in Individual Tournaments (where all the players are rated)    ...
  13.14.2. For tie-break purposes a player who has no opponent will be considered as having played against a virtual opponent who has the
  same number of points at the beginning of the round and who draws in
  all the following rounds. For the round itself the result by forfeit
  will be considered as a normal result.

  This gives the formula:

  Svon = SPR + (1 – SfPR) + 0.5 * (n – R)

  where for player P who did not play in round R:
  n = number of completed rounds
  Svon = score of virtual opponent after round n
  SPR = score of P before round R
  SfPR = forfeit score of P in round R

Since I, like a lot of arbiters, use the Swiss Manager pairing program I though I'd see what the Swiss Manager help has to say about this.

  4 Buchholz-Tie-Break Calculation On account of many requests about the Buchholz-Tie-Break I publish the following Excel file with
  suitable examples.

Some quite complicated examples are given there but with minimal explanation.

One last final twist which helped me understand the examples is this one regarding
the score of a player which is going to be used in the Buchholtz calculations for other players.

If a player has received a pairing bye for which he has received one point (as opposed to an elective bye for which the player receives only half a point) then this is treated as an elective bye for Buchholtz calculations, so only counts as a half point bye.

So, if I play player A who has a total score of 3 and he had a one point bye (meaning he scored 2 points from playing games and 1 point from the bye) then when calculating my Buchholtz score I don't add 3 points for this opponewnt, I only add 2.5 points because his one point bye only counts as a half point bye.


Standard for receiving live chess broadcast I was making live broadcast recent days and I'm quite surprised how it technically worked. We were downloading whole new PGN file every 5 seconds with format shown it the code below. Is this how things work by default, is this standardized way of accessing tournament games?

Is it typical for major actions that access to games can be licensed/encrypted to avoid traffic from unknown entities?

For actions with many boards and many watchers like Olympiad online traffic downloading whole new PGN every second is just unimaginable for me.

[Event "Nomina?ní turnaj"]
[Site "?"]
[Date "2018.05.29"]
[Round "5.1"]
[White "Babula, Vlastimil"]
[Black "Plat, Vojtech"]
[Result "0-1"]
[BlackElo "2556"]
[WhiteElo "2556"]
[LiveChessVersion "1.4.6"]
[ECO "D96"]

1. d4 {[%clk 1:30:55]} d5 {[%clk 1:30:54]} 2. Nf3 {[%clk 1:31:03]} Nf6
{[%clk 1:31:00]} 3. c4 {[%clk 1:31:10]} c6 {[%clk 1:29:19]} 4. Nc3
{[%clk 1:30:57]} g6 {[%clk 1:28:47]} 5. e3 {[%clk 1:27:45]} Bg7 {[%clk
1:29:13]}
6. Be2 {[%clk 1:27:05]} O-O {[%clk 1:29:35]} 7. O-O {[%clk 1:27:11]} dxc4
{[%clk 1:25:13]} 8. Bxc4 {[%clk 1:27:06]} Nbd7 {[%clk 1:25:29]} 9. Bb3
{[%clk 1:13:22]} Nb6 {[%clk 1:22:11]} 10. h3 {[%clk 1:08:06]} Bf5
{[%clk 1:21:31]} 11. Nh4 {[%clk 1:02:41]} Be4 {[%clk 1:17:33]} 12. Nxe4
{[%clk 1:02:24]} Nxe4 {[%clk 1:17:59]} 13. Qc2 {[%clk 1:00:24]} Nd6
{[%clk 1:18:23]} 14. Nf3 {[%clk 0:58:11]} Rc8 {[%clk 1:18:48]} 15. Rd1

....

and so on

This is very common for live broadcast. What's simpler than just sending a PGN file format?

  downloading whole new pgn every second is just unimaginable for me.

Not really. While I don't claim myself a HTTP expert, your browser doesn't really need to do a new download. Good browser implementation should have a cache of your most recent PGN file. Only the HTTP response would need to be sent back. Please take a look:

https://stackoverflow.com/questions/20978189/how-304-not-modified-works


Touch a piece and then claim opponent's previous move was illegal In a last round tie between 2 players fighting for top seed in a competition, here is what happened.

White had 18 seconds on his clock and black had 26 seconds. Black was winning. At move 56, black made a pawn push which exposed his king to a check by a dark square bishop, thus making the pawn push an illegal move. White did not take note so he  raised the bishop and was about to play then he saw that the king was in check, so before he could call 'illegal' black quickly called the 'touch move rule'. Thus implying that white had to move the bishop. According to FIDE rules which call should supersede: Black's 'touch move' or white's 'illegal move'?

In standard play (each player has at least 60 minutes for all the moves) it makes no difference when the illegal moves is spotted the position must be restored to the one before the illegal move even if that was several moves ago.

In rapid or blitz Appendix A4 part 2b applies:

  b. An illegal move is completed once the player has pressed his clock.
  If the arbiter observes this he shall declare the game lost by the
  player, provided the opponent has not made his next move. If the
  arbiter does not intervene, the opponent is entitled to claim a win,
  provided the opponent has not made his next move.

Provided white has not released the bishop on a different square the claim for an illegal move stands and white wins the game.

EDIT: As of 1st January 2018 the rules for rapid and blitz have been brought into line with standard rate. In all 3 cases there is a time penalty for the first illegal move (1 minute for blitz and rapid, 2 minutes for standard) and only the second illegal move loses you the game.


Are there any Chess960 positions where Black has the advantage? I've heard it said that some Chess960 positions have a significant advantage for White, usually involving fast attacks against undefended pawns. However, since zugzwang positions do exist, it's theoretically possible that Black could have an advantage in some opening setups. Which leads to the question: are there any where he does? If not, are there any that give White less of an advantage than he has in normal chess?

It happens that someone tried to evaluate all 960 positions with an engine. Several positions got a score of 0.00, but none of them offered any advantage for black.

Of course, those conclusions are only the evaluations of Stockfish at 40 plies depth. It is a strong hint, but no definite proof, that Black is fine  in the huge majority of 960-chess starting positions, but not better in any of them.

This result matches with the intuition that in a symmetric, non-developed position, with all pawns on the 2d and 7th rank, there is always something useful to do if you are on move: in other words, there cannot be mutual zugzwang.


A chess problem question: Why is this the solution? [FEN "5B2/3p1n2/R2p4/1P1NRBQ1/1KPkrb2/1p6/2Pp1Pn1/4r3 w - - 0 1"]

1. Nc7! Rxe5 (1... Nxg5) (1... d1=Q) 2.c3#

What would make you play Nc7? This results in checkmate in 2 if, as the computer does, Rxe5 is played. But why wouldn't the computer just play Nxg5, winning the queen and preventing checkmate? Or why not play to d1 and promote to a queen?

What would make you play Nc7?

It is the only move with which White can give check mate in two moves.

  This results in checkmate in 2 if, as the computer does, Rxe5 is played, but why wouldn't the computer just play Nxg5, winning the queen and preventing checkmate?

On 1. ...Nxg5 White plays 2.Rd5 which check mates.

  Or d1 and promote to a queen?

On 1. ...d1Q White plays 2.Rd5 which check mates.

SUMMARY:

1.Nc7 has been played to free the rook on e5 to give check mate, by coming to d5.

This is why computer played 1. ...Rxe5, since on every Black's move 2.Rd5 check mates, except for these:

1. ...Ne3 but then White mates with 2.Rxe4.

1. ...Nxe5 where White mates with 2.Rxd6.

1. ...Bxe5 where White mates with 2.Qxd2.

1. ...dxe5 where White mates with 2.Bc5.

1. ...Kxe5 where White mates with 2.Bg7.

Best regards.


What is the best strategy for an amateur to last as many moves as possible against a GM? As an amateur chess player, I have been pondering this question for quite a bit now:

  In case of an amateur playing against a Grandmaster, what strategy would lengthen inevitable defeat?

I am assuming that a Grandmaster will always beat an amateur; I suppose that it is possible to find exceptions, but they will be so rare as to be negligible. My question is partly constrained by the following observations:

The amateur will have a significantly higher chance of not choosing the best possible move in any given situation.
The Grandmaster is playing as if they were playing against a Master or another Grandmaster.

In this case, will the amateur be able to lengthen their defeat by always playing what they believe is the best possible move (which the Grandmaster is likely to anticipate with experience), or by using strategies that are not encouraged but objectively make the game more difficult for the Grandmaster (eg. always going for the kill regardless of piece value, a queen for a queen)?

Or would it benefit the amateur to play an entirely random move every turn, since it would prevent the amateur from taking the bait/accepting the gambit?

It really depends on what you mean by "lengthen".

I am not a GM, but as an "ordinary" Master, I have played 1700s before, who were lost by move 10, but the game still took 50 moves to finish. If you are trying to stay equal longer, that is a harder question to address.

If you are just taking about purely lengthening the game, then you are looking to trade material. Endgames naturally take longer to play out. Again, they may still be lost for many moves, but they can take 40-50 more moves to execute the opponent.

In reality, if you want a shot at being one of those statistical upsets, you want a complicated position, possibly at the cost of a pawn, where you are the aggressor. You are still likely to lose, but at least you have a "puncher's chance".

P.S. I do not recommend playing randomly. That is a recipe for making MUCH WORSE moves, which will be punished that much more severely. Unless it is an actual good move that is buried deeply, and that a strong player overlooked, a "random move" is really just a move that we discounted already, usually for good reasons. Playing moves that strong players do not consider strong, is not a good recipe for success. When I encounter such a random move, it is usually just bad, and I try to adjust to take advantage of whatever new weakness was created.

P.P.S. Based on your comment, and clarification, in the comment below, there is probably nothing you can do that will guarantee that you will stay equal longer other than if you have prepared the game with a chess database, and guess the line that the GM ultimately will play. A GM is going to be MUCH stronger positionally, and tactically. They simply analyze and understand much better.

That leads me back to my last comment above, and that is you want a complicated position. They will probably outplay you there too, but that is the only way you have a prayer.


Chess engine: Quiescence Search increases required time by a factor of 20 I am currently trying to implement a basic chess engine and got to the following point:

I have got Alpha-Beta Pruning implemented and extended it with a transposition table. To further increase stability I implemented Quiescence Search and this is where I ran into problems.

The result clearly looked better but the required time for this was out of this world.

I was using Alpha-Beta pruning with a depth of 6 half-moves. Each evaluation was carried out by Quiescence Search. Without limiting the allowed depth of the Quiescence Search, my program ran for multiple minutes without any result. I limited the depth of the Quiescence Search 10 half-moves and got to the following result for the second move:

visited nodes:   6915527
quiescent nodes:   104313894
>>> 79502 ms <<<

Without Quiescence Search (the listed quiescent nodes are the leafs of the main tree)

visited nodes:   8472808
quiescent nodes:   4978606
>>> 9227 ms <<<

You can see that the Quiescence Search takes up most of the time.

What could I do to improve the time my engine needs?

private double alphaBetaSearch(double alpha, double beta, int currentDepth) {
    _visitedNodes ++;
    long zobrist = _board.zobrist();
    double transposition = transpositionLookUp(zobrist, currentDepth);
    if(!Double.isNaN(transposition)){
        return transposition;
    }

    List<Move> allMoves = _board.getAvailableMoves();
    if(currentDepth == _depth || allMoves.size() == 0 || _board.isGameOver()){
        double val = Quiesce(alpha, beta,quiesce_depth );
        transpositionPlacement(zobrist, currentDepth, val);
        return val;
    }

    orderer.sort(allMoves,currentDepth,zobrist,_transpositionTable_pv);

    for (Move m : allMoves) {
        _board.move(m);
        double score = -alphaBetaSearch(-beta, -alpha, currentDepth + 1);
        _board.undoMove();
        if (score >= beta) {
            transpositionPlacement(zobrist, m);
            return beta;
        }
        if (score > alpha) {
            transpositionPlacement(zobrist, m);
            alpha = score;
            if (currentDepth == 0) {
                _bestMove = m;
            }
        }
    }

    transpositionPlacement(zobrist, currentDepth, alpha);

    return alpha;
}

private double Quiesce(double alpha, double beta, int depth_left) {
    _quiesceNodes ++;
    _evaluatedNodes ++;
    double stand_pat = evaluator.evaluate(_board) * _board.getActivePlayer();
    if(depth_left == 0){
        return stand_pat;
    }
    if( stand_pat >= beta)
        return beta;
    if( alpha < stand_pat )
        alpha = stand_pat;

    List<Move> allMoves = _board.getAvailableMoves();

    for(Move m:allMoves){
        if(m.getPieceTo() * m.getPieceFrom() < 0){

            _board.move(m);
            double score = -Quiesce( -beta, -alpha, depth_left-1);
            _board.undoMove();

            if( score >= beta )
                return beta;
            if( score > alpha )
                alpha = score;
        }
    }

    return alpha;
}

Because you said

  Without limiting the allowed depth of the Quiescence Search, my program ran for multiple minutes without any result

I'm assuming that you haven't implemented any capture ordering in your quiescence search.

When you don't do this, you allow your computer to calculate rather silly situations very deeply. For instance, say I have one capture: my queen takes your (defended) pawn. This is obviously a bad choice, and we want your computer to recognize this quickly.

You could simply recapture (choice A), but you have another capture available (choice B) your bishop takes my pawn. Say for the sake of example that these are the only two available captures. You now have two options for searching these moves:

First B, then A

If you search B first, my queen might have the option to take another piece (now that it has moved to a different square). You'll call the quiescence function again (maybe your bishop can now take another piece) and after that, maybe my queen can take yet another piece. You're calling the quiescence function over and over again. It'll have to end at some point, but when you're doing this for every leaf node, this takes time.

First A, then B

If you search A first, I will no longer have a queen with which to take pieces, meaning I am substantially less likely to have to have more captures available, meaning your quiescence search will likely stop here. Then, when you inevitably search B, you will be much more likely to create a beta cutoff because capturing the queen with a pawn was given a very high value.

Hopefully this illustrates the importance of move ordering in quiescence search.

The way we typically do this is with MVV/LVA, which stands for "most valuable victim, least valuable attacker," which does exactly what it sounds like. For each capture, compute the value of the victim minus the value of the attacker, then search the largest captures first. This should massively reduce your qsearch times.

All this being said, limiting your qserach is sometimes a legitimate thing to do, (is it actually useful to see the 10th capture in a row?) but first you should see how the capture ordering shakes out, then make a decision.

Hope it helps.


Normal draw positions in the endgame KQPKQ with a bishop-pawn? Suppose, in the endgame queen + pawn vs queen (KQPKQ) , the stronger side has a bishop-pawn (c-pawn or f-pawn). The weaker side cannot win the pawn, nor has a perpetual check,
 nor can play on stalemate.

Is there any drawing position left with all these conditions?

According to the tablebase here, this position is a draw. Of course, with the open position, Black threatens perpetual check with any free move.

[FEN "3k1q2/8/8/8/8/8/5P2/3KQ3 w - - 0 1"]


Chess variants-Anyone recall the name for one that has a "superpiece" with the movements of the queen and knight? What is the name of the chess piece in a variant game where there is a piece that moves like the queen AND a knight?

Is there a name for this variant?

According to the Wikipedia variants page, there does not seem to be a variant with a specific name, but there are several variants that use the queen-knight hybrid, which is called an Amazon (appropriate name, and combines rook+bishop+knight movement abilities). So maybe just "Amazon chess" would make sense.

The Amazon is used in the following variants (copied from the Wikipedia page above):

Maharajah and the Sepoys: Black has a complete army, and White only one piece: the maharajah (Amazon).
Musketeer Chess: A commercial variant, inspired from Seirawan Chess. This variant introduces 10 fairy pieces: archbishop, chancellor, hawk (different rules from Seirawan Chess), elephant (different rules from Seirawan Chess), leopard, cannon (different from Xiangqi), unicorn, fortress, spider, and amazon (also called dragon in this game). Players have a choice of 2 pieces among the 10 possible and method used to introduce them during the game.
Wolf Chess: On an 8×10 board, with fairy pieces wolf (empress), fox (princess), nightrider, sergeant (almost a Berolina pawn), and elephant (amazon). By Arno von Wilpert (1943).

There are also the following hybrid pieces:

Empress (rook+knight)
Princess (knight+bishop)
The traditional Queen (rook+bishop)


I'm confused by UCI Pondering and Time Control I'm trying to talk to a UCI engine (right now Stockfish, but more generally to all UCI engines) to write my own computer-vs-computer program (I could use Fritz, but I really want to learn more about UCI and engines in general, so I'm trying to do it on the nuts and bolts level).

I've gotten to the point where I can do:

position fen r1b1kb1r/ppp2ppp/3p1q1n/4p3/3nP3/1PN2N2/PBPPQPPP/R3KB1R w KQkq - 0 7
go wtime 500000 btime 500000

And read

info nodes 811977 time 4620
bestmove f3d4 ponder e5d4

So I know my engine decided, after it's processing time of 4620 milliseconds, to move f3d4, and it expects the other player to play e5d4.

First question:  do I immediately send go ponder to let the engine think?  Or do I need to use other commands first?

The player plays a move and, hot dog, it's what the engine said it was going to ponder.

Second question:  do I just send it a ponderhit or do I need to postition fen --new position-- first then send ponderhit?

I'd personally expect the engine to update it's internal state on a ponderhit, but it looks like the engine is supposed to rely on the GUI to handle all board state for the game, is this correct?

All the examples I've seen just do a single analysis, or run a single move then end, I don't know how to continue the game!

Third question:  When I send a go command I send along with it the wtime and btime left on my game's clock.  Does the engine actually use this data to decide how long to think on each move, or does it expect the GUI to tell it how to manage it's own time?  It looks like the engine handles this thinking on it's own, but as I've never actually gotten to the NEXT move, I'm not sure if it's actually doing time management.

I know these are horribly newbish questions, but all the reading up I've found on the UCI engine seems to just talk about one move, or analyzing a move, and I haven't found any examples of multiple moves in sequence, so I'm not quite sure how to play THROUGH a game on the UCI command line.

First the GUI sends the position string with the ponder move as the last move in this string. Then the GUI sends "go ponder". This makes little sense to me, but UCI is very much a kludge. Note that the engine can actually ponder whatever move(s) it wants, but UCI tried to make it simple for basic implementations. From the protocol

ponder

start searching in pondering mode.      Do not exit the search in ponder mode, even if it's mate!       This means that the last move sent in in the position string is the ponder move.        The engine can do what it wants to do, but after a "ponderhit" command      it should execute the suggested move to ponder on. This means that the ponder
move sent by the GUI can be interpreted as a recommendation about which move
to ponder. However, if the engine decides to ponder on a different move, it
should not display any mainlines as they are likely to be misinterpreted
by the GUI because the GUI expects the engine to ponder on the suggested move.

I think the GUI simply sends "ponderhit" when it is applicable.

The main reason not to resend the position string, but to only send "ponderhit" is to ensure that the engine continues its current search in the pondered position, rather than starting a new one.

ponderhit

  the user has played the expected move. This will be sent if the engine was
  told to ponder on the same move the user has played. The engine should
  continue searching but switch from pondering to normal search.

In general, UCI tries to be "stateless", which is really it's big error IMO, as it makes everything natty. Pondering is a prime example of when the engine can really do whatever it wants (even the protocol says explicitly). The "ponderhit" command's action is determined by the "position fen ... moves" string that was already sent before the pondering began. So in that sense the GUI still sends the board state (this is completely awkward in my opinion, particularly if you want to ponder more than one move, but that's UCI for you).

Engines can/should use their own time management based on "wtime" (and/or btime/winc/binc). Again it's a bit confusing with UCI, as the GUI is supposed to be in somewhat total control (like with opening books), but then has some leeway when allowing the engine to allocate its own time (you can use "go movetime" if you want the GUI to control time management, assuming the engine complies).

You can look at a log of how a GUI communicates with an engine such as Stockfish.

GUI -> engine1: position startpos
GUI -> engine1: go wtime 100000 winc 1000 btime 100000 binc 1000
engine1 -> GUI: bestmove e2e4 ponder e7e6
GUI -> engine1: position startpos moves e2e4 e7e6
GUI -> engine1: go ponder wtime 98123 winc 1000 btime 100000 binc 1000
[user or other engine plays the expected e7e6 move]
GUI -> engine1: ponderhit
[engine keeps thinking]
engine1 -> GUI: bestmove d2d4 ponder d7d5

Or if the pondered move wasn't made, then a new "position" string is sent instead of "ponderhit".


What would approximately be the ICCF rating of a GM with no external help and of a computer with no human judgment? I need some players who play at the ICCF (International Correspondence Chess Federation) to answer this question.

What would approximately be the ICCF Elo rating of the two following players?

Player A is a Grandmaster with an OTB rating of 2500 Elo FIDE. He will not use any engine, nor will he use any opening database, nor will he use any opening book, nor will he use any endgame tablebase, nor will he use any form of outside assistance. He will play using only his brain. He will use on average about 5 minutes per move, which also happens to be the average time per move of humans in OTB chess at classical time control. Player A is 100% human.
Player B is in reality a patzer, with an OTB rating of 1200 Elo FIDE. For the opening he will use an opening database and in each position he will just pick one of the popular moves which score well. For the rest of the game, he will use one (and only one) of the top 3 best engines: Komodo 9, Stockfish 6 or Houdini 4 (64-bit version). His engine will have 7-men endgame tablebases. At each position he will let his engine run for one hour (using 4 CPUs) and then he will blindly pick his engine’s first suggestion. He will not offer draws or accept draws early, he will continue his games until it is very clear that the position is a draw. He won’t resign early either, he will wait until he gets checkmated. Player B is 100% computer.

Note that I only need an approximation. But still, try to make your approximation as accurate as possible.

I play on ICCF. My guess is that the engineless GM might be able to maintain a 2000 rating by beating other engineless players or players who are bad at engine use.

I don't think the second player would do that well actually. Players in the 2300+ range are all using anti-engine strategies, following GM opening theory, have their novelties, so they can lure him into opening traps or positions his engine has trouble evaluating. I would guess he'd wouldn't go much beyond 2100.  I've played against 2200 players who are pure engine once out of book, but they put more effort into their openings than your player B does.

There is another breed of player you haven't mentioned: the engine monkey master.  These are players with 2000+ ratings over the board. They could potentially try to carry out strategic plans in the middlegame, but they get so caught up in the engine analysis they end up play positionally suspect moves. They do contribute a lot to the openings and endings though, so you see them in the 2300-2400 range.


What's the winning box for the King in a Queen against 7th rank Bishop-pawn endgame? In a Queen vs Pawn endgame where the pawn is a Rook pawn on the 7th rank, it is a draw unless the King is inside the winning box, as shown here:

My question is what is that winning box if the pawn is a Bishop pawn? Though I do know that the Queen needs to be on h2 or d2 against an f pawn, and on a2 or e2 against a c pawn. (Comparing to the whole 2nd rank if it was a Rook pawn).

There are actually two zones, depending on which side of the pawn the black king is. If it's already in the corner, the zone is small:

If the black king on the other side (towards the center), the zone is larger. The white queen can force the king to stand in front of the pawn, giving the white king an extra tempo to reach the 'small' zone above. (This also applies if the king is in front of the pawn already.)

(diagrams from Fundamental Chess Endings by Müller and Lamprecht)


How is average centipawn loss calculated when a mate is missed? As far as I know, to calculate the average centipawn loss, we calculate S1 - S0 for every move, where S1 is the evaluation (in centipawns) of the position before the move and S0 is the evaluation (in centipawns) of the position after the move.

Let's take this position as an example:

[Site "https://lichess.org/kuvnBssO"]
[Date "2018.07.20"]
[Round "-"]
[White "Kulkid"]
[Black "WaisKamal"]
[Result "0-1"]
[WhiteElo "2016"]
[BlackElo "2107"]
[Variant "Standard"]
[TimeControl "30+0"]
[ECO "D44"]
[Termination "Normal"]
[FEN "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1"]
[SeUp "1"]
[StartPly "67"]

1. d4 d5 2. c4 Nf6 3. Nc3 e6 4. Nf3 dxc4 5. e3 { D44 Queen's Gambit Declined: Vienna Variation, Quiet Variation } Be7 6. Bxc4 O-O 7. Bd3 Nbd7 8. O-O b6 9. Re1 Bb7 10. a3 Bxf3 11. b4 Bxd1 12. Rxd1 c5 13. Bb2 cxd4 14. exd4 Qc7 15. Ne2 Rac8 16. Rac1 Qb7 17. Rb1 Rc7 18. f3 Rfc8 19. Ng3 h6 20. Ne4 Nxe4 21. Bxe4 Qb8 22. Bd3 Bf6 23. Ba6 Rd8 24. Be2 b5 25. Kf2 a6 26. Bc1 Nf8 27. Be3 Rdd7 28. Rdc1 Rxc1 29. Rxc1 Qd8 30. Rd1 Bxd4 31. Bxd4 Rxd4 32. Rc1 Rd2 33. Re1 Ng6 34. Ke3 f5 35. Kf2 Nf4 36. Kg3 Nxe2+ 37. Kf2 Qd4+ 38. Kf1 Qg1# { Black wins by checkmate. } 0-1

The given position is a mate-in-one (Qd4#). I missed this mate, and instead played f5, resulting in a position with an evaluation of mate-in-6. How will my centipawn loss be calculated for this move?

I cannot vouch for every engine available, but the general approach is, the mate is evaluated to something close to 15-bit integer, 32765 centipawns, and you get minus 1000 centipawns for every move-to-mate (to make it reasonable for the engine to sacrifice the queen (~900 cp) to delay the mate).

In your particular case, the original evaluation was 327.65 pawns, the mate-in-6 became something like 327.65 - 10.00 * 6 = 267.65 -- the numbers are not exact, and different engines may use slightly different approaches, but this one is the most common, I believe.


Which format should i choose to improve my chess skills (Blitz chess or Standard time control chess)? I always play both blitz and standard time control chess games. But in blitz I make a lot of mistakes and I'm not able to find a lot of good and tactical moves whereas in standard time chess format I can play better.

I think blitz is only for Applying our chess skills and only standard time control chess will help more to improve our chess skills.(I'm not against blitz :D)

Will blitz help more than standard time control to improve my chess skills?
If yes how? If No when and for what purpose should i play blitz ?

Thanks in Advance.

Will blitz help more than standard time control to improve my chess
  skills?

No. Standard time control chess always helps more to improve your game than blitz chess because in standard chess you spend more time analyzing the game.

Chess is a game of intelligence but even more so of knowledge. The more (structures, endgames, openings, etc.) you know, the better you are.

  To make a rather primitive classification, the average grandmaster
  knows about 1,500 - 2,000 typical positions, including the opening,
  possible middlegame plans, and some outlines of endgame. Super GMs,
  like Kramnik or Anand, have a wider and deeper knowledge. As for
  Kasparov, his knowledge is truly head-spinning, I guess, his number of
  positions might exceed 10,000. Garry's memory is phenomenal! I think
  it even impedes him during the game. - Valeri Tsaturian

Knowledge is hardly acquired in 3-5 minutes (blitz) and even if it is, it is quickly forgotten. To gain chess knowledge, you need to spend more time studying the game.

The more time you spend studying a position, the more you understand it, the better you remember it, and the more insights you gain into it. It also helps you correct your faulty decisions in the post-game analysis, because, if you're wrong, it can show you to what extent you're wrong in your judgment of certain positions.

For example, I played a game recently in standard time control and in one position, my opponent was really surprised that I didn't capture his bishop with my knight. During the game, I thought that the trade of bishop for knight wouldn't help me in that position, but in the post-game analysis, my opponent proved me wrong and demonstrated how it was good for me. I went home and analyzed with a computer and found that my opponent was right. If this had been just a blitz game, I could have just excused myself saying "well, I didn't have enough time to consider the consequences of that" and thereby prevented myself from recognizing this flaw in my own knowledge.

  If No when and for what purpose should i play blitz?

You can play blitz to

1) Enjoy yourself.

2) Check your opening preparation.

3) Develop a rough understanding of certain types of positions with the intention of analyzing them in depth later. This third point is crucial, because it is the best way to use a blitz game. You may not learn much during and immediately after the game, but if you analyze your blitz games, you will still learn a lot.


Why does a touched piece not have to move in online play? There is a rule of playing the game of chess that a touched piece of one's own should be the one to move. I have always been taught by professional trainers from early childhood that this is the official rule to be followed in tournaments, but not necessarily in friendly games.

However, I find that online interfaces for playing rated games do not enforce this rule. I often find myself starting to make a move in blitz and then opting for another, possibly with a different piece. The interface always allows that in all the sites I have played.

Is this an omission on the part of the designers or rather an indication that chess players really do not care about this rule (mindlessly repeated from generation to generation)?

I think the reason becomes more apparent when you consider why the rule is in place for OTB games - an opponent constantly moving their hands around the board and moving the pieces around can be very distracting while the other player is likely still trying to concentrate on the position.

By contrast, in online chess both players are using their own screens and the fact that one player starts moving one piece, decides against it and then moves another is not even conveyed to the other player - they see a static board until the final move is made.

Another factor (but not the main motivation IMO) might be that, as you hinted at in your question, most online games are seen as 'friendly' games - it has only been very recently that the idea of officially rated online games has been accepted by FIDE, for example.


Openings that fianchetto on the king side I'm a beginner and I really like openings that end up in a fianchetto, I mostly like playing on Black side because of Sicilian Dragon and King's Indian Defence.

On White I play London System and King's Indian Attack.(For which I don't like London system that much.)

So I have 2 questions:

1.- Is there a list of openings where a fianchetto is involved for both black and white openings? And which are most effective?

2.- I like to think of myself as a positional player, what are the most popular white openings that have this kind of "passive" play?

With black against 1.e4:

Modern defence
Pirc
Sicilian defence: dragon
Sicilian defence: accelerated dragon

With black against 1.d4:

Modern defence
King's Indian defence
Grünfeld
Leningrad Dutch
Benoni

Most of these openings have a fixed or typical setup, so with white you can play the same setup with an extra tempo.

Hard to say whether an opening is tactical or positional, active or passive. All the openings in the list have the reputation of being "fighting". This is not surprising. As you spend time playing g6 and Bg7, your opponent has the opportunity to occupy the center. Therefore, it is often important to create counterplay, which leads to an interesting battle.

In order to choose one of these openings, you can take a look at some games of strong players to see which kind of position arises and to learn the main ideas.


No writing down moves in advance of making, or in advance of completing Per FIDE rules, I must not write down moves "in advance".  Does this mean: in advance of making, or in advance of completing?

Today I have seen a strange ruling as a spectator.  A young player made a move, wrote it down and pressed the clock.  The other player called an arbiter and objected to the order of actions.  The arbiter seemed to be agreeing with the complaint, stating that the mandatory order is making the move, pressing the clock, and only then writing it down.  (It wasn't obvious whether this was meant as advisory or warning.)  This was in Europe.

I prefer answers based on non-US experience if available, because the USCF used to be more lenient toward writing down 1 move even immediately before making it, and that is hopefully irrelevant to my question.

Once a move has been made (hand has left the piece) the move cannot be changed unless it is an illegal move.

The rule against writing the move down in advance is in relation to "taking notes". If this were allowed you could write down what you thought was the best move and then stop and think for another 10 minutes considering other possibilities. If you reject the other possibilities you don't have to worry about forgetting your original choice because you wrote it down. If half way through you see a better move than your original you can erase the original move and write the new move and continue thinking. It is this behaviour that the rule is aimed at stopping.

In the case you saw the question does not arise because having made the move the player can't change the move. Writing the move down now whether it is before or after pressing the clock is not taking notes and is not against the rule. If the arbiter really thought his behaviour was against the rule and gave a warning then he was wrong.

I am a FIDE arbiter for an Asian country, currently living in Europe.


Is it possible to draw this endgame where I blundered my queening pawn? Move 13 (54 in actual game) is when I blundered my last pawn due to pressure of the Blitz game (probably). Even with seemingly equal material, the position is dreaded as the Black's pawns are more than pawns, and the only possible way to prevent defeat is to find a perpetual or keep checking for fifty moves. Is that possible in this position?

(The replayer PGN is only excerpt. If you're interested to see the full action of how I lost in the KQ v KR ending, the game was played here.)

[FEN "8/5ppp/4p3/2k1P2P/2pp1nP1/8/3K4/2R5 w - - 0 42"]
[Date "2015.07.23"]
[White "Unihedron"]
[Black "Xyuzhg"]
[Result "0-1"]
[Variant "Standard"]
[TimeControl "300+3"]

1. Rf1 c3+ 2. Kc2 Ng2 3. Rxf7 Ne3+ 4. Kc1 Nxg4 5. Rxg7 Nxe5 6. Rxh7 d3 7. Rc7+ Kd4 8. h6 Ng6 9. Rc6 c2 10. Rxe6 Ne5 11. h7 Kc3 12. Rd6 Nf7 13. h8=Q+ Nxh8 14. Rd8 Ng6 15. Rd6 Nf4 16. Rc6+ Kb3 17. Rc8 Ne6 18. Rc6 Nd4 19. Rc7 Kb4 20. Rd7 Kc3 21. Rc7+ Kb4 22. Rd7 Kc5 23. Rc7+ Kd6 24. Rc8 Ke5 25. Re8+ Kf4 26. Rf8+ Ke3 27. Re8+ Kf2 28. Rf8+ Nf3 29. Rd8 Ne5 30. Rf8+ Ke2 31. Rd8 Nc4 32. Re8+ Ne3 33. Rd8 Nf5 34. Re8+ Kf3 35. Re5 Nd4 36. Rd5 Ke3 37. Re5+ Kf4 38. Rd5 Ke4 39. Rd8 Ke3 40. Re8+ Kf4 41. Rf8+ Ke5 42. Rd8 Nb3+ 43. Kb2 c1=Q+

There is a third way to draw this endgame - sacrifice your rook for two pawns. With only a knight, Black will not be able to checkmate you.

So from move 14 on, you should keep checking the king, or, if the king doesn't protect c2, attack c2. Black will never be able to escape.

A possible sequences of moves:

[FEN "7n/8/3R4/8/8/2kp4/2p5/2K5 w - - 0 42"]

1. Rc6+ Kb3 2. Rb6+ Ka4 3. Rc6 Kb3 4. Rb6+ Kc4 5. Rc6+ Kd5 6. Rxc2 dxc2 7. Kxc2 draw


How do computers play three-check chess? How do computers evaluate three-check chess positions where the first side to check the other side three times wins?

How do they value the first and second checks?
It looks like the position evaluations would be tricky but it also looks like three-check chess would be an easier game to solve than standard chess.

https://github.com/ddugovic/Stockfish

Very active development, this is the Stockfish version used by lichess.

What you need to do is search this macro:

  #ifdef THREECHECK

Evaluation function:

  https://github.com/ddugovic/Stockfish/blob/master/src/evaluate.cpp

Checks are given extra bonus unlike normal chess:

    if (pos.is_three_check())
        score += ChecksGivenBonus[pos.checks_given(Us)];

pos.checks_given gives the number of checks already done. ChecksGivenBonus is an array of bonus values.

The bonus values are:

  S(444, 181),  // first check
  S(2425, 603), // second check

444 is the bonus for opening/middlegame, and 181 is the bonus for endgame. The bonus for the second check is much greater.

I'm not sure positional evaluations in three-checks is tricky. I can see the parameters have changed, king safety improved, but the overall structure is identical to regular chess.


Controversy over the Xiangqi cannon piece? When reviewing the nature of the pieces of various chess variants, namely the xiangqi cannon, I asked about its history. I was surprised that the dates of its mentions did not match 8th century Xiangqi and the invention of the cannon in the 12th century. What piece is that the one mentioned in the writings from before the 12th century about the Xiangqi, which is supposedly the cannon?

The character 砲 (pào) gives a significant clue:  compared to 炮, which is homophonous, the radicals of these characters are different.  砲 uses the 石 radical, which means stone, and 炮 uses the 火 radical, which means fire.
Although cannons were not yet invented until, as you say, the 12th century, trebuchets -- weapons of super long range that used stone -- predates the cannon by hundreds of years.


Punishing player for indicating moves to other team players I am arbiter myself, but I don't know how to treat player in team matches who try to indicate other players of their team what move to play in position they are in. If they won their game I might first warn them and at the second time lower their score to 1/2 (to 0 in case of a draw), but if they lose their game, there is no way one can punish them. They have literally nothing to lose. According to FIDE rules, they become a spectator one can only exclude from the room. And even in that case, nothing can stop them just to not care and stay anyway. For the refference, we're talking about low contest, like regional once where most of the time the arbiter is actually a player of one team as well.

In a low contest regional type tournament, I'm assuming you don't have to abide by FIDE or USCF rules. Given this, I would suggest the following:

Warn them the first time you see this happening. Say that the next time you see this anytime in the rest of the tournament, their team loses whatever current match they're playing. So not only does one player lose a game, but their whole team forfeits the entire match.
Enforce your ultimatum from step 1 if you see them cheating again.


What is important in the endgame besides centralization and activity? I'm a little confused about this. I know pawn structure and centralization of the king is essential in the endgame and I also know that activity, especially from the rooks is very important. Playing with little space also seems to create far too much tactical problems, although it often seems playable according to computer engines that I use to look at the match after it's over (playable not very pleasant to play with so little space). However, it seems that there is not much strategy beyond trying to be the one with the superior minor piece or superior rook or superior king and the better structure and going after the square and pawn weakness.

I know there's some endings with mating attacks against the king, but this usually requires rook on the 7th/2nd, at least two pieces, a safe king (to prevent forks and a perpetual check), and a weak opposing king. Sacrifices might not necessarily be required, but often are. These conditions are a bit hard to get even against players that are not very good. I suppose all these advantages for a mating attack on the end would have to be forced in the middle game.

So, I know the strategy and some cool tactics can also revolve around passed pawns and piece imbalances or space (lack of space) and I also know there's some interesting piece sacrifices, like those you do with exchanging a minor piece for 2 pawns but you get to lock all the opponent's pieces and kill counterplay. Zugzwang is also pretty cool. But still, maybe I'm just not very good at positional sacrifices and tactics to try to make things more interesting, however it seems to me that it is very hard to materialize a win in very balanced endings, even against some poor, but not so poor players. So, there's more to endings that I don't know? Maybe trying to force complex theoretical endings could make things more interesting? (Not sure if I would know how to do that and even so my opponent can just know the solution for such theoretical ending too?).

Anyway, another point is about king safety. With one rook and 3 minor pieces on both sides around I'm usually scared of king centralization, while with one rook and 2 minor pieces around on both sides I'm usually in doubt of whether I should centralize my king or not. Any easy tips to assess the safety of a king which is not on the first rank? Also, I was watching a blitz match between Hikaru and another GM and I noticed really a lot of pawn pushs, knight moves, just some rook moves and even fewer king moves by both sides, maybe they were just trying to do fast chess and that's the strategy somehow, but it made me really curious. Finally, can you quickly think in situations where the endgame king is more needed in the flank than in the centre? Situations where it is not so obvious why, like passed pawns running to queen.

Your question meanders a lot, but I think what you are asking is, “What factors other than king centralization and piece activity are crucial to the endgame?”

I have highlighted three areas below in bold that not more important than the other areas discussed, but just that they are not often discussed, so you can take note of them.

You hit on a lot of them in your question, so I may reiterate some of them here. The first thing is that endgames, despite their simplicity, require an incredible amount of calculation. They tend to be very specific in nature, and often we see that moving a piece to a specific but seemingly equal square, often a rook, is the difference between winning, drawing, or even losing. There are A LOT of mistakes made in endgames, even by the greatest of players. So, in essence, your comment about there not being much strategy is both true, and not true. You must keep the strategic things below in mind, but ultimately, as in much of chess, it comes down to brute-force calculation.

Ultimately, you are not going to get a set of catch-all rules for the endgame, but I will compile a list of things that you need to think about, but only endgame study and experience will allow you to prioritize them for any specific position you may end up having so you can, hopefully, calculate the proper course you should take. I will say that focusing on this area of the game, and taking many opponents into the endgame by trading, you will win a lot of points. I have only recently started to go to local clubs again after many years, and I have been playing a lot of 1800-2000 players in blitz, and while I often beat them like a drum in the middlegame, occasionally, they manage to stay equal until the endgame, but only then, they make mistakes and lose equal endgames. Being a bit older now, I can say that while I overlook things in the middlegame, and even hang material from time to time, I do not recall any of them ever outplaying me in an endgame and actually winning.

One thing that you touched upon that is SO important, that I feel compelled to discuss, is how much of higher-level chess is about trading off your bad pieces for your opponent’s good pieces. This is in the opening, middlegame, and endgame. Entire plans are often based on this key point, and games are frequently decided by this one factor. Listening to GM Peter Svider’s broadcasts on chess24.com, he often discusses this specific to a position in passing. It is like a masterclass listening to him, in general, so I cannot recommend it enough.

So, here is as complete a list of endgame factors to consider as I can compile.

You must know basic theoretical endgames. The book “100 Endgames You Must Know: Vital Lessons for Every Chess Player” by GM Jesus de la Villa, and its companion workbook, are highly recommended for this aspect. Since we are all looking for positions that are familiar to us, you will be aiming for positions in this book most of the time, whether as the player, who is trying to win, or the player, who is trying to hold the game and draw. Knowing some of the famous drawing positions like your opponent having a bishop and rook-pawn, but the bishop does not control the queening square (obviously with your king able to get to the queening square) are critical to good endgame play. Or, knowing that you can still draw in some queen versus lone pawn positions if the pawn is a bishop- or rook-pawn on the 7th with your king nearby is another example.
Planning: Be prepared to plan strategically based on the factors that follow below. If the position is quiet, you will simply have to decide where you want your pieces, and how to get them there in the best manner. This planning starts in the middlegame, and thinking about active transitions into the endgame.
Extra material, whether an extra pawn, or trying to convert an exchange (for example, knowing that rook and pawns versus knight and pawn endings are often some of the easiest to win).
You have probably heard this a million times, but when up in material, trade pieces, not pawns as the pawn’s value increases when there is less material on the board.
Conversely, if you are behind, you want to trade pawns in the hope that it will leave your opponent with a single pawn that will be impossible to promote, or maybe that you can sacrifice a lone remaining minor piece for it, leaving an immediate drawn ending.
Strange material imbalances. Sometimes, and this is always scary, is a piece for three connected passers. This is a VERY general rule, but knowing that if the three passers are at 3rd, 4th, and 5th rank is usually a draw, but further back, they are a loss (assuming other material still on the board for the side with the piece), and on the 4th, 5th and 6th, often a win.
King Position, often centralization, but also the ability to shoulder the other king out (that means to keep the king from approaching, or forcing him to take a longer route so you gain a tempo or two), or is the king cut off (often in rook endings), or even the ability to go where the other king cannot follow because he would be going outside the square. For example, just yesterday, Smirnov resigned to Anton Guijarro because he could go wide, and Smirnov could not stop him by following since h5 would win.
The opposition in pawn endings.
Piece activity, and as you said, often rooks (on the 7th), but a bad bishop is another common example of a piece that can have limited activity, especially when tied down to defending its own pawns. This can often lead to the closely-related zugzwang, a frequent visitor in bad-bishop endings.
Weak squares: Just because the middlegame has passed, that does not mean that you cannot still think about weak squares. The famous Cohn-Rubenstein, St. Petersburg 1909, endgame comes to mind. Rubinstein made a beeline to the weak square h3, and then advanced his kingside pawns, leaving him with the better, and winning, king position.
Pawn structure: This includes protected passed pawns, damaged structures, the ability to create a passed pawn, especially an outside passed pawn, and pawn islands. Are all the pawns on one side of the board, making it more likely the game will be draw? Corollary to my last sentence: Knowing that the structure f2-g3-h4 makes it hard for the opponent to make a passed pawn, even when down 4-3 pawns all on that same side, thus this is often desirable.
Advanced pawns and the threat of promotion (or actual promotion), both for queening directly, but also for just tying down the opposing side, and keeping them busy. Having an advanced pawn when down a pawn, or even more material, can also be an equalizing factor since it forces the opponent to be tied down to prevent the pawn from queening.
The ability, even at the cost of a pawn sacrifice, to create two passed pawns that are far separated, often in opposite colored bishop endings. In Topalov-Shirov, Linares 1998, Shirov uncorked one of the greatest moves in chess history, 47…Bh3!!, with the sole goal of creating passed pawns so far apart that Topalov’s bishop could not deal with them.
Unbalanced pawns when up a pawn: This is a very crucial topic, and one that is not often discussed. If you have an extra pawn, such as 2 to one for your opponent to 3 to one for you, you have the opportunity to create two passed pawns to your opponent’s one passed pawn. This strength is amplified if they are connected. This factor, which happens in rook endgames frequently, can make an endgame a lot worse than it otherwise might appear material-wise.
Tactics: There are more tactics in endgames than most people realize, but they mostly do not make it into most tactics books since they are more bare-bones tactics. When an endgame position is very complex, you cannot use basic principles, and you must calculate the same way you would a complex middlegame position. Coincidentally, right now, I am reading the only book I know of that is dedicated to endgame tactics, “Van Perlo's Endgame Tactics: A Comprehensive Guide to the Sunny Side of Chess Endgames”.  This book, in its fourth edition, is a labor of love, and covers tactical areas including pawn breakthroughs, zugzwang motifs, bare-bones mating attacks, and stalemate tricks among others. I highly recommend it.
The drawing tendencies of rook endgames. There is an old Savielly Tartakower (sometimes attributed to Tarrasch) saying that “all rook endgames are drawn”. Obviously, that is not true, but it is just an exaggeration about their drawing tendencies, and you need to keep that in mind when trying to win or draw.
Opposite-colored bishops, and their drawing tendencies. In opposite-colored bishop endings, the stronger side still wants to put their pawns on the opposite color of their bishop, but the weaker side may actually want to put their pawns on the same color as their bishop since it can be defended so easily now.
Bad bishops (opposing either a good bishop or a good knight). Try to avoid placing pawns on the same color as your bishop at all costs if your opponent has a same-colored bishop as you, or a knight.
Good knights in blocked positions (often opposing a bad bishop).
Bad knights (they do not defend well against rook pawns).
Having two bishops in the endgame is often a decisive factor.
Fortresses. We often see this in opposite-colored bishop endings, but there are many in other endgames too.
Another thing that I see a lot: Players, who are winning a close ending, but they take the time to hunt an extra pawn, when they could be taking that time to push their own pawns that much further. I mostly see this in rook endings. Sure, take the extra pawn if it is a direct part of your plan, or it is getting in the way of a direct part of your plan, or because it is actually dangerous to you; but otherwise think first about pushing your pawn(s). Imagine how many pawns you will be able to take later if you are up a piece. You may not get the chance if you went pawn hunting for the sake of pawn hunting.
The famous Shereshevsky quote: “Do not hurry”. Often an endgame is drawn, but you can lull your opponent into making a mistake by entering a position that looks similar to one that you have previous had during the game, but there is a small difference. Your opponent loses their sense of danger, and you pounce. Of course, there are times where time is of the essence, and you must act immediately, but if the position is semi-locked, this strategy can be useful.
Aim for endgames that you are familiar with, and know how to win. This goes back to my very first point: Know basic theoretical endgames.