How is this position possible in a normal game of chess? A friend of mine gave me this problem. It goes like this.

In a normal game of chess, the white player checks the black's king with a rook and a bishop as in the following image.

8/8/8/8/8/7k/8/3K1B1R b - - 0 1

Now the image seems a bit awkward. In the last move before the check, the white player will have moved either his rook or his bishop (but not both). Suppose that in the last move the white rook is moved, so the black king and white bishop would already be at the same position as they are now. So the black king was already checked by the bishop and hence it was impossible for the black king to remain in that position. Similarly, if the white bishop is moved in the last move, the black king would already be checked by the rook and hence it would be impossible for the king to stay in that position.

But it is assured that this position can be reached without any breach of rules. Does anyone know how this can be done?

Double check is only possible by using discovered check. So either the rook check or the bishop check was discovered by moving something in between on the previous move.

I don't see how that's possible with the rook check, but it is possible with the bishop -- if the board is shown with black at the bottom, contrary to what is usually done. Then there could have been a pawn in between the black king and the white bishop, it could have captured something on h8 and promoted to a rook.

E.g.,

[FEN "3K1B1q/6P1/7k/8/8/8/8/8 w KQkq - 0 0"]

1.gxh8=R+


Why did Garry Kasparov not play under the flag of Azerbaijan in his comeback tournament in the summer of 2017? Garry Kasparov was born in 1963 in Baku, Azerbaijan, at the time part of the USSR, Soviet Union.

According to the news he has also acquired Croatian citizenship.

In his comeback tournament in the summer of 2017 he still used the Russian flag.
However I did see a Croatian flag together with the Russian one on the poster behind him at the signature sessions between the matches.

But why did Garry Kasparov not play under the flag of Azerbaijan?

But why did Garry Kasparov not play under the flag of Azerbaijan?

Because his FIDE registration is with Russia.

If he wants to change his registration to Azerbaijan then the following also have to happen -

1) He has to have a valid claim like residency, nationality or birth, so birth would do.

2) Azerbaijan chess federation have to agree.

3) An administration fee has to be paid to FIDE and possibly a "transfer" fee also. Because Kasparov is a highly rated GM this would be very large. I think when Caruana transferred from Italy to US it was more than $50,000.

The section of the FIDE handbook which describes the rules is here.


Can you objectively determine who was the best chess player of all time? There have been a number of statistical attempts (e.g., chessmetrics and edo)  or computerized attempts to determine who was the best chess player of all time.

The statistical approaches attempt to back rate all top chess players through time in order to make meaningful rating comparisons.  You can't just compare Elo ratings because many great players played before the Elo system was implemented.

A second approach is to use computer analysis of the games of great players and determine who blundered the least.

However, I see some problems with these approaches as implemented to date.  Here are my thoughts on this.  I would like to hear others thoughts.

A computer comparison blunder analysis by professors Matej Guid and Ivan Bratko found that Capablanca played more like a computer than modern players! . However, Guid and Bratko noted that Capablanca's rather sedate style and lower quality of competition than modern players led to fewer positions where he was likely to blunder. Perhaps, an aggressive player like Kasparov may make more tactical errors because he sought complex positions but his opponents made even more errors under his pressure!

Perhaps, you need an error weighting system that doesn’t just calculate the percentage of errors per 100 moves but estimates the difference between your error rate and your opponents error rate.

Because computer comparison analyses don’t take into consideration the strength of your opponent back ratings have been used to adjust for increasing quality of play over time.  These approaches make some hidden assumptions as well. For example, Chessmetrics assumes a player’s peak rating occurs when they are 40 years old which probably isn't true in all cases.

According to Edo, Capablanca and Morphy are rated the two highest players from the pre 1920s era.  According to Chessmetrics, Capablanca and Lasker were the two best players (Morphy doesn’t even make the top ten.). There are many other discrepancies between these two back rating systems.

Can one derive a better system based on more solid assumptions to accurately estimate who was the best chess player?

I'm posting a sample answer to my question to give others an idea about what I'm thinking about.

First, you have to define what you mean by best. For example, does best mean you are the most dominant player for your era? Or does it mean that the quality of your player is superior to all other players. And if quality is what you mean, then how do you define quality?

Paul Morphy was probably the most dominant player. For example, when he was 12 years old he defeated a top ten player (Lowenthal) in a match 3-0. According to Edo and chessmetrics he was probably already one of the best players in the world at the age of 12! At the age of 21, he played against a simultaneous against 5 top ten players (Bird, Barnes, Boden, De Reviere, and Lowenthal) and scored 3-2.

However, most would argue that dominance is a poor indicator of who is best. After all, Morphy has been described as the first modern chess player. His competition was weak compared with subsequent champions.

Another definition that has been used is quality of play. However, this definition also has a lot of problems. In the 1900 hundreds , a number individuals argued that Steinitz or Lasker were the best players of all time arguing that their knowledge of opening and modern theory would make them superior to players from the past. However, Louis Paulsen made some very clever arguments against this hypothesis. He argued that Morphy (who had a photographic memory and memorized the Louisana bar code by the age of 19) if brought back to life would learn openings and modern theory within a year and be able to compete successfully against modern chess players.

The mathematician Kenneth Regan argues that modern chess players who have access to chess computers and modern training methods play more like computers than players of the past. That’s no surprise because they were trained by computers but does that mean that modern players are really better? This begs the question what would Fischer or Capablanca do if they had access to modern computers?   The problem with computer comparisons is they don’t take the historical factor into account.

You need an error weighting system that doesn’t just calculate the percentage of errors per 100 moves (which is basically what Regan and Guid and Bratko did ). Instead, you need to calculate the difference between your error rate and your opponents error rate. After all, chess is about committing fewer errors than your opponent. Putting pressure on your opponent to induce more errors is considered a good quality.
If innovation leads to dominance within a specific chess era over time and it becomes increasingly difficult to innovate over time as the strength of the competition increases you can’t measure true dominance by just looking at the match records of the top 30 players. That is, it’s a lot harder for Magnus Carlsen to dominate his opponents than it was for past champions.
Can the problem of increasing quality of play overtime be corrected by looking at back ratings? I prefer the Edo back rating system http://www.edochess.ca/ because the statistical assumptions are better. According to Chessmetrics, Zukertort, Steinitz, Tarrasch, Lasker, Pillsbury, Maroczy, Marshall, Janowsky, Chigorin, Schlechter, Blackburne, Duras, Teichmann, Neumann, Vidmar, Gunsberg, Rubinstein and Burn were better than Morphy.   That doesn’t ring true for me.
If you look at Edo or Chessmetrics back ratings it’s easy to see that the magnitude of the difference between the top players’ ratings has been decreasing over time. So I believe an Edo type statistical model that takes into consideration the difficulty to dominate over time would be a better approach than what has been tried previously.
So my dream analysis is that you use Edo ratings based on a database that only includes the top 20 or 30 players from each five year period. After you complete this analysis you reweight your results by a dominance factor. That is, more recent players get a bonus factor that is calculated by estimating the trajectory of difficulty of dominating over time (the decrease in rating disparities between top 30 players over time). Next, you would validate this analysis by comparing players percentage of chess computer calculated blunders their opponents make minus their own blunders. If this invalidates the above, then you need to reweight according to the computer error checking analysis if it shows there is a tendency for more recent top players to play more accurately even after my dominance factor is taken into consideration.
My guess based on my eyeballing this, is that Kasparov would do very well. But that’s just a guess.


Improving your chess without access to OTB tournaments Due to the Coronavirus, all chess tournaments and activities have been canceled in my area. At the same time, I've got a lot of time on my hands right now and would like to work on my chess. I have got access to a lot of training material, which includes a vast library of chess books on tactics, openings, endgames, and positional play. I'm rated about 2050 FIDE. Here are my main questions:

What do you think is the best time control to play online to improve? I have found that rapid games (10 minutes each) don't leave a lasting impression, meaning I quickly forget what happened and probably also don't learn much from it.
Have you tried improving mainly via online chess and can share your experiences? If not, do you know anyone who has done that?
Should I set up a real board while playing online to recreate the OTB experience?
How much training per day do you recommend? I plan on working between 1-2h every day on chess and playing long games regularly.

Overall, I like your plan. Addressing them, not in order though, and adding some thoughts along the way:

How much training per day do you recommend? I plan on working between
1-2h every day on chess and playing long games regularly.

Let's face it, the more time, the better in terms of really getting better. Spending two hours per day is a lot for a non-professional, and is a great commitment.

Should I set up a real board while playing online to recreate the OTB
experience?

I love this idea because I think that playing online, even at slower controls, leads to the click-first-then-think mentality. I see this mentality a lot with the chess.com daily puzzle and many weak players saying "easy" when they "solve" a super-hard study. They got through it, but they clicked until the puzzle accepted the move, rather than truly seeing the solution and then clicking it in.

Have you tried improving mainly via online chess and can share your
experiences? If not, do you know anyone who has done that?
What do you think is the best time control to play online to improve?

I really cannot say that I have because most of my improvement took place long before the advent of the Internet, but I did use an old standby: Face-to-face training games with a friend, who was rated similarly at the time. I do not see why you cannot find a player online, who is interested in doing this with you.
As part of this, I want suggest that you use a long time control (like 40/2 60/1) so you have time to really train your thought process. You should even use notes regarding things that you want to make sure you want to address in your thought-process training. I am not talking about notes regarding specific moves, but notes about the things you want to train as part of your practice.
For example, as I have been getting back into OTB play, here is a list of things that I want to look for. My list might help you, but you should add your own items to it.

Pay more attention to leads in development, and open the position when I am ahead in development. Pay attention to tempi, and not just in the opening.
Every few moves, or after a major change, look at every move for both sides.
Think more about the pluses and minuses of each piece, and how well they are, or are not, placed. What squares do they deny the opponent’s pieces?
What square do I want for my piece, and how do I conquer it?
When beginning to calculate, ask “what is hanging?”  Also ask if there are any double attacks or pieces that can be drawn into a double attack by a sac.
When I find a good move, just look at the other moves to make sure there is not a better one.
Look for pieces in a line so a pin might win.
When calculating a tactical sequence, make sure that you properly evaluate the final position, and that there is no extra counterplay left. Before making the final move, think about all his possible moves as in number one above.
Think more about going after the opponent’s King.
Think more about how to gain space by pushing pawns on either flank, that is play on both sides of the board, if possible.
Ask what is my worst piece, and where is its best square, and move it there.
Ask what pieces should I trade? What is my weak piece and what is his strong piece?
When lacking space, think more about trading.
Ask myself, “what is his moving trying to accomplish?” and “what can he do after I move? (look at all his possible moves as in the mate-in-two problems)” “What is his plan if I were he?”
What structure am I playing for?
When accepting or changing a structure, see if the pieces are misplaced on either side with regards to helping the structure, and enforcing or containing pawn breaks.
When the opponent’s pieces are misplaced, open the position.
Look more at opening the position when I have the two Bs.
In conjunction with asking “where is my pawn break?”, look more at pushing my pawn majorities when I have them.
Think more about dynamic play when I have static deficiencies, or am worse.
Think more about resulting endgames.


Queen against rook-drawn and won endgames I played a game in which I had a queen against a rook but it seemed that my opponent’s king could protect his rook, and there were no pawns on the board. In the end, I drew the game. Are such games be drawn easily and won only in certain positions?

Quoting https://en.wikipedia.org/wiki/Pawnless_chess_endgame#Queen_versus_rook

  A queen wins against a lone rook, unless there is an immediate draw by
  stalemate or due to perpetual check, ... (or if the rook or king can
  immediately capture the queen)

The same article also says

  With perfect play, in the worst winning position, the queen can win
  the rook or checkmate within 31 moves

In practice if the defending side knows what they are doing it can be quite difficult to win, especially if, as you say, the king and rook remain in contact. A key position to know is the Philidor position, where white can force the king and rook to be separated, and then the rook can be won by a fork. See https://en.wikipedia.org/wiki/Philidor_position#Queen_versus_rook


How many legal but unreachable positions exist? Consider this legal chess position which can never be reached from the normal starting position.

    [FEN "6kb/6p1/6K1/8/8/8/8/8 w - - 0 1"]

The Black bishop is placed on h8, but with the Black pawn on g7, there is no way the bishop could have actually reached h8. How many such positions exist in chess which are legal but unreachable? Is there any research on reachable/non-reachable positions?

I found that endgame tablebases don't necessarily take this into consideration, but if the number of non-reachable positions is significantly large, it might possibly help minimize the size of endgame tablebases.

Here's a screenshot from the online Nalimov tablebases.

Now, in this unreachable position, I can add another piece like a knight on almost every square.

I can add an additional piece, like a rook.

This can go on and on and I can keep adding more pieces, but all those positions would be unreachable. We thus end up storing unnecessary positions in the tablebase and increasing its size.

Of course, it's a good thing for tablebases to have these positions if we want to use them for chess variants like Chess960, but they are not necessary for the standard version of chess. It would be quite interesting to know how many such unreachable positions exist.

(Addition of more relevant tags suggested)

The fraction of all six-man positions that are unreachable from the starting position is very, very small. Removing them would have a tiny effect on the size of a six-man database.

Here is an example of how rare these positions are. First of all, we can't get into one of these unreachable positions without a bishop and a pawn, so we already have a small subset of the number of total six-man positions. But okay, say that one side is lucky enough to have one pawn, one bishop, and a king. The bishop will have to be in one of its own corners (not the far corners!) and the pawn will have to be diagonally adjacent to it. So only 2 out of the 64 bishop positions could lead to a trapped bishop, and out of those, the pawn has to be in the one spot of its possible 48 positions that would trap the bishop. So even if you have one pawn and one bishop, which is pretty unlikely, the chances of randomly getting an unreachable position are only (2/64) * (1/48) = 1 in 1536.

Let's do one bishop, two pawns, and a king just for fun. If the bishop is in its own corner (2/64 chance), the chance of getting one of the two pawns in the diagonally adjacent square is 2/48 (2 of the 48 squares in ranks 2 through 7 have pawns in them). If the bishop is one of the other spots on the first rank (4/64 chance - c1 and f1 are definitely OK!), both pawns have to be in exactly the right spot (1/48 * 1/47) chance. When I do the math I get a chance of around 1.33% for getting an unreachable position even if you start with this very unlikely great combination of material for generating unreachable positions.

My conclusion, as first predicted in my comment above and now backed up by some math, is that these unreachable positions are an extremely small subset of the set of all six-man positions.


For white - anything but a draw? [fen "6k1/1pp1b1p1/p6p/8/6P1/P6n/1PB5/2K1B3 w - - 0 1"]

I've played this out quite a few times, but no joy.
Trying to get my endgame back to a reasonable level, after years not playing!!

Assuming it is even white to move there, the real question is can white avoid the loss, and I would say the answer is "no".

White is down two pawns, and black has the means to create passed pawns on both wings. This is just lost.


Continuous-motion animated chess diagrams Looking for a tool to create animated diagrams from a PGN file. The usual way that animated diagrams are created is through the animated GIF file which shows separate positions with a fixed time delay between the still frames. The better tools indicate the last move with an arrow (like here for example http://www.apronus.com/chess/diagram/animated/), but what I really need is a video file animation showing the actual continuous motion of the pieces across the board.

There seems to be php code for the apronus example you gave.


Why an analyser labels this move as a blunder? On the picture, you see the move that was offered by the analyzer.
My move was Na5. Forking the Queen and the bishop, so I can negate white's attack on f7 and defending the undefended pawn b7, so the queen can not take it.
However, the analyzer labels it as a blunder and offers Nd4. Why it's better? Why is my turn a blunder, where can I lose here material?

Your move 1...Na5 is a blunder because there was an opportunity to win material.

The suggestion 1...Nd4 is best because you win a rook, e.g. 1...Nd4 2.Qxb7 Nxc2+ 3.Kf1 Nxa1


Ideas behind the Grünfeld defense I started a game (with the black pieces) where I have the possibilty to play the Grünfeld that I never played before.

  1.d4 Nf6 2.c4 g6 3.Nc3 d5

I want to know what's the main idea behind it, especially for black, since I heard that it could lead to sharp positions and complications (even Kasparov had a hard time playing it against Karpov)

The main idea behind the Grünfeld is that Black momentarily concedes the center to White, only to attack it later.

For example, in the Exchange variation, White often gets a pawn center (c3, d4, e4) while Black will put it under pressure (especially aimed at the white d-pawn). Below is a diagram with a typical pawn structure for this variation, and some black pieces on squares where they can often be found.

[FEN "3r2k1/pp2ppbp/2n3p1/q1p5/3PP3/2P5/P4PPP/4K3 w - - 0 1"]


Do you feel intimidated by higher rated players? I beat this 1570 rated player (me being 1170), but the thing is that i had his rating covered by a youtube pop-up window so I didn't know he's higher rated until i finished the game. I feel like if I knew, it would have made me perform worse due to pressure. What's your thoughts of that? I think that besides good moves, there a psychological side to chess.

If you are wondering here is a link to the game: https://lichess.org/qlnj6aMS

It really matters whether you are talking about a simple blitz game, or an OTB (over-the-board) tournament game. In blitz, it really is for fun, so you should just do precisely that, and have fun. Do not worry about someone's rating. If you are really into chess, you will play so many blitz games, and you will win some, and you will lose a lot too. Some wins will be great games, and some losses will be horribly pathetic losses. Just move on to the next game. I cannot even imagine the number of losses I have had in my life, but they all combined to make me a reasonably strong player.

Now, a tournament game is another thing, so I can understand someone getting nervous; but you really do not want to think that way if you can help it. I certainly know that if I got a chance to play Magnus Carlsen, I know logically that I will likely lose, but at the same time, I am not at all afraid of him (really). What is the worst that can happen: The predicted result? Big deal. Even that game, I would enjoy.

That reminds me of one other related thing that I just do not understand: In 40 years of playing tournaments, and following chess closely, I have seen a lot of weak players take draws against even world champions in simultaneous exhibitions. Sure, take a draw if it is really a dead draw, but otherwise, how many times are you going to get to play someone that strong, or even an IM or weaker GM? You should play that out, and enjoy the experience, even if you lose.

Back to the subject: You just want to take your time (within reason within any time control), and play good moves. You may not play the best moves every move, but I highly recommend not being one of those people, who constantly gets into time trouble. Funny, I feel like bad clock management, and trying to play too good a move too often is what is hurting Kasparov in the exhibition Chess 960 match he is playing against Caruana in St. Louis. He should just play moves that are good, and do not lose, and hope Caruana makes a mistake first.

Lastly, confession time: For at least the first two years I played tournaments WAY back when, I literally threw up before virtually every game. It was not because of being afraid, but just general nerves; so while I did not worry about someone's rating, I do understand your potential nervousness. I would just try to put it behind you, especially since blitz means nothing. :)

I went a little beyond the scope of the question, but hopefully, the practical advice will help someone.

ONE LAST PIECE OF ADVICE: In a tournament game, NEVER treat a lower-rated player with contempt. ALWAYS play them like you would play a Master. When you do that, you get too sure of yourself, and can make mistakes. I had a period of 7 years that I did not lose a tournament game to anyone below 2100, and I believe that part of it is not taking for granted that I would win.


Why is this "slow move" with the king a good move? rn1qkb1r/1p3pnp/p1p1p1p1/3pP3/3P2P1/2NBBQ1P/PPP2P2/2KR3R w kq - 0 13

Stockfish (depth 30) says the best move is Kb1 with +1.5 evaluation.
I'm having trouble to understand why.
The a2 pawn is not getting threatened soon,
and that the c1-h6 diagonal is well guarded against checks.
Furthermore, it is early game and white has an advantage,
building pressure on black's kingside. Kb1 looks like a tempo wasting move
that just doesn't accomplish much.
The engine also likes Qg3, Ne2 and Bh6, which I deem more active ones.
But can you help me understanding reasons why Kb1 is a good move?

Just because Stockfish thinks a move is best doesn't mean it is best. But let's see why Stockfish might like it.
When I look at Stockfish's static evaluation of that position, and move the king from  c1 to b1, I see four sub-evaluations change. In order of the size of the change, those sub-evaluations are:

Psqt bonus. This gives a bonus to each piece based on what square it's on. The king gets a bigger bonus simply by being on b1 instead of c1.

Shelter weakness. The king gets a penalty on c1 because the adjacent d-pawn has moved, and gets no penalty on b1 because none of its adjacent pawns have moved.

Mobility bonus. On b1, the White pieces are slightly more mobile (the rooks can now move to c1 - yes, it counts the square for both rooks) and that gives a bonus.

Shelter storm. Black gets a bonus for the d5 pawn beginning to "storm" the White king if the king is on c1. With the king on b1, the d-pawn does not count as "storming" since it's no longer on an adjacent file to the king, and Black doesn't get this bonus.

All told, it adds up to about 0.5 evaluation points.
It seems that Stockfish is simply having a hard time coming up with a good plan here. At depth 27 it gives Rhf1 as the second-best move, but the line it gives starts with this.
rn1qkb1r/1p3pnp/p1p1p1p1/3pP3/3P2P1/2NBBQ1P/PPP2P2/2KR3R w kq - 0 13

1. Rhf1 Nd7 2. Kb1 a5 3. Rg1

But it doesn't exactly seem like the best sequence for making progress.


What are some popular anti sicilians and what are their respective strengths and weaknesses? I dislike the positions in the sicilian in which both sides kamikaze each other. What are some popular anti sicilians which will bring the black players out of their comfort zone?

For me it was very helpful to pick one opening (continuation) from moves available in big chess database like here

http://www.365chess.com/opening.php?m=3&n=3&ms=e4.c5&ns=3.3

I wouldn't recommend going with most common move  2.Nf3: that is what your opponent (a Sicilian player) is most used to, prepared and comfortable with.

For example Sicilian player played Smith Mora Gambit in less than one percent of all his games against 1.e4. But I played Smith Mora Gambit in 100% games against c5. Which can be considered an advantage.

Best thing is that you don't have to spend many hours studying all Sicilian dragons and other variations. But if your opponent wants to be ready for you he will have to study all variations of Smith Mora on top of all his previous studies of usual Sicilian theory.

(Don't forget to check sanity of variation with the best engine available.)


Classical Scheveningen: Why is ...Ne8 so rare in this position? Black to move. This position from the classical variation of the Scheveningen occurs over 900 times in the Lichess database, yet ...Ne8 has been played only three times. The move seems strong: it prepares ...Bf6 followed by a trade of dark-squared bishops. Since white's DSB is bearing down on the black king, while black is cramped and his bishop sits apparently without prospects on e7, this trade is surely favorable for black. Indeed, my versions of Stockfish 12 and Leela both give ...Ne8 followed by a timely ...Bf6 as the best lines for black in this position. Leela gives ...Ne8 as the only move that retains approximate equality. Why then is ...Ne8 played so rarely?
[FEN "r4rk1/1bq1bppp/p2ppn2/1p6/3BPP2/P1N3Q1/1PP1B1PP/R4R1K b - - 0 1"]

Haven't checked, but I would guess it is due to a combination of weaker players (the classical Scheveningen is not all that popular nowadays), most games being blitz or bullet and the move not being obvious.
While it might be the strongest move in the position, the maneuver Ne8, Bf6 is not obvious at first glance.  It comes with some downsides which have to be carefully considered before deciding on it:

the move removes one attacker from the pawn on e4 (even though it cannot be currently taken)
the move blocks the rook on f8
it moves an active piece backwards (at least a psychological factor)
white could reply e5?! at one point which is not easy to calculate. It could either be a strong move blocking the knight (and therefore the Rf8) and lead to an attack on the black king. Or it could turn out to be weakening with black freeing himself and moving the knight via c7 to strong light squares in the center. In any case it is not easy to calculate.

Other factors could be the mentioned shorter time control, player strength, or perhaps some players preferring to move the Rf8 before Ne8.


From which top class game is the endgame motive? I think this happened in Kasparov game but I am not sure about that. It was minor piece endgame with quite blocked queenside. Black took pawn on the kingside (h4 maybe) and white, instead of 'obvious' pawn recapture, moved his knight, temporarily sacrificing pawn, but kept the position open. I guess it was N vs. B endgame.

You are probably thinking of the game Karpov - Kasparov  form  round 9 in their first World Championship Match in 1984-85. This match was later called off after 48 games before a winner was declared.

The situation you describe appeared after black's 46th move in this game.

[FEN ""]
[Event "World Championship Match"]
[Site "Moscow"]
[Date "1984.10.05"]
[Round "9"]
[Result "1-0"]
[White "Anatoly Karpov"]
[Black "Garry Kasparov"]
[Startply "92"]

1.d4 d5 2.c4 e6 3.Nf3 c5 4.cxd5 exd5 5.g3 Nf6 6.Bg2 Be7 7.O-O
O-O 8.Nc3 Nc6 9.Bg5 cxd4 10.Nxd4 h6 11.Be3 Re8 12.Qb3 Na5
13.Qc2 Bg4 14.Nf5 Rc8 15.Bd4 Bc5 16.Bxc5 Rxc5 17.Ne3 Be6
18.Rad1 Qc8 19.Qa4 Rd8 20.Rd3 a6 21.Rfd1 Nc4 22.Nxc4 Rxc4
23.Qa5 Rc5 24.Qb6 Rd7 25.Rd4 Qc7 26.Qxc7 Rdxc7 27.h3 h5 28.a3
g6 29.e3 Kg7 30.Kh2 Rc4 31.Bf3 b5 32.Kg2 R7c5 33.Rxc4 Rxc4
34.Rd4 Kf8 35.Be2 Rxd4 36.exd4 Ke7 37.Na2 Bc8 38.Nb4 Kd6 39.f3
Ng8 40.h4 Nh6 41.Kf2 Nf5 42.Nc2 f6 43.Bd3 g5 44.Bxf5 Bxf5
45.Ne3 Bb1 46.b4 gxh4 47.Ng2 hxg3 48.Kxg3 Ke6 49.Nf4+ Kf5
50.Nxh5 Ke6 51.Nf4+ Kd6 52.Kg4 Bc2 53.Kh5 Bd1 54.Kg6 Ke7
55.Nxd5+ Ke6 56.Nc7+ Kd7 57.Nxa6 Bxf3 58.Kxf6 Kd6 59.Kf5 Kd5
60.Kf4 Bh1 61.Ke3 Kc4 62.Nc5 Bc6 63.Nd3 Bg2 64.Ne5+ Kc3 65.Ng6
Kc4 66.Ne7 Bb7 67.Nf5 Bg2 68.Nd6+ Kb3 69.Nxb5 Ka4 70.Nd6 1-0


Does the new Netflix series "The Queen's Gambit" resemble any real life chess master? Recently, a Netflix series has been launched entitled The Queen's Gambit which surely created a lot of hype in the chess community. Does the protagonist Beth Harmon resemble anyone (fully or partially) in real life? This is although the makers of the series said the character is fictional. Sill, I am kind of sceptic about this.

The character Beth Harmon is purely fictional. The series is based off a book by the same title by Walter Tevis. The author had a tendencie to base books drawing from personal experiences but he wasn't a chess prodigy that's for sure. He was however a good club level player which is why the book has such strong chess knowledge. In that time period, there are no valid players that could fit as inspiration for the character (that I can place at least). The chess advisors in the show were Bruce Pandolfini and Garry Kasparov which really shows the high-calibre efforts the production team went to to get the show's chess moments bang on.
EDIT: Found the following article
https://www.radiotimes.com/news/on-demand/2020-10-29/the-queens-gambit-book-netflix/

Tevis previously told The Times that the character was created as a
“tribute to brainy women” adding that “I like Beth for her bravery and
intelligence. In the past, many women have had to hide their brains,
but not today,” he said.
He listed his daughter and his aunt – who had gifted him with his first chess set – among the women who had inspired the character.

Regarding the games however that is a different story; Most the games are based on famous games.  The final game in the series where she beats Borgov is based off a game between Vassily Ivanchuk and Patrick Wolff at the Biel Interzonal in 1993 for example. An absolute monster of a game to watch though;
Those researching the film did a fantastic job in finding great games to base their games on. Specifically move 38 Ne6 which is a more direct and simplified line.
The Movie Game (Simplified Ivanchuk v Wolff)
The movie is a simplified and more modern line than the game it was based on.
[FEN ""]
[Event "?"]
[Site "?"]
[Date "2020.08.24"]
[Round "?"]
[White "Harmon"]
[Black "Borgov"]
[Result "1-0"]
[ECO "D20"]
[PlyCount "105"]
[SourceVersionDate "2020.10.31"]

1. d4 d5 2. c4 dxc4 3. e4 Nc6 4. Be3 Nf6 5. Nc3 e5 6. d5 Ne7 7. Bxc4 Ng6 8. f3 Bd6 9. Qd2 Bd7 10. Nge2 a6 11. Bb3 b5 12. a4 O-O 13. O-O Qe7 14. Rac1 Nh5 15. g3 h6 16. Bc2 Rab8 17. axb5 axb5 18. Ra1 Ra8 19. Bd3 Bb4 20. Rxa8 Rxa8 21. Qc2 Bc5 22. Nd1 Bd6 23. Nf2 Nhf4 24. Rc1 Qg5 25. Kh1 Qh5 26. Ng1 Nxd3 27. Nxd3 f5 28. Nc5 Bc8 29. Rf1 Ne7 30. Qd3 fxe4 31. fxe4 Qg6 32. Kg2 Kh7 33. Nf3 Ng8 34. Nh4 Qg4 35. Nf5 Nf6 36. h3 Qg6 37. Ne6 Ra4 38. b3 Rxe4 39. Nxd6 Bxe6 40. dxe6 cxd6 41. e7 d5 42. Bc5 Qe8 43. Qf3 Qc6 44. b4 Qe8 45. Qf5+ Kh8 46. Qxf6 gxf6 47. Rxf6 Qh5 48. Rf8+ Kg7 49. e8=Q Re2+ 50. Kf1 Qxh3+ 51. Kxe2 Qg2+ 52. Rf2 Qe4+ 53. Kd2 1-0

The Game that its based off
[FEN ""]
[Event "Biel Interzonal"]
[Site "Biel"]
[Date "1993.??.??"]
[Round "1"]
[White "Ivanchuk, Vassily"]
[Black "Wolff, Patrick G"]
[Result "1/2-1/2"]
[ECO "D20"]
[WhiteElo "2705"]
[BlackElo "2585"]
[PlyCount "144"]
[EventDate "1993.07.??"]
[EventType "swiss"]
[EventRounds "13"]

1. d4 d5 2. c4 dxc4 3. e4 Nc6 4. Be3 Nf6 5. Nc3 e5 6. d5 Ne7 7. Bxc4 Ng6 8. f3 Bd6 9. Qd2 Bd7 10. Nge2 a6 11. Bb3 b5 12. a4 O-O 13. O-O Qe7 14. Rac1 Nh5 15. g3 h6 16. Bc2 Rab8 17. axb5 axb5 18. Ra1 Ra8 19. Bd3 Bb4 20. Rxa8 Rxa8 21. Qc2 Bc5 22. Nd1 Bd6 23. Nf2 Nhf4 24. Rc1 Qg5 25. Kh1 Qh5 26. Ng1 Nxd3 27. Nxd3 f5 28. Nc5 Bc8 29. Rf1 Ne7 30. Qd3 fxe4 31. fxe4 Qg6 32. Kg2 Kh7 33. Nf3 Ng8 34. Nh4 Qg4 35. Nf5 Nf6 36. h3 Qg6 37. g4 Bxc5 38. Bxc5 Ra4 39. Rf3 Rc4 40. Be7 Bxf5 41. Rxf5 Rd4 42. Qe3 Rxe4 43. Qf3 Rf4 44. Rxf4 exf4 45. Bxf6 Qxf6 46. Qd3+ Qg6 47. Qe2 c6 48. Kf3 cxd5 49. Kxf4 Qf6+ 50. Kg3 Qd6+ 51. Kf3 b4 52. h4 Qf6+ 53. Kg3 Qd6+ 54. Kf3 Qf6+ 55. Kg3 g6 56. Qe8 Qd6+ 57. Kf3 Kg7 58. g5 hxg5 59. hxg5 d4 60. Qe4 d3 61. Qb7+ Kf8 62. Qc8+ Ke7 63. Qb7+ Ke6 64. Qe4+ Kd7 65. Qb7+ Kd8 66. Qa8+ Kc7 67. Qa7+ Kc8 68. Qa8+ Kc7 69. Qa7+ Kc6 70. Qa6+ Kc5 71. Qxd6+ Kxd6 72. Ke3 Ke5 1/2-1/2

I believe the Kentucky game to be based of Nezhmetdinov vs Kasparian game as well.
[FEN ""]
[Event "Spartak Team Ch (1955), Riga LAT"]
[Site "?"]
[Date "1955"]
[Round "?"]
[White "Rashid Gibiatovich Nezhmetdino"]
[Black "Genrikh Kasparian"]
[Result "*"]
[ECO "B11"]
[PlyCount "93"]

1. e4 c6 2. Nf3 d5 3. Nc3 Bg4 4. h3 Bxf3 5. Qxf3 e6 6. g3 g6 7. Bg2 Bg7 8. O-O Nd7 9. Qe2 d4 10. Nb1 e5 11. d3 Ne7 12. f4 Qc7 13. a4 O-O 14. f5 f6 15. Nd2 Bh6 16. Kh2 Kh8 17. fxg6 hxg6 18. Nf3 Bxc1 19. Raxc1 Nc5 20. c3 Nb3 21. Rcd1 Rad8 22. Nh4 Qc8 23. Bf3 Qe6 24. Bg4 Qf7 25. Nf3 Qg8 26. h4 Kg7 27. Rf2 Rd6 28. Rdf1 Rdd8 29. Qc2 b6 30. h5 c5 31. hxg6 dxc3 32. bxc3 c4 33. d4 exd4 34. cxd4 Nxd4 35. Nxd4 Rxd4 36. e5 f5 37. Bxf5 Qd5 38. Be6 Rh8+ 39. Bh3 Nxg6 40. Rf7+ Kh6 41. Qxg6+ Kxg6 42. R1f6+ Kg5 43. Rf5+ Kg6 44. R7f6+ Kh7 45. Rh5+ Kg7 46. Rg5+ Kh7 47. Bf5# *

I will try to pin all the games I can find in the show so this list is likely to grow.


Insufficient material draw on lichess.org [FEN "8/8/1k5K/8/1p1N4/8/p7/8 w - - 0 1"]

I had KPP material and my opponent had KN. My time ran out and I lost the game. Shouldn't this have been a draw?

FIDE laws of chess: https://www.fide.com/FIDE/handbook/LawsOfChess.pdf
"6.9 Except  where  one  of  the  Articles:  5.1.a,  5.1.b,  5.2.a,  5.2.b,  5.2.c  applies,  if  a  player  does  not  complete  the  prescribed  number  of  moves  in  the  allotted  time,  the  game  is  lost  by  the player. However, the game is drawn, if the position is such that the opponent cannot checkmate the player’s king by any possible series of legal moves."
So as long as there is a way to checkmate the opponent, them timing out constitutes a win for a player. Which is the case here, e.g.:
[FEN "8/8/1k5K/8/1p1N4/8/p7/8 b - - 0 1"]
[StartFlipped "0"]

1... Ka5 2. Kg5 Ka4 3. Kf4 Ka3 4. Ke3 Kb2 5. Kd2 Ka1 6.Kc1 b3 7.Nxb3#


Method to study chess puzzles way above your level I have a collection of middle-game chess puzzles classified in levels. I can solve most puzzles in the first level after a few minutes, and some of the puzzles in level 2.

But for higher levels there is no hope I can solve any of them, even if I tried for a thousand years. Nevertheless, those are supposed to be interesting positions with hidden treasures, and I wonder if I can still learn something from them. What should I do? Play against a computer from those positions until finding the solutions? Look at the solutions and memorizing them?

Chess puzzles (and to a large extent playing chess) are based around recognizing certain patterns or motifs which help you to quickly assess a position and to visualize potential lines without the need to calculate move by move in your head.

Chesstempo has a good list of tactical motifs and positional motifs. It is important that when you solve problems (or when analyzing your games) that you realize which motives (usually there is more than one) apply to this problem. If you cannot solve a problem on your own it is fine to look up the solution or to get help from a computer, but make sure you understand the solution (i.e. match them to motifs/patterns). Again chesstempo is very useful for this as it shows you the motifs of each problem as "tags" (after you solved it or after you failed to solve it).

Once you have built a repertoire of patterns/motifs in your mind you should have a good basis to solve more complicated problems as well.

Another factor could be visualization when calculating long lines, but there is not much you can do about it other than concentrating, playing games, analyzing games, solving puzzles.... basically everything you should be doing anyway.


What is the correct definition of a bad bishop? Is a bad bishop a bishop that is trapped by your own pawns? (For example, all your pawns are on dark squares, so the dark squared bishop is bad.)  Or is it when your opponent's pawns trap your bishop's mobility?  (For example, they control the dark squares which your bishop controls, so the bishop is bad).

When evaluating a bishop, there are two totally separate things that must be considered.  The first is whether a bishop is "good" or "bad".  These are very much misnomers because they have nothing to do with the worth of the bishop.  The second consideration is whether the bishop is "active" or "inactive".  Finally, there may be mitigating factors as well (is the bishop doing something useful?).

Good vs Bad

A good bishop is on the opposite color as its pawns.  A bad bishop is on the same color as its pawns.  For example if the white pawn structure is c3, d4, e3, f4, then the light squared bishop is the good bishop and the dark squared bishop is the bad bishop.

Active vs Inactive

An active bishop is outside of the friendly pawn chain (in the above example, if the bishop is on e5, then it is clearly both active and bad).  An inactive bishop is trapped by pawn chains - either the player's color or the opponent's.

Mitigating Factors

There are two main mitigating factors.  The first can be remembered by a common phrase: "bad bishops defend good pawns".  This means that a bishop might be very bad (same color as all the friendly pawns) but if it is defending them from attack in the endgame, then it might be enough to hold a draw.  Usually it is much harder to win with the bad bishop though.
The other main mitigating factor is if the bishop is defending its own passed pawn or stopping an enemy passed pawn.


Offline move trainer software I am looking for an offline move trainer software like the one chessable has. I am currently looking at PGN's with same opening and I would like to practice these games. For instance, I am looking at Sicilian Najdorf Scheveningen style and have collected Kasparov's game (roughly around 40 of them). I would like to faithfully repeat the moves made by Kasparov in each of these games, while the White's move is made by the computer. I would greatly appreciate suggestions. It need not necessarily be spaced repetition though it would be great.

Check out Chess Position Trainer. Also Chessbase has a training mode where you can create quizzes for certain moves.


What are the records for highest 1 year span performance rating? I've heard that Bobby Fischer had a 2892 performance in 1971. If this is true, it's probably the highest performance, but I don't know if this is true. Does anyone have any information about this?

Given Carlsen's 2882 current rating and the fact that he also reached this rating in 2014, it seems likely that at some point he had a year with a performance rating higher than your 2892 figure. (I calculated Carlsen's 2013 performance rating as 2890 [47 points in 69 games against an average opponent of 2757] but it's tedious enough to calculate that I don't want to do it for every year.)

However, if you use current FIDE rules on how to calculate performance rating, Fischer's performance rating in 1971 was even higher than the number you specified.

In 1971, Fischer participated in three official matches that I know of:

Fischer - Taimanov Candidates Quarterfinal
Fischer - Larsen Candidates Semifinal
Fischer - Petrosian Candidates Final

(He also played some blitz and simul games, but I assume those don't count.)

Taimanov was rated 2620, Larsen was rated 2660, and Petrosian was rated 2640 at the times of the matches. Fischer scored 6/6 in the first two matches and 6.5/9 in the third, for a total of 18.5/21 and an average opponent rating of 2640.

18.5/21 corresponds to a fractional score of 0.88. According to FIDE regulations, this in turn means that the performance rating is 336 points higher than the opponent's average rating. 2640 + 336 = 2976 performance rating.

It's hard to say whether that's the highest ever, but it very well might not be, even setting aside powerhouses like Carlsen. Since a 100% score results in a performance rating 800 points above the average opponent, anyone whose record for a particular year consisted solely of a 100% match score against a 2200 player would have a performance rating of 3000. I'm guessing that has happened to someone at least once.


Pawn structure books Which book is better for a 1700-1800 player?

Pawn Power in Chess by Hans Kmoch (originally Die Kunst der Bauernführung, 1956)
Pawn Structure Chess by Andrew Soltis
Chess Structures: A Grandmaster Guide by Mauricio Flores Rios, or
The Power Of Pawns by Jörg Hickl.

I would take a look at The Art of the Middle Game by Keres and Kotov. It is the only book I know of which devotes serious attention to pawn structure in a way that goes beyond opening development.

If you liked My System you might also check out Chess Praxis (also by Nimzowitch). It isn't on pawn structure specifically, but details Nimzowitch's theory of Prophylaxis, covering pawn structure in the process of doing so. It's a good follow up to My System.

As to the books in your question I've heard great things about Pawn Power in Chess, but haven't read it myself so can only report second hand.


lichess vs chesscom players I have been playing on chess.com and lichess for more than 2 years. My rating in blitz on lichess is around 2100, and on chesscom is around 1800. Yet I highly believe that the players on chesscom are much more accurate. Like sometimes I look at the position and they don't do any blunders, 1 mistake, and a few inaccuracies in a position that's really tough to play. Like I would beat them with good moves (not the best moves) and then I would be surprised at the end that overall they played better almost every time! This is very strange. I don't know if there's more cheating on chesscom or what? I would really appreciate it if you can give me your feedback on this topic because it has been driving me crazy. Like I find it easier to beat a 1900 player on lichess than a 1800 on chesscom which is insane!

Like I find it easier to beat a 1900 player on lichess than a 1800 on chesscom which is insane!

Why is that insane? According to one site, an 1800 blitz rating on chess.com is about equivalent to a 1915 rating on lichess (based on people who answered their survey and have ratings on both sites.) So, your experience of the 1900 lichess player being easier to beat than the 1800 chess.com player conforms to reality.
I think the issue here is simply that an 1800 rating on one site does not correspond to an 1800 rating on another site. Even if they used the same rating rules (which they don't), the ratings would likely diverge due to differences in the player pools.
In the end, rating is just a number, and that number means different things in different places. Just because 1800 rated players are a particular strength on one site does not mean 1800 rated players will be about that strength on another site.


How to iterate over all FENs in Syzygy table? This is a programming question related to chess syzygy endgame tables. I believe that it is better suited on chess stack exchange than on SO because it is too specific to chess and asks for a recommendation. Also I noticed that there are enough people with a lot of programming knowledge here.

I have a syzygy WDL endgame table (just for example I uploaded the file KPPPPvK.rtbw) and for my own purposes I need to iterate over all FENs in this table and see the results for each position.

Is there a library (preferably with python interface) to do this? Most of the libraries that I have seen so far only allows to probe a table.

To my knowledge the Syzygy tablebase doesn't have a function that magically returns all FEN positions from a file. I don't think it should because that's not what tablebase is designed for.

However, there's nothing stopping you from constructing all possible FENs. You know from the file name you have four pawns in the endgame. All you need to is:

Use python-chess package
Generate all possible FENs
For each FEN, use the Python package for probing

Please take a look at:

  http://talkchess.com/forum/viewtopic.php?start=0&t=61003&topic_view=flat

for FEN generation. Sven Schüle is an experienced engine programmer, so please study his code and adjust it if necessary.

// Usage example: fengen.exe [-m|--mirror] Q r n 2p
// See http://www.talkchess.com/forum/viewtopic.php?t=61003
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cctype>
#include <algorithm>
#include <vector>

// definitions for chess board representation

typedef int Color;
enum { White = 0, Black, Empty };

typedef int Piece;
enum { NoPiece = 0, Pawn, Knight, Bishop, Rook, Queen, King };

typedef int Square;
enum {
    A1 = 0,B1,C1,D1,E1,F1,G1,H1,
    A2,    B2,C2,D2,E2,F2,G2,H2,
    A3,    B3,C3,D3,E3,F3,G3,H3,
    A4,    B4,C4,D4,E4,F4,G4,H4,
    A5,    B5,C5,D5,E5,F5,G5,H5,
    A6,    B6,C6,D6,E6,F6,G6,H6,
    A7,    B7,C7,D7,E7,F7,G7,H7,
    A8,    B8,C8,D8,E8,F8,G8,H8,
    FF = 0xff
};

Color opponent(Color c) { return c ^ Black; }
Square makeSquare(int file, int rank) { return 8 * rank + file; }

struct Board {
    Color   color[64];
    Piece   piece[64];
    bool isPiece(Square s, Color c, Piece p) const { return color[s] == c && piece[s] == p; }
    void set(Square s, Color c, Piece p) { color[s] = c; piece[s] = p; }
    void clear(Square s) { set(s, Empty, NoPiece); }
    Board() { for (Square s = A1; s <= H8; s++) clear(s); }

    void printFEN()
    {
        int nEmpty = 0;
        for (int r = 7; r >= 0; r--) {
            for (int f = 0; f <= 7; f++) {
                Square s = makeSquare(f, r);
                if (color[s] == Empty) {
                    ++nEmpty;
                } else {
                    if (nEmpty > 0) {
                        fputc('1' + nEmpty - 1, stdout);
                        nEmpty = 0;
                    }
                    static char const pieceSym[] = ".pnbrqk";
                    if (color[s] == White) {
                        fputc(toupper(pieceSym[piece[s]]), stdout);
                    } else {
                        fputc(tolower(pieceSym[piece[s]]), stdout);
                    }
                    nEmpty = 0;
                }
            }
            if (r > 0) {
                if (nEmpty > 0) {
                    fputc('1' + nEmpty - 1, stdout);
                    nEmpty = 0;
                }
                fputc('/', stdout);
            }
        }
        fputs(" w ", stdout);
        if (isPiece(E1, White, King) && isPiece(H1, White, Rook)) fputc('K', stdout);
        if (isPiece(E1, White, King) && isPiece(A1, White, Rook)) fputc('Q', stdout);
        if (isPiece(E8, Black, King) && isPiece(H8, Black, Rook)) fputc('k', stdout);
        if (isPiece(E8, Black, King) && isPiece(A8, Black, Rook)) fputc('q', stdout);
        fputs(" - 0 1\n", stdout);
    }
};

// definitions needed to set up the initial position
// usually more simple than that but we need to iterate over each group of pieces of same type

struct PieceInitDescr {
    int     nPieces;
    Square  initSqr[8];
};

PieceInitDescr pieceInitDescr[2][1+6] = {
    {
        { 0, { FF,FF,FF,FF,FF,FF,FF,FF } },
        { 8, { A2,B2,C2,D2,E2,F2,G2,H2 } },
        { 2, { B1,G1,FF,FF,FF,FF,FF,FF } },
        { 2, { C1,F1,FF,FF,FF,FF,FF,FF } },
        { 2, { A1,H1,FF,FF,FF,FF,FF,FF } },
        { 1, { D1,FF,FF,FF,FF,FF,FF,FF } },
        { 1, { E1,FF,FF,FF,FF,FF,FF,FF } },
    },
    {
        { 0, { FF,FF,FF,FF,FF,FF,FF,FF } },
        { 8, { A7,B7,C7,D7,E7,F7,G7,H7 } },
        { 2, { B8,G8,FF,FF,FF,FF,FF,FF } },
        { 2, { C8,F8,FF,FF,FF,FF,FF,FF } },
        { 2, { A8,H8,FF,FF,FF,FF,FF,FF } },
        { 1, { D8,FF,FF,FF,FF,FF,FF,FF } },
        { 1, { E8,FF,FF,FF,FF,FF,FF,FF } },
    },
};

// data related to command line parameters

int missing[2][1+6] = {
    { 0, 0, 0, 0, 0, 0, 0 },
    { 0, 0, 0, 0, 0, 0, 0 },
};

bool mirror = false;

template <bool Mirror>
void enumerate(Board & b, Color c, Piece p)
{
    Color cMiss = (Mirror ? opponent(c) : c);
    Color cStop = (Mirror ? White : Black);

    PieceInitDescr const & d = pieceInitDescr[c][p];

    // setup initial pieces of given color and type
    for (int i = 0; i < d.nPieces; i++) {
        b.set(d.initSqr[i], c, p);
    }

    if (p == King && c == cStop) {
        b.printFEN();
    } else {
        // generate all permutations of missing pieces for the given color and piece type
        int nPresent = d.nPieces - missing[cMiss][p];
        std::vector<bool> v(d.nPieces);
        std::fill(v.end() - nPresent, v.end(), true);
        do {
            // remove missing pieces
            for (int i = 0; i < d.nPieces; i++) {
                if (!v[i]) {
                    b.clear(d.initSqr[i]);
                }
            }
            // recursive call
            Color cNext = (p == King) ? opponent(c) : c;
            Piece pNext = (p == King) ? Pawn : p + 1;
            enumerate<Mirror>(b, cNext, pNext);
            // restore removed pieces
            for (int i = 0; i < d.nPieces; i++) {
                if (!v[i]) {
                    b.set(d.initSqr[i], c, p);
                }
            }
        } while (std::next_permutation(v.begin(), v.end()));
    }

    // clear initial pieces
    for (int i = 0; i < d.nPieces; i++) {
        b.clear(d.initSqr[i]);
    }
}

int main(int argc, char * argv[])
{
    // scan parameters (illegal parameters are ignored for simplicity)
    for (int i = 1; i < argc; i++) {
        char const * arg = argv[i];
        if (strcmp(arg, "-m") == 0 || strcmp(arg, "--mirror") == 0) {
            mirror = true;
        } else
        if (strlen(arg) <= 2) {
            int number  = (strlen(arg) == 1) ? 1         : arg[0] + 1 - '1';
            char p      = (strlen(arg) == 1) ? arg[0]    : arg[1];
            Color color = (p == toupper(p)) ? White : Black;
            Piece piece = NoPiece;
            switch (tolower(p)) {
                case 'p': piece = Pawn;     break;
                case 'n': piece = Knight;   break;
                case 'b': piece = Bishop;   break;
                case 'r': piece = Rook;     break;
                case 'q': piece = Queen;    break;
                // king must not be missing
                default: break;
            }
            if (piece != NoPiece && number >= 1 && number <= pieceInitDescr[color][piece].nPieces) {
                missing[color][piece] = number;
            }
        }
    }

    // enumerate combinations of missing pieces
    Board b;
    enumerate<false>(b, White, Pawn);
    if (mirror) {
        enumerate<true>(b, Black, Pawn);
    }
    return 0;
}


How do you punish this opening? I’m a fairly new player, with a FIDE rating of around 1000. I'm really wondering what’s wrong with this opening. It’s the Indian variation of the Nimzo-Larsen, but it’s a different line.
I like to play b3, Bb2 e3, d4, Bd3, Nf3, and Qe2, along with a3 or h3 if a knight threatens to go to b4 or g4. At this point, I’m ready to castle either way and enjoy a solid position. Of course, it doesn’t always go like this. Sometimes the order changes according to my opponent's play. But it seems really solid to me. Since it’s not a recognized line as far as I know, I want to know how to play against it.
[FEN "r2q1rk1/1bpn1pp1/pp1bpn1p/3p4/3P4/PP1BPN1P/1BPNQPP1/R3K2R w KQ - 0 1"]

This is a recognised opening. It's the Colle-Zukertort opening by transposition. The normal move-order for White is d4, e3, Bd3, Nf3, Nbd2 this is the Colle System, then b3, Bb2 to end up with this structure.
In the Colle, White breaks open the centre with the freeing move e3-e4 and gains piece play on the kingside which can turn into a king-side attack. White normally uses the e5-square for the knight in a Pillsbury/Stonewall style by following up with f2-f4. The bishop on b2 can come to life later on if Black tries to free himself with .. c5 or ... e5
With the g6-square weakened because of Black's ... h5, White has the plan of Ne5, f4, f5 threatening to exchange on e6 and now there's a hole on g6.
A quieter alternative is for White to play positionally with c2-c4 and after exchanging on d5 playing down the c-file.


Lichess.org rating vs rating in real life How does a chess rating at Lichess.org compare against a rating in real life, in classic chess (more than 8 min)?

The largest problem with sites like LiChess and Chess.com is that the standard pools are not very reflective of Over The Board rating. Most people play chess online for the Blitz and Lightning games. Chess.com recently came out with some statistics that showed that their Blitz rating pool is roughly the same as USCF currently. I do not know how well that would translate for the Standard pools.

When I was 1900 playing G/30 games on Chess.com and ICC (Internet Chess Club), I was rating roughly 2100/2200 on both sites. This was years ago though, so again, not entirely sure how accurate they are.


Are there any 'romantic' chess programs? Are there any chess programs, which play gambits? I have two solutions in mind:

It tries to offer situations where one of your moves looks quite promising on the short term (3-5 moves), but later it turns out to be disastrous.

Or the opposite:

It tries to reach positions, which look bad for you, but there's a single line (hard to find), which can save the day.

I guess the difficulty of writing such programs can be that it's not trivial to decide which lines are easy to be found by a human and which aren't. (And that also depends on the skills of the player, so some parameters would be required.)

Houdini may be worthwhile checking out.  See link.

http://www.cruxis.com/chess/houdini.htm
(4th paragraph down)

  "The Chess Club Live Facebook page phrased it like this: "If there
  ever was a computer descendant of the romantic players like Morphy,
  Anderssen, Spielmann, Marshall, Bogoljubow, Tal, Nezhmetdinov, Shirov,
  Morozevich it would be Houdini. Houdini is the current World number 1
  chess engine and plays in a very romantic style."

I didn't notice when the quote was from because the last time in the TCEC Championship that Houdini was #1 was 2013.

I use Houdini 5.  I can attest to the romantic style of play.  Quite a change when you are used to seeing how Komodo or Stockfish play.  Settings are relatively user friendly.

It is a commercial engine but the developers do offer Houdini 1.5 for free.


In terms of rating points, how much stronger should a coach be than their student? I'm considering getting a chess coach with the general goal of reaching the WIM title (2200 rating, plus norms; or get lucky in an Oceania Zonal).  I'm not sure how realistic this is.  However, almost everyone with a title nowadays considers themselves a chess coach, so I should be a bit selective.  I have a few questions, but my first is...

Question: In terms of rating points, how much stronger should a coach be than their student?

My current rating is 1792 and in a recent tournament in China (after two years without tournament play) my performance was 1889, including a draw with an FM and a win against a 2247-rated player.

So I have concerns that a coach around the 2300 level might not be able to help me achieve my goal.  But I could be completely wrong about this.

So, you are about 1800 and you are worried that a coach with a rating 500 points higher than you will not be able to give you the help you require?

I think you are too fixated on rating. What do you think a player rated about 2400 looks for in a coach? Do they also "need" somebody rated 500 points higher? While he was alive IM Mark Dvoretsky coached grandmasters. How was that even possible?

A coach who can help you improve by several hundred rating points is not going to do it by magically transferring his extra rating points. He will do it by teaching you how to study and work better, by directing the work that you do and to some extent by motivating you to do the work.

When you sit down at the chess board the moves that come out will reflect the work that you have done, how much, what type, not the rating of your coach. The most important factor your coach has is how good a teacher, trainer and guide he is not how strong a player. Look for these qualities first.


HalfKP Structure for Stockfish / Shogi NNUE - how does it work? Stockfish now uses a neural network for position evaluation. The structure of this neural network was introduced for Shogi by Yu Nasu in the paper dubbed "Efficiently updatable neural network - NNUE". Unfortunately it is in Japanese.
It is a fully connected neural network with four layers. The first layer receives an encoded chess position. The second and third are hidden layers and then there is final output layer that gives the evaluation.
The input layer receives a chess position encoded as a "HalfKP" structure, and this is where I am completely lost. A picture is available here.
The encoding seems to work like this. Suppose we have the starting position. We first consider only the white pieces. We encode the position by always considering the position of the white king together with a white non-king piece for each square. The resulting value is then either '1' or '0'.
Consider the starting position. We have
King on a1, Pawn on a1 -> 0
King on a1, Pawn on a2 -> 0
...
King on e1, Pawn on a2 -> 1
...
King on e1, Pawn on e2 -> 1
...

and so on. This input is fully connected to the next layer. Then we do the same for the black pieces.
Question 1.) Is my understanding correct?
Suppose we have the move e2e4. There are only two inputs which change:

King on e1, Pawn on e2 changes from 1 to 0
King on e1, Pawn on e4 changes from 0 to 1

There is apparently some efficiency gain here claimed in the original paper, but I do not see where. After all, the two nodes above are connected to every node in the second layer, so we have to update all second layer nodes.
Question 2.) Why is this efficient?
An encoding that would be much more straight-forward would be to simply use bits to indicate positions of the pieces, similar to bitboards.
King on a1 -> 0
...
King on e1 -> 1
...
Pawn on e2 -> 1
Pawn on e4 -> 0

If we use such an input encoding, we have less input nodes. Also updating for the move e2e4 just changes two input nodes. Such input seems to be common in other approaches, like AlphaZero and Lc0.
Question 3.) Why does one not use such a much easier encoding? Why do we use combinations of King + Piece? What do we gain here?
Question 4.) The first layer uses 16 bit integers, the next layers 8 bit integers. What is the reason for this choice? Obviously we need to limit the range to operate with fixed-point arithmetic due to memory constraints, but why 16 and 8, and not 16 and 16, or 32bit and 32bit?
The first half of the input layer (for white) is fully connected to the first 256 nodes of the second layer; the second half of the input (for black) is fully connected to the latter 256 nodes of the second layer.
Question 5.) Why do we consider the white and black pieces separately? What is the benefit? What is the so-called (full) KP, and what is the relation to HalfKP?
Question 6.) Is it possible to illustrate the update and efficiency gain with the above e2e4 example?

[1]
Your understanding is correct, with one slight adjustment. Instead of thinking about it as "King on a1, Pawn on a2", you should think of it as two things: "King on a1, Friendly Pawn on a2", and "King on a1, Enemy Pawn on a2". The input layer knows the colors of the pieces. Note that I do not say White/Black, but Friendly/Enemy, which are relative. This is because the weights are the same for both sides, but flipped around and rotated a bit (depends on the engine)
[2]
Suppose we have a full board. All 32 pieces on the board. To compute the first layer of neurons (but not apply an activation), we will in essence perform 30 (we don't care about the king's directly) vector additions. You pointed out rightly that the inputs are 0s and 1s, so we use addition and not multiplication.
I now take a record of the values in each neuron (before activation). Now you make the move e2e4. You correctly point out that (for each side) two things change. Turn one bit off (King on X, Friendly Pawn on E2) and turn on (King on X, Friendly Pawn on E4). To update the remembered neurons, we only need to take the original values, subtract a vector of E2 pawn weights, and add a vector of E4 pawn weights. 31 additions (operations) now becomes 2.
[3]
As to your comments about using a simple input system. Your example is 768(=6x2x64) input bits. "Is piece A of colour B on square C". This works just fine. There is a chess engine named Halogen using this scheme, and I've trained networks for it. It is strong, but not as strong as the halfkp style networks. The theory is that the overspecialization allows for more knowledge, but without additional computation cost.
[4]
This one is a technical question, and it (in my view) relates to the first comment where the inputs are 0s and 1s, so really we use addition and not multiplication. Suppose you have two numbers, both of which are stored in 8-bits. If you multiply them, the result will need upto 16-bits to be represented.
Now consider the later layers of the network (ignoring the input for now). You take an 8-bit input, multiply by an 8-bit weight, sum a whole bunch of these up, and then output an 8-bit weight. In the intermediate steps you are dealing with 16-bit types, but later that information is packed down into 8-bits.
Multiple times I typed (before the activation) in my earlier answers. This is important. The intermediate data for computing the next layer of neurons is 16-bits. And since we are constantly adding and subtracting little pieces (from your e2e4 move), we are dealing with the intermediate data, and thus we want it available in 16 bits. For technical reasons, you might as well use 16-bits for the input weights, even though they are actually going to be within an 8-bit range. This is all subjective, and you or anyone else could use another scheme and be fine.
[5]
HalfKP allows us to reuse the same weights for both sides. Some engines will flip, some will rotate. For example, the weight for (White King on A1, White Pawn on A2) will be the same as the weight for (Black King on H1, Black Pawn on H2). This makes training much easier, as it "halves" the number of weights to be trained, which is akin to having more data.
Other solutions like HalfKA (accounts for the enemy King) are also viable, and are being used in an engine named Seer. The halfkp paradigm has some other ramifications to something called I call factorizorss, during training, but that is a much more complex discussion.
[6]
I'm not one for making big graphics, but I suppose "Yes" does answer your question :)
Source: I programmed all of this at one point https://github.com/AndyGrant/EtherealDev/tree/openbench_nnue/src/nnue which involved me going through each of your questions. I happen to have a different setup than Stockfish, but I considered the same issues and came to my own solutions while understanding the alternatives.


How can I use pgn-extract to remove a game from a pgn file when there is an illegal move? How can I use pgn-extract to remove a game from a pgn file when there is an illegal move?

pgn-extract will do exactly that if you give it an input file and say where you want the correct games to go. For instance:

pgn-extract --output clean.pgn games.pgn

will put only the valid games from games.pgn into clean.pgn, reporting any errors on standard output. If you want to have a record of the errors then you can use the -l flag to specify a log file; e.g.:

pgn-extract --output clean.pgn -lissues.txt games.pgn

There are lots of additional options/flags described in the documentation.

Disclosure: I am the author of pgn-extract.


Is exchanging a knight for a bishop and open the game a good strategy for beginners? I just learned that bishops are better in an opened game, but in a "normal" game is it good to follow this strategy?

No, it is not a good strategy (in any situation).

Each game is different and it is not a good idea to follow a strict strategy like this. Even in open positions there are situations where knights can become very strong. Take for instance the following position which is inspired by the Sicilian Najdorf (so would satisfy your semi-open requirement). The knight is very strong and cannot easily be removed from its dominant position. The black bishop on the other hand is stuck defending the pawn on d6 and does not have many options in general.

r2q1rk1/1p2bppp/p2p4/3Np3/4P3/8/PPP2PPP/R2Q1RK1 w - - 1 13

It is not possible to generalize that bishops are always stronger. You really need to analyze the position you have and base your strategy on this. A few things to look for:

badly placed pieces - which you could improve
weaknesses in the pawn structure - which could be attacked
open files - which you could occupy
more space - which you could take advantage of
better development - which you could take advantage of (typically by opening up the position)
insecure king - which you could attack

And of course you should analyze this for both sides in order to be aware of possible plans of your opponent.


Is this move valid in the rollerball chess variant? Can the white King move a space to the right, into the original location of the black king? This would be disallowed in standard chess, as one cannot intentionally put themselves into check. However, in rollerball chess, moving the king into this square is supposed to end the game, giving white the win. Thanks in advance!

No it is not legal. Just like in normal chess the king cannot move into check, even if it would 'win' the game.

http://en.wikipedia.org/wiki/Rollerball_%28chess_variant%29


Is a bishop less than half the value of a bishop pair? In valuing a rook, I observe that a rook on the open board commands 15 squares; his own and seven others in each direction. Divide by three and you get a value of 5.

In valuing a knight, I observe that a knight on the open board commands nine squares; his own and eight others in each direction. Divide by three and you get a value of 3.

If I were to value a bishop same way, I would observe that a bishop on the open board commands 13 squares; divide by three, and I would get 4 (plus).

But most valuations have the bishop at 3, rather than 4 despite his range.

Interestingly, some experts value a bishop pair on the open board at 7-8, even though the sum of 3+3 is only 6. Some would say that the pair is worth more than 7, even valuing single bishops at 3.5. A value of eight for a pair would be in line with my theoretical value of 4, above.

Put another way, a bishop and extra pawn is almost always at a disadvantage against a rook, but two bishops and two extra pawns are not necessarily at a disadvantage against two rooks.

Could a bishop be worth only three because of its single-colored move, even if two bishops are worth eight?

Given the concern that computers beating humans has made the game less interesting, have any experts, human or computer proposed or play tested a variant whereby a bishop can change its color by making a single move in a lateral direction to a square of the opposite color? This, presumably, would increase the value of the bishop, perhaps to four.

More to the point, have the Grandmasters made any more conventional arguments in favor of an eight-valued bishop pair?

A bishop pair is rarely worth more than a pawn. That would mean you're willing to sacrifice a pawn to obtain the bishop pair.

The value of pieces depends on what those pieces can accomplish, not just how many squares they control.

knight/bishop = 3 pawns because at worst, a minor piece can usually sacrifice itself for 2 pawns. So it's worth at least 2 pawns, but minor pieces are more useful than 2 pawns, and can potentially win another pawn, so theoreticians estimate its value at 3 pawns. 4 pawns is pushing it, it's less likely a minor piece can force exchanging itself for a value of 4 pawns.

The same can be said for the rook, a rook can usually exchange itself for a minor piece and pawn at any time, so it's worth at least 4 points. But the minor piece can't force the rook to make this exchange as easily as the rook can.  5 points is a fair estimation. Similar things can be said for the bishop pair and queen. It's the potential for these pieces to win more material than they can be exchanged for that increases its practical value.


Why is pawn c6 is not winning here and what is the missed win for black? When I played a game on chess.com and then ran the analysis afterward, the computer said that the pawn move c6 was incorrect.

 [title "Black to play"]
 [fen "r1b2rk1/p1p2p1p/5p2/2bNq3/8/8/PPP1BPPP/R2Q1RK1 b - - 0 1"]
 [startflipped "0"]

 1... c6

I don't understand why the move is considered a missed win. Can anyone explain why?

Look at the diagram. The engine tells you the best move (Rd8).

The idea behind that move is that it pins the white knight to the queen and at the same time attacks the knight a second time.

Moving the knight white would lose the queen (for a rook).
If white tries to defend the knight (with c4, Bc4 or Bf3), black would play c6 attacking the pinned knight with a pawn.

So the idea is: first pin, then win the knight with c6.

If you play c6 first, white could just retreat the knight to c3.

It is worth memorizing this theme (pin a piece, then attack it again) as it is quite common. Also works with diagonal pins by queen/bishop.


What is the best chess site for strong players? A decade ago, it was clear that if you wanted to play against titled players, ICC was the best way to go. With the rising popularity of free chess servers such as lichess.org and chess.com, is ICC still the best place to play chess if you are looking for games with masters? Does chess.com have more masters/day that visit their site? I suspect that that there are significantly more titled players that play on chess.com these days but since I don't have an ICC account, I cannot verify. Anyone have any thoughts on this? Thanks.

Honestly I believe that Chess.com is the best site for strong players and to gently and steadily climb up the ladder according to your rating. What I have witnessed in Chess.com is that there is a background algorithm which works for everyone and when you ask for a game it would exactly pair you up in a range which would be +400 & -400 rating points. You can even customize it according to your wish.

The benefit is if you are a 1800+ player, it would show up on the dashboard and other players would also be observing your game which is quite encouraging and you never get someone who would be too much below your rating.

Moreover, the site has infinite material resources about openings and middlegame understanding from top-level players, which makes it a great deal if you want serious progress. Even there are a lot of advertisements and strong players play there regularly, the UI is also superb.


Which piece should I move and where should I move it when playing against black in chess when I have the first move of the game? What is the first piece I should move as a novice chess player when beginning the game on the white side as a defensive strategy?

There is no magical move that will solve your opening problems. But if you learn opening principles you can find the correct moves for solving your problems your own.

I recommend you to read this: http://www.chess.com/article/view/the-principles-of-the-opening

I also found this video quite entertaining: https://www.youtube.com/watch?v=lNO9KCloLRE

Also check these opening traps: https://en.wikipedia.org/wiki/List_of_chess_traps


Is there any documented game by Benjamin Blumenfeld where he played Blumenfeld Gambit? Is there any documented game by Benjamin Blumenfeld where he played Blumenfeld Gambit?

I am sorry I have no sources, but I have read somewhere (maybe in Yermolinsky's The Road to Chess Improvement - but apparently not) that no, there isn't any known game of Blumenfeld employing his eponym opening. The gambit is named such just because Alekhine, when annotating his famous Blumenfeld win against Tarrasch, wrote that "4...b5 is an idea by Blumenfeld".


Famous grandmaster games of "torturous" winning or flaunting out of arrogance? I was originally wondering why we don't see more torturous type of games among masters. For example, instead of proceeding to checkmate, the player in control methodically takes all pieces of his opponent before ending the game. This would be a more gratifying experience, especially if there was bad blood between the players. Then it dawned on me, that at the master level, a player usual resigns as soon as he knows he lost competitive influence on the outcome of the game, thus he avoids subjecting himself to that kind of "punishment." But chess has a long history and perhaps I'm wrong and there is actually a few good instances of tortuous winning.
Question
Are there such examples of torturous winning, where a grandmaster resists his urge to resign and lets the opponent take all of his pieces before he gets checkmated? Perhaps taking every piece before checkmating is extreme, I would also accept answers that could show a famous grandmaster game where a winning player exhibits "arrogance."

Are there such examples of torturous winning, where a grandmaster
resists his urge to resign and lets the opponent take all of his
pieces before he gets checkmated?

No, there aren't, for the simple reason that that sort of behaviour would require both players to behave in an extremely childish manner and childish behaviour (e.g. "hope chess") is something you have to eliminate to become good enough to become a grandmaster.
The aim of the game is to checkmate the opponent, not take all their pieces. Good players understand this. All grandmasters are very good players. Delivering checkmate gives most adult players and all strong players far more pleasure than taking all the opponent's pieces.
What you do see sometimes amongst strong players, including grandmasters, is the player who is defeated by an unexpected tactical blow, which leads inevitably to checkmate, allowing the checkmate rather than resigning when it becomes clear what has happened. This is seen as particularly sporting behaviour. Normal behaviour would be to resign once it becomes clear. Spiteful behaviour would be to resign one move before checkmate.


What are the actions one can do against chess.com players who stop moving when they are in an objectively losing position and refuse to resign? One of my opponents at chess.com just stopped moving after falling into objectively losing position, refused to resign, and made me wait for 20 minutes to claim a win by time.

I've recently resumed my online chess activity and I have experienced this childish behavior of some online chess players several times already.

Does chess.com's engine detect such unsportsmanlike behavior? Or is there a way to flag such users, so that they could be punished? What is the proper etiquette for us to proceed in such cases?

Here's the game position when my opponent stopped moving and refused to resign:

[Title "Me vs Malicious Player"]
[FEN "8/7P/2k1p3/p3P3/Pp1K2P1/1P6/8/8 w - - 0 44"]

Assuming you also have plenty of time on your clock, make a break: have a drink, or check your mail, or pay a visit to the bathroom, or grab a book (even if it's an openings book, it doesn't count at cheating in that position ;) ), or go verify if your baby hasn't hurt herself with that knife she was trying to grab when you were too busy calculating your Bxh6! sacrifice to stop her. Meanwhile, check every five minutes that the opponent hasn't played (the worst trick would be if he plays a meaningless move at some point and ends up winning on time). After your well-deserved 20' pause, collect your point, block this undelicate opponent to make sure you never play against him anymore, and look for another partner. You will win the next game as well thanks to your fresh mind after the 20' break.

In case you're a real chess lover who doesn't care about his virtual Elo rating, and really just want to start a new game as soon as possible, the alternative is to resign yourself. I almost never do that because I do care about my little rating points (vanitas vanitatum, omnia vanitas) and because the pueril opponent might believe he has been smart when he gets gifted that pseudo-win, which might even encourage him to continue his misbehavour. But objectively, we shouldn't care at all what the abusing, unfair player is thinking - It's not our job to educate him, and we don't have the means to do it anyway.


Why do some (many!) grandmasters play the opening so slowly? I know it is never good to memorize opening lines and play them without understanding the plans and ideas, but still, I see so many grandmasters play moves from #5 to around #10 so slowly as if they've never seen the position before.  But we know that they have, and furthermore the positions has been played in literally thousands of games by others.  Are they trying to decide which of the moves that are in their repertoire to play?  Or are they trying to fully absorb the plans, even though they've already studied the plans at home?  Or are they trying to recall the variations that they studied at home but might have forgotten?  What's going on in their heads during their slow play in the first 10 moves?

Remember that they've usually spent a few hours before the game to prepare against this particular opponent: reviewed which openings the opponent plays and what his weaknesses are, chose what kind of opening to play today, made a guess which variations are likely to occur and made a plan based on that, et cetera. He always plays the same against 1.e4 and I have a nice idea against that line, maybe play that today even though it's not my main move? In that other line, he recently won spectacularly against a strong opponent but I have an improvement early on, he probably hasn't looked at it too closely...

Of course, the opponent has done the same.

If everything goes exactly as expected, the moves go very fast. But usually at least one side goes for a surprise, and then the exact preparation is out of the window, and they have to rely on the general preparation. He suddenly goes 1.e4, maybe I should go for a secondary defense? But I know my main one so well... Or: he suddenly goes for the French! What have I played against this recently, should I avoid those lines? What other lines are there that he probably isn't that good at? Why is he playing this?

The moves and variations themselves are very familiar at that point, but there's still the metagame of choosing the right opening against this opponent.


How do engines evaluate a position (actual algorithm)? How do chess engines actually evaluate a position? I am looking for a technical answer, not a general summary of how minimax works, I already know how minimax and alpha-beta, etc, work, so please do not reiterate generalities. I am interested specifically in the evaluation function.

My understanding is that the evaluation of a position is the same as evaluation of the leaf of the decision tree given best play by both sides. So, the problem then is how is each leaf evaluated? Obviously, whatever algorithm is used must be very fast because millions of leafs are evaluated. So, if this is right, then evaluation simply reduces to how a leaf position is evaluated.

The two methods for leaf evaluation that I know of are material balance and king safety. However, I suspect that it must be more complicated than this, otherwise evaluations would not have such fractional values. For example, there are many positions where both sides have the same material and perfectly safe kings. So, in those cases we would expect an evaluation of "0.00". However, in actuality the engine I use (Rybka) never has such an evaluation (unless it is a draw). It's evaluation of such positions is always something like "0.13" or "-0.05" or "0.07". So, obviously it is doing something more than just material+king safety. How does it come up with the number?

Chess algorithms are complicated, but I'm sure static evaluation gets applied before reaching the leaf nodes. For example, it's very common to reduce or even eliminate a branch if it loses materials.

The best way to learn positional evaluation in chess is the Stockfish source code. There's simply nothing better than that. https://github.com/official-stockfish/Stockfish/blob/master/src/evaluate.cpp.
If you don't like reading C++ code. There's a page here: https://hxim.github.io/Stockfish-Evaluation-Guide/.

function middle_game_evaluation(pos) {
  var v = 0;
  v += piece_value_mg(pos) - piece_value_mg(colorflip(pos));
  v += psqt_mg(pos) - psqt_mg(colorflip(pos));
  v += imbalance_total(pos);
  v += pawns_mg(pos) - pawns_mg(colorflip(pos));
  v += pieces_mg(pos) - pieces_mg(colorflip(pos));
  v += mobility_mg(pos) - mobility_mg(colorflip(pos));
  v += threats_mg(pos) - threats_mg(colorflip(pos));
  v += passed_mg(pos) - passed_mg(colorflip(pos));
  v += space(pos) - space(colorflip(pos));
  v += king_mg(pos) - king_mg(colorflip(pos));
  return v;
}

Stockfish evaluates a position by linearly add each individual term. That includes piece values, square values, pawn structures, mobility, passed pawns etc. Nothing special here.

How to get those values, known as parameter tuning? Nobody knows for sure, we have to adjust the parameters, play many games, look at the results. Sounds dumb? Yes, it is, but that's what all chess programmers do. Google's AlphaZero is no exception.


What effects would being able to capture while castling have? Capturing an enemy piece while castling has been illegal for many decades, and the concept has been solidified in chess history.
But what effects would it have if it were allowed? First, some ground rules.
1). Captures may only take place on the squares where the king and rook land, for obvious reasons. As such, castling cannot be done of an enemy is on b2/b8.
2). The king and rook are capable of both capturing when castling, since it just makes sense that they should be able to.
3). Castling with capture if the king is in check is allowed, as it is merely a complicated capture, one of the 3 ways to get out of check. This is not castling out of check in my opinion.  The king may also castle if their square is occupied by a checking piece, as that is not castling into check, but a long-range capture for the king.
For example, to bring everything together, castling in this position is perfectly legal given that the king and rook have not moved before. The king is moving onto a checking piece's square, the checking piece is being taken by the rook, and both the king and rook are capturing on their landing squares.
[FEN "8/8/8/8/8/8/8/R1qqK2k w - - 0 1"]

1. O-O-O+ {White takes both queens with check, thereby winning the game!}

Note-in this position, the Black queen reached their current squares via promotion and/or capture.

What effect, in endgames and middlegames in particular, would this have on chess, if capturing while castling was legal? What kinds of tactics would become obsolete, and what new ones could arise? To keep them question limited, only a few examples are needed for a sufficient answer. Good, solid examples in which the differences between present rules and these new ones determine, down to the bone, who wins would be appreciated.
Lastly, does anyone know of a joke problem that has been created using this concept?

Not much would be affected, as user @user1583209 noted in a new deleted comment: “ I don't think this would change much. By the time an enemy piece entered that far into your camp usually you would typically have castled already or lost castling rights anyway.”
However, there are at least a few positions in the opening lines that would be influenced at the least. For example, in this line of play Blacks gains a small advantage, at the least, by preventing White from castling kindside.
[FEN ""]

1. e4 b6 2. Nf3 c5 3. d4 Ba6 4. d5 Bxf1 5. Kxf1

But if capturing while castling were allowed, White will be able to castle whilst capturing the bishop, retaining the advantage, not having to take the time to manually castle.
Additionally, as @Chessanator noted in a comment, the Benko Gambit would be the most affeted opening due to having a similar motive in my example.


When losing in blitz, is it rude to play to win on time? In blitz, I frequently find myself in a position where I'm hopelessly losing on the board but have a good chance of winning on time (and the other way around). Is it generally considered good sportmanship to resign or offer a draw in such positions, or is it fair play to frustrate your opponent until his clock runs out?

Update: I realize this question is very similar to a previous question, although I believe this scenario to be slightly different, which may elicit different answers.

No it's not. Your opponent spent more time to reach a winning position and you spent less time to get time advantage. It's quite fair to use your time advantage over your opponents position advantage.

Time control is a part of chess.


Castling, is it necessary to take it? I've got a simple question, that I'm having difficulty finding an answer for...

If it is possible to castle (I know the conditions for it), and I decide to move the king to the square where it would end up in castling, do I have to "take the castling", i.e. move the rook too?

Yes.

Otherwise this would be an illegal move because during castling the king moves two squares, but apart from castling it is only allowed to move one square.


Castling during the endgame Are there any famous games where castling occurred during the endgame?

The game Lasker - Thomas, Lasker could have ended with a castling checkmate, but instead he played “18.Kd2#.” Some versions of that game I've seen may have ended with “18.O-O-O#.”

[Title "Edward Lasker-George Alan Thomas, London, Casual Game, 10/29/19"]
[FEN ""]

1. d4 e6 2. Nf3 f5 3. Nc3 Nf6 4. Bg5 Be7 5. Bxf6 Bxf6 6. e4 fxe4 7. Nxe4 b6 8. Ne5 O-O 9. Bd3 Bb7 10. Qh5 Qe7 11. Qxh7+ Kxh7 12. Nxf6+ Kh6 13. Neg4+ Kg5 14. h4+ Kf4 15. g3+ Kf3 16. Be2+ Kg2 17. Rh2+ Kg1 18. Kd2#

Was this an endgame? White did not have his queen on the board, and it was definitely the end of that game.


Why does Stockfish website offer many apps to download? I want to get a strong engine to practice while I'm not home. Look at: http://stockfishchess.org/download, we see a list of apps to download for the Stockfish engine.

Why are there three apps to downloads for the same engine? Which one should I choose? What are their advantages and disadvantages? Which one is the strongest? Which one is the easiest to use? What functionality do they offer?

PS: I have an iPhone 5 and Android tablet.

On the Android tablet, you download the version for Android, and for the iPhone you can download the iPhone version.

Stockfish engine's source code is written in C++, and therefore it has to be compiled for the platform (Windows, Android, iPhone, etc.) on which it will run. Thus, you have different "versions" (not in the strict sense) of the same engine.

For Android, I recommend you download the app called DroidFish. I use it myself. It is very convenient.


How do people use chess software to improve their practical skills? I'm currently using chesstempo to get better at tactics, reading books on strategy, analyzing grandmasters' games, etc.

My current rating is around 1800 and I am planning to gain 200-300 points within the next couple of years.

I'm considering investing in a chess software either ChessBase or ChessAssistant and would very much welcome some use cases of how you use them to improve your practical skills?

I know that I, for one, have used them to tell me why a line not mentioned in the books is bad. Most books show you all viable lines of play and maybe a few dubious ones, but a book can't mention all possible variations. More often than not, my opponent will play something very early on in an opening that isn't mentioned in any of the books I have on hand and so I assume it's incorrect play but struggle to know why it's an inaccuracy and how I can punish the inaccuracy. This is where, in the absence of a seasoned pro, a computer can be useful.

Let me illustrate with an example. I am a Trompowsky player and I learned most of my lines from a book by Peter Wells and a video from Andrew Martin. Together they cover a lot of material and I feel reasonably prepared to play at least passed move 8 or so. In many blitz games, however, I was frequently encountering the line:

  d4, Nf6
  Bg5, Ne4
  Bf4, g5?!

Now this g5 move is not listed in any material I've come across. I can probably assume it's bad or it would be mentioned as a viable line, but I couldn't come up with why it was bad over the board. Maybe with careful analysis, I could, but if you are like me, time is in short supply. I am a husband and father to 4 so I need to make good use of my time. Or, in this case, good use of the computer's time. Finally getting tired of seeing this line in view of

  Be5, f6
  Bg3, h5

and I'm not sure where the bishop is going to go after h4. So I put the position into the computer after 4. Be5, f6 and let it run for awhile. After some time it came up with the surprising

  e3!, ...

threatening Qh5#. I had completely missed this and always assumed that the bishop must keep on moving or retreat all the way back to c1 after 3. ..., g5. You can argue that I should have been able to find this without a computer, but the fact remains that I didn't and there are plenty of situations out there where my opponent may play something dubious but I may struggle to find out why it's dubious and what the correct response is.

In sum, I think you'll find it useful to use a computer to refute variations that appear strong on the surface, but aren't mentioned in your reading material so it's not likely that they are as strong as you fear. Computers can easily find those counterintuitive moves that will shock your opponent who isn't as prepared.


Reasons why castling may be the only winning move I recall at least one game of mine where my last move was castling (around move 20 or so :-), it saved my ugly posterior, it was the only move and we immediately agreed on a draw after that. (Do not try this at home, kids.)
I see the following ways of castling being the only winning move.

Retro: Under some convention, one side castles to prove the other can't.
Tactical 1: Again, the king's posterior is on fire, and after that is solved, material wins. (Happened.)
Tactical 2: Double attack on a stupid incoming Rb2 and Kd8 - yes, that happened more than once.
Tactical 3: E.g. after some Nxf2 against the bK, with great shocking value. Ditto. So lets file everything else in this spirit under "Various Tactical".
Positional: This is the only way to get the rook past the king and out of the pawn forest. (Very study-like. Probably never happens in a game.)

What are other ways in which castling may the only winning move in any given position?

Castling is an incredibly useful in chess: three moves in one. So we don't have to hunt far for reasons why it can be the best move strategically.
One common comparison is between the castling and the rook move to the d file or f file. Basically the king may need to move offensively, or defensively:

to cover a flight square for bK,
to attack a pieces (castling can be double attack),
to avoid being checked/mated,
to get out of the way so that the rook delivers check or can move.

In basic retrograde analysis, castling is used as OP pointed out, to deny the opponent's castling in certain situations.
In more sophisticated retrograde analysis, under the A Posteriori condition one player captures e.p., which would not normally be allowed, but a later castling "proves" that the e.p. was in fact justified as no other move could have been made.
In Dead Reckoning, castling may be the only way to keep the game alive, even if the result of the problem is in the end a draw. This also may allow the legality of castling to be deduced through retrograde analysis, without using the conventions. It is not normally possible to reason positively about castling using R.A.
In an antique version of the conventions, it was thought that castling would reset the counter for draw by 50 moves. So a few problems by Plaksin exploit this trick. This is still a matter of controversy even today.
There are also joke problems involving "playing at odds" so one player is missing a rook, but is still allowed to castle with the king moving twice, even though no rook actually moves. I don't know whether occupation of the vacant corner square would be enough to demolish the castling right, generally not, as some of these problems have a rook on the haunted corner square which did not originate there, either coming from the other side or promoting.
I'm aware this is a all bit dry so far, but we could find examples of all of these ideas if folk are interested.