# Question
Title: What are the piece values in chess.com's four player chess?
In chess.com's four-player chess, they evaluate the bishop and rook as an equal 5 points. But the geometry of the board is far more diagonal, perhaps making the bishop actually worth more than the rook. Is there a rough piece value analysis for chess.com's four player chess?

# Answer
> 1 votes
Just like in a normal chess game, it all depends on the positions. In the opening the Bishops are far more valuable than the Rooks because of their additional mobility through the pawns and their range. But if the game reaches the endgame, the Rook becomes stronger because of its pawn-stopping ability. You cannot really assign a precise value to a piece because the value of a piece is always relative to the position and the number values people assign them are just a general guide. That being said, I would argue that the Bishop and the Rook both being valued at 5 is a reasonable estimate of their strengths, but that when deciding whether to take or not you should be considering the positions of the pieces more than anything else. A strong Bishop shouldn't be traded for a passive Rook or vice versa.

---
Tags: chess-variants, point-value
---


# Question
Title: What are some common opening positions where reasonable looking moves are misplays?
A perfect example of what I'm looking for is a position like this one, the "Blackburne Shilling Gambit"

1 e4 e5 2 Nf3 Nc6 3 Bc4 Nd4?

```
[fen "r1bqkbnr/pppp1ppp/8/4p3/2BnP3/5N2/PPPP1PPP/RNBQK2R w KQkq - 4 4"]

```

The stats from Lichess show that Nxe5 is the second most popular move - being played half as often as the most popular move - despite giving a decisive advantage to black.

In this case at least, it's obvious enough that it's an intentional gambit from black and a dubious line to play into. In other positions, however, there's much less reason to suspect an otherwise typical opening move will lead to a tactic. I know I've certainly run into those positions when playing against an engine, though I can't remember any in particular

# Answer
A perfect example of this would be the Stafford Gambit. Analysis done by IM Eric Rosen shows many very tricky traps.
> 3 votes

---
Tags: opening, opening-traps
---


# Question
Title: How can I avoid stalemate in this position?
I am very much a beginner to chess and have been clueless in my past matches. I feel like I'm either making a move just to protect any of my pieces at that moment or make a move to simply knock my opponent's piece; which is certainly not the right way to play chess.

I recently played a match in Lichess which ended up being a stalemate. I have a couple of questions with this...

```
[fen "5k2/6p1/6p1/r2p4/4p3/1K2n3/3q4/8 b - - 0 1"]

```

I was playing with the black pieces and this was how it ended:

i) How exactly is the match concluded to be a stalemate?

ii) Being a beginner, I obviously find it difficult to checkmate the opponent... even though in this particular match, I seemed to have the upper hand with so many of my pieces in the board. At this particular step which I have attached below, my mind tells me that I could have somehow used the rook and knight to give a checkmate. What are some moves to give checkmate as I'm having a tough time figuring it out myself?

```
[fen "5k2/6p1/3p2p1/7r/1K2p3/4n3/3q4/8 b - - 0 1"]

```

# Answer
> 11 votes
> i) How exactly is the match concluded to be a stalemate?

1. The white king is not in check
2. The squares a2, b2, c2, c3, b4 are covered by the queen. The king may not move there.
3. The squares a3, a4 are covered by the rook. The king may not move there.
4. The square c4 is covered by the knight. The king may not move there.

Hence the king is not in check and white has no legal moves. That is the definition of stalemate.

> Could somebody suggest some moves to give checkmate?

Far and away the most important area for you to study as a beginner is simple endgames. Unless your opponent is kind enough to resign then that knowledge is the only way you are going to win games unless you stumble upon checkmate by chance.

Probably the simplest simple endgame is when two major pieces (rooks and queens are major pieces) combine to drive the opponent's king to the side of the board to give checkmate.

This is how it would look in the position you give -

```
[fen "5k2/6p1/3p2p1/7r/1K2p3/4n3/3q4/8 w - - 0 1"]
[Startflipped "1"]

1. Kb3 Rc5 2. Ka3 Qa5+ 3. Kb3 Qb6+ 4. Ka3 Ra5#

```

If you know these simple mates then you will know exactly what you are trying to do and will waste time going round in circles making pointless moves, risking stalemate in these kind of positions.

# Answer
> 1 votes
The best advice anyone can give a beginner is that when you are hunting the King like this, make sure that he is either in check, or that you're absolutely positive he has a square he can move too. A good drill I used to do as a beginner was to highlight all the squares covered by my pieces. This was both helpful for avoiding unfortunate stalemates and it trained me to be faster at seeing these things over the board where you can't highlight the squares.

# Answer
> 0 votes
When you have two major pieces (the major pieces are rooks and queen, so two major pieces would be two rooks or a rook and a queen), the basic checkmate pattern is called "ladder mate". This is where you force the king to the side of the board by taking away more and more space. In the second position that you posted, a good first move is to move your rook to c5. Once you do this, the king can't more to the left or below your rook because those spaces are attacked by your rook, and it can't take your rook because it's protected by the pawn. So once you do this, the king has only twelve spaces it can move two, and only three files.

Once you've done that, you can take away more files from the king, and once none are left, it's checkmate. In ladder mate, keeping your pieces away from the king makes it simpler, both because it keeps the king from threatening your pieces, and because it makes it harder to inadvertently cover the spaces around the king and give stalemate. In the stalemate position you give, both of your major pieces are just a knight's move away from the king, which means that they are covering a lot of spaces near it. They are also on opposite sides of the king, which makes it worse. You should try to keep your pieces on the same side of the king. That way, not only do they protect each other, but there is more overlap between the squares they are attacking, which means the total distinct squares attacked is lower.

Going back to the Rc5 move, once you've done this, you can move your queen to d5 and then to b2. Now the king can't stay on the b file, and it can't move to the c file because of the rook, so it has to move to the a file. You can then move your rook to c1 and then a1. This will be checkmate because the rook is taking away the a file and the queen is taking away the b file. This isn't the fastest checkmate, but it's one that can be found with simple rules.

If you let the enemy king get among your material, then it can use them to block attacks, and they get in the way of your major pieces, making ladder mates more difficult. For instance, if your knight weren't there, there'd be a simpler mate of Qd4, Rc3, Qf2, Rc1. If this happens, your options are to just let the king take the material, try to move the material away, or try to force the king away. In the case of pawns, you can just push them, and either the king will capture them, giving less cover, or eventually you'll promote them, giving you more pieces to deliver mate with. Just be careful that when you promote a piece, it doesn't create a stalemate.

If you were to promote all four of your pawns to queens, you'd have five queens, and at that point you'd have enough pieces that you could easily follow another tactic to avoid stalemates: make sure that all of your moves are checks, but don't give away material.

---
Tags: beginner, stalemate
---


# Question
Title: What happens when a world chess champion doesn't defend their title?
When a world chess champion like Carlsen decides not to defend the title, how does FIDE determine who the new champion will be? Is it just the winner of the Candidates tournament?

# Answer
> 7 votes
The winner of the candidates plays a WC match against the runner-up of the candidates. The World Champion who does not defend the title loses the title to one of these two players. Therefore, the next World Champion after Carlsen will be Nepo or Ding.

---
Tags: rules, fide, world-championship, carlsen, candidates
---


# Question
Title: What rating point advantage does playing White equate to?
Data shows white has a non-trivial advantage (Does white have an advantage?) but has anyone ever done any analysis what ratings point advantage/handicap?

Put another way if player W plays white against player B playing black, how big a rating advantage (FIDE or ELO) would player B require to have a 50% chance of victory?

# Answer
> 22 votes
I do not know whether any statistical analyses have been conducted using real games, but let me suggest the following (theoretical) estimation:

My Stockfish 15 gives White an advantage of 0.3. Calculating the expected score gives `50 + 50 * (2 / (1 + exp(-0.004 * 30)) - 1) = 53`, i.e. 0.53 expected points.

This is consistent with the commonly accepted 52-56% as seen in both computer and human player's games.

Using the Elo model's expected points formula, we can see, that this translates to an approx. Elo difference of 21 points (0.53 expected points) to 42 points (0.56 expected points).

# Answer
> 11 votes
Kaggle held a contest called the "Deloitte/FIDE Chess Rating Challenge". As part of the benchmarks for the challenge, they say the following (**emphasis** mine):

> (2) White Advantage Benchmark - It is always a slight advantage to have the white pieces in a game of chess, because White always gets the first move. The advantage of that extra move is highest among closely-matched top players, and less advantageous among weaker or mismatched players. It is worth roughly **25-40 rating points** on average, giving White an expected score of about 54% in general. The White Advantage Benchmark is another extremely simplistic entry, using an expected white score of 53.875% for all games. This is slightly more accurate than the All Draws Benchmark, and so it performs better, but only marginally so.

# Answer
> 2 votes
I don't know of an empirical analysis either. Some years ago I attempted to do one on my own but ended up frustrated. The 54% advantage mentioned in the answers above is just an average from all recorded games and most probably conceals important correlations. My hypothesis was that white's ELO-advantage is low for weak players and high for masters. I have the feeling there is a peak somewhere below the elite level. Who knows? But even with a database of ~10 million games the results remained inconclusive.

You have to group players according to their strength and then look at how they perform against other groups. For example: What performance do players from the group (2500, 2510\] achieve with white against the group (2510, 2520\]? The problem is, that if you make these intervals too big, the hypothetical rating advantage is lost in the noise. If you choose them too small you end up with too little games.

Your second formulation of the question might have a definitive answer although it probably depends on the ELO of W. But I doubt this formulation is equivalent to your first one. A player with a rating advantage of 100 points might profit more from the white advantage than a player with a mere 50 point advantage, while a player with a 500 point advantage will win almost every game independent of the colour they are playing.

Unfortunately you have to make numerous theoretical decisions before you can hand down your question to statistics.

---
Tags: rating, handicapping
---


# Question
Title: Why did this legendary game of Carlsen vs Nakamura not trigger threefold-repetition after move 5?
As far as I can tell, the position is the same after move 1, after move 3, and after move 5, so why does the game last until move 6 is done? Did it not get claimed as a draw by either player?

```
[fen "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1"]
[Event "Magnus Carlsen Invitational"]
[Site "chess24.com INT"]
[Date "2021.03.15"]
[EventDate "2021.03.13"]
[Round "15.3"]
[Result "1/2-1/2"]
[White "Magnus Carlsen"]
[Black "Hikaru Nakamura"]
[ECO "C20"]
[WhiteElo "2847"]
[BlackElo "2736"]
[PlyCount "12"]

1. e4 e5 2. Ke2 Ke7 3. Ke1 Ke8 4. Ke2 Ke7 5. Ke1 Ke8 6. Ke2
Ke7 1/2-1/2

```

# Answer
While the position might seem like it has been reached 3 times at that point, that is actually only the second time they have reached that position because the first time they were in this position, before the kings had moved, they had the ability to castle. So the position has only occurred twice where they can't castle as of move 5, and it has only had the exact same position twice in a row. They then needed to play it one more time so that they have had the same position three times where they haven't had the ability to castle.
> 56 votes

---
Tags: threefold-repetition, claim-draw, bongcloud
---


title: Distribution of Elo ratings

text:
# Question
Title: Distribution of Elo ratings
Danger! Only for math buffs!

As we all know, Elo is Gaussian. In theory. Except it isn't. But my question is not about *that* distribution. Your Elo *might* also list a second number: the number of tournaments rated. To my best knowledge, FIDE Elo only has the "K number". My German national Elo ("DWZ") lists this number, though. Can you say something about the statistical distribution of that variable, making some natural assumptions on the process (players take up and leave chess with a constant rate; the number of tournaments per time of individual players might be Gaussian)? I also would be interested in a numerical simulation of that process.

Legend: The lower curve was compiled by me and shows the number of rated tournaments of all rated Hamburg players, just pre-Corona. (I'm a chess maniac and show-off, I'm #2 or so :-) The upper curve - which determines the axis numbers! - is from my CS bachelor thesis and completely unrelated, but I found it always funny how similar it looks, except for the cutoff. Unfortunately I don't know a formula for that one, either. In first approximation, both are Poisson or Zipf or so.)

EDIT! As announced, here is the output of a very primitive simulation. We have an array A of length 1000 (players), with p=0.01 a chessplayer drops out and at the same time a new one starts at 0 (which is of course not realistic). With q=0.1, a player gets a new tournament rating (again, as stated in a comment, more than one should be updated). Essentially the only free variable is p/q (assuming both are smallish). Red: 50000 runs, Blue: 100000. (A player with 92 rated tournaments leads by far.) Evidently, a dynamic steady state was reached.

# Answer
> Your Elo *might* also list a second number: the number of tournaments rated. To my best knowledge, FIDE Elo only has the "K number".

Wrong.

The monthly rating lists which FIDE publishes include the number of games played which is a proxy for number of tournaments played and probably a more useful one than that.

Here is a graph of the number of players (y-axis) who played x number of games (x-axis) so far in 2022. These are FIDE rated at standard time control:

Not all that useful really because 276,251 have played zero games so far this year. Let's try again but remove that data point.

Now what we see is much more interesting. The maximum is 11,303 players playing exactly 5 games. To me that looks like a weekend 5-round Swiss in which all of your opponents are rated.

The little glitch comes at 9 games with 6886 players - 9 round all-play-all?

Let's extend the range to all FIDE rated standard control games played since 2010. The shape of the full graph isn't all that interesting so let's look at 1 through 30 games.

Local maxima at 5 games (14294 players) and 9 games (14149)!
Roughly 1000 players playing each of 1, 2, 3 or 4 rated games.
Over a 12 year period most of the players played just a handful of tournaments.

For balance let's look at the fanatics, those who played 500 or more games during the 12 years.

One player played 2442 games, about 200 games a year and 156 players played 1200 or more games.
> 2 votes

# Answer
I'd love to comment but alas, my reputation is too low. If this must be taken down, I understand. I suspect "the number of tournaments per time of individual players might be Gaussian" is not Gaussian as it is lower bounded at 0.

num. of tournaments is always positive. Per time of individual players is also positive. +/+ is always positive or zero.

Additional thoughts: *In the contrived case where Hamburg players play only in Hamburg amongst themselves.* I think the most interesting part here is how dependent each observation is. One player can not add another tournament appearance without adding tournament appearances for someone else. You can't play in a tournament by yourself after all. So it would be really neat to view this as a network where each player is a node and then tournaments are the lines connecting them.

* Edit: at this point, I think I have the karma to move this to the comments. But I don't wanna mess with things and maybe lose that privilege, so I will keep it here
> 4 votes

---
Tags: statistics, elo
---


title: Dark-squared bishop after QGA 3. e3

text:
# Question
Title: Dark-squared bishop after QGA 3. e3
I have played Queen's Gambit and most players my level choose Accepted and then try to hold onto their pawn. After I play 3. e3, while the light-square bishop has c4 has an obvious target, I have difficulty knowing what to do with my dark-squared bishop which is now blocked in.

```
[FEN ""]
1. d4 d5 2. c4 dxc4 3. e3

```

Does it go to the center of the pawn structure at d2? I've followed several of the lines through and it's not clear to me if the bishop really belongs on the queenside after a and b pawns are pushed, or eventually the e pawn is pushed on the kingside and the bishop is freed.

If instead 3. e4 is played, which strikes in the center immediately, no such issue with the bishop arises.

# Answer
In the e3 lines the bishop helps on the queenside which is nice if Black tries to hold the pawn. White's goals are:

* Breakup Black's queenside pawns
* Get a lead in development as Black will be making too many pawn moves

Here is an example of Black trying to hold on tight to the extra pawn. Note: I always play 3. Nf3 daring Black to try to hold the pawn. There is no hurry to get it back.

```
[FEN ""]
1. d4 d5 2. c4 dxc4 3. Nf3 c6 4. e3 Be6 5. Qc2 b5 6. b3 Qa5+ 7. Bd2 cxb3 8. Qb2 Qc7 9. Nc3 bxa2 10. d5

```

I would much prefer the White side here with a lead in development and Black queenside coming apart.
> 6 votes

# Answer
If Black just develops passively, then eventually (perhaps after castling), you will try to push e4. This gives the bishop the option of developing along the c1-h6 diagonal. However, Black commonly solves this problem for you, by attacking the centre with 2...e5 followed by ...exd4 -- or, by playing 2...Nf6, and at some point ...c5 (often followed by ...cxd4 soon). This leads to an isolated pawn situation after exchanging on d4 (...exd4 exd4, or ...cxd4 exd4), after which the diagonal is opened for your bishop.

As for 3.e4, it's also a perfectly playable line, but the drawback of it (compared to 3.e3) is that Black can again play 3...e5, but now your d4-pawn isn't supported by your e-pawn. The main line now runs 4.Nf3 exd4 5.Bxc4, with an interesting game.
> 1 votes

---
Tags: opening, queens-gambit-accepted, bad-bishop
---


# Question
Title: Is there a Correspondence Chess ranking on Lichess.org on 2022?
A similar question was posted in the past (2020):
Is there a way on lichess to see the Correspondence chess rankings?

However, that solution is not working anymore. In my perspective, things have changed and lichess.org is allowing correspondence chess, but a ranking does not exist anymore. Is there a way to be certain about this topic?

Also, why lichess.org is treating correspondence chess differently, if that is the case? I am guessing that is difficult to control who is cheating and who is not. In the past I used to play correspondence chess, but I am playing classic games now. According lichess.org classic are games that each side has 30 minutes or more for the entire game. Correspondence chess you have 1 day per move or more. Chess.com calls correspondence daily chess.

# Answer
> 4 votes
Although it's from six years ago, the lack of leaderboards for correspondence chess in lichess was explained by its creator in this reddit post.

Quoting from reddit's user ornicar2 (who is labeled as lichess creator):

"We don't have correspondence leaderboards because it's impossible to accurately monitor for cheating. While player behaviors are analyzable and somehow predictable in timed games, go figure what happens when a player spends 24h between two moves."

---
Tags: engines, computer-chess, lichess, correspondence-chess, chess.com
---


# Question
Title: Do accidental clock presses get counted with DGT clocks connected to DGT boards?
I have played many games with DGT 2010, DGT 2000 clocks and they cannot be connected to DGT boards as far as I know. Also there is a button to know the number of moves played (rather clock presses) so even accidental presses are counted.

Clocks such as DGT XL, DGT 3000 can be connected to DGT boards (there is a port). I have played very little games on those but I assume there is a button to check the number of moves there as well.

My Question is when a clock is connected to a DGT Board will the accidental moves get counted there as well? Since the board will show the actual number of moves in broadcast does it give the same number in the clock?

Or is it something completely different?

# Answer
The clock is programmed in a way it does not read number of moves from the board so it will count it as additional move.

The only obvious issue with this is when you have additional time per move - it will add extra time that should be retracted.
> 2 votes

---
Tags: fide, time-control, chess-clocks
---


# Question
Title: Looking for online Swiss pairing software
I would appreciate if somebody could recommend a good Swiss pairing program. I'd prefer online version with multi-language option and free version but cheap one is also good.

I've found http://www.free-swiss.com/ but do you know other ones?

# Answer
> 3 votes
My club uses Swiss Manager. It is very good but not cheap. 150 euros for the full version, 75 euros for the light. It is perhaps worth looking at what it does to get ideas if you are thinking of writing your own.

One I downloaded some time ago but still haven't got round to playing (so I can't give any recommendation) is OSwiss which is a project on Sourceforge.

# Answer
> 7 votes
You could try this free service: https://swisssystem.org/

It’s simple and easy to use. It works fine on mobile devices. The maximum player count is 200.

# Answer
> 5 votes
SWIPS is also online tool for managing tournaments. It includes much more than just a swiss system and round robin, but you can use it solely for that purpose if you want.

Right now its free, available languages are English and Slovak.

# Answer
> 4 votes
An offline alternative is Vegachess, which it is also homologated by FIDE. AFAIK Vegachess just uses javafo as its pairing engine. Linux version of vegachess is free to use and Windows version not very expensive.

# Answer
> 3 votes
If you are looking for an easy-to-use, FIDE-approved online platform, take a look at ChessManager.

# Answer
> 0 votes
As offline alternative, there is my program VinczeSwiss: http://vincze.euweb.cz or http://vinczeswiss.sweb.cz

---
Tags: software, swiss-pairing
---


title: Literature on Accelerated London system

text:
# Question
Title: Literature on Accelerated London system
I (beginner) have been trying to shift from Philidor Defense (I still play it for Black) to the Accelerated London System for Blitz and Rapid. For eg:

```
[FEN ""]
1. d4 d5 2. Bf4 Nc6 3. e3 Nf6 4. c3 Bf5 5. Bd3 Bxd3 6. Qxd3 e6 7. Nf3 Bd6 8. Bg3 Bxg3 9. hxg3 O-O 10. Ne5 Nxe5 11. dxe5 Ng4 12. Qxh7#

```

Is there any creditable literature or any famous games on:

1. What to do if Black castles Queenside (O-O-O)? The system seems exclusively oriented towards attacking the short castle.
2. Black attempting a similar structure, with the light-square bishop being brought out on move 2? Everywhere I see, this system is only analysed for White to play.

# Answer
The hanging pawns YouTube channel has lots of very instructional content on the London system. The videos cover many different responses to the London system and the proper ways to play against them as well as many of the common ideas which you or your opponent will be playing for in each type of position. While the videos are generally best for A players because of their high depth, a beginner would also likely find them very valuable as well, especially if you are interested in learning lots of opening theory.

here is his London theory playlist

https://www.youtube.com/playlist?list=PLssNbVBYrGcCjajrI7QtQi48nKOfy-W5O
> 3 votes

---
Tags: beginner, london-system, reference-request
---


# Question
Title: Why does Stockfish recommend this queen sacrifice in this puzzle?
```
[Variant "From Position"]
[FEN "r1b1r1k1/pp3ppp/2p5/2Ppn1q1/1P1Q2B1/4P1N1/P4PPP/R4RK1 w - - 9 18"]
[Title ""]

1. Bxc8 Raxc8 2. f4

```

https://lichess.org/training/fRzq3

The idea of the puzzle seems to be first (intermezzo?) a bishop trade, then unleashing the main idea which is a pawn forking the black queen and knight.

But why does Stockfish recommend black trade queen for knight? Isn't the queen a very valuable defender in this situation? Is the white knight really that threatening, maybe because it is supported by the rook on f5? The top moves are

1. +6.3 19...Qxg3
2. +7.1 19...Qf6
3. +7.6 19...Qe7

# Answer
After 2.f4:

2...Qf6 3.fxe5 Qxe5 4.Nf5 Rc7 5.Rf3 h6 6.Nd6 leaves White 2 points up with a killer knight on d6, and Black basically has no chances.

2...Qxg3 3.hxg3 Ng4 prepares to follow up with ...Re4, when Black is down a queen for a knight, but at least his pieces are active and the position is a bit blocked (for now).

It's still pretty surprising that Stockfish slightly prefer 2...Qxg3 over 2...Qf6 though. The neural net it uses for evaluation has a reputation of being more "intuitive" (compared to the hand-crafted evaluation from 2020 and earlier), and in a human game one could argue 2...Qxg3 may give slightly better practical chances. But still, 2...Qxg3 leaves Black down 6 points, compared to 2...Qf6 (where it's 2 points). It's curious that Stockfish does not prefer the materialistic route here, considering the material is so much more.

Perhaps when training the neural net, this style of evaluating gives elo gains, when applied to more balanced positions. E.g., maybe being a bit less materialistic gives elo gains to Stockfish, when in positions under 1.00. Then, this behavior of the neural net might still be used for positions where one side is completely winning (in your example, over +6), and whether this style of the neural net is completely optimal for these types of positions becomes irrelevant.

Stockfish will win any position over +6, and will lose any position under -6 (against a remotely comparable engine). So, it playing the strongest moves in such extreme positions doesn't affect how much elo Stockfish gains/loses, and thus wouldn't be a factor in what neural net is trained and eventually used. It should be noted that I'm just going on a tangent of assumptions here, but my main point is that if a neural net makes Stockfish behave slightly worse in totally won/lost positions, it likely won't affect the training of this neural net, and whether or not it's ultimately chosen to be used for Stockfish.

That being said, maybe 2...Qxg3 is indeed the better move from an objective standpoint. Not really any way to tell definitively.
> 11 votes

# Answer
When I put this to Stockfish, it recommended Qf6 with a score of +4.66, which looks more reasonable. But your link is a puzzle site, with Stockfish running in your local browser; the key moves of the puzzle were over by then, so I don't think a lot of effort was put into choosing between all the losing moves. A losing position is a losing position.
> 0 votes

---
Tags: stockfish, puzzles, sacrifice
---


# Question
Title: Is it possible to get DTM of a position from sygyzy tables?
This is a programming question related to chess endgame tables.

As far as I know syzygy tables allow me to get WDL and Depth to Zeroing (DTZ) information for a given position. Is it possible to somehow (without access to chess engine) extract Depth to Mate (DTM) information of a position from these tables?

Based on what I understood from python chess documentation, that minimaxing the DTZ will give you a win, but it does not guarantee the quickest win:

> Minmaxing the DTZ values guarantees winning a won position (and drawing a drawn position), because it makes progress keeping the win in hand. However the lines are not always the most straightforward ways to win.

# Answer
> 6 votes
**No**. It's **not** possible. People use Gaviota tablebase if they want to do DTM or the old Nalimov.

Syzygy tablebase is the most popular tablebase algorithm because it doesn't do DTM, better compression. You can't get both - information and size.

# Answer
> 3 votes
TL;DR DTM & DTZ measure different things and one cannot be deduced from the other.

DTZ measures the shortest distance to zero the position (zeroing = pawn move, capture or checkmate), without compromising the Win/Draw/Loss status. If White only has just sufficient material to mate, then any zeroing is likely to be useful, but if White has way more material than is necessary, White may try to sacrifice its own unit, and Black may try to refuse the sacrifice!

Since DTZ does not compromise on WDL status, and since zeroing the position can only be done a finite number of times in the game, it definitely does progress the game, but it may be an inefficient way of doing so.

Syzygy uses a thing called DTZ50, which is a refinement of DTZ which keeps track not just of 3-valued WDL status but 5-valued status as shown here in the table at the top right of the Syzygy page https://syzygy-tables.info/metrics. So following DTZ50 will additionally ensure that any path does not just progress the game, but also does not fall foul of any 50M traps, even those lurking ahead after several simplifications.

It is not possible to deduce the DTM value from a DTZ value. Sibling nodes may share the same DTZ value but have different DTM values. And vice versa. (Of course if you give the full set of DTZ information in the form of a tree, then someone could throw away the DTZ data, and reconstruct the DTM from the tree!)

Syzygy does provide DTM if there's 5 or fewer pieces on the board. One can experiment with this to see how the concepts differ. For example https://syzygy-tables.info/?fen=7k/8/7K/4P2R/8/8/8/8\_b\_-\_-\_0\_1 leads immediately to a simple position with DTZ=1 & DTM=3. But White can only achieve one of these. After Black makes the forced move, White can either DTZ=0 (with DTM=16) or DTZ=2 (with DTM from 2 to 20).

I think the answer is a concept called DTM50, but this is more complex to compute, and I don't know of any existing databases.

---
Tags: engines, endgame, tablebases
---


# Question
Title: What games in a FIDE rated tournament does FIDE NOT rate?
In a recent FIDE rated tournament I officiated in one of the players complained to me afterwards that only 2 out of his 5 wins had been rated by FIDE. "What", he wanted to know, "was going on?"

Well, if you play somebody in a FIDE rated tournament who is unrated then FIDE will not use that game to calculate your new rating. They can't. Your opponent didn't have a rating. However they will use the game to calculate a first rating for your opponent. Of course your opponent will need to score at least half a point against a total of at least 5 opponents and get a rating of at least 1000 to get a rating.

Is this the only case where a game played in a FIDE rated tournament isn't rated for one or both players?

# Answer
> 2 votes
What you describe was the position up until January 1st this year but FIDE have changed the rating rules regarding rating games where there is a points difference bigger than 400 elo.

Here is what the old rules say:

> 8.54 A difference in rating of more than 400 points shall be counted for rating purposes as though it were a difference of 400 points.

Here is what the new rules say:

> 8.3.1 For each game played against a rated player, determine the difference in rating between the player and their opponent, D.
>
> A difference in rating of more than 400 points shall be counted for rating purposes as though it were a difference of 400 points. **In any tournament, a player may benefit from only one upgrade under this rule**, for the game in which the rating difference is greatest.

What this means is that if you play a tournament where more than one of your opponents has a rating 400 points or more lower than yours then only one game will count to your new rating using the adjustment. Any other games with more than 400 point rating difference will be used in your rating calculation but without the adjustment. If the rating difference for second and subsequent games is 735 or more then according to the tables you will get zero rating points for these games.

"So what?" you might say. Who will ever be affected by this? The answer is that world number 1 and world champion Magnus Carlsen just has been affected. In this Olympiad he has played (and beaten) two players with ratings more than 400 points lower than him and only one of those games will count to his new rating:

Note, I don't agree 100% with what this screen capture shows. The difference was still less than 735 hence the Stanojoski game should still give Carlsen an additional 0.6 rating points. We'll have to wait and see what the official FIDE rating calculations show when the September list is published.

---
Tags: rules, fide, rating
---


# Question
Title: What stops me from pumping up my rating by playing a 200 game match against a much weaker (>400 point difference) player?
This question is inspired by this extract from a question about minimum rating gain:

> One of the top 10 players in the world (say Magnus Carlsen), wants to increase his rating to 3000. He has a good friend who has 1200 in rating, and who is willing to play a match of 200 games (2 each day for 100 days) against him. His friend will of course play his best, so this is by no means considered cheating.
>
> According to https://wismuth.com/elo/calculator.html, Magnus will have way more than 99 % chance of winning a single game, but for simplicity, let's say he has 99 % chance of winning a game (which is an understatement). If we then forget about draws (for simplicity), Magnus would be expected a score of 198/200. That means a rating gain of 0.8\*198 - 9.2\*2 = 140 rating points.

Putting to one side, for the moment, the far fetched nature of the example, is there anything to stop this kind of behaviour?

I know two master level players who have achieved the 3 title norms they need for high level FIDE titles but are still about 150 points short of satisfying the rating requirement for the title. What stops them from following the suggestion and playing a 200 game match against a player rated 1000 points lower? Neither of them is getting any younger and the extra rating points they need seem to be getting harder and harder for them to gain.

# Answer
## Tournaments

Not all games affect the rating. FIDE rating is about games in FIDE-sanctioned tournaments pre-registered by the federation in whose territory it is held. In addition, they (FIDE Qualification Commission) have the right to not rate a tournament for arbitrary reasons, and a "tournament" of 200 games between Carlsen and his 1200-rated friend would be a good candidate to simply not be rated even if it would be properly managed and registered otherwise.

Carlsen is free to join various open FIDE tournaments, of course - but those tournament rules will usually ensure that he does not get to arbitrarily choose which players to play against and that he will not be paired with 1200-rated players.
> 16 votes

# Answer
Yes, it is possible. And it has been done.

At the highest level such practice would be frowned upon, to say the least, and would only be harmful for the grandmaster gaining valueless rating points with such ridicule practice.

On a lower level, however, a few dozens points can award you a Fide title, and such "farming" by playing in very low level tournaments is seen from time to time. For example, a chess teacher could grab valuable rating points by playing in tournaments against much weaker children on his way to becoming a Fide Master.
> 16 votes

# Answer
This was done by Claude Bloodgood, a chess enthusiast who spent most of his life in prison.

In the 90s he regularly played games against other prisoners; since he was a fairly good chess player and they were completely new to the game, his rating rose considerably. By 1996 his USCF rating was 2789, the second highest in the country, despite playing almost entirely other prisoners who barely knew the rules.
> 13 votes

# Answer
FIDE ratings are governed by the FIDE Qualification Commission. It is their job to oversee and scrutinise matters relating to titles and ratings. Normally for ratings these things work in an automated, computerised way which doesn't require much oversight. However if something looks wrong regarding either ratings or titles then someone can contact a member of the qualification commission and ask for the matter to be investigated.

In any case anything to do with title norms and title rating requirements will receive a certain minimum level of scrutiny by one or more human beings before being approved and will not be automatically validated by the computer saying "Yes".

In terms of running a very long one-sided match which one player is guaranteed to win purely for the sake of gaining rating points there is an additional hurdle to be overcome in the FIDE Rating Regulations:

> 6.2 Where a match is over a specific number of games, those played after one player has won shall not be rated. This requirement may be waived by prior request.

Your 200 game match is only going to gain you rating points for the first 101 games. If you apply in advance, as required by the above rule, to have all 200 games rated then the Commission is going to smell a rat and likely deny the event any rating. Furthermore you are likely to be marked by the Commission as a likely cheat and your future moves in the realm of their jurisdiction are likely to receive additional scrutiny.

I don't think this rule was introduced to prevent "rating farming". I think it was introduced because when one player has won enough games to win a match then the they may not try their hardest in the remaining games. Similarly the loser may give up hope and stop trying as we saw in the latest World Championship match even before Carlsen had the match won.
> 10 votes

# Answer
From 1st January 2022 FIDE have closed this loophole. Their FIDE Rating Regulations effective from 1 January 2022 say this:

> 8.3.1 For each game played against a rated player, determine the difference in rating between the player and their opponent, D.
>
> A difference in rating of more than 400 points shall be counted for rating purposes as though it were a difference of 400 points. **In any tournament, a player may benefit from only one upgrade under this rule**, for the game in which the rating difference is greatest.

In other words any subsequent games against players rated more than 400 points less will be rated according to the rating tables. This means, for instance, that if the opponents are more than 735 points lower then zero rating points will be given for beating them.

It's almost as if FIDE read this forum ;-)
> 7 votes

---
Tags: rules, fide, rating, titles
---


# Question
Title: "Inventor" of Najdorf Ng4 (Anti-English)
```
[Variant "From Position"]
[FEN "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w - - 0 0"]
[Title ""]

1. e4 c5 2. Nf3 d6 3. d4 cxd4 4. Nxd4 Nf6 5. Nc3 a6 6. Be3 Ng4!?

```

What I know is that Kasparov popularized the variant (around 1998 according to LiChess). But then, it came on the board already in Wahls-Reddmann (Hamburg ch 1987). I have no megabases to check but I'm fairly sure that I haven't "invented" Ng4. Can somebody look up the first occurence in some megabase? (Very obviously, this doesn't exclude some "patzer" playing it before even that "accidentally" and not getting credit because megabases concentrate on GMs, but so there.)

# Answer
> 5 votes
Searched in Mega Database 2019.

The very first occurence I found was a game played in January 1970 between players **Nemlioglu, Ahmet Fahri - Hausner, Ivan** in an event called Niemeyer U21-08 Final B. White played Qd2 after Ng4 so assume it was not a master level game
**EDIT**
Ivan Hausner is an IM (since 1979) and had 2360 in 1976 according to Chessbase profile

The next occurence in October 1970 was the game **Robert Byrne - Walter Browne**. Both 2 strong GMs.
Also found the game on chessgames

```
       [FEN ""]
       [White "Robert Byrne"]
       [Black "Walter Browne"]

       1. e4 c5 2. Nf3 d6 3. d4 cxd4 4. Nxd4 Nf6 5. Nc3 a6 6. Be3 Ng4 7. Bg5 Nc6 8. Qd2 Qb6 9. Nb3 e6 10. h3 Nge5 11. f4 Ng6 12. f5 Nge5 13. Be2 Bd7 14. Be3 Qc7 15. O-O Na5 16. fxe6 fxe6 17. Nxa5 Qxa5 18. Rad1 Be7 19. Kh1 Rc8 20. a3 Rc6 21. Bh5+ g6 22. Be2 Nf7 23. Bg4 h5 24. Bf3 Ne5 25. Be2 g5 26. Bxg5 Nc4 27. Qd4 e5 28. Qf2 Bxg5 29. Qf7+ Kd8 30. Bxc4 Be7 31. Qg7 Re8 32. Bf7 Rf8 33. Nd5 1-0

```

---
Tags: opening, history, najdorf
---


title: How to pass 1000 elo

text:
# Question
Title: How to pass 1000 elo
Currently my chess.com rating is fluctuating between 1000 - 1050. What are some common pitfalls that players in this range make and how can I capitalize on them? I've been playing for about 5 months and am looking to take it more seriously. Here the account link: https://www.chess.com/member/strawhatjared

# Answer
Probably the number one thing that can improve your chess at that level is better tactical awareness, both offensively and defensively. Here are some positions from just one of your games:

```
[FEN "rnb2rk1/ppp2pp1/3p1q1p/2bNp3/2B1P3/3P1N2/PPP2PPP/R2QK2R b KQ - 3 8"]

```

White is threatening Nxf6+ and Nxc7. You played Qg6, but this doesn't actually save the queen - White could have played Ne7+ and forked it. (Luckily for you they opted for Nxc7 instead, which wasn't nearly as good as it looked.)

Here's another of your opponent's tactics:

```
[FEN "5rk1/pp3pp1/5P1p/4p3/2Bn4/3P1P2/PP3K2/6R1 b - - 0 23"]

```

Here you played g6, but that allowed Rxg6 because the f7 pawn was pinned. g5 would have been better.

Now let's look at a couple of places you could have won material:

```
[FEN "5r1k/pp3BR1/5P1p/4p3/3n4/3P1P2/PP3K2/8 b - - 0 26"]

```

Here White has just played Bxf7. The bishop is attacked, and it's protected only by the rook - and notice that the rook won't be protecting the bishop if the rook moves. If you could just make it go away, you could win the bishop. You could have played Nf5, attacking the rook, and either you win the rook for the knight or you win the bishop outright.

A little later this position arose:

```
[FEN "5r1k/p5R1/3K1P2/3B4/5n1p/5P2/P7/8 b - - 5 34"]

```

Here you played Nxd5, totally missing Rxf6+, which puts your opponent in check and takes out the only support of your opponent's rook, so your king wins the rook next move. It also eliminates the dangerous passed pawn, and that alone should have had you at least *consider* that move.

These are all fairly basic one or two move tactics. Being able to see this sort of thing on a regular basis will greatly improve your game at this level.
> 18 votes

# Answer
At that level the most common mistake is to focus exclusively on your own plans even to the extent of ignoring direct capture threats to your own pieces from the opponent. Players play a kind of hope chess in which they imagine their opponents will play plausible but bad responses to their trappy but bad moves.

To overcome this and improve there are two things you need to do:

1. Every time your opponent makes a move you should ask yourself why they made that move. What are they planning to do? Can you stop their plan? Sometimes stopping your opponent's plan is more important than progressing your own plan.
2. Every time you have decided what move to make you should stop. Don't make the move straight away. Picture the position with your move on the board and put yourself in your opponent's position. What would you do in that position if you were your opponent? That way you can drastically reduce the number of blunders you make.

If you can successfully implement these two items in your games your rating will improve dramatically.
> 11 votes

# Answer
These 3 simple pieces of advice that can really help beginners are

1. Move your minor pieces (bishops and knights)
2. Control the center of the board
3. Protect your king (i.e. castle)

Although these sound simple, just keeping them in mind will probably be enough to surpass 1000 on chess.com.
> 3 votes

# Answer
I really like DM's answer, tactical awareness is the most important thing for you right now. What I'd like to add is not really a complete answer, but rather an addendum to that post, talking about how you should look for tactics as a beginner.

The comment on DM's post made by Akavall says the following: "In three out of four positions, tactics would not be missed if you considered all checks available to you, and all checks available to their opponent in response to the chosen moves. So this could be a starting point in training you calculation discipline, make sure you consider all checks on your move, and once you chosen the best move consider all checks that the opponent has."

This should really form the basis for your tactical calculations starting out. When considering what move to play next, consider candidate moves in the following order:

1. Consider ALL checks, no matter how silly some of them seem.
2. Consider ALL captures, no matter how silly some of them seem.
3. Only after this, consider other candidate moves.

This works both ways. When trying to figure out what your opponent is planning, it's usually a good place to start looking what checks and captures are available to them; you'd be surprised how much these simple rules can help out in the beginning. To illustrate just how powerful this scheme can be, let's look at an insane game played yesterday in the Chennai Chess Olympiad between Wesley So and Hrant Melkumyan, two strong grandmasters:

```
 [FEN "r2qr1k1/pp1nbp1p/2n3pB/3pp3/3P4/2PBRQNP/PP3PP1/R5K1 b - - 0 1"]

 1...e4?? {Black's pawn moves to attack the white queen on f3, as well as the white bishop on d3. So black thought he would win a piece here. But he had forgot to look out for a particular capture in the position...} 2.Rxe4!! {Wesley So realized that he could just take the pawn with the rook, because black could not take it back without getting checkmated.} 2...dxe4? {This is not the game continuation, but let us just go over why black can't take back on e4.} 3.Qxf7+!! {Another stunning move! White sacrifices a queen with check, and black's king is forced to take back (white is threatening to play Qg7# in the next move)} 3...Kxf7 4.Bc4+ {Now white can check black's king all the way to checkmate, and on each move black has only one legal option} 4...Kf6 5.Ne4+ Kf5 6.g4+! Kxe4 7.Re1+ Kf3 8.Bd5#

```

Note how every move from white in this sequence is either a capture or a check (or both at the same time). In fact, every move from white except for the first one is a check. If Wesley hadn't been on the lookout for every possible check it would've been difficult for him to see 3.Qxf7+, and if he hadn't considered every possible capture in the starting position it would've been very hard for him to see that 1.Rxe4!! was even an option. In fact, we know that 2.Rxe4 is hard to see, because black missed it despite being a very strong grandmaster in his own right!
> 3 votes

---
Tags: learning, beginner
---


# Question
Title: What is the most number of repetitions in a GM game?
In July 2014 FIDE introduced new rules regarding draws. The arbiter was required to step in and declare the game drawn in cases where the players repeated the position 5 times:

> 9.6 If one or both of the following occur(s) then the game is drawn:
>
> a. the same position has appeared, as in 9.2b, for at least five consecutive alternate moves by each player.
> b. any consecutive series of 75 moves have been completed by each player without the movement of any pawn and without any capture. If the last move resulted in checkmate, that shall take precedence.

Of course long before this players have been able to claim a draw for a 3-fold repetition. Nevertheless, the new 5-fold repetition rule allowed players to force the arbiter's hand in tournaments where early draws were forbidden.

Since the rule change in 2014 what is the most number of repetitions in a FIDE rated game where both players are GMs?

# Answer
> 7 votes
The most number I have found so far is in this game from 2015

```
[fen ""]
[Title "Narciso Dublan vs Grigoryan 38th Barbera Open 2015 "]

1.e4 c5 2.Nc3 e6 3.g3 d5 4.exd5 exd5 5.Bg2 d4 6.Qe2+ Be7 7.Nd5 Nc6 8.d3 Be6 9.Nf4 Bc8 10.Nd5 Be6 11.Nf4 Bc8 12.Nd5 Be6 13.Nf4 Bc8 14.Nd5 Be6 15.Nf4 Bc8 16.Nd5 Be6 17.Nf4 Bc8 18.Nd5 Be6 19.Nf4 Bc8 20.Nd5 Be6 21.Nf4 Bc8 22.Nd5 Be6 23.Nf4 Bc8 24.Nd5 Be6 25.Nf4 Bc8 26.Nd5 Be6 27.Nf4 Bc8 28.Nd5 Be6 29.Nf4 Bc8 30.Nd5 Be6 31.Nf4 Bc8 1/2-1/2

```

That is a remarkable **12 repetitions** before the game was declared drawn! Perhaps there was a 30 move requirement before the game was allowed to be declared drawn and the arbiter paid more attention to this than article 9.6.

---
Tags: rules, draw, grandmaster, records, fivefold-repetition
---


# Question
Title: When a US tournament entry is limited based on rating, when is the rating checked?
I see that some tournaments with prizes are limited to low rated players. Given that travel requires planning, I expect entry to the tournament is processed some time before the 1st day of the tournament.

So what happens if a person does very well in another tournament shortly before and hence get an increased rating?

# Answer
> 8 votes
The rules are specific to each tournament. For example 2021 U.S. Class Chess Championships specified "July 2021 Rating Supplement used for pairings and Prizes".

# Answer
> 3 votes
According to the USCF,

> Official ratings lists are generated on the 3rd Wednesday of each month and become official on the 1st day of the next month. For events that begin prior to September 1st, the August supplement should be used.

> Tournament directors should use the appropriate published rating unless otherwise announced in all pre-tournament publicity.

So this gives at least a week (and possibly over a month) as a buffer; a tournament starting anytime in March wouldn't consider any rating changes after the official March list is generated, which would be sometime between February 15 and 21 depending on what day Wednesday fell. I can confirm that at least once in my youth I was able to win a small class prize based on my officially published rating, despite my not-yet-published rating from a recent tournament putting me above the limit for that prize.

But maybe you registered well in advance, and your new rating is published in time to be used. *Most* tournaments would allow you to join another section if you registered well in advance and were no longer eligible for the section you initially selected, although it's possible that space would no longer be available. In that case they'd probably just give you a refund. They aren't going to let you play in a section if your officially published rating is too high for it.

If you're concerned about this possibility, it's possible in many tournaments to register for the section *above* your current rating, instead of the one which matches your rating. This has the obvious drawback that if your rating *doesn't* increase, you're still stuck playing the tougher opponents (although some people like the better competition anyway.)

---
Tags: rating, tournament, uscf
---


# Question
Title: What free programs do exist to comment chess games? For Windows, Linux, and Mac
What free programs do exist to comment chess games? For Windows, Linux, and Mac.

I know that ChessBase and ChessOK Aquarium can do it. However, it is my understanding that they are not free.

# Answer
Check Lucas Chess and Creatica.

Both are free and run locally on your machine.
> 5 votes

# Answer
I have a program called Chess Artist. It is written in python, open source and there is windows executable in case you don't like the python script.

You can access the help by sending the command `help` from command prompt.

```
PS F:\Github\chess-artist> ./chess_artist.exe --help

```

In that example, the chess\_artist.exe is located in `F:\Github\chess-artist`, it is up to you where you put the exe file after you download it.

**Output**

```
Read pgn and analyze games in it or analyze epd file or test engines with epd test suites

optional arguments:
  -h, --help            show this help message and exit
  -i INFILE, --infile INFILE
                        input pgn or EPD filename
  -o OUTFILE, --outfile OUTFILE
                        output filename
  -e ENGINEFILE, --enginefile ENGINEFILE
                        input engine filename
  --enginename ENGINENAME
                        input uci engine id name, if not specified engine id name will be used.
  -n ENGINEOPTIONS, --engineoptions ENGINEOPTIONS
                        input engine options, like threads, hash and others example: --engineoptions "Hash value 128,
                        Threads value 1"
  --bookfile BOOKFILE   input book filename
  --eval {static,search}
                        eval can be static or search. static uses static evaluation of Stockfish
  --movetime MOVETIME   input analysis time per position in ms, (default=1000)
  --depth DEPTH         input analysis depth, (default=0)
  --movestart MOVESTART
                        input move number to start the analysis, this is used when analyzing games, (default=8)
  --moveend MOVEEND     input move number to end the analysis, this is used when analyzing games, (default=1000)
  --puzzle-score-margin PUZZLE_SCORE_MARGIN
                        if deep score less shallow score is this margin or more then save the position as puzzle,
                        (default=15 centipawn). If this is low more positions will be saved.
  --log                 Save log to chess_artist_log.txt
  --job {analyze,test,createpuzzle}
                        type of jobs to execute, can be analyze or test or createpuzzle. To create puzzle: --infile
                        games.pgn --job createpuzzle, To analyze pgn: --infile games.pgn --job analyze, To annotate
                        epd: --infile positions.epd --job analyze, To test engine with epd: --infile test.epd --job
                        test
  --wordycomment        There are more words in the move comments such as better is, planning, excellent is, Cool is
                        and others.
  --color COLOR         enter color of player to analyze, (default=None) can be white or black
  --player PLAYER       enter player name to analyze, (default=None). Player opponent moves are not analyzed. If you
                        use --player do not use --player-and-opp.
  --player-and-opp PLAYER_AND_OPP
                        enter player name to analyze. Player opponent moves are also analyzed, (default=None). If you
                        use --player-and-opp do not use --player.
  --loss                This is used to analyze games where a player lost his/her game. Example to analyze lost games
                        by Mangnus, use: chess_artist.exe --player "Carlsen, Magnus" --loss ... other options. To
                        analyze all games with non-draw results: chess_artist.exe --loss ... other options
  --draw                This is used to analyze games where a player has drawn his/her game. Example to analyze drawn
                        games by Mangnus, use: chess_artist.exe --player "Carlsen, Magnus" --draw ... other options.
                        To analyze all games with draw results: chess_artist.exe --draw ... other options
  --min-score-stop-analysis MIN_SCORE_STOP_ANALYSIS
                        enter a value in pawn unit to stop the engine analysis, (default=-3.0). If the score of the
                        game move is -3.0 or less chess_artist would no longer analyze the position to look for
                        alternative move.
  --max-score-stop-analysis MAX_SCORE_STOP_ANALYSIS
                        enter a value in pawn unit to stop the engine analysis, (default=3.0). If the score of the
                        game move is 3 or more chess_artist would no longer analyze the position to look for
                        alternative move.
  --game960             A flag to enable chess960 of a variant game which will be used for python-chess.

```

**Example**

Let's analyze all the games of caruana where he lost from the current olympiad held in India.

1. Download the latest olympiad games from weekinchess on the link below, be careful if you press it, it will download the file.

https://theweekinchess.com/assets/files/pgn/olym22.pgn

2. Create a command line from the command prompt.

In `--movetime 3000`, the 3000 is in milliseconds in other words, the 3000 is just `3 seconds`.

```
PS F:\Github\chess-artist> ./chess_artist.exe -i "olym22.pgn" -o "analysis_olym22.pgn" -e "stockfish_15_modern.exe" -n "Hash value 128" --eval search --movetime 3000 --movestart 12 --moveend 80 --job analyze --wordycomment --player "Caruana, Fabiano" --loss --min-score-stop-analysis -5 --max-score-stop-analysis 5

```

**Example output**

```
[Event "44th Olympiad 2022"]
[Site "Chennai IND"]
[Date "2022.08.06"]
[Round "8.2"]
[White "Caruana, Fabiano"]
[Black "Gukesh, D"]
[Result "0-1"]
[BlackElo "2684"]
[BlackFideId "46616543"]
[BlackTeam "India 2"]
[BlackTitle "GM"]
[Board "1"]
[ECO "B31"]
[EventDate "2022.07.29"]
[Opening "Sicilian"]
[Variation "Nimzovich-Rossolimo attack (with ...g6, without ...d6)"]
[WhiteElo "2783"]
[WhiteFideId "2020009"]
[WhiteTeam "United States of America"]
[WhiteTitle "GM"]
[Annotator "engine: Stockfish 15, program: Chess Artist v3.2.0"]

{Hash 128mb, Threads 1, analysis 3.0s per position, move score is in pawn unit,
positive is good for white and negative is good for black}
1. e4 c5 2. Nf3 Nc6
3. Bb5 g6 4. O-O Bg7
5. Bxc6 bxc6 6. Re1 Qc7
7. h3 d6 8. e5 dxe5
9. d3 c4 10. Nc3 cxd3
11. cxd3 Nh6 12. Nxe5 {+0.54} Nf5
13. Bf4 {+0.65} Qb7 14. Na4 {+0.67} (14. d4 O-O 15. g4 g5 16. gxf5 {+0.77}) f6
15. Nf3 $5 {+1.01} O-O 16. d4 $2 {+0.70} ({Better is} 16. Nc5 Qxb2 17. Qa4 Qb5 18. Qa3 {+1.36}) g5
17. Bh2 $2 {+0.39} ({Superior is} 17. Nc5 {+1.06}) h5 18. Re4 $2 {+0.38} ({Preferable is} 18. Nc5 {+0.94}) Qd7
19. Qc2 {+0.49} ({More useful is} 19. Qd3 Rf7 20. Rd1 Bf8 21. Qe2 {+0.75}) Rf7 20. Rae1 {+0.51} (20. Rd1 Bf8 21. Qe2 Rg7 22. Nd2 {+0.53}) Bf8
21. Qe2 $1 {+0.39} (21. Rd1 Rg7 22. Nd2 g4 23. hxg4 {+0.37}) Qd5 22. Nc3 {+0.48, with a better king safety} Qd7
23. Qc4 $2 {+0.00} ({Superior is} 23. Rd1 a5 24. Na4 Qa7 25. Nc5 {+0.54}) Qb7 24. b4 $6 {-0.16} ({Worthier is} 24. Na4 Qb5 25. Qc2 Ng7 26. g4 {+0.47}) e6
25. Rb1 $5 {+0.12} Qd7 26. Rbe1 {-0.15} ({More useful is} 26. a4 {+0.32}) Qb7
27. Rb1 {-0.18} Qd7 28. a3 $2 {-0.76} ({Brilliant is} 28. a4 a5 29. bxa5 Ba6 30. Qxe6 {+0.51}) a5
29. Na4 $2 {-0.84} ({More valuable is} 29. bxa5 Rxa5 30. a4 Ba6 31. Qxe6 {-0.64}) Qd8 30. bxa5 $5 {-0.75} Rxa5
31. Nc5 $4 {-2.15} ({Brilliant is} 31. Qc2 {-0.47}) Qd5 32. Qe2 {-2.11} Rxa3
33. Rd1 {-3.08} ({More valuable is} 33. Qe1 {-2.42}) Rfa7 34. g4 {-5.15} hxg4
35. hxg4 {-4.58} Nh6 36. Bg3 {-5.13} e5
37. Nxe5 {-5.77} fxe5 38. Rxe5 {-5.81} Bxg4
39. Qd2 {-6.72} Qf3 40. Rxg5+ {-8.37} Rg7
41. Re1 {-10.42} Bh3 42. Bd6 {-14.62} Bxd6
43. Rxg7+ {-17.75} Kxg7 44. Qg5+ {-319.77} Kh7
45. Ne4 {-319.89} Qxe4 {WhiteBlunder=1, WhiteBad=6} 0-1

```

It can comment on `king safety`, `piece mobility` and `passed pawn` evaluation with the use of `eval` command from stockfish, depending on the position. It also has threat comments, like `intending to play ...` and `followed by ...`

At the end it will comment on the number of blunder (??) and mistake (?) each player has made.

Example screenshot from HCE gui after loading the analyzed games.

The comments `preferable is`, `more valuable is` are due to the flag `--wordycomment` in the command line.

You may save the command line to a `batch` file to easily rerun the program.

`ana.bat`

```
./chess_artist.exe -i "olym22.pgn" -o "analysis_olym22.pgn" -e "stockfish_15_modern.exe" -n "Hash value 128" --eval search --movetime 3000 --movestart 12 --moveend 80 --job analyze --wordycomment --player "Caruana, Fabiano" --loss --min-score-stop-analysis -5 --max-score-stop-analysis 5

```

If you have other features to include in this command line tool, you may post it in github, I might implement it.

**Notes**

1. Do not use `--depth n` option, just use `--movetime m`.
2. If you re-run the analysis command and maintain the same output file specified from `-o` option, games that are already analyzed will not be analyzed again.
3. This program does not support analyzing games in parallel. But if you want to do so, just split your input games. For example you have 4-cores and want to use 2 cores, split your input pgn file into 2 and run each pgn file in chess\_artist. Be sure they have different output filenames specified from the `-o` option.
4. To download all files in the chess-artist repo in github, open your powershell on windows 10 and send the command below.

```
git clone https://github.com/fsmosca/chess-artist.git

```

Example:

```
PS F:\Tmp> git clone https://github.com/fsmosca/chess-artist.git
Cloning into 'chess-artist'...
remote: Enumerating objects: 1135, done.
remote: Counting objects: 100% (153/153), done.
remote: Compressing objects: 100% (77/77), done.
remote: Total 1135 (delta 84), reused 134 (delta 67), pack-reused 982
Receiving objects: 100% (1135/1135), 45.46 MiB | 2.42 MiB/s, done.
Resolving deltas: 100% (594/594), done.
PS F:\Tmp> cd chess-artist
PS F:\Tmp\chess-artist> ls

    Directory: F:\Tmp\chess-artist

Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
d-----        2022-08-08     12:01                Book
d-----        2022-08-08     12:01                Engine
d-----        2022-08-08     12:01                EPD
d-----        2022-08-08     12:01                PGN
-a----        2022-08-08     12:01            435 .gitignore
-a----        2022-08-08     12:01            441 analyze_atomic_game.bat
-a----        2022-08-08     12:01            339 analyze_chess_game.bat
-a----        2022-08-08     12:01         125661 chess_artist.py
-a----        2022-08-08     12:01           1495 create_puzzle.bat
-a----        2022-08-08     12:01          35815 LICENSE
-a----        2022-08-08     12:01           8686 README.md
-a----        2022-08-08     12:01             35 requirements.txt

```

There is no exe file here, get it at release page.
> 6 votes

# Answer
I recommend Scid. Even some forks of scid such as ChessDB are popular. If your intention is to comment games, work with chess databases, and so on (rather than engine evaluation, play aginst engines, etc.), you can still use scid or use one of its alternatives such as chessDB, chessX or scidb .
> 4 votes

---
Tags: engines, analysis
---


# Question
Title: Why is en passant only possible on the first opportunity?
Quoting FIDE rulebook:

> This capture is **only legal on the move following this advance** and is called an ‘en passant’ capture.

Quoting Wikipedia:

> The *en passant* capture must be made **at the very next turn** or the right to do so is lost.

**Why?**

---

I know the basic story of *en passant* and I'll just paraphrase it here: A rule was added to let pawns move two squares forward on its first move. Someone said something like, what if a pawn uses this to escape from an enemy adjacent pawn? Then the basic pawn skeleton/framework would be changed! So we must have an *en passant* to preserve the same chess framework.

Okay that part makes sense, but why does it have to be **on the very next move?** Was that part of the rule only added later? Why was it added at all? When two pawns are diagonally adjacent confronting each other, they don't have to capture immediately or else forefeit the ability to capture. So the concept of the "ghost pawn", if you don't capture it immediately, and the other player doesn't move it, seems to me like it should still be there and available for capture as long as it's there.

**Does anyone know why this part of *en passant* was created?**

---

**Optional Background:** In case you're curious, I come from a programming background. Of all the special moves, *en passant* is (was, see below) the hardest to program. Not only is it the only move where the capturing piece moves to a blank square, but it's the only move that "disappears" if you don't take it. That means it's a move where **the total board position is not enough information** to generate all moves. (That's true for castling too, which already has its fair share of tricky rules.) Two enemy pawns could be adjacent on the 4th or 5th rank, surrounded by blank squares, but you still don't know if *en passant* is possible. You have to check the previous move.

Or so I thought. Now that I'm revisiting this, I figured out a clever way to implement *en passant* without checking the move log. Don't generate it at turn start. Generate it at move\_take, specifically at the end of a 2-step pawn move. But store it in a special move array since the normal one gets cleared at every inc\_turn. Then migrate and clear appropriately at gen\_all\_moves. That way, if ep is not taken, it doesn't generate itself on the next move because you didn't move that same pawn two steps on the next move. Just remember to check both sides of the pawn and create **two** ep moves if two enemy pawns are there.

Castling was implemented with the help of a "moved" boolean in every piece, which is also useful for a pawn's first move of course. Even if the King and Rook are in the right spot, you use that to see if the King/Rook has moved before. No need to check the move log. But I will say that Castling is now the hardest move to implement because you gotta check if the path is under attack. En passant is no longer the hardest now that I thought of the clever way.

# Answer
> 9 votes
The OP asked me to provide sources supporting the claim that the double step was originally a *double move*. I'll do my best.

The immediate predecessor of modern chess, the game Shatranj, did have pawns (*sarbaz*), but no double step. The pieces in Shartanj had relatively weak powers, and gameplay, especially in the opening, was generally slow.

In medieval times they addressed this problem by starting the game from certain tabiyas, battle arrays where the opposing forces were already in contact.

A more recent western invention to speed up the play was to allow double-initial moves of pawns. From A Short History of Chess by Henry A. Davidson, Chapter 7:

> *The Initial Double Move*. Not until about 1550 did the pawn uniformly enjoy the power of moving two squares for his first move. The reason for the final adoption of the rule was simply that openings became conventionalized. White moved P to K3 \[`e3`\]; Black did likewise. Then each pushed the pawn up a square. Since this was the usual opening, the modern practice of allowing both moves at once, thus speeding up the game, was introduced. As a matter of fact, this pawn privilege was the last, not the first, of a series of special consecutive-move privileges.

Davidson then very briefly discusses consecutive-move rules in earlier versions of chess.

There was also at some point an option to move two different pawns simultaneously one step each. Quote from the same book:

> During the seventeenth century a convention was in effect permitting a player to open a game by moving both rooks' pawns simultaneously one square each. \[...\] Perhaps the idea was that moving two pawns each one square was the equivalent of moving one pawn two squares.

I think this historical context provides some rationale for why the en passant rule was introduced. If the double step is actually a double move, then it's quite logical that the opponent should be given a chance (on the next move) to capture the pawn after the first step. (See also Brian Towers' answer.)

# Answer
> 9 votes
A pawn which 'exposes' itself to en passant will be distinct from one that doesn't. Say, for a black pawn on a4 and a white pawn on b4: giving black the option of playing ...axb3 at any time after b2-b4 means that the moves b2-b4 and b3-b4, which seemingly lead to the same position, have long-term implications as it depends too much on the past. In particular, when the pawn stands on b2, white would need to weigh the pros and cons of moving his pawn to b4 in one or two moves (where the con is giving black a long-lasting right to take on b3).

Or, in the spirit of the motivation of en passant that you correctly described, permanently stopping a two-square pawn from 'escaping' would greatly neglect (or complicate) the benefit of being able to move two squares forward.

Another practical reason because it's just much simpler for humans: with more than one pawn on the board, it would be complicated to keep track of en passant rights on all of them. (Someone once suggested that pieces be able to capture en passant at some FIDE meeting; needless to say, it was laughed out of the room --- that said, I can't recall the source of this story.)

One may ask a similar (opposite?) question about castling rights; the 'simpler' option may arguably be to always allow castling as long as the pieces are back on their original squares, but that too has strong implications, one of which is a reduced importance of development.

Generally, the special moves in chess have restrictions associated with them to ensure that they don't change the way the game 'looks' after the time these special moves are made (playing ...axb3 to take a white pawn on b4 looks completely unlike the old game, so it's only allowed for one move). After all, the rules were designed by humans, arguably arbitrarily.

# Answer
> 4 votes
The reason is very simple. If white has a pawn on d5 preventing a black pawn on e7 from moving then the move e7-e5 circumvents that. To keep things fair when the double pawn first move was introduced then the en passant rule was also introduced so that white wouldn't lose the possibility to capture. However going back to the pre-double move era if black plays e7-e6 and white doesn't capture immediately then black can play e6-e5 on the next move and white has lost his chance forever. That is reflected in the restriction of en passant to the move immediately following the double pawn move.

# Answer
> 3 votes
Interesting question, though I am not sure there is a good answer which could be backed by sources. I can think of the following motivations:

1. If you imagine your pawns to be real "armies", then if one army is passing you at high speed (double step), you need to act immediately (if you wish to do so) and cannot wait before the other army is far away.
2. Practicality. Keeping track of all possible en passant captures could become tricky. What if one or both of the pawns involved get replaced by another pawn of the same color...
3. In chess, if a piece attacks a piece of the same type, the other piece at the same time attacks the first piece. With indefinite en passant you would create an asymmetry where one pawn could capture another pawn but not vice versa.
4. Indefinite en passant would be too big a change to the game as it was known before the introduction of en passant.
5. (see Ken Wei's answer): With a black pawn on a4 and a white pawn on b2. You need to compare the option of playing b2-b3-b4 in two moves (which would lose you a tempo) with the double step (which would put you in danger of indefinite capture).

# Answer
> 2 votes
Regarding the en passant rule requiring the capture being made immediately or not at all is due to a situation where if an opposing piece on the next move moved onto the vacant square where the en passant would occur, then TWO captures could be made at ONCE with one being done by en passant and the other being a normal pawn capture.

# Answer
> 1 votes
Your programming description relies on variable name specific to your program, so it's hard to understand what you're saying, but one way to program this is to to have a "double pawn move" boolean. To makes things simpler, let's assume that white is the one making a double pawn move. To move a pawn two space, white first moves the pawn *one* space, and set that pawn's "double move" boolean to true. If any of the opponent's pawns have a true "double pawn move" booleans, then they have only two options: take or pass. So now black has only two legal move (three if two pawns are adjacent). Black can either capture the pawn, or pass. If black passes, then it's now white's turn. But if a player starts their turn with a "double pawn move" boolean being true for any of their own pawns, they aren't allowed to make any move other than advancing that pawn, and then the boolean is set to false. If black captures the pawn, then the boolean is set to false, and it's now white's turn.

In other words, you can think of *en passant* not being that white makes one move consisting of the pawn moving two spaces, and then black has the *en passant* option only on the next move, but rather that white makes a move consisting of the pawn moving one space, black makes a move consisting of either capturing that pawn or passing, and then, if the pawn is still on the board, white makes a move of advancing the pawn again. The *en passant* option exists only for the intermediate move (the one in which black either captures or passes) because that's the only move where the pawn is in the right location to be captured.

However, there is a corner case presented here: https://www.futilitycloset.com/2010/06/09/intercepted/ . As *en passant* is currently implemented, it's legal to make a double move if you kings is not in check after the second advancement, even if you king is in check after the pawn is advanced only one space. So your code would have to take that into account.

---
Tags: history, en-passant
---


# Question
Title: How to search for chess players by favourite opening
Is there a convenient way to search for players by their opening? For example if I input 'Ruy Lopez' then it gives me a list of chess players, sorted by how many times they played Ruy Lopez in tournament.

I know that chess.com and 365chess has this feature, but they only provide 3 to 5 players per opening.

# Answer
> 5 votes
I had created a python package called pgnhelper with documentation which can be used to see what you would like to find.

Do not use a big pgn file as it will take more time. This is more useful for examining stats of a tournament. 5 or so tournament pgn files can be combined. Player names should be consistent.

### Typical setup for windows 10

1. Intall python 3.7 or later from https://www.python.org/downloads/
2. Install pgnhelper from command line.

```
pip install pgnhelper -U

```
3. Save the code below to ruylopez.py.

3.1 Download candidates games from https://theweekinchess.com/assets/files/pgn/wchcand22.pgn

3.2. Place the pgn file and ruylopez.py in the same directory.

4. Execute ruylopez.py from command line like an example below.

```
PS F:\pgnhelpter_test> python ruylopez.py

```

The ruylopez.py and wchcand22.pgn are in F:\pgnhelpter\_test path where `pgnhelpter_test` is the folder or directory name.

### Code

`ruylopez.py`

```
"""Show player names and number of games on the given opening name.

requirements:
  pip install pgnhelper -U
"""

import pgnhelper
import pandas as pd

# opening_name = 'Nimzo-Indian'
opening_name = 'Ruy Lopez'

pgnfn = 'wchcand22.pgn'
# https://theweekinchess.com/assets/files/pgn/wchcand22.pgn

df, players, israting = pgnhelper.record.get_pgn_data(pgnfn)

# print(df)
# df.to_csv("sample.csv", index=False)

openings = df.Opening.unique()
for o in openings:
    print(o)

data = {}
for p in players:
    data1 = {}
    for o in openings:
        dfw = df.loc[(df.Opening == o) & (df.White == p)]
        dfb = df.loc[(df.Opening == o) & (df.Black == p)]
        wcnt = len(dfw)
        bcnt = len(dfb)
        total = wcnt + bcnt
        data1.update({o: {'w': wcnt, 'b': bcnt, 'total': total}})

    data.update({p: {'data': data1}})

mydata = []
for p in players:
    mydata.append([opening_name, p,
                   data[p]['data'][opening_name]['w'],
                   data[p]['data'][opening_name]['b'],
                   data[p]['data'][opening_name]['total']])

mydf = pd.DataFrame(
    mydata,
    columns=['Opening', 'Player', 'Wgames', 'Bgames', 'Total'])

mydf = mydf.sort_values(by=['Total', 'Wgames'], ascending=[False, False])
print(mydf)

mydf.to_csv("ruylopez.csv", index=False)  # Save to csv file

```

### Output

```
Sicilian defence
English opening
Ruy Lopez
QGD
Sicilian, Chekhover variation
Giuoco Pianissimo
Gruenfeld
Sicilian
Catalan
Nimzo-Indian
Catalan opening
Petrov
Reti
Four knights game
Four knights
English
Giuoco Piano
QGD semi-Slav
     Opening               Player  Wgames  Bgames  Total
2  Ruy Lopez     Nakamura, Hikaru       2       4      6
7  Ruy Lopez     Rapport, Richard       4       1      5
0  Ruy Lopez     Caruana, Fabiano       3       2      5
1  Ruy Lopez    Radjabov, Teimour       1       3      4
3  Ruy Lopez    Firouzja, Alireza       1       1      2
6  Ruy Lopez          Ding, Liren       0       2      2
4  Ruy Lopez  Nepomniachtchi, Ian       1       0      1
5  Ruy Lopez  Duda, Jan-Krzysztof       1       0      1

```

The code can be revised to show a column of score percentage. Can also be revised to show by ECO code.

Opening names in the game are printed in console due to:

```
openings = df.Opening.unique()
for o in openings:
    print(o)

```

Results are printed in console due to:

```
print(mydf)

```

csv file will be saved due to:

`mydf.to_csv("ruylopez.csv", index=False) # Save to csv file`

You can change the opening name in the code by changing below code:

```
opening_name = 'Ruy Lopez'

```

You can use different pgn file but be sure the game has Opening tag like below.

```
[Event "FIDE Candidates 2022"]
[Site "Madrid ESP"]
[Date "2022.06.17"]
[Round "1.3"]
[White "Caruana, Fabiano"]
[Black "Nakamura, Hikaru"]
[Result "1-0"]
[WhiteTitle "GM"]
[BlackTitle "GM"]
[WhiteElo "2783"]
[BlackElo "2760"]
[ECO "C65"]
[Opening "Ruy Lopez"]
[Variation "Berlin defence"]
[WhiteFideId "2020009"]
[BlackFideId "2016192"]
[EventDate "2022.06.17"]

1. e4 e5 2. Nf3 Nc6 ...

```

There must be `Opening` tag.

```
[Opening "Ruy Lopez"]

```

### Add eco

If the game in your pgn file has no Opening tag, you can use pgnhelper to add a tag.

Example from command line:

```
pgnhelper addeco --inpgnfn candidates_zurich_1953.pgn --outpgnfn eco_candidates_zurich_1953.pgn --inecopgnfn eco.pgn

```

See also the guide at https://pgnhelper.readthedocs.io/en/latest/usage.html.

The file `eco.pgn` is needed, you can download it from github.

For example you can download pgn files from weekinchess, or from pgnmentor.

# Answer
> 3 votes
I'm not sure any of these solutions below provide exactly what you're looking for, but I think enough functionality is there to assist you in your goal. Though the second option is very similar to the Chess365 functionality you reference.

**Option 1: ChessGames.com General Search**
ChessGames.com allows searches by ECO code or opening. For example, here are the results for games in the Scotch (ECOs C45–45) restricted to the year 2021. You can further restrict games by result (White wins, Black wins, draw, or "no draw"). You can parse the results easily enough.

**Option 2: ChessGames.com Opening Explorer**
ChessGames.com also has an opening explorer that will list around 6 practitioners of that opening ECO code (3 with the White pieces, and 3 with Black). For example, searching ECO code 65 (Berlin Defense is 65–67) gives the following.

**Option 3: ChessTempo.com Opening Explorer**
ChessTempo.com has an opening explorer with some added filters including specifying a rating range. Again, you'd have to parse the results, but it seems relevant.

For example, I asked for all games with position after **1. e4 c5 2. Nc3 Nc6 3. f4** (Grand Prix Attack) with both players rated 2700+. It returns the following.

# Answer
> 1 votes
You could use `pgn-extract -e3 pgn-file-name` to split the pgn file by ECO codes of games, e.g., you will get files C60.pgn to C99.pgn for Ruy Lopez. You can then combine C60.pgn to C99.pgn to get a single Ruy Lopez file. You may also be able to export from scid vs pc games in a range of ECO codes. You can then simply browse the file in scid vs pc. Or extract games of a specific player (again using pgn-extract) and you will see how many games are extracted. Otherwise, you can use a "simple" bash (e.g., grep/sort/wc commands)/awk/sed/perl/python script to get player frequencies in a pgn file. (Sorry, I cannot write such a script quickly, but similar scripts may be available already.)

If you are more interested in a specific player, then extract first by player name and then get the statistics of their openings. (By the way, pgn-extract can add opening codes in a pgn file of they don't already exist.)

Or in scid vs pc filter games containing a given position, say, the position after 1. e4 e5 2. Nf3 Nc6 3. Bb5, and browse the filtered list.

---
Tags: opening, database
---


# Question
Title: How are categories A, B, C, D, and E decided in the Chess Olympiad?
I have seen that there is a separate category prize in the Chess Olympiad.
How are categories A, B, C, D, and E are decided? Is it the average rating of the team?

For example in the 2022 Olympiad I can see that each category has only 10 teams. Countries like South Africa are not visible in that list. Is there a full list available for all the countries in each category?

I couldn't find it on the starting rank page either.

# Answer
> 3 votes
> How are categories A, B, C, D, and E are decided? Is it the average rating of the team?

Yes. According to FIDE:

> 4.6.2.2. Before Round 3, in each section, the teams are divided by TAP (see Article 4.17) into five rating categories, on the basis of their position in the initial overall ranking list; as far as possible, the categories shall contain equal numbers of teams.

> For example in the 2022 Olympiad I can see that each category has only 10 teams.

Each category has 37-38 teams. The webpage you linked only shows the top 10, though.

> Is there a full list available for all the countries in each category?

There's a link to download a spreadsheet on the webpage in your first link, which contains all the countries separated by category (but that spreadsheet does not contain results.) Also, you can see the teams sorted by average rating on the official FIDE page here. The categories aren't directly listed there, but they start at the following teams on that page: United States, Egypt, Morocco, Botswana, Gambia.

For overall results, you could look at the official page for standings of all teams - although these are not sorted by category, it will at least show South Africa on the list.

---
Tags: fide, tournament, tournament-directors, chess-olympiad
---


# Question
Title: Why does India get three teams for Open and Women's sections in the 2022 Chess Olympiad?
The 2022 Chess Olympiad is hosted in Chennai, India. Why does India get to field three teams while most nations get the usual one team per Open and Women's sections?

# Answer
> 38 votes
Normally the host nation is entitled to a second team. Following the absence of Russia and Belarus due to FIDE ban, China due to pandemic lockdowns, and last-minute Pakistan pullout due to political conflict with India, the number of teams was odd, so FIDE rules allow another team to India.

According to FIDE regulations:

> Odd Number of Participating Teams
>
> 2.1 The organising federation shall be entitled to enter a second team ("B" team). If there is an odd number of participating teams the organising federation has the right to enter a third team ("C" team).

https://handbook.fide.com/chapter/OlympiadPairingRules2022

I have not found the FIDE Council rationale for this, but I guess this is an extra reward to the host nation (who has to fund the event), and is more exciting than a bye. (If you know, please post as an answer)

---
Tags: rules, team, chess-olympiad
---


# Question
Title: Is this endgame winnable for either side?
I'm a complete novice in chess and I don't know if this even qualifies as endgame with so many pieces left, but I ended up in this position playing as black vs. a king's pawn debut. I sort of tried to play king's gambit of my own, despite playing black. As you can see, I won on timer, but is this position winnable to either side, or it a stalemate / draw? Assuming both sides play perfectly, of course - which they did not up to this point, but my question is theoretical.

```
[Title "White to move: Is it draw?"]
[FEN "2k3r1/1p3p2/2p5/p2r3p/8/P2P3P/1P2RK1P/6R1 w - - 0 1"]
[Startflipped "1"]

```

The only advantage for black that I can see is the pawns being advanced one more line, my goal would be to sneak one pawn up to the 1 line, but it's hard to see for me whether that's doable.

# Answer
> 11 votes
With white to move, as you indicated, it is a trivial win for white. Your rook on g8 is en prise to the white rook on g1. White plays RxR+ and you are just a rook down.

---
Tags: analysis, endgame, winning
---


# Question
Title: Why does the computer recommend to move the rook?
I don’t understand why the computer is suggesting I move the rook to e1 in this scenario.

# Answer
> 5 votes
The engine thinks that White will soon play exf5. If this happens, a rook on e1 will then be attacking the pawn on e5. (The other rook is needed on f1 because it thinks Black will get a knight on d4, which attacks f3. So it has to be the a-rook that moves to e1.)

This is the line it shows me:

```
[FEN "2kr3r/Qpp5/4n1pn/4pp1p/1q2P2P/2NP1PPB/PP6/R4RK1 w - - 0 1"]

1. Rae1 Qd4+ 2. Qxd4 Nxd4 3. exf5 Ndxf5 4. Rxe5

```

# Answer
> 2 votes
This is an about equal position material-wise. The rook on the a file is undeveloped unless you can get rid of the pawn in front of it (which Black should not take) to support the queen, or push it far enough up the board to support an attack.

Otherwise it looks like to me a developing move to get another piece active to prepare a center battle since White doesn't have a queenside attack. This does give away a pawn but after Qa5 everything is defended and the Black queen can try to stick around on d2 but the Stockfish still argues having queens on the board is +4.0 for White.

```
[Variant "From Position"]
[FEN "2kr3r/Qpp5/4n1pn/4pp1p/1q2P2P/2NP1PPB/PP6/R4RK1 w - - 0 1"]

1. Rae1 Qxb2 2. Qa5 Qb6+ (2... Qd2 3. Re2 Qxd3 4. exf5 Nxf5 5. Rxe5) 3. Qxb6 cxb6 4. exf5 Nxf5 5. Bxf5 gxf5 6. Rxe5

```

---
Tags: middlegame
---


title: Which top engine is strong on what?

text:
# Question
Title: Which top engine is strong on what?
We select an engine to use, and stick with it. But I heard that all engines have different characteristics, and can be better or worse comparing to each other, in different positions. For example: The champion engine can be beaten by another engine in some specific position.

So my question is, which engine to use in which positions?

# Answer
> 3 votes
According to Hartmann's findings in an article in ChessBase:

> Houdini is a tactical juggernaut. It tends to do best on the various tactical test sets that some engine experts have put together, and it is fairly quick to see those tactics, making it useful for a quick analysis of most positions. Its numerical evaluations also differ from other engines in that they are calibrated to specific predicted outcomes:
>
> A +1.00 pawn advantage gives a 80% chance of winning the game against an equal opponent at blitz time control. At +2.00 the engine will win 95% of the time, and at +3.00 about 99% of the time. If the advantage is +0.50, expect to win nearly 50% of the time. (from the Houdini website)

Larry Kaufman, who works on Komodo, said in an interview on the Quality Chess blog that:

> Komodo is best at evaluating middlegame positions accurately once the tactics are resolved. Stockfish seems to be best in the endgame and in seeing very deep tactics. Houdini is the best at blitz and at seeing tactics quickly. Rybka is just obsolete; I like to think of Komodo as its spiritual desceendant, since I worked on the evaluation for both, although the rest of the engines are not similar. Komodo’s assessment of positions is its strong point relative to the other top two, which overvalue the queen. Komodo has the best sense for relative piece values I think. Komodo is also best at playing the opening when out of book very early.

In the article, they conduct some tests using very complex positions, to see if engines can find the solution.

# Answer
> 0 votes
This is just my opinion and I can't really support it scientifically, but from the games played at the last TCEC I had the feeling Komodo plays really great in KID and similiar structure positions. I think it was mainly outplaying Stockfish in this type of positions. It feels very well the positions for knights.

Stockfish is not really great positionally in my opinion, but it is the one calculating the deepest, so it's great at finding Zugzwang positions, and breaking fortresses.

Gull is very strong at simple, almost endgame positions, and drawing little worse endgames.

Actually I always felt houdini is the strongest positionally, it just can't calculate so deep like the other ones, but it's just personal opinion. It is the best to evaluate positional pawn and exchange sacrifices.

# Answer
> 0 votes
Anecdotally, Leela plays more "humanlike" than more calculating engines like Stockfish (maybe before Stockfish got its own neural nets). What is "humanlike" at 3500+ ELO I'm not sure, but maybe more active piece style versus slow and positional. I recall hearing Caruana trained opening novelties from Leela because they seemed more creative and realistic for a human to play. Reported here, r/chess discussion

Lots of discussion: https://www.reddit.com/r/chess/comments/a7stpp/do\_nn\_engines\_like\_alpha\_zero\_and\_leela\_really/

From watching Matthew Sadler's Silicon Road Channel, I got the impression that Stockfish is a legendary defender. It can somehow hold disadvantageous positions other engines would gradually crumble under. If you asked Sadler directly he'd probably give an excellent answer as he spends a lot of time analyzing engine games.

---
Tags: engines
---


# Question
Title: My Transposition Tables implementation slows down Alpha Beta Pruning
I have this implementation of alpha beta pruning I made a couple days ago. I've been trying to look into transposition tables.

When I tried this implementation it was slower than the original code. I even tried Zobrist hashing.

Why is my transposition table implementation slowing down Alpha Beta Pruning?

Here is the code.

```
pawntable = [
    0, 0, 0, 0, 0, 0, 0, 0,
    5, 10, 10, -20, -20, 10, 10, 5,
    5, -5, -10, 0, 0, -10, -5, 5,
    0, 0, 0, 20, 20, 0, 0, 0,
    5, 5, 10, 25, 25, 10, 5, 5,
    10, 10, 20, 30, 30, 20, 10, 10,
    50, 50, 50, 50, 50, 50, 50, 50,
    0, 0, 0, 0, 0, 0, 0, 0]

knightstable = [
    -50, -40, -30, -30, -30, -30, -40, -50,
    -40, -20, 0, 5, 5, 0, -20, -40,
    -30, 5, 10, 15, 15, 10, 5, -30,
    -30, 0, 15, 20, 20, 15, 0, -30,
    -30, 5, 15, 20, 20, 15, 5, -30,
    -30, 0, 10, 15, 15, 10, 0, -30,
    -40, -20, 0, 0, 0, 0, -20, -40,
    -50, -40, -30, -30, -30, -30, -40, -50]

bishopstable = [
    -20, -10, -10, -10, -10, -10, -10, -20,
    -10, 5, 0, 0, 0, 0, 5, -10,
    -10, 10, 10, 10, 10, 10, 10, -10,
    -10, 0, 10, 10, 10, 10, 0, -10,
    -10, 5, 5, 10, 10, 5, 5, -10,
    -10, 0, 5, 10, 10, 5, 0, -10,
    -10, 0, 0, 0, 0, 0, 0, -10,
    -20, -10, -10, -10, -10, -10, -10, -20]

rookstable = [
    0, 0, 0, 5, 5, 0, 0, 0,
    -5, 0, 0, 0, 0, 0, 0, -5,
    -5, 0, 0, 0, 0, 0, 0, -5,
    -5, 0, 0, 0, 0, 0, 0, -5,
    -5, 0, 0, 0, 0, 0, 0, -5,
    -5, 0, 0, 0, 0, 0, 0, -5,
    5, 10, 10, 10, 10, 10, 10, 5,
    0, 0, 0, 0, 0, 0, 0, 0]

queenstable = [
    -20, -10, -10, -5, -5, -10, -10, -20,
    -10, 0, 0, 0, 0, 0, 0, -10,
    -10, 5, 5, 5, 5, 5, 0, -10,
    0, 0, 5, 5, 5, 5, 0, -5,
    -5, 0, 5, 5, 5, 5, 0, -5,
    -10, 0, 5, 5, 5, 5, 0, -10,
    -10, 0, 0, 0, 0, 0, 0, -10,
    -20, -10, -10, -5, -5, -10, -10, -20]

kingstable = [
    20, 30, 10, 0, 0, 10, 30, 20,
    20, 20, 0, 0, 0, 0, 20, 20,
    -10, -20, -20, -20, -20, -20, -20, -10,
    -20, -30, -30, -40, -40, -30, -30, -20,
    -30, -40, -40, -50, -50, -40, -40, -30,
    -30, -40, -40, -50, -50, -40, -40, -30,
    20,20,0,0,0,0,20,20,
    20,30,10,0,0,10,30,20]

def evaluate_board(bd):
    if bd.is_checkmate():
        if bd.turn:
            return -9999
        else:
            return 9999
    if bd.is_stalemate():
        return 0
    if bd.is_insufficient_material():
        return 0

    wp = len(bd.pieces(chess.PAWN, chess.WHITE))
    bp = len(bd.pieces(chess.PAWN, chess.BLACK))
    wn = len(bd.pieces(chess.KNIGHT, chess.WHITE))
    bn = len(bd.pieces(chess.KNIGHT, chess.BLACK))
    wb = len(bd.pieces(chess.BISHOP, chess.WHITE))
    bb = len(bd.pieces(chess.BISHOP, chess.BLACK))
    wr = len(bd.pieces(chess.ROOK, chess.WHITE))
    br = len(bd.pieces(chess.ROOK, chess.BLACK))
    wq = len(bd.pieces(chess.QUEEN, chess.WHITE))
    bq = len(bd.pieces(chess.QUEEN, chess.BLACK))

    material = 100 * (wp - bp) + 320 * (wn - bn) + 330 * (wb - bb) + 500 * (wr - br) + 900 * (wq - bq)

    pawnsq = sum([pawntable[i] for i in bd.pieces(chess.PAWN, chess.WHITE)])
    pawnsq = pawnsq + sum([-pawntable[chess.square_mirror(i)]
                           for i in bd.pieces(chess.PAWN, chess.BLACK)])
    knightsq = sum([knightstable[i] for i in bd.pieces(chess.KNIGHT, chess.WHITE)])
    knightsq = knightsq + sum([-knightstable[chess.square_mirror(i)]
                               for i in bd.pieces(chess.KNIGHT, chess.BLACK)])
    bishopsq = sum([bishopstable[i] for i in bd.pieces(chess.BISHOP, chess.WHITE)])
    bishopsq = bishopsq + sum([-bishopstable[chess.square_mirror(i)]
                               for i in bd.pieces(chess.BISHOP, chess.BLACK)])
    rooksq = sum([rookstable[i] for i in bd.pieces(chess.ROOK, chess.WHITE)])
    rooksq = rooksq + sum([-rookstable[chess.square_mirror(i)]
                           for i in bd.pieces(chess.ROOK, chess.BLACK)])
    queensq = sum([queenstable[i] for i in bd.pieces(chess.QUEEN, chess.WHITE)])
    queensq = queensq + sum([-queenstable[chess.square_mirror(i)]
                             for i in bd.pieces(chess.QUEEN, chess.BLACK)])
    kingsq = sum([kingstable[i] for i in bd.pieces(chess.KING, chess.WHITE)])
    kingsq = kingsq + sum([-kingstable[chess.square_mirror(i)]
                           for i in bd.pieces(chess.KING, chess.BLACK)])

    eval = material + pawnsq + knightsq + bishopsq + rooksq + queensq + kingsq
    if bd.turn:
        return eval
    else:
        return -eval
boards = {}
def alphabeta(alpha, beta, depthleft, bd):
    global boards
    bestscore = -9999
    if depthleft == 0:
        return quiesce(alpha, beta, bd)
    for move in bd.legal_moves:
        bd.push(move)
        # implementation of transposition tables
        if depthleft == 1:
            try:
                boards[chess.polyglot.zobrist_hash(bd)]
                bd.pop()
                continue
            except:

                boards[chess.polyglot.zobrist_hash(bd)] = 0
        # done

        score = -alphabeta(-beta, -alpha, depthleft - 1, bd)
        bd.pop()
        if (score >= beta):
            return score
        bestscore = max(bestscore,score)
        alpha = max(alpha,score)
    return bestscore

def quiesce(alpha, beta, bd):
    stand_pat = evaluate_board(bd)
    if stand_pat >= beta:
        return beta
    alpha = max(alpha,stand_pat)

    for move in bd.legal_moves:
        if bd.is_capture(move):
            bd.push(move)
            score = -quiesce(-beta, -alpha, bd)
            bd.pop()

            if (score >= beta):
                return beta
            if (score > alpha):
                alpha = score
    return alpha

def selectmove(depth, bd):

    bestMove = chess.Move.null()
    bestValue = -99999
    alpha = -100000
    beta = 100000

    for move in bd.legal_moves:
        bd.push(move)
        boardValue = -alphabeta(-beta, -alpha, depth - 1, board)
        if boardValue > bestValue:
            bestValue = boardValue
            bestMove = move
        alpha = max(boardValue,alpha)
        bd.pop()
    return bestMove

```

# Answer
Your current implementation just stores on which positions quiesce search was ran. If it was run before, then it skips the position.

But you don't want to skip searching all positions you searched previously. You need to store the result of each (quiesce) search into the transposition table, and then use those values as the position score, so running the search again isn't necesarry.
> 6 votes

---
Tags: python, transpositions, minimax
---