title: Absolute strength and stability of Elo

text:
# Question
Title: Absolute strength and stability of Elo
Not sure how to phrase this...

I am aware that Elo measures the relative strength of players.

Let's assume for this question that there is such thing as an absolute strength in chess and that players stay at their level without improving or getting worse over time.

If there are only two people in the pool playing many games against each other their Elo ratings will settle on some value and these values are a measure of their absolute strength.

Now, if there are more than two players, I was wondering, whether under the assumptions above (absolute strength exists, no change over time), the Elo ratings would also settle on constant values or would keep on changing constantly?

For the answer, I would like to exclude chess arguments like: player A cannot deal with player B's aggressive style and scores worse than against other players of the same rating (but who play more calmly).

---

Basically I am wondering whether there is some kind of analogue to frustration (physics term) in the Elo system, namely that, if you have \>2 players in a pool they would not happily settle on a rating.

To put it concretely, I am wondering whether the system of players ends up in a steady state of constant player ratings such that if at that point in time any two players play against each other a million games, their outcome reflects exactly their rating difference.

It is assumed that players are of comparable strength so that they have a non-zero probability to draw (or win).

# Answer
No. In the general case, the ELO ratings of three people will not converge to some stable equilibrium, and here's why.

Suppose you have two players, A and B. B on average scores 66% vs A, so if they played enough games, B's ELO rating would converge to about 100 more than A's.

Now suppose we introduce player C, who scores 66% vs B on average, but never plays against player A. If C and B play many games, their ELO difference will stabilize to about 100 as well. If B kept playing games with A during this time, A would converge to about 100 less than B, with C about 100 more than B.

So, what happens when A finally starts playing C? For there to be stability in the ratings, we MUST have C score 76% vs A, because C is 200 ELO points higher than A. If A scores better than that, A would gain points when playing C, causing the gap between A and B to decrease. But then A would lose the points A gained if they started another long series with B. In this case, the three ELO ratings are not only a function of how well they play against eachother, but also how often they play each opponent - clearly not an absolute rating in any sense.

So this begs the question, if B beats A 66% of the time, and C beats B 66% of the time, should we automatically assume that C beats A 76% of the time, as the ELO functions imply? That doesn't sound too crazy, but for the 3 body ELO problem to be stable, this implied score would have to be accurate for ANY pair of ELO gaps between A-B and B-C. There aren't any assumptions in the ELO model that this transitivity should work.
> 3 votes

# Answer
> Let's assume for this question that there is such thing as an absolute strength in chess and that players stay at their level without improving or getting worse over time.

So, let's start with at least one obviously false assumption.

> If there are only two people in the pool playing many games against each other their Elo ratings will settle on some value and these values are a measure of their absolute strength

Now let's add in another false assumption, although it is less immediately obvious than that a player's playing strength remains absolutely constant.

To understand why let's look at an example. Suppose I, FIDE rated 1718, play a long series of standard time control games against Magnus Carlsen, FIDE rated 2863.

Carlsen's k factor is 10 and mine is 20 and our rating difference is over 400 so every time Carlsen beats me he will gain 0.8 points and I will lose 1.6 points. I am never going to beat Carlsen. I am never going to draw with him. My rating is going to keep on going down and Carlsen's keep on going up. Our ratings are never going to "settle on some value".

Of course if Carlsen repeatedly plays his clone then with unvarying playing strength all games are going to be draws and neither player's rating will change. So at that extreme the model works.

> Now, if there are more than two players, I was wondering, whether under the assumptions above (absolute strength exists, no change over time), the Elo ratings would also settle on constant values or would keep on changing constantly?

We've already established that the two player system wouldn't necessarily result in "settled" ratings so clearly that will also apply in the multi-player system.

In the more general case where a large number of players with widely differing strengths play each other without the restriction of the 400 point rule the system is still not going to reach a steady state ***because the underlying formula (P = 1/(1 + 10^(-D/400)) behind the tables used for calculating rating does not reflect the real world probabilities when two players differ in playing strength by several hundred points play each other.*** Weaker players get better than expected results in those circumstances. Hence the 400 point rule encourages stronger players to play in those circumstances.

Here is what Wikipedia says on the subject:

> Subsequent statistical tests have suggested that chess performance is almost certainly not distributed as a normal distribution, as **weaker** **players have greater winning chances than Elo's model predicts**. Therefore, the USCF and some chess sites use a formula based on the logistic distribution. **Significant statistical anomalies have also** **been found when using the logistic distribution in chess**
> 1 votes

# Answer
they will all oscillate around the true strength. people have off days. some they play are improving and so the WL ratio changes.

the biggest problem with ratings is that we do not have good starting ratings and that many new players rapidly improve distorting the ratings because there is not sufficient competition amongst all the players and the initial ratings never get properly set nor do the later ones.

another problem is that old players do get worse with time. their brain slows down. their attention span lowers.

ratings are just an interesting guide to about how good a player *might* be but are not the magical answer that so many players think.

pursuing a rating is a misuse of your life and has no value at all except to some people and their ego.

you should see the amount of money that bridge players spend playing weekly as well as frequently in tournaments monthly if not travelling to tournaments every week. all in pursuit of a meaningless title of 'master' with some adjective associated with their level they paid for with time and money.
> 0 votes

# Answer
They wouldn't stay totally still because ratings vary after every game but in the long term they'd tend to converge to the same value
> -1 votes

---
Tags: rating, elo
---


title: Can White defend and possibly win?

text:
# Question
Title: Can White defend and possibly win?
```
[FEN "1nkr2nr/pppp2pp/2b2p2/3q4/3P4/1NQ5/P1P2PPP/R1B1R1K1 w KQkq - 0 1"]

```

Can White possibly win in this position and avoid a queen mate on g2?

# Answer
Avoid queen mating on g2 is easy:

* f3, Qg3, Qh3+ are decent options
* Re4, Kf1 also prevent immediate mate but are not good

---

Winning this position is objectively speaking impossible. Black is up a piece and white does not have sufficient compensation for it. Most players would resign if playing somebody of 1800 strength or even less.

If black is a beginner and/or short on time white could try to continue the game. The usual plan in lost positions with material down is to keep the position as complicated as possible and to avoid trades. You want to activate your pieces and start to attack something, specifically the enemy king.

In this regard one possible plan could be:

1. Qg3 (protects g2, attacks g7 and eyes c7), also makes space for the c pawn to move (clearance),
2. Bf4 develops the bishop a tempo by double-attacking c7. Also makes space for a rook to move to c1 (clearance)
3. Rac1 and 4. c4 or even immediately 3. c4 with the idea that after Qxc4 you play Rac1 and have a half-open file with attacking chances on the king

Once you get in c4 you can follow up with d5 which limits the range of the only active black minor piece.

Of course black also makes moves in-between and could spoil this plan.

The following example continuation is not best play, but about the best white could hope for for the next couple of moves:

```
[FEN "1nkr2nr/ppp3pp/2b2p2/3q4/3P4/1NQ5/P1P2PPP/R1B1R1K1 w - - 0 1"]

1. Qg3 g6 2. Bf4 Na6 3. Rac1 Kb8 4. c4 Qf7
5. d5 Ba4 6. Nd4

```

The final position is still lost for white, but at least white got the more active pieces and more space than black. There could be some attacking potential along the b file as well, now that the bishop left c6.
> 7 votes

# Answer
You can defend with Qg3 and Qh3 but the position is clearly disadvantageous for White, as they are one piece down
> 2 votes

# Answer
anything is possible.

depends how good the opponent is and how bad white is.

white is down a pawn and a piece and should lose.
> -1 votes

---
Tags: analysis, checkmate, problems, attack, defense
---


# Question
Title: What are the rapid and blitz forms of chess?
I have no clue-I am a recreational player who wants to join FIDE tournaments.

# Answer
Rapid and Blitz are both form of fast chess

---

Rapid, as the name suggests, is a faster version of chess

> Time controls for each player in a game of rapid chess are, according to FIDE, more than 10 minutes, but less than 60 minutes. Rapid chess can be played with or without time increments for each move.

Many tournaments with a large player count opt for this faster format to try and finish off an entire tournament in a day or two.

---

Blitz is even faster than rapid, with times less then 10 minutes on the clock.

> Time controls for each player in a game of blitz chess are, according to FIDE, 10 minutes or less per player. This can be played with or without an increment or delay per move—a more recent development due to the influx of digital clocks.

---

Both these formats have their own rating category in FIDE in 15+10 and 3+2 time control respectively.

Source:Wikipedia
> 4 votes

# Answer
They are time controls for chess used in relatively quick short games.

The actual time amount depends on how is defining them.

Blitz used to be zero seconds per move before digital clocks evolved. Rapid used to mean exactly ten seconds a move before clocks came into more widespread use and then it was 5 minutes (or ten minutes) per person for the entire game. EG SD5 or SD10.

All were popular speeds back in the day.
> 1 votes

---
Tags: terminology, blitz, rapid
---


# Question
Title: What is the typical move prediction accuracy of human chess grandmasters?
I couldn't find any data about the percentage of moves that a typical human grandmaster would be able to predict in games of other human grandmasters. To clarify my definition of accuracy: The predicting player would predict the next half-move for a position from a game he or she has never seen before, only being able to see past positions from the same game (preferably without even seeing the names of the players or when the game was played). To limit the influence of blunders, only games with classical time control should be used and the predicting player would have a limited time per move to make the prediction (let's say 1 minute per move). A correctly predicted move counts as 100%, an incorrectly predicted move as 0% and these numbers would be averaged over a large number of positions.

Since I couldn't find anything, I tried it myself and achieved 42 out of 119 (35.3%) in a randomly chosen grandmaster game (Alekhine vs. Erik Lundin, 1941, Round 7), but I'm quite amateurish, not a grandmaster. Randomly guessing legal moves would have achieved less than 5% in that specific game. My conditions do not have to be followed strictly, but I'm not really interested in accuracy results for blitz games, games of weaker players or "immediate", intuition-based predictions (i.e. without giving the predicting player time to think).

I'm interested in this because I want to know how accuracy varies with playing strength of the predicting player.

# Answer
> 1 votes
0.2785

It depends a lot on the opening as each would have different preferences and pet lines.

Middle games would be a bit better as there are fewer strategies to choose from for long term effort.

End games should be best as the simple positions are easier to predict moves although many end games could offer more variation to try for a win than middle games.

Overall the answer is 0.2785 based on a sample of one. More samples should yield a more accurate statistic.

Although I doubt anyone really cares enough to do a study to see.

---
Tags: rating, statistics, grandmaster
---


# Question
Title: What happens if a player dies at the board? What is the ruling?
What happens if a player dies at the board? What is the ruling? I am interested in both FIDE and/or USCF rules.

I seem to recall about 40 years ago, when reading my first copy of the USCF rule book, that per USCF rules the position would be adjudicated (a result ruling was made based on the position on the board at the time), but of course, it was so long ago, I could be remembering that incorrectly now. I can no longer find anything about that situation for either USCF or FIDE anywhere.

The deceased person does not care, so it would seem natural to award the other player the win since eventually the flag would fall anyway.

During the game CM Kurt Meier versus Alain Patience Niyibizi at the 2014 Olympiad, CM Meier died at the board, but the game was a draw, and I am not sure why, whether it was an act of sportsmanship, or rules.

In another more publicized case, Nikolaos Karapanos played a brilliant game against Israeli IM Dan Zoler, and died during a time scramble. Remarkably, Zoler, is a medical doctor, who tried to revive his opponent, and who was lost on the very final move, graciously resigned the position later in an act of truly commendable sportsmanship.

So if anyone knows, I would appreciate any light you may shed on this situation, which has happened all too often.

# Answer
Clock runs out and they lose on time if it is the move of the dead player.

Otherwise the opponent could resign or move; unless a draw was offered before the death in which case they could accept the draw, resign, or move and wait for the clock to run out on the now dead opponent.
> 2 votes

# Answer
USCF rules. This is a case that is decided by the director's discretion.

`**18G. Adjudications.** Only under emergency circumstances may a director permanently adjudicate a game; that is, declare a result based upon best play by both sides.`

An interesting rule is: `**15G. Ownership of scoresheets** The scoresheets of all games in a tournament are the property of the sponsoring organization(s).`

This means that even if you bring you own scoresheet, once you take notation, it belongs to someone else, and you taking it home is theft.
> -3 votes

---
Tags: rules, tournament, fide, uscf
---


# Question
Title: What does it mean to ''analyze grandmaster games''?
I am currently rated 1850. My coach tells me that in order to get better at my game, I should ''analyze grandmaster' games''. On the surface, I understand that he wants me to learn from great players' moves. But I'm unsure about what I should be ''analyzing''.

In particular, I have the following problems:

* When I look at GMs moves, I see GMs responses. So it's difficult for me to learn why the GM 1 played this particular move, when the GM 2 plays an equally "perfect" move. As a 1800 player, I cannot see the +0.1 advantage that the GM 1 just obtained by his move.
* If I put an engine like Stockfish on the move, I will have a bunch of move opportunities, but none of them ''speaks to me''. Why is one move slightly better than another? Stockfish will not tell me.
* Finally, like Kasparov said, ''Life imitates Chess''. So in principle, I should make each move with an underlying grand plan. But what is the grand plan? I do not know.

So how can I ''analyze grandmaster games'', so that I can learn from them?

Please give me some guidance.

# Answer
> 22 votes
I agree with you, more than your coach. Just analyzing a GM game, even with a computer, is not helpful just by itself if you have no idea what is going on.

For example, just earlier today, I answered a question here, where the person gave a computer line that made no sense as far as the plans for the position were concerned, so the computer was really no help at all there.

I think what you need are grandmaster games that are WELL-ANNOTATED, to tell you what is going on in them IN WORDS, not just variations, although concrete lines are clearly important too. Another thing that happens in modern chess is that games between IMs/GMs have become so advanced that the battles between each side's plans have become too complex for learning early in a chess "career" because the plans are so effectively thwarted by the opponent it is not always clear what each side was aiming for.

What is much better are the games of old masters like Capablanca and Alekhine because their opponents, while not slouches, were not on their levels; so you can see plans more clearly executed from beginning to end as the plans were often not met with the type of resistance that you would see today at the top levels.

I would get collections of their games, written by them, and play through those games. I have also written here extensively about opening pawn structures, and as you read any game trying to understand it, you need to have some understanding of what you are striving for in any given opening.

Another book that is extremely good for learning is "Learn from the Legends: Chess Champions at Their Best" by GM Mikhail Marin.

Learning to calculate is really a different skill, but one that is reliant upon how well you understand chess (see above), in general, and what you are aiming for (that is, what is the plan).

Calculation prowess can be gained by combining two practice activities: Reading pure tactics books, and reading books that have non-tactical positions for you to practice calculating the best move. Also, try practice reading annotated games without a board, including the annotations, to work on vision in your head.

Tactics books are self-evident as there are a million of them out there. Some excellent books that will give you positions to calculate (mostly) non-tactical positions include:

"Positional Chess Handbook: 495 Instructive Positions from Grandmaster Games" by trainer FM Israel Gelfer. **I cannot even begin to tell you how much I love this book. It is incredible.** (Do not get the Kindle version as there are way too many mistakes)

"The Best Move" by GMs Hort and Jansa.

"Test Your Chess Skills: Practical Decisions in Critical Moments" by GMs Sarhan Guliev and Logman Guliev

These will help you improve your pure calculation.

# Answer
> 11 votes
So forget about Stockfish, forget about Kasparov, forget about GMs.

You are 1850. You understand something about the game. Not everything will be correct, some of it will be.

*Start analyzing*. It can be your own games, it can be any old game, it can be a random diagram you saw in the newspaper.

Set up the position, and try to figure out what is going on. What are both players trying to do. Are there any tactics, threats? What are the candidate moves. And finally, what is the best move. Write it down with some short variations as arguments.

Then see what was actually played. If it's the same move, fine, move on. If it's different, was it at least one of your candidates? Why didn't you choose it? If it wasn't, do you understand why it was played, does it fit in with the "story" of the position you had? If not, try to figure it out for a few minutes. If you can't, shrug and move on.

If you can do this with an annotated game, you can compare your annotations with the book's afterwards. You'll have missed mostly everything! But it'll get better.

This is very hard work, but I think everybody would improve doing this regularly.

# Answer
> 5 votes
I’d also recommend Silman’s *The Amateur’s mind* — I’m currently rated a bit above 1800 and I found it much more helpful for someone to show me how think about *how I think about a position* and why do I get some things often wrong. It’s really interesting to see yourself in someone else’s words when they’re asked about a position.

In short, I think it’s good to think about why/what did *you* get wrong instead of what did a GM get right.

# Answer
> 1 votes
More than analyze you should play over hundreds of them in the openings that you specialize in.

Then you get an intuitive feel for the moves to make and how the game continues into the middle game.

Just analyzing for the sake of analyzing is just busy work if you are not learning to play better.

One old book said to increase your rating then you need to stop playing for a year and do some useful studying. If analyzing helps you study then do it, but for me I find just playing over games and occasionally looking at the annotations for a given move when I would have done something else is more useful.

---
Tags: learning, grandmaster, master-games
---


# Question
Title: Does a loophole still exist in the defintion of castling?
Castling on the e-file with a promoted rook, an idea immortalized by Tim Krabbe and Max Pam, is no longer legal since FIDE amended the wording to state that castling is an actionn on the first/eigth rank. This new wording seemingly did away with castling with a promoted rook, but did it really? Let me explain in yet another rules lawyering question.

Imagine that the below position occurs in a tournament and White promotes.

```
[FEN "8/4k2P/8/8/8/8/8/R3K3 w - - 0 1"]

1. h8=R

```

Ater Black moves, White castles kingside using the rook! Naturally, Black pulls in the arbiter. Ignoring the preamble in the FIDE laws, White defends themsevles using the current laws of castling in the 2018 rules, step by meticulous step.

1. "3.8.2 by ‘castling’. This is a move of the king and either rook of the same colour along the player’s first rank, counting as a single move of the king"

> Check-White castled on their first rank on a board with two rooks capable of castling.

2. "and executed as follows: the king is transferred from its original square two squares towards the rook on its original square, then that rook is transferred to the square the king has just crossed."

> Check-The king moves two spaces along the first rank towards the rook on its original square, and the rook goes onto the square the king just passed over.

"3.8.2.1 The right to castle has been lost: 3.8.2.1.1 if the king has already moved, or 3.8.2.1.2 with a rook that has already moved."

> Some will argue that the rook, having formly been a pawn, has already "moved," but since FIDE took the time to specify where castling may take place, we may presume that they agreed that the rook is unmoved for the purposes of nitpicking. The rook on a1 is also unmoved, so the stipulation of "either rook" is completed.

"3.8.2.2 Castling is prevented temporarily: 3.8.2.2.1 if the square on which the king stands, or the square which it must cross, or the square which it is to occupy, is attacked by one or more of the opponent's pieces, or 3.8.2.2.2 if there is any piece between the king and the rook with which castling is to be effected."

> Check-No pieces block the paths of either the king or the rook, and nor will the king moves out, through, or into check.

As far as I can tell, all conditions for castling are in the green, allowing for castling with a promoted rook along a player's first rank. As far as my research goes, this idea goes back to at least 1918, so it seems weird that this loophole hasn't been fixed yet. Then again, it is a really obscure idea

Is there any glaring flaw in this rules lawyer case, or is it solid until FIDE fixes it? An obvious fix would be make so that the wording reads "This is a move of the king and either **starting** rook of the same colour," since it is simple and unambiguous.

**Addednum**

As commenters have rightfully pointed out, I was vauge as to what my interpertation of the rules were. The point I meant to make was that it is possbile to interpert 3.8.2 as meaning that castling is a move of **the king,** and not the king **and** rook, on a player's first rank. The definition of "towards" is loose, as @Annatar pointed out below @Brian Tower's answer. Do note that the arguement is not meant to be strong, but rather merely exist.

I suppose what is comes down to is that the way 3.8.2 is written can be argued to have a syntactic ambiguity. 3.8.2 can mean either "This is a move of the **king, and either rook of the same colour,** along the player’s first rank," or "This is a move of the **king and either rook of the same colour** along the player’s first rank." The first interperation combined with the loose meaning "towards" are what culminate in the weak and absurd, but amusing, arguement that castling can be done on a player's first rank with a promoted rank.

The idea of this rule lawyering question is not to exploit any possible loopholes, but to point out a potential ambiguity in the rules to plug it before it gets abused. If there is no loophole, the idea is also to hopefully point out, in a clear manner, what exactly refutes it.

# Answer
> I suppose what is comes down to is that the way 3.8.2 is written can be argued to have a syntactic ambiguity. 3.8.2 can mean either "This is a move of the king, and either rook of the same colour, along the player’s first rank," or "This is a move of the king and either rook of the same colour along the player’s first rank."

There's no ambiguity. "And" means "and"—it means that both of the things mentioned participate in the event or state described by the sentence. "Bob and Sarah went to the store" can't mean that Bob went to the store while Sarah went somewhere else; it can only mean that Bob went to the store and Sarah went to the store, too. Likewise, "This is a move of the king, and either rook of the same colour, along the player's first rank" can't mean that it's a move of the king along the first rank while the rook moves in a different way; it can only mean that it's a move of the king along the first rank, and it's simultaneously a move of the rook along the first rank.

So, in order to for a move to be a valid castle, the rook must move along the first rank. The meaning of the word "along" implies that the rook must be on the first rank throughout the duration of the move; in particular, it's impossible to move the rook "along the first rank" if it is not on the first rank to begin with.
> 20 votes

# Answer
> Is there any glaring flaw in this rules lawyer case, or is it solid until FIDE fixes it?

Yes, there is a glaring flaw in your case. The rook and king have to be on the same rank. This is clear from the text of the rule and the diagrams which follow. Here is the text from the latest FIDE Laws of Chess:

> 3.8.2 by ‘castling’. This is a move of the king and either rook of the same colour **along the player’s first rank**, counting as a single move of the king and executed as follows: **the king is transferred from its original square two squares towards the rook on its original square**, then **that rook is transferred to the square the king has just crossed.**

These are the obvious objections to your attempted interpretation:

1. The two pieces start on different ranks, hence cannot move along the same rank.
2. The rook's original square is h8. The king is on e1. There is no square on the board which is exactly two squares away from the king in the direction of the rook.
3. Consequently there is no "square the king has just crossed".

Furthermore, if you go to the link and find section 3.8.2 you will also find that it ends with four diagrams illustrating how castling may be perfortmed.
> 16 votes

---
Tags: rules, fide, castling, pawn-promotion, loopholes
---


# Question
Title: What should be the next move in this position?
```
 [FEN "2r1r1k1/pb5p/1pp1qb2/3p1p2/3Pn1p1/1Q2P1P1/PP2NPBP/2RRB1K1 b - - 0 1"]

```

What is the best move for Black in this position. Everything seems defended here. What method is applicable in such situations? Method of imbalances?

# Answer
All black pieces are currently defended but that does not mean there is nothing to do as if you play aimlessly white will eventually gain an advantage.

On analyzing the game the first thing you can notice is that the kingside is completely locked down by pawns so our attack needs to be on the queenside. Ba6 and Be7 are good moves to start gaining control on the queenside. Double rooks on c- file with a c5 pawn break is one option (but it sacrifices the d5 pawn).

Exploiting White's cramped position is essential for any strategy you employ on the queenside side. White will probably outpost his knight on the f4 square so BxN eventually will open up the e-file. Even though this is a drawish game it is far from over and inaccurate play from either player might lose the game.
> 3 votes

# Answer
have to attack on the king side advance krp and also put horsie on kbishop 6 square for black move rooks and q to kr file
> -2 votes

---
Tags: analysis, strategy
---


# Question
Title: How many positions does a GM analyze before making a move?
From a research paper: Chess players search highly selectively. It is rare that they analyze more than one hundred positions in the search tree before choosing a move.

In the middle game how many positions does a GM analyze before making a move? What are typical limits of top players?

# Answer
> 4 votes
Of course this depends on the position at hand, but generally speaking...

I am not a GM, but 100 *positions* (not moves) seems highly exaggerated, though this might depend on your definition of "position" and "analyze".

If you really mean unique (and not only slightly different) positions, and if you mean by analyze, the full process of evaluating the position, I would guess that the number is between 0 and 3 or so.

Only rarely you would want to calculate forced line and would have to analyze a position in the future anyway. Most decision making is based on well known plans, that follow from the current position on the board.

# Answer
> 3 votes
Nobody is safe to answer this question unless he or she is a GM. You definitely need to search an answer in chess games. You can analyse by yourself or by using chess engines or you can easily find many videos on the internet. One of my favourites is the game between Vladimir Kramnik and Garry Kasparov when Kasparov sacrificed his Queen on move 12! It reveals in a great way how a GM can "create" the future through many moves before.

# Answer
> 0 votes
depends

how much time left on the clock how complicated the position does he need a win or is a draw okay who is the opponent is he sleepy/tired ....

---
Tags: analysis, tactics, grandmaster, calculation
---


# Question
Title: Sicilian Defence or Caro-Kann also help with Queen's pawn opening
I know and play the Sicilian defense. Specifically, I mix it with the Hyper Accelerated Dragon with the kingside rook pawn movement akin to the Najdorf. I am also learning the Caro-Kann, in which most of my opponents play the advanced variation or I start the exchange variation. But most of my opponents never play the mainline past the first move, so I just employ basic chess tactics such as central control and development.

Which opening should I learn the best? I learned the Dragon to the point where I can consequently out develop my opponents early with the Hyper Accelerated Dragon, but I have also heard that the Caro-Kann is good enough to know.

Also, I know the Queen's and King Indian Defenses enough to counter any 1. d4 players. Although not many people do it, I still think it's worth it. Should I add it to my arsenal, for Black at least? For White, I used to play the Queen's Gambit, but now I play the English.

# Answer
> 3 votes
For a more meaningful answer, it'd be a great idea to know what your current skill level is. That being said:

Knowing an opening is not about knowing "what's on the book". If you can't find the correct response when your opponent deviates, then to all practical effects it's as if you didn't know anything the opening, no matter how depth into the mainline you've studied. Mainlines also change over time and from author to author. Study the key strategical ideas of the opening, not concrete variations.

Also consider that at lower levels, it's not really worth studying the opening, since:

* The difference between playing well in the opening or not is not that big and there's a lot of time to catch up during the rest of the game if you are worse.
* Studying the opening is harder as a beginner because you need to memorize more. GMs can remember hundreds of 20-move deep lines because they only have to remember a few critical points, the rest comes intuitively to them.

When choosing between Hyper-accelerated Dragon and Caro-Kann, I personally prefer the former because as you'll have to know a fair amount of theory for both, you'll better play the opening that puts your opponent into bigger trouble if he messes up. But there are deifnitely arguments for the Caro-Kann and it's hard to tell what suits you best without knowing your skill level or "playing style".

The Queen's Indian is a great opening that can teach you a lot about chess. If you already know about it, there's no reason not to include it in your repertoire

---
Tags: opening, sicilian-defense, caro-kann, sicilian-dragon, accelerated-dragon
---


# Question
Title: Why taking the bishop with queen is better here?
```
[FEN "rnbq1rk1/pp1B1p1p/5bp1/2pPp3/8/8/PPPNQPPP/R1B2RK1 b - - 0 1"]

```

The engine doesn't want me to take the bishop with the bishop, but to instead use the queen and I don't understand. What difference does it make?

# Answer
> 6 votes
Your queen then attacks the undefended white d-pawn. Also, white is threatening Ne4 (attacking the black squared bishop), and after e.g. Bg7, taking on c5. If black took with the bishop, this would fork the white squared bishop on d7 and the undefended pawn on b7. If black took with the queen, black could simply take the d5 pawn and defend the b7 pawn while attacking the knight.

---
Tags: analysis, captures
---


# Question
Title: Mate In N algorithm-Lichess Computer Analysis
Is it possible to have the computer analysis report mate in 12 moves to only change that to mate in higher number of moves, like 15 for example, after it searches deeper?

# Answer
> 1 votes
It is possible, if the computer program has a bug... A position is assigned a win-in-(k+1) only when one move from that leads to a loss-in-k, and assigned a loss-in-k only when every move from that leads to a win-in-k or when k=0 and it is a checkmate. So every correct chess program will never assign a position to win-in-12 and then later revise it to win-in-15 *due to "searching deeper"*. No heuristic pruning techniques should ever affect this, as heuristic pruning can only weaken the evaluation away from a win/loss (in a correct program).

However, it is possible that the program is designed to search deeper if the input position satisfies a certain criterion C, in which case it may find a win-in-12 for a given position X that satisfies C, but then one move later the resulting position Y no longer satisfies C and so the program does not search as deep lines as it did for X, and so fails to find a win-in-11 for Y! It may still be able to prove a win-in-15 for Y if it has some rudimentary endgame evaluation. For example, KQK is always a win-in-10, so we do not have to do any search to return win-in-10 in such a position. Thus the program might do a more shallow search for Y and see a KQK in the search tree and immediately return win-in-10, but a deeper search would have revealed that it was actually win-in-5. This can produce the observed effect, but is *due to "searching less deep"*!

Note that clicking on "go deeper" on Lichess analysis may not use the same memoization table that had been used before at the lower depth level. One clear example is here where the cached analysis states #−30 but if you click "go deeper" it clearly starts completely from scratch. This is expected; after all it makes no sense to store huge tables along with the cached analysis. I think that if you cannot provide an actual concrete example of the behaviour you are asking about, it is difficult to address your hypothetical question more than I already have.

---
Tags: engines, analysis, stockfish
---


# Question
Title: Is there a standard system of classification of games?
Given there are practically infinite number of chess games possible, does there exist a standard system of classifying or naming games simlar to how there are rules for naming a chemical compound uniquely? There are 10 pieces that can move initially, so I imagined there would be 10 families of games and each game's pgn would be the identity of the game and so on. But the ECO classification system is quite different than what I imagined. What I am really interested in is this-will a certain family of games would be more interesting than the other? Will certain family of games have less draws or wins with perfect play? Is there more zugzwang positions in a certain family?

# Answer
Such a system doesn't exist exactly, but a few similar concepts do. There are many reasons, but the main reason is that it's not possible to classify chess games like this in any useful way.

Yes, you could classify them based on the first move -- but who cares? Only 1.c4, 1.d4, 1.e4 and 1.Nf3 are really important, and they often *transpose* into each other (1.d4 is followed by 2.Nf3 quite often, and 1.Nf3 is followed by 1.d4).

For a system like this to be useful, it needs to have some properties:

* It should be based on the games of really strong players, after all they are the ones who care about this sort of thing
* Some people have really amazing memories, but even they are quickly overwhelmed by chess. It has to be of a practical size
* It has to *help you find good moves at the board*, as that is really the only thing that matters for chess players

And a whole chess game is quite long. Some *parts* of it can be categorized, others defy such attempts completely. So in chess it is *positions* that can sometimes be classified, not entire games.

I can think of three phases that can be treated like this:

* The early opening. Theory can be worked out *exactly*, because the starting position is known. Related lines will have things in common but also important differences, and they mostly just need to be memorized. Opening names like in ECO are mostly so you can find in which book you need to look up your theory.
* Most *middlegames* (not all) can be usefully classified based on **the central pawn structure**. That's the main thing most players will think of. In e.g. a position where one side has "the isolated queen's pawn" (a pawn on d4 and no pawns on the c- and e- files, after the opening, and the other side say a pawn on e6 and no pawns on the c- and d- files) has a list of standard plans that people know by heart. The actual positions differ, the tactical details will matter, but recognizing lots of types of position like this and knowing the standard plans *helps*. It is what books like Mauricio Rios' Chess Structures are about.
* Very simplified *Endgames* can again be classified and studied. Many positions with bishop + pawn vs bishop have similar ways for trying to promote the pawn or stopping it, and knowing about them helps (and it helps to decide whether you can safely trade down to this endgame in a particular case), and so on for lots of other material distributions. Many, many books are written about endgames in such a fashion.

But there are also phases of the game in between the early middlegame and the late endgame, and they lend themselves much less to classification. The differences are more important than the things games have in common, here.

And there is no "standard" classification for any of this. It's an art, more knowledge of this sort of thing (and the skill to apply the knowledge) is what separates strong players and even stronger ones.
> 8 votes

# Answer
Yes, there is. It derives from the Encyclopedia of Chess Openings and the codes they used to classify openings.

You can find a comprehensive list of the ECO codes here.
> 3 votes

# Answer
The Encyclopedia of Chess Openings is **the** standard game classification system of the chess world, with "standard" in the sense of "what almost everyone uses". I don't really understand the issue you seem to have with that.

Regarding your actual questions:

> What I am really interested in is this-will a certain family of games would be more interesting than the other? Will certain family of games have less draws or wins with perfect play?

We don't know for sure, as Chess is not solved yet. We have some approximation though by looking at the winning percentages, which any decent online game database (example: https://lichess.org/analysis#explorer ) will show. "Interesting" is of course a subjective predicate, but at least we can say that White will have better prospects to win the game by starting 1. d4 or 1. e4 instead of say, 1. a4 or 1. h4.

> Is there more zugzwang positions in a certain family?

This is even more unanswerable. Due to their nature, zugzwang situations mostly occur in the endgame (when there are fewer pieces left, which naturally reduces the number of move options all by itself). We are very, very far away from safely linking specific endgame positions to specific openings. Just too many different paths to connect, and that's not even accounting for transpositions.
> 2 votes

---
Tags: opening, engines
---


title: What is perfect play?

text:
# Question
Title: What is perfect play?
What exactly is perfect play? Can there can be multiple perfect plays, which sounds quite contradictory? If perfect play is known for all openings then why would a player play anything other than that? Such a thing would make all high level games futile because then players would intentionally divert from perfect play in order to just create a show or something similar.

# Answer
> 12 votes
In the context of game theory, perfect play involves playing truly optimal moves. Specifically, if the game state is a (theoretical) win for the player to move, perfect play would be a move that both preserves that state (eg keeps the game a winning state) and minimizes the number of moves remaining until victory. If the game state is a draw, perfect play preserves the draw. If the game state is a loss, perfect play cannot improve the theoretical outcome, but instead maximizes the number of moves until defeat.

Perfect play is, by definition, known for solved games like Tic-Tac-Toe. Chess is not yet solved, so in most board positions, perfect play is not known. For some situations, for example positions with 7 or fewer total pieces on the board, we have endgame tablebases which have perfect play recorded. Also, for positions with forced checkmate in sufficiently few moves, engines can calculate perfect play on-the-fly by simply looking at all possible moves and responses and choosing one that gives checkmate the fastest. Perfect play is not (yet) known for chess openings. If chess were solved and perfect play were widely known, then it is possible competitive chess may die.

There can be multiple perfect moves for a given board position. For example, if there are two different moves that immediately checkmate the opponent, both are perfect. Playing around with endgame tablebases, it is fairly common to find positions where multiple moves lead to checkmate in (say) 18 moves. If the game is a theoretical draw, often many moves preserve the draw. All of these moves are perfect from a game-theory perspective, though some may give better practical chances than others.

# Answer
> 3 votes
Technically, perfect play would consist of making moves that do not adversely affect the result of the game. In endgame theory books, only mistakes can change the result, and they are flagged as such. Strictly, in a winning position, you might require that perfect play reaches the win the the smallest number of moves, or conversely postpones the defeat for as long as possible in a losing position.

On either of those definitions, there may be several equally good moves in a position. A chess engine announcing a mate in 5 (or 15!) may see multiple different routes of the same length to checkmate.

That's the game theory answer - John Nunn takes that approach in his endgame books, for example.

However, there are the twin facts that chess is not yet solved (so we do not know the perfect play) and you may be facing a human opponent who is both fallible and has particular strengths and preferences. I would argue that best play in this case would choose the moves that are most likely to lead to a win today against this particular opponent - which might not be (game-theoretic) perfect play. Playing moves which are not theoretically best in order to maximise winning chances in a real game introduces an element of risk.

Finally, sometimes in a tournament or a match, a draw is as good as a win. In those circumstances, the change in the relative value of the outcomes would lead to a different optimising solution for the practical approach even though the game-theoretic solution (if it were known) would be unchanged.

# Answer
> 0 votes
**1. What exactly is perfect play?**
Firstly, the definition of perfect play is very subjective. One may say that a 4-move checkmate is a perfect play for me! Or, the best possible move that you could have done regardless of the situation you are in, "Oh! that was a perfect play because you could not have played any other move any better!".
According to me, a perfect play is when the entire game is always in your control. In the sense that, with every move you make, you force your opponent to make a move of your choice rather than his own choice. This is not possible in the game of chess. You can predict the probability of a move, but cannot force an opponent to play moves in every given scenario unless you are some intelligent silicon-based life form that can simulate every possible scenario. Therefore, according to my definition of "perfect play", it simply cannot exist.

**2. Can there be multiple perfect plays?**
Maybe according to some other definition of a perfect play.

**3. If perfect play is known for all openings then why would a player play anything other than that? Such a thing would make all high level games futile because then players would intentionally divert from perfect play in order to just create a show or something similar.**
Well, if perfect play did exist, then no one would willingly play anything other play than that, unless given good enough motivation (e.g. bribery) during competitions. That is the only logical answer here.

# Answer
> -1 votes
I am not sure whether there is a single definition of "perfect play".

The answers so far considered perfect play separately for the winning or losing player. In this sense it is often used in the negative sens: *white's position is lost, even with perfect play*

However, "perfect play" can also refer to the combined play of both players. As such it is what you get if the winning player is minimizing DTM (depth to mate) while the losing player is maximizing DTM. So basically what a minimax engine does.

---
Tags: terminology
---


# Question
Title: Engine is evaluating the same position at the same depth with different score
My engine is evaluating the same position at the same depth with a different score inside the search tree, is that normal?

```
[Title "depth 1   ply 3 alfa -20 beta -15  score -15 (1.Na3 a5 2.Nh3)"]
[FEN "rnbqkbnr/1ppppppp/8/p7/8/N6N/PPPPPPPP/R1BQKB1R w KQkq - 0 1"]

```

---

```
    [Title "depth 1   ply 3 alfa -20 beta -5  score -5 (1.Nh3 a5 2.Na3)"]
[FEN "rnbqkbnr/1ppppppp/8/p7/8/N6N/PPPPPPPP/R1BQKB1R w KQkq - 0 1"]

```

**Search code:**

```
        tab.makeMove(mov);
        // first  time eval value is -15 with alpha -30 beta -15
        // second time eval value is -25 with alpha -30 beta -25
        // this is in the same search
        int eval = -negaMax(depth - 1, -beta, -alfa, ply + 1);
        tab.takeBack(mov);

        if (eval >= beta) {
            return beta;
        }

```

**engine output:**

```
go
info depth 1 score cp 50 pv b1c3
info depth 2 score cp 0 pv b1c3 b8c6
info depth 3 score cp 50 pv b1c3 b8c6 g1f3
info depth 4 score cp 0 pv b1c3 b8c6 g1f3 g8f6
info depth 5 score cp 40 pv b1c3 b8c6 d2d4 g8f6 g1f3
info depth 6 score cp 0 pv b1c3 d7d5 d2d4 b8c6 g1f3 g8f6
info depth 7 score cp 35 pv e2e4 b8c6 g1f3 g8f6 e4e5 f6e4 b1c3
bestmove e2e4

```

# Answer
What you are seeing does not necessarily indicate a bug.

You are searching the position with two different bounds. Your engine is fail-hard (because you return beta and not eval in the case of a fail-high), so the score that comes back from eval is going to be constrained within the bounds you provide.

In the second case (using the numbers from your diagram, not your code) you are searching with a bounds of \[-20, -5\] and your score is -5. This is fine.

In the first case you are searching with a bounds of \[-20, -15\] and your score is -15. This is also fine. It would be impossible for this search to return a value of -5 because it is outside the bounds you provided.

In either case, what the search is telling you is that this position is better (relative to the side to move) than the bounds you provided because in both cases the search is failing high.
> 3 votes

---
Tags: engines, programming, evaluation
---


title: Discovered attack in quiescent search

text:
# Question
Title: Discovered attack in quiescent search
I'm implementing quiescent search in my chess engine, although just capturing moves have been generated. In the below position, at 1 ply, the white queen captures the pawn, but the quiescent search can't see that after 1... Bg3+ 2. Kf1 Rxd5, and the white queen is captured. This is a case of a discovered attack. How can quiescent search handle that, or is it just for capturing moves?

```
[FEN "2b1k3/3r4/3b4/3p4/8/8/3Q4/R3K3 w - - 0 1"]

```

# Answer
Quiesence search isn't able to handle situations like that - including checks would explode the search tree. Two iterations later (assuming you're doing iterative deepening), Qxd5 and Bg3+ will take place in the main search, and then quiesence search would be able to find the continuation you described.

Some engines include quiet checks in the first ply of quiesence search - in that case you situation would be resolved in one additional iteration instead of two
> 2 votes

# Answer
I suppose one possible solution would be checking if any double attacks can be played. This would include checking for forks and discovered attacks/checks. If this is too broad a condition for quiescence search, you could narrow it down by checking if one of your pieces involved in the double attack is worth a sufficient amount (say, at least a knight or rook).

In this case, ...Bg3+ would do a double attack on your king and queen, which would clearly indicate that a quiescent state hasn't been reached.
> 1 votes

---
Tags: engines, programming, evaluation, captures
---


# Question
Title: How to store moves for a magic bitboard system?
I am currently trying to implement magic bitboards into my chess engine. Let's just talk about rooks here. Given a square, what I can currently do is:

-Calculate the sliding moves on an empty board.

* Generate all blocker boards.
* Calculate the corresponding mve board.

What I am having trouble with is the using of this information. I have downloaded an array of length 64, populated by "magic numbers" for the rook squares. Can I use this? I can generate a index from this information, but it doesn't correspond to the correct move board. Any ideas? I am happy to share more information and code upon a request.

# Answer
> 1 votes
It sounds like you have all the tools to do the job, you just need to put it all together. And yes, you can use the magic numbers you found.

When your engine initializes (or any time before you begin the search, really) you'll need to pre-compute the move board for every possible permutation of blockers you might encounter during the search.

**Initialization**

```
for each square...
  ROOK_MASKS[square] = //rook attacks on an empty board

  int bits = bitCount(ROOK_MASKS[square]);
  ROOK_SHIFTS[square] = 64 - bits;

  int permutations = 1 << bits
  for each permutation (p)...
    int index = (ROOK_MAGICs[square] * ROOK_MASKS[square]) >>> ROOK_SHIFTS[square];
    long blockers = //the pth permutation of ROOK_MASKS[square]
    ROOK_ATTACKS[square][index] = //rook attacks with blockers

```

Then when it comes time to generate moves you need to perform a similar operation using the pieces actually on the board

**Move Generation**

```
  long blockers = ROOK_MASKS[square] & //all the pieces on the board
  int index = (ROOK_MAGICS[square] * blockers) >>> ROOK_SHIFTS[square];
  return ROOK_ATTACKS[square][index];

```

---
Tags: engines, programming, rooks, bitboard
---


# Question
Title: How to get static evaluation from Stockfish in case that a king is in check?
I am working on a program that should recognize the difference between human and computer players. For this purpose, I need some parameters. A part of them would be the individual values of the static position evaluations.

In Stockfish you can get these values with the command EVAL. However, if I call EVAL while one of the kings is in check, I don't get a rating. Instead, I only get the info "none (in check)"

Does somebody know why this is the case? In my opinion, that doesn't make sense as long as it's not a checkmate or stalemate. How can you get around this?

# Answer
If a king is in check, that's a major thing. There are likely to be few legal replies for the engine to consider. It's also unlikely (although possible) that there would be a large chain of checks from both sides. And it's very unlikely that you'd want to immediately prune the check; they're almost always worth at least considering.

When the engine is evaluating lots of positions, it therefore makes sense for it to not waste time evaluating the check position itself. Instead it's quicker to look ahead to how the check is resolved.
> 3 votes

# Answer
Evaluation functions are built for "quiet" positions. That is, positions without a lot of unresolved tactics. This is why evaluation is done at the leaves of quiesence search, which resolves all reasonable captures and checks.

The idea is that it would be incorrect to evaluate a position with lots of tactical options, because after those tactics are resolved the material on the board could be dramatically different than it is now. The same thing goes for checks.

Instead of calling EVAL on your positions, you should consider calling qSearch to get a score.
> 3 votes

---
Tags: engines, stockfish, evaluation, check
---


title: Are these magics wrong?

text:
# Question
Title: Are these magics wrong?
I am working on my chess engine and wanted to finally implement magic bitboards to get a huge increase in performance.

Basically I was writing a method to check if a number can be used as a magic for a given attack mask. I took a look at this table: best magics and tried to verify if these can actually be used.

I tested it with the index 48 (rook on a7). I should probably say that I am working in Java and there are no unsigned values but this is not a problem because all shift-operations still work the same and the given magic for a7 is positive anyway.

So I took the mask and populated it with some random blockers.

```
mask:                     random blockers:

00000000                  00000000
01111110                  00110010
10000000                  10000000
10000000                  10000000
10000000                  10000000
10000000                  00000000
10000000                  00000000
00000000                  00000000

```

I then took the magic number (0x48FFFE99FECFAA00) and took the random blockers bitboard and multiplied them. the result and the shifted result looks like this:

```
result                    shifted

00000111                  00000000
00011110                  00000000
10011110                  00000000
01010101                  00000000
00000000                  00000000
00000000                  00000000
00000000                  11100000
00000000                  11000000

```

The problem here is that the amount of bits does not equal the one of the random blockers which is a problem because the bits in shifted result must be the same as the amount of bits in the random blockers bitboard. Also different random blockers inputs resulted in the same output.

> Can somebody verify this? Where did I go wrong?

---

> Also I was wondering how long it takes to generate the magic numbers. My code was running for a few seconds and did not find a single one (I checked about one thousand). What is the density of valid magics? 1/1000 ? 1/10000000?

---

> My last question is: Why are people trying to reduce their tables sizes of magics? I keep seeing this and people seem to have a real battle about who can go below x kByte. Is there a specific reason for this?

EDIT:

I found the problem with the magics. I compared the shifted result and they were the same for some blockers. but these had the same actual attack set. I am very happy for any kind of help!

# Answer
> 3 votes
I think you're misunderstanding something here based on the way you formulated your question. Multiplying the blockers by the magic and the shifting does **not** give you the attack set. What it gives you is an index by which you can lookup the attack set in a pre-computed array. The shifted product is a key, not a bitboard as you displayed it

It is possible (and desireable) for multiple blocker sets to result in the same index and therefore have the same attack map. Consider a rook on A1. The attack set will be the same if there is a blocker on B1, blockers on B1 and C1, blockers on B1 and C1 and D1.

As for how long it takes to generate the magics themselves, that depends on your hardware and on the speed of your algorithm. I would say that only being able to test a thousand in a few seconds indicates a serious performance issue in your code. I feel like stockfish claims to be able to generate them *all* in a second or so.

Finally, the benefit of findind a "better" magic is what you said. It reduces the size of the pre-computed array. Lowering the memory footprint of an engine makes it more efficient in terms of cpu cache hits vs memory lookups.

---
Tags: engines, programming, bitboard
---


title: Why is stockfish not accepting my move?

text:
# Question
Title: Why is stockfish not accepting my move?
I am trying to play with stockfish from terminal.

I entered the following commands:

```
position startpos e2e4
d

```

The output was:

Why is stockfish not accepting my move?

# Answer
> 4 votes
There is an issue with the syntax you are using. According to the UCI protocol you should use `position startpos moves e2e4`, i.e., the **moves** keyword is missing in your command.

---
Tags: engines, stockfish, computer-chess, uci
---


# Question
Title: Is it poor sportsmanship to resign immediately after a major blunder early in the game?
In a recent (online) game in which I had black, my opponent played an opening variation with which I was unfamiliar. That, a very aggressive attack, and lack of adequate time to think through my moves had me down a pawn and in poor position as we entered the middle game. While I wasn't yet in major time trouble, they had significantly more time on their clock also.

After a relatively long time before their 15th move, I got the end of game sound and pop up window. The first thing I noticed was that my opponent had taken another pawn and put me in check with their queen. For just an instant, I thought I was being told that I had lost. However, I had multiple ways out of check so knew that couldn't be correct. Then I realized that my opponent had resigned so fast after making their move that the move and end of game signal appeared on my computer simultaneously. Apparently they hadn't seen that I had a knight guarding the square to which they had moved their queen.

Presumably my opponent resigned because they had hung their queen and realized it right after making the move. While that mistake devastated their chances of winning the game, to me it felt unsporting for them to have resigned so abruptly, when many pieces were still on the board (in addition to the two pawns I had lost, the only pieces off the board were from a bishop/knight trade).

Is a resignation like this bad sportsmanship? Or should I just accept it as part of the game after such a significant mistake? (For reference, both of us are rated in the 1100's.)

# Answer
It is totally normal, and actually, I would consider it good sportsmanship, but that is a bit relative to your level of play.

Among masters, if someone blunders even a piece, they know that their master opponent will have no problem converting, so to play on could be considered rude and a waste of time. That said, they have the right to, and if they do, you don't really complain about it.

At MUCH lower levels, sometimes players are not strong enough to win, even up a queen, so playing on may make sense.

In either case, it is your opponent's right to resign a position they do not want to play. Take the rating points, and smile.
> 67 votes

# Answer
You have no way to know what your opponent was thinking. Maybe the move was intended to be a brilliant queen sacrifice, but then he/she realized the flaw in the plan. Or maybe it was just a slip of the mouse!

If it had been my blunder, I would probably have waited to see if you actually took the queen or decided it must be a trap and ignored it, but resigned immediately if you did take it.

I don't think you can draw much conclusion either way about "sportspersonship".
> 12 votes

# Answer
It is good sportsmanship and your opponent would be very happy.

On the other hand, you do not have to do that and are permitted to keep playing without dishonor.

Indeed I saw an expert toss a queen against a lower rated player and did not resign. In the end, after a long endgame he managed to win. He kept improving his position and won some material along the way and was helped by less than good moves by his opponent.

And it depends on the situation too. You may see you are lost but he may not. It is always good to have a poker face and keep playing in case they miss the best reply and you can recover most if not all the ground you lost.
> 9 votes

# Answer
This issue is not specific to chess. In any game where it can become obvious at some point who will win or lose it is a matter of opinion as to whether the obviously losing side should quit.

The side of "The loser should just quit and we should save ourselves the time or perhaps start a new game" side has fairly logical and straightforward reasoning. It seems other answerers here are in that boat, but it is certainly not an open-shut case.

For many people, not playing until the end ruins the entire game. I generally prefer to play to the very last move, even if it is completely obvious that I will win or lose before then.

If I quit because I'm losing, I feel like I didn't actually lose, I just quit.

If I win because my opponent quits, I feel like I didn't actually beat them, they just quit. This ruins the victory for me. It feels hollow, sometimes worse than not having played at all. It is the other player's right to quit, but it is also my right to be frustrated that they do.

Sometimes I have asked people to please play the last few moves if they quit at a spot that would take less than a minute or two to finish. Just as the loser has the right to not finish, I have the right to ask them to please finish, but I cannot force the matter. I have had people refuse my request to finish, and there is nothing that can be done about it other than politely accepting and walking away annoyed.

There is nothing unsportsmanlike about wanting to finish a game you start. There are plenty of people who feel like they need to finish.

So the summary answer to your question is that it is neither definitely sportsmanlike nor definitely unsportsmanlike. What makes it sporting or not is the manner in which it is done, though in an online game with little or no communication it is mostly a matter of opinion and opinions vary wildly.
> 6 votes

# Answer
tl;dr No, not bad sportsmanship at all.

Details: When you're sure you're going to lose, why waste your time and your opponent's time? Cash the game in and maybe be able to get in an extra game in whatever playing session you're in? And let your opponent do the same?

My personal practice is I'll resign if I have confidence my opponent knows how to win the position on the board. Sometimes I'll make my opponent play a couple of moves more, just to see if they actually do. Play well enough, and I'll resign; give me a reason to believe you won't, and I'll play on.

I can't speak to what was in your opponent's mind to resign like that, but one possibility is being so angry with themself as to just want the game to be over so they could forget it and move on, and not have to look at that mistake any longer.

On a wider note, this is the first time I've ever heard someone question the sportsmanship of resigning; it's always been complaints about the bad sportsmanship of continuing to play on. (One player, after a blunder, asked if I minded them playing it out, because they wanted to see how a game with that kind of advantage could be won -- young player, advantage was two exchanges. I didn't mind, if you're curious.)
> 6 votes

# Answer
It is totally appropriate to resign after you make a major blunder. Playing on in such a situation is implicitly saying that your opponent is a fish.
> 1 votes

# Answer
I think it’s better, from both a sportsmanship and a gamesmanship perspective, to wait for the opponent to actually move before resigning. That way the opponent feels more deserving for actually catching the blunder, but also sometimes they won’t catch the blunder and then you can keep playing.
> 1 votes

# Answer
You can resign after a blunder if you want, but what happens most common is that they wil wait for you to capture the queen, then resign
> 0 votes

---
Tags: resigning, sportsmanship
---


# Question
Title: Safe place online for children to play against others
I'm looking for a safe website where my child can play. He is developing his game, I'm worried about people he may meet on various websites.

If there are some known places please advise.

# Answer
> 9 votes
The free online chess site **Lichess** offers a feature called "kid mode".
I haven't tried it out myself, but when enabled, all site communication features are disabled while the rest of the site remains functional.

It's password protected and can be enabled under Preferences → Kid Mode:

# Answer
> 4 votes
ChessKid is a platform designed for kids, built by the people from chess.com. I don't have any personal experience with this platform, though.

---
Tags: learning
---


# Question
Title: How does Magnus create opportunities for his opponents to go wrong?
I have heard this statement many times, but I don't understand it. What does it mean exactly?

# Answer
An interesting question!

I think it was Kramnik who, when asked who the best player on earth was, mentioned some other player. When asked why not Carlsen he replied: Magnus is from another planet!

That such a great player as Kramnik, conquereor of Kasparov, was in awe of Carlsen speaks volumes.

His "sight of the board" is phenomenal as is his ability to detect tactical possibilities.

How does he create opportunities for his opponents to go wrong?

The simple answer is by continuing to play!

He seems to absolutely love playing chess and plays out positions that many other GM's would pass up as too dry and drawish.

He has a superb ability to find resources in any position where other GM's cannot. Sometimes the advantages are only microscopic but Carlsen is willing to steadily seek out and accumulate these and convert drawish positions into winning ones.

Carlsen seems content to just get a playable position out of the opening rather than dominate with superior opening knowledge like Kasparov could do.

If you play through his games he often switches play back and forth from the centre then to one wing then to the other. He keeps sustained pressure on his opponent and squeezes as much as possible out of any position.
> 3 votes

---
Tags: terminology, carlsen
---


# Question
Title: Is there a standard way of scoring a position for chess programs?
It seems most chess programs score a position basically the same way, give or take a few tenths of a point, for a given position. For example, Stockfish might score a position as .65 while Houdini might score the same position .80. If this is essentially the case, are there general "rules" for scoring a position?

# Answer
> 1 votes
This is certainly not the case. Traditional engines "score" a position by running their evaluation function (which differs from engine to engine) on the best position at the end of their search tree (which also differs from engine to engine, since this position depends on their search algorithm).

Sure there are standard concepts for scoring a position - e.g. which side has more material, which side has doubled pawns, which side has rooks on open files - but ultimately each engine does it differently, and there are positions which one engine can be very optimistic on while another is not. There are even positions where one engine thinks White has an advantage and another engine thinks Black has an advantage. Example from the ongoing TCEC Season 18 superfinal.

# Answer
> 1 votes
You're right.

Everything is based off of the assumption that 1 point= 1 pawn. Everything else is relative to that.

If an engine is evaluating a position at +3 that means either it thinks that white can win the material advantage of three pawns or that white can obtain a positional advantage equivalent to three pawns or some combination of the two.

How things are weighted vary from engine to engine but the basic concept is the same.

---
Tags: engines
---


# Question
Title: Is there a word to count one moving by one player?
Is there a word to count one moving by one player? For example, the following series of moves:

1. e4 e5 2. Nf3 Nc6 3. Bb5 a6

is counted as three moves. But if I want to denote "e4" as a unit of a count, what word should I use?

# Answer
> 16 votes
There is indeed such a word for so called "half-moves." The terminology used is the word **ply**. To speak of multiple ply, **plies** is used. One would refer to the move "e4" as the first ply of the game. An example demonstration of it can be seen at work in CSE's very own diagram viewer.

Sometimes, a user wants to add a game to their post, but wants the diagram to start with a specified board position. For example, this question would look like the below picture without the word "ply" to refer to the wanted position.

But with the code \[startply "38"\] having four spaces in front of it, the page, when loaded, shows the position after Black's 19th moves, i.e. the 38th ply, and before White's 20th move, the 39th ply.

White's ply count will always be odd while Black's will always be even. Do note that while "half-move" is a broadly used term as well, it is basically a laymen's term, and "ply" is the offical one.

# Answer
> 15 votes
The word for one move by one player is "move". This is the term used in FIDE's laws of chess.

The exception is when referring to the move counts in chess notation, where "move" commonly means one move by each player, and to disambiguate from that, the term "half-move" or "ply" is then used to clarify that only one move by one player was intended.

*Half-move* is the traditional chess term. *Ply* comes from game theory, where it's used in the description of game-playing algorithms such as alpha-beta pruning, which is used by chess engines. For that reason, chess computing uses the word ply exclusively, and with the increasing presence of engines in chess, ply is gaining prevalence outside chess computing circles.

Professional chess players use "move". In an expression such as "black has mate in 3", the count refers to the number of moves *by black*. Since black can't make 3 moves without white making 2 intervening moves, that may give the impression that "move" refers to one move by each player, but that is not the strict sense of the word.

# Answer
> 3 votes
Another term used is "single-move". From Hooper & Whyld, The Oxford Companion to Chess (1st ed., 1987):

> **SINGLE-MOVE,** a move by White *or* a move by Black. This term makes a useful distinction, for the word 'move' is frequently used to mean a move by White and a move by Black.

# Answer
> 3 votes
The answer is the word "ply"

I'm not sure why that requires a 5000 word essay with game examples though.

# Answer
> 1 votes
The standard word is "ply", although it's mainly used in the context of computers and game theory when applied to chess, rather than being a proper chess concept. For instance, you will not see the word "ply" a single time in the entire FIDE rulebook, with the word "move" being used instead.

---
Tags: terminology, ply
---


# Question
Title: How is AlphaZero defferent from Stockfish?
Obviously one is better than the other and AlphaZero uses machine learning and all, but what is the real reason for their different style of play? Given a position, both evaluate the next best move but can AlphaZero, being an AI, be mischievous and try to bluff Stockfish or something like that?

# Answer
Chess engines consist of two prongs of code: search and eval. Search is the algorithm that tells the engine which moves to look at, "searching" through the game tree to find the most promising continuation. Eval is the code that says, given this position and without making any moves, how good is this position for us?

Stockfish uses Alpha-Beta pruning for search, and a handwritten evaluation function for eval. The Alpha-Beta pruning function involves lots of tricks to prune off unnecessary branches and includes a lot of human knowledge as well, e.g. "if the eval says our position is bad, our best chance is a direct attack on opponent's king, so search moves that give check more thoroughly". The handwritten evaluation function encompasses human knowledge such as "rooks are better on open files".

AlphaZero uses Monte Carlo Tree Search for search, which is fundamentally different from Alpha-Beta, and a NN evaluation function. In other words every time AlphaZero searches a position, it queries its NN for an evaluation of it. Both of these are different from Stockfish's approach, and not necessarily better.

The different playstyles come from the fact that their search & eval functions are different. Presumably NNs dislike cramped positions, for example. As for bluffing, it doesn't work against engines. They just keep looking for the best moves.
> 3 votes

---
Tags: stockfish, alphazero, chess-ai
---


# Question
Title: Is shuffling aimlessly for hundreds of moves permissible?
As I write this, game 73 of the TCEC Season 18 superfinal has just ended. What was most "interesting" about this game is the sheer amount of shuffling both sides did: starting from around move 30 to move 200+, effectively nothing happened with Leela pushing a pawn only to avoid 50-move draws. It had three such moves to reset the 50-move counter, which naturally led to 150+ moves of shuffling. On move 220, Leela finally played 220. e4, which led to some trades and a more equal-ish position, but this also reset the 50-move counter and the shuffling started anew. The game went past move 300 with opposite color bishops on the board, enough for humans to say it's a clear draw, but Leela still saw a 40% chance for White to win, which led to more shuffling. Finally, on move 357 and faced with yet another 50-move draw, Leela's eval dropped and the game was adjudicated as drawn.

(This description makes it sound like it's Leela's fault the shuffling happened, but in fairness, Stockfish also saw a substantial White advantage for much of the game.)

This kind of scenario happens pretty often in computer chess, but I'm wondering what would've happened if this were a human game. Can the player with Black claim that White is being unsporting by shuffling and refusing to accept a draw? Are arbiters permitted to adjudicate if one player isn't making an active attempt to win the game, but seems to be merely prolonging it?

# Answer
> 10 votes
> Can the player with Black claim that White is being unsporting by shuffling and refusing to accept a draw?

No. White may be quite legitimately trying to win on time. In blitz this is always allowed. In longer formats it depends on the format.

> Are arbiters permitted to adjudicate if one player isn't making an active attempt to win the game, but seems to be merely prolonging it?

Only if there is no increment and the other player is down to less than 2 minutes on the clock. This is dealt with in the section called "**Guidelines III. Games without increment including Quickplay Finishes**" of the FIDE Laws of Chess and applies only if this was announced beforehand.

> **Guidelines III. Games without increment including Quickplay Finishes**
>
> III.1 A ‘quickplay finish’ is the phase of a game when all the remaining moves must be completed in a finite time.
>
> III.2.1 The Guidelines below concerning the final period of the game including Quickplay Finishes, shall only be used at an event if their use has been announced beforehand.
>
> III.2.2 These Guidelines shall apply only to standard chess and rapid chess games without increment and not to blitz games.
>
> ...
>
> III.4 If the player having the move has less than two minutes left on his clock, he may request that an increment extra five seconds be introduced for both players. This constitutes the offer of a draw. If the offer refused, and the arbiter agrees to the request, the clocks shall then be set with the extra time; the opponent shall be awarded two extra minutes and the game shall continue.
>
> III.5 If Article III.4 does not apply and the player having the move has less than two minutes left on his clock, he may claim a draw before his flag falls. He shall summon the arbiter and may stop the chessclock (see Article 6.12.2). He may claim on the basis that his opponent cannot win by normal means, and/or that his opponent has been making no effort to win by normal means:
>
> III.5.1 If the arbiter agrees that the opponent cannot win by normal means, or that the opponent has been making no effort to win the game by normal means, he shall declare the game drawn. Otherwise he shall postpone his decision or reject the claim.
>
> III.5.2 If the arbiter postpones his decision, the opponent may be awarded two extra minutes and the game shall continue, if possible, in the presence of an arbiter. The arbiter shall declare the final result later in the game or as soon as possible after the flag of either player has fallen. He shall declare the game drawn if he agrees that the opponent of the player whose flag has fallen cannot win by normal means, or that he was not making sufficient attempts to win by normal means.

# Answer
> 4 votes
In fairness , it seems Leela zero could have won that game by NOT shuffling on move 78. The pawn break e4!was decisive , and Leela missed it. Stockfish own PV lead to an ending with Rook and Bishop for Leela , Rook and Knight for Stockfish, with Leela a pawn up. I analyzed with Houdini 6.02 with TWO iterations of twenty minutes each , going in the first so far at depth 36 (Eval was stuck at +1.62). I put up the second iteration of analysis as soon as there were a diverging ply , with Black to move. After another 20 minutes d= 31/84 the lines indicated a rook endgame , with eval +4.11.It seems Leela zero missed a win, and not always shuffling pay off.

---
Tags: rules, fide, draw
---


# Question
Title: Position with the largest material imbalance that is a draw, no matter whose turn it is?
I am curious if there is a known position with the largest material imbalance that, no matter who it is to move, the weaker side can hold a draw.

# Answer
Here's a humorous, uncredited example I found in Lasker's Manual of Chess. However, a search revealed that it was created by Ludwig Meyer in 1886.

```
[FEN "b2b3R/1np2pp1/1p3k2/n2KN3/p7/5pN1/P1p3p1/2B2rqr w - - 0 1"]

1. Ng4+ Ke7 2. Nf5+ Kd7 3. Ne5+ Kc8 4. Ne7+ Kb8
5. Nd7+ Ka7 6. Nc8+ Ka6 7. Nb8+ Kb5 8. Na7+ Kb4
9. Na6+ Kc3 10. Nb5+ Kd3 11. Nb4+ Ke2 12. Nc3+ Kf2 (12... Ke1 Nd3#)
13. Nd3+ Kg3 14. Ne4+ Kg4 15. Ne5+ Kf5 16. Ng3+ Kf6

```

A draw by perpetual check, against all odds! Black has all the pieces, White only a few. Every move is forced.
> 6 votes

# Answer
One side with fully promoted pawns and all his material and the other side having nothing but his king. Just stalemate the king in the corner with a bishop, knight and rook, place your other material to block off checkmates and you have a forced stalemate.
> 4 votes

# Answer
As @Matthew Liu said, shoving a king in the corner and surrounding it is perfectly feasible. Going by the regular point values, the maximum possible imbalance is worth 103 points. The last moves were 1. Kh1-g2 Rh3xg3+ 2. Kg2-h1.

```
[FEN "8/8/8/8/6rq/5nr1/qqqqb2b/qqqqk1nK w - - 0 1"]

```

However, if you want a position where neither side is already stalemated, here is a king only position with an imbalance of 63 points.

```
[FEN "8/8/8/8/8/bpp5/brrppp1n/nqqqqk1K w - - 0 1"]

```

With more than a king, 68 points are possible.

```
[FEN "7n/8/8/8/1p6/brpp4/qqkrp1K1/qqqbB2n w - - 0 1"]

```

Lastly, akin to @Raymond Hancock’s answer, here is the longest known problem in which White has a minimal force against **all** of Black’s forces

```
[Title "Alexey Khanyan, SuperProblem 4/13/2009"]
[FEN "8/ppp1P3/3p4/7n/r7/1p4p1/brpp2Kb/n1q1k3 w - - 0 1"]

1. e8=Q+ Kd1 2. Qxh5+ Ke1 3. Qe8+ Kd1 4. Qxa4 Qb1 5. Qg4+ Ke1 6. Qe4+ Kd1 7. Qf3+ Kc1 8. Qf4 d5 9. Qe3 Kd1 10. Qf3+ Kc1 11. Qf4 d4 12. Qg5 Kd1 13. Qg4+ Ke1 14. Qe4+ Kd1 15. Qf3+ Kc1 16. Qf4 a6 17. Qg5 Kd1 18. Qg4+ Ke1 19. Qe4+ Kd1 20. Qf3+ Kc1 21. Qf4 a5 22. Qg5 Kd1 23. Qg4+ Ke1 24. Qe4+ Kd1 25. Qf3+ Kc1 26. Qf4 a4 27. Qg5 Kd1 28. Qg4+ Ke1 29. Qe4+ Kd1 30. Qf3+ Kc1 31. Qf4 a3 32. Qg5 Kd1 33. Qg4+ Ke1 34. Qe4+ Kd1 35. Qf3+ Kc1 36. Qf4 b6 37. Qg5 Kd1 38. Qg4+ Ke1 39. Qe4+ Kd1 40. Qf3+ Kc1 41. Qf4 b5 42. Qg5 Kd1 43. Qg4+ Ke1 44. Qe4+ Kd1 45. Qf3+ Kc1 46. Qf4 b4 47. Qg5 Kd1 48. Qg4+ Ke1 49. Qe4+ Kd1 50. Qf3+ Kc1 51. Qf4 c6 52. Qg5 Kd1 53. Qg4+ Ke1 54. Qe4+ Kd1 55. Qf3+ Kc1 56. Qf4 c5 57. Qg5 Kd1 58. Qg4+ Ke1 59. Qe4+ Kd1 60. Qf3+ Kc1 61. Qf4 c4 62. Qg5 Kd1 63. Qg4+ Ke1 64. Qe4+ Kd1 65. Qf3+ Kc1 66. Qf4 c3 67. Qg5 Kd1 68. Qg4+ Ke1 69. Qe4+ Kd1 70. Qf3+ Kc1 71. Qf4 d3 72. Qe3 Bg1 73. Kxg1 Kd1 74. Qf3+ Kc1 75. Qf4 g2 76. Kxg2 Kd1 77. Qf1#

```

Source: The Die Schwalbe Chess Problem Database
> 4 votes

# Answer
Regarding wins, and not draws, I remember a joke problem by Otto Blathy where black has their entire army, but the pawns trap all the pieces and black can only play Qa1 and Qa2 repeatedly. White promotes their single pawn to a knight, forces black to make a move that strips their king’s protection, and then checkmates black.

```
[Title "Otto Blathy, The Chsss Amateur 1922"]
[FEN "8/8/8/2p5/1pp5/brpp4/qpprpK1P/1nkbn3 w - - 0 1"]

1. Kxe1 Qa1 2. h3 Qa2 3. h4 Qa1 4. h5 Qa2 5. h6 Qa1 6. h7 Qa2 7. h8=N Qa1 8. Nf7 Qa2 9. Nd8 Qa1 10. Ne6 Qa2 11. Nxc5 Qa1 12. Ne4 Qa2 13. Nd6 Qa1 14. Nxc4 Qa2 15. Na5 Qa1 16. Nxb3#

```

Entry #270 in Tim Krabbe’s Chess Diary shows a problem which is pretty close to what you're asking for, but it's a win and not a draw. It is a problem is which White faces nearly all of Black’s forces.

```
[Title "Marek Kwiatkowski, The Problemist 1992, Mate In 29 Moves"]
[FEN "3n4/rBp1p3/2P5/2PK4/k2N4/pp2R3/bppB2Rp/q1n1r1b1 w - - 0 1"]

1. Rg4 h1=Q+ 2. Nf3+ Kb5 3. Rb4+ Ka5 4. Rbe4+ Kb5 5. Nd4+ Ka4 6. Ne2+ Kb5 7. Nc3+ Ka5 8. Nxa2+ Kb5 9. Nc3+ Ka5 10. Ne2+ Kb5 11. Nd4+ Ka4 12. Nf3+ Kb5 13. Rb4+ Ka5 14. Rbxb3+ Ka4 15. Rb4+ Ka5 16. Rbe4+ Kb5 17. Nd4+ Ka4 18. Ne2+ Kb5 19. Nc3+ Ka5 20. Na2+ Kb5 21. Ba6+ Rxa6 22. Nc3+ Ka5 23. Ne2+ Kb5 24. Nd4+ Ka4 25. Nf3+ Kb5 26. Rb4+ Ka5 27. Rb6+ Ka4 28. Rxa6+ Kb5 29. Ra5#

```
> 2 votes

# Answer
For a draw by insufficient mating material (rather than stalemate), one possibility is king and nine bishops, all on squares of the same colour (eight of them promoted) versus bare king.
> 2 votes

# Answer
Using a different idea, it is trivial to generate a stalemate that is 26 pawns in material behind for one side by forming an indestructible pawn chain (with only one piece to capture a pawn and white with a defender for that).

```
[FEN "r2qkb1r/4p3/3pPp2/2pP1Pp1/1pP1B1Pp/pP5P/P7/4K3 w - - 0 1"]

```

Really, either idea (isolated bare king against the world or indestructible pawn chain) requires cooperation from the other side. There is no way for these formations to happen unless the opponent is being very, very helpful. I think a much more interesting question would be, "What is the biggest material imbalance for a position that is drawn for either side that happened in a real game?"
> 0 votes

---
Tags: problems, records
---


# Question
Title: Is tactics training just a waste of time when you cannot play long games?
I have been doing tactics training quite regularly since the beginning of the year. However, I haven't really been playing a lot (for obvious reasons). On average, I would say that I spent 10 hours per month on tactics since January (except for June, as I was really busy with other things). I also did some additional training in other areas of the game, but that was limited to mainly 2 months. Now, despite my efforts, I don't think I have improved. Chesstempo estimates my rating between 2150 and 2250 Fide (for context: my current rating is about 2100), but I don't see that in my Blitz games (I have been rated between 2200 and 2300 on lichess since January with almost no change. If anything, I got slightly worse). I find that pretty discouraging, and I'm wondering if all that training has just been a waste of time because I didn't play OTB games. There a lot of other things I could do with my time and I'm honestly thinking of dropping chess completely if all my efforts are in vain. Any help is appreciated.

# Answer
> 5 votes
Thank you for sharing your very discouraging story. I've been an IM for years and recently I've tried to become a grandmaster, did a lot of tactics but: I failed, and now with corona and 0 OTB games it feels a bit silly anyway. So I started to learn code, which is fun haha and very off topic here.

The biggest difference you can make to get from 2200 to 2400 is understanding of pawn structures and having a coherent repertoire. Especially facing 1.Nf3 and 1.c4 becomes more important. But apart from a broad coherent repertoire I would say start learning openings 20 moves deep, and in case you have some forced line, start memorizing 30 moves, take research seriously, try to get some great books to guide you. And then in the main lines, try improving on the book.

Another great help is to take Dvoretsky's endgame manual and go through it a lot. That book is pure gold. Especially online a lot of games end in some kind of endgame. And making rabbits appear out of hats is great.

The reason for focusing so much on openings is because that's probably your bottleneck right now. You don't have the strategic insight to make your tactics work. e.g. different players need different things. Try to identify where you're weakest.

One trick to do that is to study the topics you most dislike in chess. For me that was opposite coloured bishops, and that has helped me a lot getting better at positional play.

You can still do the tactics, but I am 100% sure you would regain your motivation when you would work on something you need more!

Last but not least: chess progress is a bitch! The rating always comes too late, when you lost motivation and think about quitting.

Cheers!

---
Tags: learning, training
---


title: Extract anonymized games out of a pgn

text:
# Question
Title: Extract anonymized games out of a pgn
I'm a big fan of pgn-extract, but I am open to other linux-friendly tools. I have a big pgn file (over 5 million games) and a set of ECO codes. My goal is to fetch all the games matching those ECO codes, but with removing or fuzzying the players names and ratings, the year played, and the game result.

I then plan to open a random game with Scid and analyze it, since removing the players' data and game result will help me avoid any bias.

So far Im using pgn-extract like this: `pgn-extract -t filter_for_naked --noresults --notags --nocomments --noduplicates -bl20 --output naked.pgn my.pgn`

But Scid is having problems opening the file. As expected each game is just the set of moves (no headers at all) and I suspect Scid requires at least some headers.

Any advise on how to use pgn-extract or Scid to achieve this?

# Answer
Thanks for your compliment about pgn-extract (I am its author). You might be able to make the task a little easier by adding `--linelength 1000` to the argument list in order to get each game on a single line, then use sed to add an unknown result to the end of the game and re-process the game with pgn-extract to add an empty 7-tag roster. Finally, use sed again to edit the White and Black tags.

The resulting command would look something like the following, although sed experts might be able to clean it up a bit:

```
pgn-extract -t filter_for_naked --noresults --notags --nocomments --noduplicates -bl20 --linelength 1000 my.pgn | sed -e 's/..*/& */' | pgn-extract -7 | sed -e 's/White "?"/White "AnonW"/;s/Black "?"/Black "AnonB"/' > naked.pgn

```

You will get some error reports for games that end in mate having inconsistent results but you can hide those in a logfile.
> 8 votes

# Answer
Scid vs PC requires \[Black "AN Other1"\] \[White "AN Other2"\] \[Result ""\].
Since this was cloned from SCID I'm pretty sure SCID will be the same. I suggest you write a simple program to add these 3 header fields with the \[Result\] field matching the result at the end of the game.
> 3 votes

# Answer
You can use `sed '/Result/c[Result ""]' my.pgn > no_results.pgn` to replace lines containing the string `Result` with whatever you want the line to be. You can adopt this for whatever else you want to replace. You want to keep the `c`.
> 2 votes

# Answer
You can always copy the pure text from a PGN manually, but that only works for one game.

For more games I am not sure, and unfortunately most chess software is for windows.
> 1 votes

---
Tags: software, programming, scid, linux
---


# Question
Title: How do you document your opening repertoire on a mac?
I have an opening repertoire which I play consistently. My problem, however, is that occasionally I will find holes in my repertoire: main line variations for which I have zero prep. I'd like to make my repertoire air-tight. As in, I would like to fill these gaps in my knowledge of theory.

My Idea is to thoroughly document, and scribe my repertoire. In doing this, I should clearly be able to see where my knowledge of theory is lacking and devote extra effort into learning those lines/ middlegame plans/ structures etc.

The problem, however, is that I can't find any software which would allow me to do precisely this. My computer is a mac, and so I cant use programs like chessbase or bookup. I have attempted to write out all the lines in a word processor, but it becomes extremely difficult to keep my lines organized, and I also cannot easily see the position on a board.

If anyone knows of a good solution I would be ecstatic to hear.

# Answer
I prefer to use Graphviz ( either in the online editor or downloadable software. You can create a flowchart with all moves and transpositions, here is an example :  This is an excellent answer which explains how to use it. If you have difficulty in visualize moves without the board, you can add screenshots of important position in the flowchart. Lichess study, as the other answer points out, is also a good alternative.
> 4 votes

# Answer
A lichess study would be a good way to do this.
> 6 votes

# Answer
The way I do it is with chesstempo.com, their opening tool is incredibly useful!
> 1 votes

# Answer
I used to use xChess on my Mac. It's a GUI, which allows you to input variations and comments to your heart's content. And also to use an engine.

That's pretty much the extent of it, but definitely easier then writing lines into an text editor.
> 1 votes

---
Tags: opening, software, preparation
---


# Question
Title: Play against a computer, but only with a few pieces and without the kings
I would like to practise playing chess against an chess engine/program, but only with a few pieces, without the kings. For example, 3 pawns against one knight.

Does exist any chess engine/program like this?

# Answer
No engine that I’ve ever come across has this functionality. In fact it would actually be surprisingly difficult to get a chess engine to do this;

The most fundamental rule of chess is that you have to checkmate your opponent’s king. A position without kings on the board wouldn’t make sense to something like Stockfish, because the game ends before the king can be captured. If you don’t have kings on the board, you essentially have to rewrite the rules of the game for the engine. This would also have the knock-on effect that, because king safety it widely considered the most important consideration in chess, you would then have to re-programme how the engine analyses the board, as king safety would no longer be a thing. By this point, once you have an engine which has different game rules and a different way of analysing the game, it doesn’t really make sense to say that it’s the same engine, but rather two different engines playing two different games. Long story short; you couldn't give a position without kings to a normal chess engine and expect to get a meaningful analysis back.

If you wanted to get around this, you could set up a position where both kings are in the opposite corner, so that they’re far enough away from the action that they couldn’t get there in time to help (assuming it’s something like 3 pawns vs a knight). Alternatively, you could set up the position on a board and play against yourself, trying to find the best move for both sides.

tl;dr – You would have to build an engine with this specific scenario in mind for it to work.
> 5 votes

# Answer
That's really bad practice in my opinion. I see no reason to play without kings. if you don't know yet how the pieces move, try moving them yourself on a physical board
> 2 votes

---
Tags: engines, learning
---


# Question
Title: Hosting bughouse server for local competition?
I'm interested in running a local competition for bughouse engines. What chess server software can I use to run the games? The most relevant question I found was but the answer is almost 4 years old.

Is there an well-maintained open source chess server I can use to host a bughouse server?

# Answer
As the question you linked indicates there is a way to run bughouse engine games via FICS using XBoard/Winboard, which I also explained in my answer to a related question.

However, if all of your engines are anyway running locally, that is neither very convenient nor an efficient way of running such matches, since the server communication in principle is completely unnecessary. Unfortunately, there does not seem to be any tool for engine matches similar to cutechess as there is for other chess variants.

Therefore, a few months ago I started to develop fairyfishtest as a script for testing bughouse (and many other variants) based on and for my engine Fairy-Stockfish, but it should also work with other CECP engines. It currently still has two issues with bughouse rules, but those are far from impossible to solve.

There is also a fork of python-chess that supports bughouse, but there does not seem to be any documentation on it, so I do not know whether/how it can be used for engine testing in bughouse.
> 2 votes

---
Tags: engines, bughouse
---