# Question
Title: What is the best way to play the middlegame?
Many times, I can play the opening correctly and find myself in a favorable position. This is because the opening has clear principles that I can follow (i.e. develop minor pieces, control the center, safe king). This positional advantage is especially exaggerated when my opponent makes mistakes that cost them some tempo, for example through early queen attacks.

However, upon securing a comfortable position, I am usually clueless as to how to play the middlegame. Usually, I end up pushing pawns recklessly or shuffling pieces and hoping for the best.

So, what are some things that I can do after I develop to milk a positional advantage? It would be great if you can address specific cases such as:

1. What to do when your opponent is underdeveloped?
2. How do you pawn storm without creating weaknesses?
3. How do you conceive long-term plans?
4. Aside from attacking pieces outright, are there better strategies for putting pressure on your opponent?

# Answer
> 2 votes
The middlegame is too vast of a topic to be fully covered in an answer here.

We already have a question with book recommendations on middlegame strategy: Best books on middlegame strategy?

So I will take this opportunity to recommend some other resources which aren’t books.

---

The Wikipedia article is a nice high-level introduction: Chess Middlegame (Wikipedia)

---

Hanging Pawns on YouTube has a playlist titled Chess Middlegame Ideas with around 50 videos on the middlegame.

Also on YouTube, The Golden Rules for the Middlegame | Chess Principles | Improver Level | IM Andrey Ostrovskiy is a great 30-minute video on the middlegame.

Chess Middlegame Strategy | Chess lesson # 91 (35 minutes) by NM Robert Ramirez is also good, but it focuses on examining different positions to find a strategy, so perhaps you can use it to practice or to assess what you have learnt.

---

Finally, there are some (paid) Chessable courses on the middlegame with good feedback:

Mastering Chess Middlegames by GM Alexander Panchenko

Chess Calculation Training: Middlegames by GM Romain Edouard

Sharp Middle Games: A Practical Guide to Chess Calculation by GM Daniel Gormally

---
Tags: strategy, middlegame, development
---


# Question
Title: Is a move called a "book move", if it leads to a familar book position but objectively speaking, this move is obviously inferior?
For example, after 1. Nf3 e5?, the move 2. Nxe5 is objectively the best continuation. However, the move 2. e4 leads to a familiar opening position. In this case, do we call 2. e4 a "book move"?

Similarly, after 1. c4 d5?, is 2. d4 a "book move"?

# Answer
> 21 votes
> For example, after 1. Nf3 e5?, the move 2. Nxe5 is objectively the best continuation. However, the move 2. e4 leads to a familiar opening position. In this case, do we call 2. e4 a "book move"?

No. Such a move is called a *transposition*.

According to Wikipedia:

> In chess, a transposition is a sequence of moves that results in a position which may also be reached by another, more common sequence of moves. Transpositions are particularly common in the opening, where a given position may be reached by different sequences of moves. Players sometimes use transpositions deliberately, to avoid variations they dislike, lure opponents into unfamiliar or uncomfortable territory or simply to worry opponents.

# Answer
> 8 votes
You probably won't find the position after 1.Nf3 e5? in any book. So most likely, no positions from there are book moves.

But if there's one silly book that decide to write a paragraph on 1...e5?, I'm sure it mentions only 2.Nxe5 next.

So no, just that a move would lead back into known theory doesn't make that move *in that position* theory.

---
Tags: opening, terminology
---


# Question
Title: Is Nxd5 playable in the Italian Game: Two Knights Defense?
The following move is considered dubvious in lichess.org opennings explorer because of the sacrifice in f7:

```
[FEN "r1bqkb1r/ppp2ppp/2n2n2/3Pp1N1/2B5/8/PPPP1PPP/RNBQK2R b KQkq - 0 5"]

1... Nxd5 2. Nxf7 Kxf7 3. Qf3+ Ke6 4. Nc3 Ncb4

```

The following explanation is given:

> 5 ... Nxd5?!
>
> Immediate recapture of the pawn sometimes thought dubious, at other times theory considers it quite playable. From a positional point of view it's not considered a good move due to the creation of open lines that White can now use to aggressively attack, and for this reason it's rarely played at master level. While modern computer analysis suggests that it may be theoretically playable, few doubt that 5...Na5 is a more practical choice in an over the board game.

While I use to refuse sac lines because I am a poor player, I feel confortable with white in this line. However lichess says it is playable.

How much playable it is? Can black preserve material not being checkmated with his king on the center and the open white position?

# Answer
Black is not in danger of being mated, but still, in the "standard" variants, Black also loses the e-pawn, thus having only +1 material, a huge developmental disadvantage, and a king on the run. In my youth, I blitzed this opening with both sides and always won, but that was because I was the best player in my club. If you are willing to suffer, go forth. The Lichess percentage is atrocious (+50=20-30) but Stockfish is unimpressed playing Black.
> 6 votes

# Answer
It's playable in the sense that there is no known forced win, but the line Black has to thread to equality is a fine one. This is reflected by the opening eval, about +0.7 - +0.9 (see my answer to a different question here about how to interpret the opening eval).

It's possible Black can defend the position. Here's a game which Leela Chess Zero defends with Black, and here's another where Stockfish defends with Black. It's even possible Black wins, although this game 1) Black was clearly the stronger player and 2) the book line given to the engines after 5...Nxd5 is not the best continuation for White, hence the 0.00 opening eval.

Note computers, if left to their own devices, generally prefer 6. d4 to 6. Nxf7.
> 3 votes

---
Tags: opening, analysis, italian-game, two-knights
---


# Question
Title: Can a player directly register with FIDE so as to avoid charges when moving counties?
It seems FIDE charges a lot if a chess player wishes to move to a different country, unless the player is registered under the FIDE flag. Can a player register directly with FIDE so as to maintain freedom of movement within the UK?

# Answer
> 5 votes
> Can a player register directly with FIDE so as to maintain freedom of movement within the UK?

The first thing to note is that you are not free to register with FIDE with any federation you like. You must have some connection with the target federation based on either nationality or residence. The rules are specified in Regulations for Registration & Licensing of Players (effective from July 1, 2015).

> 1.5 Each player represents is registered either to:
>
> 1.5.1. A National Chess Federation (NCF) which is a member of FIDE, or
> 1.5.2. Upon a decision by FIDE Council, an Affiliated Organisation which represents an autonomous territory which is contained within no more than one NCF
> 1.6 **There is a special category called ‘FIDE flag players’ (the Federation symbol is FID) to cover those players who are, for whatever reason, without a Federation, in order to ensure that these players can play chess in FIDE rated tournaments.**
>
> 1.7 A player may be registered under a Federation if he or she has citizenship, naturalization or residency in the country of that Federation.
> 1.8 A player may only be registered with and only represent one Federation at any particular time.
> 1.9 A player who has dual citizenship must be registered with and only represent one Federation at any particular time.

The UK is special in FIDE terms (as it is in FIFA, soccer, terms) in that instead of there being one UK federation there are several - England, Scotland, Ireland (which actually encompasses Ireland, a separate country, and Northern Ireland, a part of the UK).

If your first registration with FIDE is with one these federations and you have UK nationality I think your registration would be unproblematic. However I'm not sure how that would work on a change of registration.

It would appear from 1.6 if you have *never* had a FIDE registration then you can register directly with FIDE however your initial registration has to come from a federation registering you to play in a tournament in their jurisdiction and they are never going to do that because that requires additional work and permission. You cannot register directly with FIDE from a position of never having had a FIDE registration.

The principle here is that FIDE are not in competition with national federations. When you register with a national federation you also pay an annual membership fee. FIDE charges something like 60 euros for membership but does not want to deprive member federations of membership money. Registration as FID is only open to players whose federations are in dispute either with the player (eg Iran with players who have disqualified players who either played Israeli players or who broke Iranian religious dress codes) or with FIDE (some years ago Bulgaria was in dispute with FIDE and all Bulgarian registered players had their FIDE registration changed to FID).

The FIDE document Transfer Regulations & Rules of Eligibility for Players (effective from December 01, 2020) deals with transfers between federations.

It starts by clarifying initial FIDE registration:

> 1. REGISTRATION UNDER A FEDERATION
>
> 1.1. A player may initially be registered by a Federation **only if he or she has citizenship, naturalization or residency in the country of that Federation**.

FIDE is not a national or geographic entity which supports "citizenship, naturalization or residency". This suggests that you cannot initially register with FIDE as FID.

However, we also have this:

> 3. TRANSFERS BETWEEN FEDERATIONS
> 3.1. All transfers shall be the responsibility of the new Federation and must be submitted to the FIDE Secretariat on the prescribed form in Annex A “Notification of change of Federation” together with the supporting documentary evidence of date and place of birth, citizenship and residence. A Notification Fee of € 50 is payable for all transfers.
> 3.2. **No Notification Fee is required for FIDE flag players who have never been registered with a National Federation**.

Which suggests that there are circumstances in which you can make your initial FIDE registration as FID. I suspect that this was a special clause entered to allow Bulgarian players to enter FIDE registered tournaments during the period when Bulgaria was suspended from FIDE. FIDE's dispute was with the Bulgarian federation and their officials not Bulgarian players and this allowed new Bulgarian players to play FIDE rated chess and not pay the notification fee when they later change to a national federation.

Finally, note that the "freedom of movement within the UK" part of your question makes no sense. Freedom of movement and FIDE registration are completely independent. One does not affect the other.

If you meant that you want to be able to play in FIDE rated tournaments in England while having SCO FIDE registration or vice versa then, again, there is no limitation. You will have to pay tournament entry fees including and national federation membership fees to play in any particular federation. Having FID registration has no effect on that.

---
Tags: fide
---


# Question
Title: Does it make any practical difference to a normal chess player the choice of federation that issues the FIDE number?
Clearly if a person is good enough to play for their county they need to be registered with the correct federation in their FIDE record, does it makes any difference to other chess players?

# Answer
> does it makes any difference to other chess players?

Only in very special circumstances for special players. Only if a player is trying to get a title norm (WIM, IM, WGM, GM) in a tournament which qualifies as a norm event does the FIDE federation of the player's opponents matter.

According to FIDE Title Regulations effective from 1 January 2022:

> 1.4.2 The following are not included:
>
> Games against opponents who do not belong to FIDE federations. Players with federation “FID” are accepted, but do not count as a foreign player.
> ... 1.4.3 Federations of opponents
>
> At least two federations other than that of the title applicant must be included, except 1.4.3a - 1.4.3d shall be exempt. Nevertheless, 1.43e shall apply.

So, if you are playing in a norm event then for your result to qualify as a norm then you must against players from at least two other federations and FID does not qualify as a different federation.

In all other circumstances the federation of the players (as long as they have a federation) is irrelevant from a chess perspective.
> 2 votes

---
Tags: fide
---


title: Duplex forced selfstalemate

text:
# Question
Title: Duplex forced selfstalemate
Ludwig Zagler, Chess Ultimates 12/1974

```
[FEN "3nBb2/3PRP2/2ppPPpp/2nk2pb/2p2QN1/1r1rBKP1/7q/8 w - - 0 0"]

```

self=1, 7 solutions

This is the record (7 variants) for forced single side selfstalemates. I expect that Zagler, who even made a systematic for one-mover records, also did the duplex version (*any* move for *both* sides selfstalemates), but could not dig it up on the existing databases.

Since one white and one black selfstalemate can be easily done with 8 pieces, please give at least 3 overall (or a link to an existing record).

# Answer
Whoever moves first is stalemated. There are four possible first moves for both sides, thus creating four variations.

```
[FEN "8/8/8/1p1p1p1p/8/1P1PpP1P/4Pp1p/5K1k w - - 0 1"]

```
> 1 votes

---
Tags: problems, records, stalemate
---


# Question
Title: Why does stockfish move quality increase non-monotonically with increasing depth? -- selected moves at depth 3 are worse than depth 1
I have been working on a project looking at how stockfish moves change with increasing computation time (here search depth), and have found something peculiar - namely that the quality of moves that stockfish selects does not increase monotonically with depth.

The question is - why are the moves that stockfish selects at depth 3 worse than the moves that stockfish selects at depth 1?

A bit on how i’ve analyzed this. I’ve taken many positions for games appearing online, and then for each position collected stockfish’s move suggestions in that position, at each sequentially increasing depth limit (so getting the move suggested at depth 1, depth 2, depth 3 etc... up to depth 18). Then I have evaluated each of those suggested moves by carrying out the move and using stockfish (at depth limit 18) to evaluate the resultant board state.

The plot below shows the average evaluations of the move stockfish selects at each increasing depth. (Note that for each position, I translated the evaluation to win probability, and then subtracted the evaluation of the move at depth 1 from the rest of the line so it would be at 0. Additionally, I have cleared the cache before each evaluation to try to remove any ordering effects).

Curiously, the evaluations are non-monotonic with respect to depth. That is, according to the evaluations of stockfish at depth 18, the moves selected by stockfish at depth 3 are worse than the moves selected at depth 1.

Would anyone understand why this happens? I would have expected, on average, move quality to increase with increasing search depth.

# Answer
I verified your results through game matches.

### d3 vs d1

Here d1 wins. I am surprise with this result.

```
Score of sf14.1_d3 vs sf14.1_d1: 423 - 463 - 114  [0.480] 1000
...      sf14.1_d3 playing White: 245 - 196 - 59  [0.549] 500
...      sf14.1_d3 playing Black: 178 - 267 - 55  [0.411] 500
...      White vs Black: 512 - 374 - 114  [0.569] 1000
Elo difference: -13.9 +/- 20.3, LOS: 9.0 %, DrawRatio: 11.4 %

```

### d4 vs d1

d4 now wins.

```
Score of sf14.1_d4 vs sf14.1_d1: 665 - 237 - 98  [0.714] 1000
...      sf14.1_d4 playing White: 336 - 113 - 51  [0.723] 500
...      sf14.1_d4 playing Black: 329 - 124 - 47  [0.705] 500
...      White vs Black: 460 - 442 - 98  [0.509] 1000
Elo difference: 158.9 +/- 22.4, LOS: 100.0 %, DrawRatio: 9.8 %

```

### Use sf14

d3 wins

```
Score of sf14_d3 vs sf14_d1: 564 - 337 - 99  [0.614] 1000
...      sf14_d3 playing White: 296 - 156 - 48  [0.640] 500
...      sf14_d3 playing Black: 268 - 181 - 51  [0.587] 500
...      White vs Black: 477 - 424 - 99  [0.526] 1000
Elo difference: 80.3 +/- 20.9, LOS: 100.0 %, DrawRatio: 9.9 %

```

So this has to do with the changes in Stockfish itself.

I checked the code compiling and testing every commit starting from the release of sf14, that has to do with pruning/reduction. The commit that is responsible on the d3 loss vs d1 is this: https://github.com/official-stockfish/Stockfish/commit/ad357e147a1b8481a04761d726ce1db14115a68f

### d3 vs d1

The 20210828 in sf20210828\_d3 is the commit date .

```
Score of sf20210828_d3 vs sf20210828_d1: 393 - 478 - 129  [0.458] 1000
...      sf20210828_d3 playing White: 216 - 219 - 65  [0.497] 500
...      sf20210828_d3 playing Black: 177 - 259 - 64  [0.418] 500
...      White vs Black: 475 - 396 - 129  [0.539] 1000
Elo difference: -29.6 +/- 20.2, LOS: 0.2 %, DrawRatio: 12.9 %

```
> 6 votes

---
Tags: stockfish, evaluation, depth
---


# Question
Title: What is the justification for the calculations of FIDE previously unrated player not being balanced?
From the FIDE handbook

> 8.22 If he scores 50%, then Ru = Ra
>
> 8.23 If he scores more than 50%, then Ru = Ra + 20 for each half point scored over 50%
>
> 8.22 If he scores less than 50% in a Swiss or team tournament: Ru = Ra + dp
>
> 8.25 If he scores less than 50% in a round-robin: Ru = Ra + dp x n/(n+1).

What's the justification for the rules for scores of less then 50% being different then over 50%?

# Answer
> 2 votes
> What's the justification for the rules for scores of less then 50% being different then over 50%?

I don't think there is any good justification for that. There is also a difference in the calculations for \<50% between Swiss and round robin tournaments. I think these rules were originally just transcriptions of the logic of the code used by FIDE in their rating calculations.

In the old days FIDE rated tournaments rather than games. In a way it made sense to have rules for rating round robins and for Swiss tournaments. Nowadays FIDE rates individual games and so these elements of the rules are obsolete.

FIDE are a bit slow updating some of these documents but they have changed the rules in the latest rating document. The document you quote is called FIDE Rating Regulations effective from 1 July 2017 till 31 December 2021 (with amendments effective from 1 February 2021).

The latest document is called FIDE Rating Regulations effective from 1 January 2022. That says:

> 8.2 Determining the initial rating 'Ru' of a player.
>
> 8.2.1 If an unrated player scores zero in their first event this score is disregarded. Otherwise, their rating is calculated using all their results as in 7.1.4.
>
> 8.2.2 Ra is the average rating of the player's rated opponents.
>
> 8.2.3 If the player scores 50%, then Ru = Ra.
>
> If they score more than 50%, then Ru = Ra + 20 for each half point scored over 50%.
>
> If they score less than 50%, then Ru = Ra + dp
>
> Ru is rounded to the nearest whole number.

The round robin element has gone. So, they have got rid of one element of confusion and difference but not the one between an overall score of 50%, \>50% and \<50%.

I suspect that the "*Ru = Ra + 20 for each half point scored over 50%*" bit is just wrong. I don't believe they calculate initial rating like that any more. It is a relic from rating by tournament rather than by game. I think they just forgot to take that line out while they were removing "*If he scores less than 50% in a round-robin: Ru = Ra + dp x n/(n+1)*"

---
Tags: rating, fide
---


# Question
Title: What is the justification for calculations of FIDE unrated player having different rules depending on tournament type?
From the FIDE handbook

> 8.22 If he scores 50%, then Ru = Ra
>
> 8.23 If he scores more than 50%, then Ru = Ra + 20 for each half point scored over 50%
>
> 8.22 If he scores less than 50% in a Swiss or team tournament: Ru = Ra + dp
>
> 8.25 If he scores less than 50% in a round-robin: Ru = Ra + dp x n/(n+1).

What's the justification for rating calculation rules for unrated players being different between round-robin and Swiss tournaments.

See also What is the justification for the calculations of FIDE previously unrated player not being balanced?

# Answer
> What's the justification for rating calculation rules for unrated players being different between round-robin and Swiss tournaments.

There is no justification for this today. In the dim and distant past (like about 15 years ago, maybe more) FIDE rated tournaments not individual games. In this setting they needed different algorithms for Swiss and for round robin tournaments. Nowadays this makes no sense since they don't do their rating calculations like that.

FIDE are sometimes slow in updating their documentation (something we software engineers can understand ;-) but they have released a new rating document - FIDE Rating Regulations effective from 1 January 2022 which has removed mention of Swiss and round robin tournaments. If you search for these terms on the page you get zero hits. This more closely reflects FIDE's current approach of rating games not tournaments.

That section now looks like this:

> 8.2 Determining the initial rating 'Ru' of a player.
>
> 8.2.1 If an unrated player scores zero in their first event this score is disregarded. Otherwise, their rating is calculated using all their results as in 7.1.4.
>
> 8.2.2 Ra is the average rating of the player's rated opponents.
>
> 8.2.3 If the player scores 50%, then Ru = Ra.
>
> If they score more than 50%, then Ru = Ra + 20 for each half point scored over 50%.
>
> If they score less than 50%, then Ru = Ra + dp
>
> Ru is rounded to the nearest whole number.
>
> 8.2.4 If an unrated player receives a published rating before a particular tournament in which they have played is rated, then they are rated as a rated player with their current rating, but in the rating of their opponents they are counted as an unrated player.

Note also the use of more inclusive language by FIDE. This is a very recent trend.
> 2 votes

---
Tags: rating, fide, tournament
---


# Question
Title: Is there a way to extract the position from a live chess game while it's happening in chess.com?
I would like to make something that has the capability to convert a chess game in chess.com to a text-to-speech output (for example to play blindfolded.) I know this has been made before, but I'm not looking for the product but rather the process. Is there a way to extract moves as they are being made or the PGN or something like that from a live chess.com game while it's happening? Assume I know everything I need to know, just give me the explanation if possible.

# Answer
> 2 votes
You can just scrape the HTML. Here's a picture of the HTML that chess.com uses to store moves:

Most modern languages have ways of scraping HTML on update, so this should solve your problem.

# Answer
> 2 votes
If you click the "Explorer" icon during the game, it will open the Opening Explorer page in a new window. The URL of the page will contain the move list. For example:

`https://www.chess.com/explorer?moveList=e4+e5+Nf3+Nc6`

If you want the actual PGN, it can also easily be accessed from that page using the normal buttons.

I assume there's some limit as to how many moves are allowed, although I just tried it 35 moves into a game and it still had all the moves.

---
Tags: online-chess, pgn, chess.com
---


title: Anki deck for tactics training

text:
# Question
Title: Anki deck for tactics training
Does anybody have Anki decks for tactics training? If anyone has such decks, could you share them with me?

I am trying to improve my tactics and I have heard that space repetition is one way to do that. As such I want to have some decks to give it a shot. I've been searching for chess tactics decks, but I can't find any.

# Answer
> 5 votes
Truth is there isn't a lot out there for chess. The best I could find was this from the Ankiweb site - https://ankiweb.net/shared/info/1176122148 There aren't many free decks for chess but it does guide you into how to make your own which you can do using puzzles that you find and like in books and the web.

For getting started with Anki Alex Vermeer's site has some useful stuff - https://alexvermeer.com/anki-essentials/

# Answer
> 3 votes
You can easily craft your own anki decks based on pgn files. You just need to craft a .csv file that has on the first column the FEN positions as \[fen\]setup\[/fen\] and on the second column the solution. If you import the csv in Anki, you'll end up with cards that have the board set up in one side and the annotation on the other side.

I wrote a guide on how to manipulate pgn to craft csv files can be found here: https://jpr.space/posts/linux-anki-chess/

# Answer
> 2 votes
I made a template here https://ankiweb.net/shared/info/1082754005

and some tactics https://ankiweb.net/shared/info/2047046995

# Answer
> 0 votes
A quite inexpensive app iChess will allow displaying & solving a collection of puzzles on Android phones & tablets. As with Anki you put the puzzle in a pgn file with tag lines \[Setup "1"\] & \[FEN "..."\]. The author supplies a few files but it will read your own. I've collected about 800 puzzles in my own files.

# Answer
> 0 votes
Lichess.org is a great source for tactics collections which can be exported to PGN (portable game notation) file. I have built an online tool that automatically converts tactics saved in a PGN file to Anki flashcards deck.

Please check out my video for instructions on how to build Anki deck for tactics training automatically out of PGN file. It provides instructions on how to convert tactics found on Lichess.org website to Anki flashcards deck.

---
Tags: tactics, training
---


# Question
Title: Program that will give all available moves given the state of a board, including check
I am trying to write a program that will give out every possible move for every piece (one move deep) given the state of a board. I have already done this such that it works with everything except check. It will allow the king to move itself into check, and it will allow a piece to be moved out of the way such that it places the king in check. I can't think of an efficient way of removing these moves from the set of moves I generate.

I am storing the board as a list of lists, where each list is a row on the board. Black is at the top and white is at the bottom. Lowercase is black, uppercase is white.

P = pawn, R = rook, N = Knight, Q = Queen, K = King.

Therefore, the starting board looks like this:

```
board = [["r", "n", "b", "q", "k", "b", "n", "r"],
         ["p", "p", "p", "p", "p", "p", "p", "p"],
         ["", "", "", "", "", "", "", ""],
         ["", "", "", "", "", "", "", ""],
         ["", "", "", "", "", "", "", ""],
         ["", "", "", "", "", "", "", ""],
         ["P", "P", "P", "P", "P", "P", "P", "P"],
         ["R", "N", "B", "Q", "K", "B", "N", "R"]]

```

So for example, `board[7][2]` is `"B"`.

The moves are stored as a list of lists, where each sub list contains the current coordinates of the piece and a list of all available moves for said piece.

For example

`[[[1, 0], [[2, 0], [3, 0]]], ...]`

As the pawn at `1, 0` can move forward either once or twice.

These are then stored in two separate lists, `white_moves` and `black_moves`.

So, I think the best way to prevent the king from moving into check is seeing if any of the moves generated for the king are in the opponent's moves, and then removing them from the king's moves if they are.

Like

`king_moves = set(king_moves) - set(enemy_moves)`

However, I can't think of a good way of determining if the movement of one of our pieces will result in the king being exposed and thus in check.

EDIT: I also need to deal with situations like this

# Answer
> 8 votes
You seem to be writing a move generator.

Conventionally, a set of legal moves is generated by first generating a list of pseudo-legal moves (i.e. all moves which could be made, ignoring the fact that the king needs special treatment) and then filtering out moves which leave the king in check.

The legal move generator in Stockfish (one of the strongest chess engines) does exactly this - `moveList` is initialised to a list of pseudo-legal moves, which is then iterated over to filter out illegal moves with `pos.legal`.

You can implement the detection of legal moves by simply 'making the move' (creating a board state after the move) and then checking if any piece attacks the king, though of course more efficient implementations are possible.

# Answer
> 1 votes
Here is some Pascal Source code from Borland 1985 that uses an AttackTab to determine whether a figure is attacked or not. Since you are interested in the algorithm this code might give you some insight.

Unfortunately I don'get the syntax highlighting to work.

**MoveGenerator**

```
MODULE MoveGenerator;
{$speed}
{$include: 'types.inc'}
VAR [EXTERN]
{$include: 'var.inc'}

{
± ± ± ± ± ± ± ± ± ± ± ± ± ± ± ± ± ± ± ± ± ± ± ± ± ± ± ± ± ± ± ± ± ±

  MOVGEN.CH  include module for SCHACH.PAS
  Last modified:  01/12/85

  This module contains the Move generator and various other
  procedures.

± ± ± ± ± ± ± ± ± ± ± ± ± ± ± ± ± ± ± ± ± ± ± ± ± ± ± ± ± ± ± ± ± ±
}

{ Tables for calculating whether a Piece Attacks a Square }
TYPE
  SetOfPiece = BYTE;
  BitTabType = ARRAY[King..Pawn] OF SetOfPiece;
CONST
  BitTab =BitTabType (1,2,4,8,#10,#20);

VAR   { A constant, which is calculated in CalcAttackTab.
        Gives the squares which a Piece in the middle of the
        table can Move to }
      AttackTab : ARRAY[-#77..#77] OF
                    RECORD
                       { A set of King..Pawn.
                         Gives the Pieces, which can
                         Move to the Square }
                       PieceSet :  SetOfPiece;
                       Direction: INTEGER;  { The Direction from
                                              the Piece to the Square }
                    END;

PROCEDURE CalcAttackTab;
{ Calculates AttackTab }
VAR   Dir:    DirType;
      Sq :   INTEGER;
       i :   BYTE;
BEGIN
   FOR Sq:=-#77 TO #77 DO
      WITH AttackTab[Sq] DO
      BEGIN
         PieceSet:=0;
         Direction:=0;
      END; { with }
   FOR Dir:=7 DOWNTO 0 DO
   BEGIN
      FOR i:=1 TO 7 DO
         WITH AttackTab[DirTab[Dir]*i] DO
         BEGIN
            IF Dir<4 THEN
               PieceSet:=BitTab[Queen]+BitTab[Rook]
            ELSE
               PieceSet:=BitTab[Queen]+BitTab[Bishop];
            Direction:=DirTab[Dir];
         END;
      WITH AttackTab[DirTab[Dir]] DO
         PieceSet:=PieceSet+BitTab[King];
      WITH AttackTab[KnightDir[Dir]] DO
      BEGIN
         PieceSet:=BitTab[Knight];
         Direction:=KnightDir[Dir];
      END;
   END;
END; { CalcAttackTab }

FUNCTION PieceAttacks(APiece : PieceType;
                      AColor : ColorType;
                      ASquare,
                      Square :  SquareType) : BOOLEAN;
{ Calculates whether APiece placed On ASquare Attacks the Square }
VAR   Sq : EdgeSquareType;
BEGIN
   IF APiece = Pawn THEN
      { Pawn Attacks }
      PieceAttacks := abs(Square - ASquare - PawnDir[AColor]) = 1
   ELSE
      { Other Attacks: Can the Piece Move to the Square? }
      WITH AttackTab[Square - ASquare] DO
         IF (PieceSet AND BitTab[APiece]) <> 0 THEN
            IF (APiece = King) OR (APiece = Knight) THEN
               PieceAttacks := TRUE
            ELSE
            BEGIN
               { Are there any blocking Pieces in between? }
               Sq := ASquare;
               REPEAT
                  Sq := Sq + Direction;
               UNTIL (Sq = Square) OR (Board[Sq].Piece <> Empty);
               PieceAttacks := Sq = Square;
            END
         ELSE
            PieceAttacks := FALSE;
END { PieceAttacks };

FUNCTION Attacks(AColor : ColorType;   Square : SquareType) : BOOLEAN;
{ Calculates whether AColor Attacks the Square }

FUNCTION PawnAttacks(AColor: ColorType; Square: SquareType):
            BOOLEAN;
{ Calculates whether AColor Attacks the Square with a Pawn }
VAR   Sq: EdgeSquareType;
BEGIN
   PawnAttacks:=TRUE;
   Sq := Square - PawnDir[AColor] - 1;   { Left Square }
   IF (Sq AND #88) = 0 THEN
      WITH Board[Sq] DO
         IF (Piece = Pawn) AND (Color = AColor) THEN RETURN;
   Sq := Sq + 2;                       { Right Square }
   IF (Sq AND #88) = 0 THEN
      WITH Board[Sq] DO
         IF (Piece = Pawn) AND (Color = AColor) THEN RETURN;
   PawnAttacks := FALSE;
END; { PawnAttacks }

VAR   i :  IndexType;

BEGIN { Attacks }
   Attacks := TRUE;
   IF PawnAttacks(AColor,Square) THEN   { Pawn Attacks }
      RETURN;
   { Other Attacks:  Try all Pieces, starting with the smallest }
   FOR i := OfficerNo[AColor] DOWNTO 0 DO
      WITH PieceTab[AColor,i] DO
         IF IPiece <> Empty THEN
            IF PieceAttacks(IPiece,AColor,ISquare,Square) THEN
              RETURN;
   Attacks := FALSE;
END { Attacks };

PROCEDURE CalcCastling(InColor : ColorType; VAR Cast : CastType);
{ Calculates whether InColor can castle }

FUNCTION Check(Square : SquareType; InPiece : PieceType) : BOOLEAN;
{ Checks whether InPiece is placed On Square and has never moved }
VAR
  Dep : DepthType;
BEGIN
  Check := FALSE;
  WITH Board[Square] DO                           { Check Square }
    IF (Piece = InPiece) AND (Color = InColor) THEN
    BEGIN
      Dep := Depth - 1;                            { Check all moves }
      WHILE MovTab[Dep].MovPiece <> Empty DO
      BEGIN
        IF MovTab[Dep].New1 = Square THEN RETURN;
        Dep := Dep - 1;
      END;
      Check := TRUE;
    END;
END; { Check }

VAR   Square : SquareType;
BEGIN
   Square := 0;
   IF InColor = Black THEN Square := #70;
   Cast :=[];
   IF Check(Square + 4,King) THEN
   BEGIN                                                        { Check King }
      IF Check(Square  ,Rook) THEN Cast := Cast +[Long];      { Check a-Rook }
      IF Check(Square + 7,Rook) THEN Cast := Cast +[Short];   { Check h-Rook }
   END;
END { CalcCastling };

FUNCTION RepeatMove(MOVE : MoveType) : BOOLEAN;
{ Check if Move is a Pawn Move or a capture }
BEGIN
  WITH MOVE DO
    RepeatMove := (MovPiece <> Empty) AND (MovPiece <> Pawn)
                 AND (Content = Empty) AND NOT Spe;
END; { RepeatMove}

FUNCTION FiftyMoveCnt : INTEGER;
{ Counts the Number of moves since Last capture or Pawn Move.
  The game is a Draw when FiftyMoveCnt = 100 }
VAR   Cnt : INTEGER;
BEGIN
  Cnt := 0;
  WHILE RepeatMove(MovTab[Depth - Cnt]) DO
    Cnt := Cnt + 1;
  FiftyMoveCnt := Cnt;
END;

FUNCTION Repetition(Immediate : BOOLEAN) : INTEGER;
{ Calculates how many times the position has occured before.
  The game is a Draw when Repetition = 3.
  MovTab[Back..Depth] contains the previous moves.
  When Immediate is set, only Immediate Repetition is checked }

VAR   LastDep,CompDep,TraceDep,CheckDep,SameDepth : DepthType;
      TraceSq,CheckSq : SquareType;
      RepeatCount : INTEGER;
LABEL 10;
BEGIN
   Repetition := 1;
   RepeatCount := 1;
   SameDepth := Depth + 1;                     { Current position }
   CompDep := SameDepth - 4;          { First position to compare }
   LastDep := SameDepth;
   { MovTab[LastDep..Depth] contains previous relevant moves  }
   WHILE RepeatMove(MovTab[LastDep - 1]) AND
         ((CompDep < LastDep) OR NOT Immediate) DO
      LastDep := LastDep - 1;
   IF CompDep < LastDep THEN RETURN;     { No Repetition Possible }
   CheckDep := SameDepth;
   REPEAT
      CheckDep := CheckDep - 1;           { Get Next Move to test }
      CheckSq := MovTab[CheckDep].New1;
      TraceDep := CheckDep + 2;          { Check if Move has been }
      WHILE TraceDep < SameDepth DO
      BEGIN
        IF MovTab[TraceDep].Old = CheckSq THEN GOTO 10;
        TraceDep := TraceDep + 2;
      END;

      { Trace the Move backward to see whether
        it has been 'undone' earlier }
      TraceDep := CheckDep;
      TraceSq := MovTab[TraceDep].Old;
      REPEAT
         IF TraceDep - 2 < LastDep THEN RETURN;
         TraceDep := TraceDep - 2;
         WITH MovTab[TraceDep] DO  { Check if Piece has been moved before }
            IF TraceSq = New1 THEN
               TraceSq := Old;
      UNTIL (TraceSq = CheckSq) AND (TraceDep <= CompDep + 1);
      IF TraceDep < CompDep THEN                      { Adjust evt. CompDep }
      BEGIN
        CompDep := TraceDep;
        IF ODD(SameDepth - CompDep) THEN
        BEGIN
          IF CompDep = LastDep THEN RETURN;
          CompDep := CompDep - 1;
        END;
        CheckDep := SameDepth;
      END;
   { All moves between SameDepth and CompDep have been checked,
     so a Repetition is Found }
   10 : IF CheckDep <= CompDep THEN
      BEGIN
         RepeatCount := RepeatCount + 1;
         Repetition := RepeatCount;
         IF CompDep - 2 < LastDep THEN RETURN;
         SameDepth := CompDep;               { Search for more repetitions }
         CompDep := CompDep - 2;
         CheckDep := SameDepth;
      END;
   UNTIL FALSE;
END { Repetition };

FUNCTION KillMovGen(MOVE : MoveType) : BOOLEAN;
{ Tests whether a Move is Possible.

   On entry :
      Move contains a full description of a Move, which
      has been legally generated in a different position.
      MovTab[Depth - 1] contains Last performed Move.

   On RETURN :
      KillMovGen indicates whether the Move is Possible
}
VAR   CastSq  : SquareType;
      Promote : PieceType;
      CastDir : CastDirType;
      Cast    : CastType;
BEGIN
   KillMovGen := FALSE;
   WITH MOVE DO
   BEGIN
      IF Spe AND (MovPiece = King) THEN
      BEGIN
         CalcCastling(Player,Cast);         { Castling }
         IF New1 > Old THEN
            CastDir := Short
         ELSE
            CastDir := Long;

         IF CastDir IN Cast THEN   { Has King or Rook moved before? }
         BEGIN
            CastSq := (New1 + Old) DIV 2;
            { Are the squares Empty? }
            KillMovGen := (Board[New1].Piece = Empty) AND
                          (Board[CastSq].Piece = Empty) AND
                             ((New1 > Old) OR
                             (Board[New1 - 1 ].Piece = Empty)) AND
                          { Are the squares unattacked? }
                          NOT Attacks(Opponent,Old) AND
                          NOT Attacks(Opponent,New1) AND
                          NOT Attacks(Opponent,CastSq);
         END;
      END
      ELSE
      IF Spe AND (MovPiece = Pawn) THEN
      BEGIN
         { E.p. capture }
         WITH MovTab[Depth - 1] DO
            { Was the Opponent's Move a 2 Square Move }
            IF MovPiece = Pawn THEN
               IF abs(New1 - Old) >= #20 THEN
                  { Is there a Piece On the Square? }
                  WITH Board[MOVE.Old] DO
                     IF (Piece = Pawn) AND (Color = Player) THEN
                        KillMovGen := MOVE.New1 = (New1 + Old) DIV 2;
      END { if }
      ELSE
      BEGIN
         IF Spe THEN                      { Normal test }
         BEGIN
            Promote := MovPiece;            { Pawnpromotion }
            MovPiece := Pawn;
         END;

         { Is the Content of Old and New1 squares correct? }
         IF (Board[Old].Piece = MovPiece) AND
            (Board[Old].Color = Player) AND
            (Board[New1].Piece = Content) AND
           ((Content = Empty) OR
            (Board[New1].Color = Opponent)) THEN

            IF MovPiece = Pawn THEN             { Is the Move Possible? }
               KillMovGen := (abs(New1 - Old) < #20) OR
                             (Board[(New1 + Old) DIV 2].Piece = Empty)
            ELSE
               KillMovGen := PieceAttacks(MovPiece,Player,Old,New1);
         IF Spe THEN
            MovPiece := Promote;
      END;
   END { with };
END; { KillMovGen }

{ Movegeneration variables }

VAR
      Buffer :        ARRAY[1..80] OF   { Buffer (generated moves) }
                        MoveType;
      BufCount,BufPnt : 0..80;            { Counters for Buffer    }

PROCEDURE InitMovGen;
{ The movegenerator.
  InitMovGen generates all Possible moves and places them
  in a Buffer. MovGen will then Generate the moves One by One and
  place them in Next.

  On entry :
     Player contains the Color to Move.
     MovTab[Depth - 1] the Last performed Move.

  On RETURN :
     Buffer contains the generated moves.

     The moves are generated in the order :
        Captures
        Castlings
        Non captures
        E.p. captures }

PROCEDURE Generate;
   { Stores a Move in Buffer }
BEGIN
  BufCount := BufCount + 1;
  Buffer[BufCount] := Next;
END; { Generate }

PROCEDURE PawnPromotionGen;
{ Generates Pawnpromotion }
VAR   Promote : PieceType;
BEGIN
  WITH Next DO
  BEGIN
    Spe := TRUE;
    FOR Promote := Queen TO Knight DO
    BEGIN
      MovPiece := Promote;
      Generate;
    END;
    Spe := FALSE;
  END;
END; { PawnPromotionGen }

PROCEDURE CapMovGen;
   { Generates captures of the Piece On New1 using PieceTab }
VAR   NextSq,Sq : EdgeSquareType;
  i :  IndexType;
BEGIN
  WITH Next DO
  BEGIN
    Spe := FALSE;
    Content := Board[New1].Piece;
    MovPiece := Pawn;                   { Pawn captures }
    NextSq := New1 - PawnDir[Player];
    FOR Sq := NextSq - 1 TO NextSq + 1 DO IF Sq <> NextSq THEN
    IF (Sq AND #88) = 0 THEN
      WITH Board[Sq] DO
        IF (Piece = Pawn) AND (Color = Player) THEN
        BEGIN
          Old := Sq;
          IF (New1 < 8) OR (New1 >= #70) THEN
            PawnPromotionGen
          ELSE
            Generate;
        END;
         { Other captures, starting with the smallest Pieces }
    FOR i := OfficerNo[Player] DOWNTO 0 DO
      WITH PieceTab[Player,i] DO
        IF (IPiece <> Empty) AND (IPiece <> Pawn) THEN
          IF PieceAttacks(IPiece,Player,ISquare,New1) THEN
          BEGIN
            Old := ISquare;
            MovPiece := IPiece;
            Generate;
          END;
      END { with };
END; { CapMovGen }

PROCEDURE NonCapMovGen;
{ Generates non captures for the Piece On Old }
VAR
   First,Last,Dir : DirType;
   Direction      : INTEGER;
   NewSq          : EdgeSquareType;

LABEL 10;
BEGIN
  WITH Next DO
  BEGIN
    Spe := FALSE;
    MovPiece := Board[Old].Piece;
    Content := Empty;
    CASE MovPiece OF
      King,
      Knight : FOR Dir := 7 DOWNTO 0 DO
               BEGIN
                 IF MovPiece = King
                    THEN NewSq := Old + DirTab[Dir]
                    ELSE NewSq := Old + KnightDir[Dir];
                 IF (NewSq AND #88) = 0 THEN
                   IF Board[NewSq].Piece = Empty THEN
                   BEGIN
                     New1 := NewSq;
                     Generate;
                   END;
               END;
      Queen,
      Rook,
      Bishop : BEGIN
                 First := 7;
                 Last := 0;
                 IF MovPiece = Rook   THEN First := 3;
                 IF MovPiece = Bishop THEN Last := 4;
                 FOR Dir := First DOWNTO Last DO
                 BEGIN
                   Direction := DirTab[Dir];
                   NewSq := Old + Direction;
                   { Generate all non captures in
                         the Direction }
                   WHILE (NewSq AND #88) = 0 DO
                   BEGIN
                     IF Board[NewSq].Piece <> Empty THEN GOTO 10;
                     New1 := NewSq;
                     Generate;
                     NewSq := New1 + Direction;
                   END;
            10 : END;
               END;
      Pawn :   BEGIN
                 New1 := Old + PawnDir[Player];    { One Square forward }
                 IF Board[New1].Piece = Empty THEN
                   IF (New1 < 8) OR (New1 >= #70) THEN
                     PawnPromotionGen
                   ELSE
                   BEGIN
                     Generate;
                     IF (Old < #18) OR (Old >= #60) THEN
                     BEGIN
                       New1 := New1 + (New1 - Old); { Two squares forward }
                       IF Board[New1].Piece = Empty THEN Generate;
                     END;
                   END;
               END;
    END { case };
  END { with };
END; { NonCapMovGen }

VAR
  CastDir : CastDirType;
  Sq      : EdgeSquareType;
  Index   : IndexType;

BEGIN { InitMovGen }
   WITH Next DO                    { Reset the Buffer }
   BEGIN
      BufCount := 0;
      BufPnt := 0;
      { Generate all captures starting with captures of
        largest Pieces }
      FOR Index := 1 TO PawnNo[Opponent] DO
         WITH PieceTab[Opponent,Index] DO
            IF IPiece <> Empty THEN
            BEGIN
               New1 := ISquare;
               CapMovGen;
            END;
      Spe := TRUE;                           { Castling }
      MovPiece := King;
      Content := Empty;
      FOR CastDir := Short DOWNTO Long DO
         WITH CastMove[Player,CastDir] DO
         BEGIN
            New1 := CastNew;
            Old := CastOld;
            IF KillMovGen(Next) THEN Generate;
         END;

      { Generate non captures, starting with pawns }
      FOR Index := PawnNo[Player] DOWNTO 0 DO
         WITH PieceTab[Player,Index] DO
            IF IPiece <> Empty THEN
            BEGIN
               Old := ISquare;
               NonCapMovGen;
            END;
      WITH MovTab[Depth - 1] DO               { E.p. captures }
         IF MovPiece = Pawn THEN
            IF abs(New1 - Old) >= #20 THEN
            BEGIN
               Next.Spe := TRUE;
               Next.MovPiece := Pawn;
               Next.Content := Empty;
               Next.New1 := (New1 + Old) DIV 2;
               FOR Sq := New1 - 1 TO New1 + 1 DO
                 IF Sq <> New1 THEN
                   IF (Sq AND #88) = 0 THEN
                   BEGIN
                     Next.Old := Sq;
                     IF KillMovGen(Next) THEN Generate;
                  END;
            END;
    END { with };
END; { InitMovGen }

PROCEDURE MovGen;
{ Place Next Move from the Buffer in Next.
  Generate ZeroMove when there is No more moves }
BEGIN
   IF BufPnt >= BufCount THEN
      Next := ZeroMove
   ELSE
   BEGIN
      BufPnt := BufPnt + 1;
      Next := Buffer[BufPnt];
   END;
END; { MovGen }

END.

```

# Answer
> 1 votes
You can download chess with

pip install chess

then you import chess

```
import chess
#then you make board
board=chess.Board()
#then you have list of moves with following line
moves=list(board.legal_moves)

```

---
Tags: programming, check
---


# Question
Title: When to do minority attack and majority attack?
So I learnt about minority attack few months ago where you push pawns on minority side to create weaknesses on opponents pawn structure but recently I have also been seeing some masters casually telling to push on majority side to create passed pawns and that too in the middle game. So now I am confused as to which concept to apply and when. Any suggestions on this?

# Answer
* Aim of minority (call it "\_") attack: You already said it. This is almost by definition the only aim. If the enemy king is on that side, you might better call it a pawn roller, but of course the aims are not mutually exclusive.
* Aim of majority (call it "+") attack: Copy same sentences. :-)

So to answer your question, first ask where the two kings stand.

* Both kings stand on \_. Hands off the _ pawns, it is too dangerous. Play on +, shoo the enemy figures around with your bigger pawn force, make a passer. This also distracts the opponent from making trouble on \_.
* Your king on \_, enemy on +. Ditto, and you get the bonus that the enemy king is feeling uncomfortable. Hurry, since the opponent does the same and has less barrieres to crash!
* Your king on +, enemy on \_. Do a pawn roller on \_, it ruins the opponents structure *and* exposes the king. Your opponent will try the same on +, but your king is safer.
* Both kings stand on +. This is the "standard" case. You can do a minority attack on \_. If and only if the opponent can't crash through in the center, you can also do a pawn roller on +, gaining space and threatening the enemy king. (E.g. common in the Sicilian for White or Kings Indian for Black.)

Chess is very concrete and tactical, and these only were the basics. If I would now begin with the influence of figure positions, space advantage, or that it is long known how to defuse a "classic" minority attack by b5 and plugging a knight on c4, this answer would reach to Mars...
> 5 votes

# Answer
What constitutes correct Pawn play depends on what support they can get from their pieces. The classic example is the exchange variation of the Queens Gambit Declined. After 1. d4 d5 2,c4 e6 White at some stage plays cxd5, brings his major pieces to the Queens wing and pushes his Pawns on that side of the board. The resulting Pawn exchanges may leave a single Black Pawn on that wing, whose value as a passed Pawn is negated by the presence of Whites heavy pieces. It may well prove a weakness that can easily be picked off. White is able to do this because of moving first, but how can Black respond?

Tradition has Black reacting by building a King-side attack which will hopefully crash through while White is busy on the other side. Quite often this will involve advancing (some of) his majority, not to create a passed pawn but to drive away the White defenders. Black does this because there is usually no other plan available.

These decisions are made in the opening and early middle game. Later on, we may find ourselves entering an endgame with whatever Pawn structure we happen to have. The best plan may have little to do with majorities and minorities. It may be about the creation and exploitation of weaknesses by other means. But it is quite likely to involve creating and exploiting passed pawns, often by pushing your majority, wherever it happens to be. However, you should always bear in mind the possibility of those Pawns being "overextended" (Far from home, cut off and vulnerable) Passed Pawns are only dangerous if they have support and can avoid being blockaded. A decisive factor is often the availability of the King for both attack and defence.
> 2 votes

---
Tags: pawns, terminology, pawn-structure
---


# Question
Title: Is the Dunst Opening with 3. Nce2 unsound?
I am trying to find a line in the Dunst Opening where:

1. White's guaranteed to develop his bishop to an active square such as c4 or b5.
2. Black doesn't get to suffocate White by playing d3.

So far I have been unsuccessful. Here are two lines I've found for Black that essentially refute White's whole setup.

This is the line with `5.Nc3`:

```
[FEN ""]

1. Nc3 d5 2. e4 d4 3. Nce2 e5 4. Ng3 Be6 5. Nf3 f6 6. Bb5+ c6 7. Ba4 Na6 8. Bb3 (8. O-O? Nc5 9. Bb3 Nxb3 10. axb3 d3!) (8. d3? Qa5+) Bxb3 9. axb3 d3! 10. O-O Nb4

```

`5.c3` has another refutation:

```
[FEN ""]

1. Nc3 d5 2. e4 d4 3. Nce2 e5 4. Ng3 Be6 5. c3 a6! 6. Nf3 Nc6

```

# Answer
> 8 votes
OK, so after a bit more research I have concluded that this variation is in fact playable for White, even with perfect play from Black! Here's my analysis:

The critical line is

```
[FEN ""]
1.Nc3 d5 2.e4 d4 3.Nce2 e5 4.Ng3 Be6 5.Nf3 f6 6.c3

```

In this position, we're threatening to win a pawn with `7.cxd4 exd4 8.Qa4+ Nc6 9.Bb5`. Black has a couple of ways to parry this threat: `6...c5`, `6...Nc6`, `6...a6` and `6...Qd7`.

* If Black plays `6...c5`, he immediately gives our bishop a comfy square with `7.Bb5+`. After we play `8.d3` on the next move, all of our major opening headaches are pretty much gone.

---

```
[FEN ""]
1.Nc3 d5 2.e4 d4 3.Nce2 e5 4.Ng3 Be6 5.Nf3 f6 6.c3 c5 7.Bb5+ Nd7 8.d3

```
* The most testing move is `6...d3!`, trying to completely suffocate our position. Against this we can sacrifice our knight for 3 pawns:

---

```
[FEN ""]
1.Nc3 d5 2.e4 d4 3.Nce2 e5 4.Ng3 Be6 5.Nf3 f6 6.c3 d3! 7.Nxe5!? fxe5 8.Qh5+ Bf7 9.Qxe5+ Ne7 10.Qb5+ Nd7 11.Qxd3

```

Objectively, White is much worse here according to the engine, but this seems fine to me for faster time controls.

* Against `6...Nc6`, we do get to play `7.Bb5`. Now if Black doesn't want to let us consolidate with `8.d3`, he has to play `7...d3` himself. Here we just `8.O-O`. Now we're already threatening to win the pawn with `9.Ne1`, so Black has to immediately question our bishop with `8...a6`. After `9.Bxc6 bxc6`, we play `10.Qa4`, developing with tempo on the c6-pawn. After Black defends it, we can play `11.b3` with the idea of developing our entombed bishop to `a3`.

---

```
[FEN ""]
1.Nc3 d5 2.e4 d4 3.Nce2 e5 4.Ng3 Be6 5.Nf3 f6 6.c3 Nc6 7.Bb5 d3 8.O-O a6 (8...Qd7? 9.Ne1) 9.Bxc6 bxc6 10.Qa4 Qd7 11.b3

```

(Black did get to play `d3` in this variation, but at least we aren't getting suffocated here.)

* Against `6...a6`, we can play `7.cxd4 exd4 8.b3`, which has the idea of trading off the bishop via `9.Bc4`. Black doesn't have a good way to stop this: `8...b5?` is met strongly by `9.a4!`, and if `8...d3?` then Black loses a pawn after `9.Bb2` followed by `10.Qb1`.

---

```
[FEN ""]
1.Nc3 d5 2.e4 d4 3.Nce2 e5 4.Ng3 Be6 5.Nf3 f6 6.c3 a6 7.cxd4 exd4 8.b3 Nc6 (8...b5? 9.a4!) (8...d3? 9.Bb2 Nc6 10.Qb1 Nb4 11.Nd4 Qd7 12.a3) 9.Bc4

```
* Against `6...Qd7`, we can play `7.cxd4 exd4 8.Qc2`, which prevents `8...d3` and has the same idea of trading off the bishops via `9.Bc4`. Again, if `8...b5?` then `9.a4!`. However, note that if `8...Nc6` is played then we want to play `9.Bb5` instead of `9.Bc4`, to avoid a nasty line where our `c1` bishop can get buried. (`9.Bc4` should be played against any other move.)

---

```
[FEN ""]
1.Nc3 d5 2.e4 d4 3.Nce2 e5 4.Ng3 Be6 5.Nf3 f6 6.c3 Qd7 7.cxd4 exd4 8.Qc2 Nc6 (8...b5? 9.a4!) (8...Kf7 9.Bc4) 9.Bb5 (9.Bc4? Nb4 10.Qb3 Bxc4 11.Qxc4 b5 12.Qb3 d3)

```

# Answer
> 4 votes
The opening 1.Nc3 is much better than people think, and I have had very good results with it, especially if I pick the opponent. The perfect choice is someone strong enough to try and refute it but not strong enough to do so. The line you mention with 4..Be6 is the only line that worries me, but it only appears if Black is either very well informed or else very perceptive and confident. The line with Nxe5 (John Coleman) is best prepared with c3 to provoke ..d3. That Pawn then gets picked up by the marauding Queen. The material is then three Pawns for a Knight and the better player will win, but maybe you don't want to take that risk. If you have to admit that, then your objective of an active Bishop development without allowing ..d3 is not achieveable. The best plan in my opinion is to give the check in your first line to provoke ..c6 (the Pawn is really wanted on c5). Then Ba4 is possibly a playable gambit after..Qa5+, c3 dxc3, 0-0!, or Be2 is not bad either. I hope you have read "Knight on the Left" by Harald Kielhack. This is one of the best general chess books I know, and much superior to the common "funny opening" booklets. The point is that 1.Nc3 has so many transpositional possibilities that the author has to deal with all of them and then discuss the differences made by the move order.

# Answer
> 4 votes
One thing to keep in mind is that practically this line is both extremely rare and fine for white against normal play. I'm around 1800, I've played 1.Nc3 d5 2.e4 d4 3.Nce2 e5 4.Ng3 559 times, of those I've seen 4. ... Be6 5.Nf3 f6 exactly 9 times (i.e. 1.6% of those games) and my record in those 9 games is 4 wins, 4 losses, and 1 draw.

You're right that against an engine this is not a very sound opening and you'll end up around -1 in these kind of lines (often with black playing h5 at some point), but even in those positions you're not lost and in practice against human opponents it's totally fine.

---
Tags: opening, analysis
---


# Question
Title: How does one determine if a book move is objectively better than another?
For example, I have heard the following statements:

1. After 1. e4 e5 2. Nf3 Nc6, the move 3. Bb5 is marginally better than the move 3. Bc4.
2. Openings moves such as 1. e4, 1. d4, 1. Nf3, and 1. c4 are equally good and none is marginally better than the others.

**Are these two statements accurate? If so, is there any way to "prove" them?**

I am not sure about the following argument:

> Since after 1. e4 e5 2. Nf3 Nc6, 3. Bb5 is played more often by grandmasters than 3. Bc4, 3. Bb5 must be the better move.

As by the same logic, we can say 1. e4 is better than the other three popular first moves.

# Answer
> 2 votes
**1. Here is one approach** to prove if one opening book move is better than the other.

**Algorithm**

1. Create positions arising from the opening that you want to study.
2. Get stockfish and play a match on those positions.
3. Keep a record of win/loss/draw and score percentage for each opening.
4. Compare the score percentage among openings.

With that you will be able to determine if one opening is better than the other.

**Opening**

1. start: e2 e5 Nf3 Nc6 Bc4
e4 e5 Nf3 Nc6 Bc4 Nf6
e4 e5 Nf3 Nc6 Bc4 Bc5
... add more, more is better to reduce uncertainty
2. start: e4 e5 Nf3 Nc6 Bb5
e4 e5 Nf3 Nc6 Bb5 Nf6
e4 e5 Nf3 Nc6 Bb5 a6 Ba4
... add more

**Engine**
stockfish 14.1-1 vs stockfish 14.1-2, name is different but they are the same stockfish 14.1 engine

**Evaluate stats**
Get the score percentage of white in opening 1 and 2. If white score percentage in opening 1 is more than the white score percentage in opening 2 then opening 1 (e2 e5 Nf3 Nc6 Bc4) is better.

**Tools**
You may use ordo or bayeselo to generate stats from the output pgn file. Or load the pgn on softwares that support opening stats views like scid and others.

**2. Another approach** is by viewing the score percentage of the move from the given player. Example get the games of Magnus load it in scid, chessbase, or hiarcs explorer or any other game viewer software that is capable of showing opening stats. Below I use hiarcs explorer.

**According to Magnus**

Bb5 is 72% for white and Bc4 is 69% for white. Games are from 2004 (the year he got the GM title) to present. All games are longer than rapid time control.

# Answer
> 1 votes
This question hinges strongly on what you mean by 'objectively better'.

If by 'objectively better' you mean you are more likely to reach a position where you can pressure the opponent, then the answer is yes, and the Ruy Lopez is "objectively better" than the Italian.

On the other hand if by 'objectively better' you mean distinguishing between a win and a draw, then the answer is no, since chess is a draw anyway (and almost surely 1. e4 is not "objectively better" than 1. c3 or 1. b4).

# Answer
> 1 votes
If there were an "objective" (by which you probably mean "algorithmic") method to determine the merits of chess moves then chess would lose much of its appeal. As you point out, perfect play leads almost surely to a draw, so many moves must be objectively equivalent, and any preference for one move over another must be based on an assumption of imperfect play. When you speak of "pressuring" the opponent, you are thinking of increasing the possibility of a mistake. The statistics of past games might be considered an "objective" measure of that, but I always feel that resorting to statistics is an admission of ignorance.

# Answer
> 1 votes
Begin by defining your criteria for objectivity. Do they apply to everyone, or are you just asking 'why is a book move better - for a current-day GM -- than another?'

I see chess as a research-problem, and so would add the factor 'how well has this book-move been researched in the past and with what results?'

Compare the question of ulcers. 20 years ago, stomach ulcers were frequently diagnosed as stress-related, and treated accordingly. Then someone researches the question and discovers that they are (to a great extent) caused by bacteria, and can be treated by antibiotics, a treatment that would have been 'objectively worse' five years earlier. (Your have similar situations with Semmelweiss in medicine, or with Knorosov in Mayan language, or with Ventris, who once said that whatever language Linear-B was used for, it wasn't Greek, and then tries it, and finds that he was wrong ...)

What research has been done, and how good is it?

Which probably means that 'one' (unless 'one' is very good at judging that question for chess) won't be able to decide.

---
Tags: opening, evaluation
---


# Question
Title: Is hyperbullet or bullet more common in online gameplay?
On Lichess, the shortest form of bullet is named hyperbullet. It is essentially 30-second chess. Standard bullet is 1 to 3 minutes.

It is difficult to assess popularity without invoking opinion. **Instead, which time control results in more games played, or has a higher number of players?**

# Answer
According to Lichess, there were

As for games played, since January 2021 there were

* 7,111,572 UltraBullet games played, and
* 55,343,894 Bullet games played.<sup> (1) </sup>

**Historical Data:** <sup> (1) </sup>

**Cautionary Note:** Examining the number of games by time control may be misleading since one can play more games of ultrabullet than bullet in the same amount of time. More relevant to the original "popularity" inquiry may be the total amount of time spent playing, but this data is less accessible.

<sub>(1) Lichess Opening Explorer.</sub>
> 14 votes

---
Tags: online-chess, statistics, lichess, bullet-chess
---


# Question
Title: What are the mistakes committed by players who take many years to become an expert?
I am a beginner and am targeting to become an expert. I see many people who barely takes 4 years to become an expert and many people who take 10 years to become an expert. I don't want to repeat the mistakes committed by players who had slow progress. What are the mistakes committed by players with slow progress? Some of them that I could think of are 1) lack of reading books 2) lack of proper coaching 3) merely playing thousands of games without strategic development. What do you think? Can you please provide suggestions on how to be efficient in my preparation? What is the best way to train?

# Answer
> 9 votes
I can think of three mistakes that a *lot* of class players who think they're working on their chess make:

1. They **read** chess books.

In particular they buy lots of them and then skim them, or study / try to memorize them as if they were textbooks.

Most low level players don't take the time to really get to the bottom of the positions in the books, they don't *work* with them, only passive consumption.

2. They memorize openings.

Opening books sell far better than all other types of chess book combined, even though the best they have to offer a class player is a slightly better position against someone who else who had memorized the opening but not quite as far. It's fun to feel like you're playing as a grandmaster, and sure it will lead to some short term improvement, but in the long term this is mostly wasted time.

3. They don't analyze.

What class player is actually able to take any position and start analyzing it to figure out what's going on? Not many, even though that's what the actual game is about. The best way to improve is just analyze a lot of positions, especially together with a mate (so you can argue and learn from each other), especially your own games. But few put in the work.

I know this because I'm very guilty of all three.

# Answer
> 5 votes
Each person is different and what works for one might not work for you. That being said, for a beginner, a coach (friend, private coach or in chess club) can make a huge difference in my opinion as he could go through your games, pointing out where you went wrong strategically, which is something that is impossible to do on your own and something that engines will not tell you either. In any case, if you haven't done already, I'd recommend to join a chess club, simply because it is more fun than playing online and also you can get many tips from other players besides formal coaching sessions.

Other factors:

* time dedicated to chess
* determination
* predisposition
* having a good mix of study, play and analyzing your mistakes

As for your first mistake ("lack of reading books"): You certainly want to do some study on your own (without a coach). Books are not the only source of information though. Also consider videos/streams, chess databases (particularly for openings) and whatever else you find.

# Answer
> 2 votes
The most common mistake I believe is the "ATTITUDE FACTOR". Now what I mean from this is all Chess aspirants have some great deal of knowledge nowadays either from Books, Internet, Chess Clubs, Coaches etc.

Everyone works hard but many fail to get the deserving rating or climbing up the ladder . What lacks here is the proper attitude and Systematic way of learning . You must set goals in a respective time period and should keep a "Can do situation to accomplish it " . They say that people who has that spunk they see Chess even in their dreams and analyse their failures . The next morning they cross that level and jump to the next one . You will get many answers to your Questions about practicing puzzles, End games , Openings and tons of advices but it is important that you take the failures into your heart ,work & analyse upon it and stop not till you become the expert .

# Answer
> 1 votes
The biggest things I think are that you need to commit to learn from your mistakes, and you need to avoid burnout.

I spent time off from playing chess and threw my games into a computer engine and I was amazed at the simple stuff I missed repeatedly. Obviously, you don't magically become better just by seeing analysis of your own game, but it helps to say: yes, I continually miss this tactic, or, I continually miss a win in this sort of endgame, or even "I thought I played great but I still missed some stuff." A computer can show you a few immediate patterns. It is no substitute for working with another person, but it is more patient about pointing out the mistakes you keep making. It also points out that you don't have to play anywhere near perfectly to be an expert, which is a relief. You'll want to find a happy medium between placing experts on a pedestal and realizing they make mistakes, too.

I'd like to echo @RemcoGerlich's point about "reading" chess books as if it is studying for a vocabulary or history multiple-choice exam. Knowledge doesn't quite work that way. If you spend 15 minutes on the stairmaster, you will burn X calories, but on the other hand, spending 15 minutes glossing over a book and flipping pages probably doesn't help you learn. I also think many of us fall into the trap of needing to play over advanced GM games from now to keep up to date, when really, games from 1900 or so emphasize basic principles much better, and it's more fun to see all the sacrifices to boot.

Some people don't ask questions about their games--their own moves and their opponents'. Some people don't have resources where they can try a few tactical puzzles per day and track their progress. And some people haven't found a good YouTube site where they can get training for free and even choose what lessons to learn next. There are so many free resources on the Internet, and it's worth taking time to find a few (you only need a few) that work well for you.

# Answer
> 1 votes
Rather than point out mistakes, as the OP requested, consider what you *should* do (it is a mistake NOT to do these things) Most important, if you can find a way to do it, is simply to hang out with players who are better than you and listen to them talk. If possible, play them, and have a sensible post-mortem (think about what you want to get out of it).

# Answer
> 0 votes
It depends.
One key is having the wrong parents and not being smart enough or being naturally capable of playing at a high level.

Other factors would be when did they start learning? How effectively were the training materials they chose? How determined were they to improve? How much time did they use for their training.

Other factors would also come in but those are major ones determining how fast and how far someone can go with their chess.

---
Tags: endgame, strategy, books, training, psychology
---


title: Correlation between opening usage

text:
# Question
Title: Correlation between opening usage
Is there statistical analysis of which openings players play as Black when they play a certain opening as White and vice versa?

For example, is it the case that people that play 1. ..c6, often leading to a more positional game, play 1.d4 / 1.Nf3 /1.c4 more likely as White than players that answer 1. ..e5?

Is there analysis available correlating openings for Black and White?

# Answer
Usually you can use your database (or the lichess analysis board) to see the most popular replies to certain openings.

Lichess specifically sorts between masters and their online database, and you can see the exact number of times (and the correlating percentage out of the most popular replies) moves have been played in response.
> 1 votes

---
Tags: opening, statistics
---


# Question
Title: Are resignations by expert players naive?
During recent online chat with gamers, I asserted that 'go' (and possibly othello) had a larger decision space than chess.

After reading Wikipedia, I realized I failed to account for othello and go 'saturating' the board with pieces and dramatically limiting available moves in the late game.

The opposite is true for chess. The decision space dramatically increases as the board is cleared.

From my non-expert opinion, this phenomenon would shift the balance away from position and towards the individual skill of the expert players. This skill is at the heart of the competition itself. The "precision" of skill would be more relevant in the late game.

So my question is: do master players naively assume the path that brought them to the weaker position is representative of the late game? Does the balance shift away from position enough to warrant the stronger position proving his mettle in late game?

# Answer
> 46 votes
By the time an expert resigns the decision tree may still be large but its evaluation has become simple. Players usually resign because continuing would be miserable to them and boring to their opponent.

# Answer
> 8 votes
An increase in possible moves does not equate to the number of meaningful choices. If you have ten moves that all win the game, it is not usually hard to pick one. Sometimes endgames are hard because they are obvious.

In Go, even at the end of the game, there is plenty to choose from. At the top level of the game, the exact order of moves may still swindle the result. Not like one move one point better but 1/4th of a point better. It is something that does not matter to me, but to pro-players it does. There are known cases of players resigning after evaluating a loss on half a point.

# Answer
> 1 votes
It's quite contrary. Experienced chess players values a fair play and doesn't account on possibilities that opponent will make an error, which will be exploited. So a good chess player would assume that he/she is playing with itself (equally strong player). In this case, usually many game outcomes are determined by difference of captured peaces between you and opponent. Even a difference of one pawn in the beginning can lead to a victory at the end. Of course while board is full, this advantage can quickly be destroyed by opponent later captured peaces. However as board gets more and more empty, situation becomes more unlikely that opponent will reverse captured peaces advantage. So small game fluctuations at the beginning becomes a fatal damage in the end. Like death is a fatal outcome of small entropy accumulations in a lifetime. So by the time experienced chess player sees an unstoppable force, it's wise to resign, not wasting time and energy for a boring game, where is no point to think anymore. And it's not naive, it's a very clever and honored move.

---
Tags: endgame, strategy, tactics, resigning
---


# Question
Title: What is the DTM for White is this 7 piece position?
I know that is winning for White because of the Syzygy tablebases. But Stockfish 14.1 NNUE, without tablebases, returns an evaluation of only +3.23 at depth =72(!). What is White's DTM?

```
[FEN "8/5N2/6p1/R5Pk/8/4K3/8/6r1 b - - 0 1"]
[startflipped ""]

```

# Answer
The tablebase in the Lichess analysis tool gives 35 moves.

```
[FEN "8/5N2/6p1/R5Pk/8/4K3/8/6r1 b - - 0 1"]
[startflipped ""]

1... Rf1 2. Nd8 Kg4 3. Rd5 Ra1 4. Nf7 Rf1 5. Rd4+ Kh5 6. Rf4 Re1+ 7. Kf3 Re3+ 8. Kf2 Re2+ 9. Kg3 Rg2+ 10. Kf3 Ra2 11. Rf6 Ra4 12. Ke3 Ra1 13. Kf4 Ra5 14. Kg3 Ra3+ 15. Rf3 Ra4 16. Rf1 Ra1 17. Rf2 Ra3+ 18. Kf4 Ra4+ 19. Ke5 Ra6 20. Rd2 Rb6 21. Rd6 Rb4 22. Kf6 Rd4 23. Rd8 Rf4+ 24. Kg7 Rf1 25. Rd6 Ra1 26. Rxg6 Rb1 27. Ra6 Ra1 28. Rxa1 Kg4 29. Rf1 Kg3 30. g6 Kg2 31. Rf6 Kg1 32. Kh7 Kh1 33. g7 Kg1 34. g8=Q+ Kh1 35. Rh6#

```
> 2 votes

# Answer
I can't give an exact DTM answer, but this one will be off by only a few moves. If you replay the Syzygy line, you will see Black can only annoy White with countless stalemate shenanigans, but White will finally get Pg6 at move 48 (phew), closely making it within the 50 move rule. Since anything DTM strategy which may be globally faster surely is in danger fail due to the 50 move rule, we can safely assume the play is optimal for White, leading to e.g. this position (BTM):

```
[FEN "8/5NK1/6R1/6Pk/8/8/8/r7 b - - 0 1"]
[startflipped ""]

```

This can already put into a DTM tablebase. I only have Shredder Nalimov; Black must very fast sacrifice the rook, so 16 moves seem to be DTM. So I think I can safely say DTM #65+-5.
> 1 votes

---
Tags: endgame, checkmate, tablebases
---


# Question
Title: What relative point values of pieces do engines use?
Humans use:

* Pawn = 1
* Knight = 3
* Bishop = 3
* Rook = 5
* Queen = 9.5
* Bishop pair = +0.5

But I would like to know what relative point values do engines use (preferably strong engines, like Stockfish, Houdini, Rybka, Komodo, ...).

If the point value that the engine assign to the pieces depends on the position of the pieces on the board (for example a White Knight on a1 is only worth 2.6 but on e5 it's worth 3.4), than I would like to know the **average** point values of the pieces.

# Answer
Rybka/Komodo/Houdini are not open source and their values aren't readily available, but the current strongest conventional engine, Stockfish, uses these values (lines 194-198):

> PawnValueMg = 126, PawnValueEg = 208,
>
> KnightValueMg = 781, KnightValueEg = 854,
>
> BishopValueMg = 825, BishopValueEg = 915,
>
> RookValueMg = 1276, RookValueEg = 1380,
>
> QueenValueMg = 2538, QueenValueEg = 2682,

The "Mg" column is value during the mid-game, and the "Eg" column is for the endgame. In units where the value of a pawn is 1:

Middlegame: Knight = 6.198; Bishop = 6.548; Rook = 10.127; Queen = 20.143

Endgame: Knight = 4.106; Bishop = 4.399; Rook = 6.635; Queen = 12.894

As you might guess, these numbers are empirically tuned.
> 8 votes

# Answer
These are the values used by Crafty \- one of the best open source chess engines.

```
#  define PAWN_VALUE                             100
#  define KNIGHT_VALUE                           325
#  define BISHOP_VALUE                           325
#  define ROOK_VALUE                             500
#  define QUEEN_VALUE                           1050
#  define KING_VALUE                           40000

```

If you can follow the C code, then you can dig deeper by looking at the the source files that are available.
> 5 votes

# Answer
I have the strong commercial chess engine Shredder Classic 4. When I open up its engine options I get the default strengths of the pieces. Without reading the documentation of this engine it seems that Shredder starts off with the traditional piece values of queen = 9.5 pts, rook = 5 pts and so on. Then there are optional sliders where I could make any type of piece worth more or less. Interestingly the default value for a "bishop pair" can also be increased or decreased by the player.

This seems to be about the best that I can do with Shredder to try to give an "average" strength of piece valuations.
> 2 votes

# Answer
A really good engine would use variable values depending on the situation and position. With position often counting more for evaluation than mere material although both are important and their weights would change too.

At the gitgo a good start is P=1, N=3, B=3 , R=5, Q=10, K=max value the computer can handle.
> -1 votes

# Answer
In my short book “True Chess:The American Revolution” I demonstrate the values of the pieces. Pawns are worth .942 Knights 2.512 Bishops 4.082 Rooks 4.396 Queens 8.478 the King has a fighting value of 2.512. I also demonstrate this in a YouTube video entitled “Chess is an expression of Pi”. Chess engines often evaluate my positions incorrectly. The first company to use these values will probably create the dominant engine, all other things being equal. Top 99% ranking on Chess.com
> -2 votes

---
Tags: engines, evaluation, stockfish, point-value, houdini
---


title: How do you input FEN into Lucas Chess?

text:
# Question
Title: How do you input FEN into Lucas Chess?
How can I input a position into Lucas Chess, in order to view the underlying engine's analysis through Lucas Chess's GUI? The position would be specified in FEN.

Under its menu Tools-\>PGN, Lucas Chess offers the features of reading a PGN file or pasting PGN. Is there really no simpler way than to create a PGN file with the FEN tag, and get Lucas Chess to read that? That would be a workaround, but it's a clumsy one.

# Answer
in swedish ,

verktyg(settings probably)-skapa ett schackparti(create a new chessgame or something)-settings-changing the starting position-Klistra in FENställning (paste Fen or something) Done!
> 2 votes

# Answer
"Create your own game" and Ctrl-V. Then "Help to Move" in the toolbar

Ctrl-K informs about other shortkeys.

To do a continuous analysis of various positions, with kibitzers is a way, if you don't have any Candidates kibitzers, first create one with the engine you want to analyze: Tools, Engines, Kibitzers, and New, Engine, and choose the engine or you leave stockfish. You accept. Then Tools, Create your own game, Utilities, Kibitzers, you choose the created one. In the kibitzer window there is a rocket, you launch it, Ctrl V to indicate the position or you edit it manually, .... (the kibitzer board also allows movements)
> 1 votes

---
Tags: software, fen
---


title: Rules of Checkmate

text:
# Question
Title: Rules of Checkmate
I’ve attached a picture of the board configuration of an end game. Black wins this game by checkmate, however, I’m wondering how this is valid checkmate?

To my understanding, checkmate occurs when a king is under threat of being captured and there are no other moves present on the board to prevent the king from being captured.

However, in this configuration, we can see that the f1 king is being attacked by the f2 queen. However, I’m wondering why the white king is unable to capture the f2 queen since technically the f6 rook is pinned against the black king and would not be able to capture the white king if it were to capture the queen.

Can anyone help me make sense of the rules?

```
[FEN "8/5pk1/3R1rp1/8/8/2Q4P/P4q2/5K2 w - - 0 1"]

```

# Answer
White's king can only take the black queen if the king will not still be in check. Here is what the FIDE Laws of Chess say:

> 3.9.1 The king is said to be 'in check' if it is attacked by one or more of the opponent's pieces, *even if such pieces are constrained from moving to the square occupied by the king because they would then leave or place their own king in check*.

So, no, the white king is not allowed to take the black queen and so it *is* checkmate.
> 6 votes

# Answer
To make sense of the rules, imagine that pieces pinned against the King can move, and the game is lost by the King who is captured first. Then the position that you show would continue 1.Kxf2 Rxf2 and the game would be over before White could play Qxg7. If you like, you can suppose that under some mediaeval system of honor, Kings do not permit themselves to be captured, but instead commit ritual suicide before that can happen.

CORRECTION Very stupidly, I first wrote "2.Qxg7 and the game would be over before Black could play ..Rxf1." @Rosie F pointed this out to me, and I am grateful and ashamed in equal measure. But the idea of "ritual suicide" does explain differently than just quoting FIDE rules.
> 5 votes

---
Tags: rules, checkmate, fide, beginner
---


# Question
Title: Is the following same colour Bishop endgame position a win or a draw?
In a very recent European Team Championship, the following position appeared on the board. Is the following position a win for White or a draw? Help from FinalGen is welcome.

```
[fen "8/4k2p/1p6/p7/8/P1P5/2P1B1bP/1K6 w - - 0 0"]

```

# Answer
> 1 votes
This is might be a win for white if the puzzle above is white to move, as despite the stacked 2 pawns white has, black currently has 2 black squared pawns, which is the opposite color of the black bishop. So it is possible for the white king to chase down the two pawns after bb5 to prevent the black bishop from protecting the pawns or advancing the pawns. White can then move his king up.

Although I think it's possible for black to make a draw if the black king goes and protect these pawns, and then move the bishop continuously till draw without moving his king once the black king is on c5 to protect the b pawn

So considering that this is the European team championship and the people playing do not blunder, this is more probably a draw.

The above is written without the help of analysis, so I am probably wrong.

Edit: Analysis has shown at this position, with White to move, is currently with an evaluation of 0.0--a draw basically. I ran the position on Stockfish 14+, so this is assuming that both players do not make any mistakes.

---
Tags: analysis, endgame, bishop-endgame
---


# Question
Title: What is White's main plan in Sicilian Keres variation?
I want to learn a new opening in the Sicilian defense called the Keres variation. What is White's main plan here?

```
[FEN ""]

1. e4 c5 2. Ne2

```

# Answer
Disclaimer: there might be other ideas too.

I used to play this some time ago against sicilian. My idea was that I liked closed sicilian positions (2. Nc3) if black did not play the "main" setup against it (that is, 2. ... Nc6, 3. ... g6 etc). So with Ne2, I still could play the closed variation against, for example, 2. ... e6 and 3... d5, and after 2. ... a6, but if black replied 2. ... Nc6 I could play 3. d4 ( or 4. d4) and return back to the "open", more sound sicilian. What white gains is a little bit of flexibility, and a chance to confuse the opponent if black has an inconsistent repertoire. I knew one guy who played d6-a6 setup against open sicilian and e6-d5 against closed one, so Ne2 was very confusing against him.
> 4 votes

# Answer
I used to play this many years ago. I had a nice win against Chessmaster's "Fischer-Style" at 2 hours/40 moves time controls.

When I was playing this, the idea I was working on was a fairly simple one, to lock up the centre create a pawn attack on the kingside. The Knight on e2 was to facilitate that by not blocking the f pawn's movement. The pawns on e4 and c4 leave a hole at d4 which can be exploited by Black's Knight, but as that is covered by the Knight on e2, and an exchange there just further locks up the centre with a black pawn I was ok with that. Generally, I found I could create a pawn chain that walled off Black's pieces, which this game exemplifies, and that made it difficult for Black to bring their pieces to the defence of their King. I tended to find it was important to get the King off the a2-g1 diagonal as Black's Queen eventually ends up on b3 with an annoying potential for a discovered check. Basically, it was a fairly simple and standard idea, lock the centre, attack the Black King on the Kingside faster than Black can break through on the Queen side, when they can attack your King along the ranks. This was an approach I developed myself, and I'm sure that with best play Black can do better.

Oh, I should mention, the idea above was based upon the 1. e4 c5 2. Ne2 e5 line, which the CM seemed to favour. I found this was rare against other engines and human players, and 2. ... e6 was more common. In that case one can transpose to more open lines via 3. d4 cxd4 4. Nxd4 ... I liked Kere's 2. Ne2 partly because it provided me with experience with both open and closed lines.

```
[Event "Sicilian/Kere's Variation; 40 moves/2 hours"]
[Site "Home Game"]
[Date "1997ish"]
[Round "?"]
[White "Me"]
[Black "CM4000 Fisher-Style"]
[Result "1-0"]

[Fen ""]

1. e4 c5 2. Ne2 e5 3. c4 Nc6 4. g3 Nf6 5. Bg2 Be7 6. Nbc3 d6 7. O-O O-O 8. d3 Bg4 9. f3 Be6 10. h3 Qd7 11. Kh2 Qc7 12. Nd5 Bxd5 13. cxd5 Nb4 14. a3 Na6 15. f4 Qb6 16. f5 Rac8 17. g4 h6 18. Ng3 Nd7 19. Qe1 Rfd8 20. Nh5 Nc7 21. Qf2 Ne8 22. h4 Nef6 23. Nxf6+ Nxf6 24. Qg3 Nd7 25. g5 hxg5 26. hxg5 f6 27. g6 Nf8 28. Qh4 Qb5  29. Rf3 Qe8 30. Rh3 Qxg6 31. Qh8+ Kf7 32. fxg6+ Nxg6 33. Qh5 Ra8 34. Kg1 Rh8 35. Qg4 Rxh3 36. Bxh3 Nf8 37. Qh5+ Kg8 38. Be6+ Nxe6 39. dxe6 f5 40. Qf7+ Kh7 41. Qxe7 d5 42. exf5 e4 43. Bg5 Rf8 44. Qxf8 exd3 45. Kf2 a6 46. Rh1#

```
> 2 votes

---
Tags: opening, learning, sicilian-defense
---


# Question
Title: Why is f4 by White so rarely seen against the Dutch?
One of the more common responses to the Dutch Defense is as seen below:

```
[FEN ""]
1.d4 f5 2.c4 Nf6 3.Nc3

```

I understand the logic behind this fairly well. White establishes a strong queenside presence and is free to bolster defenses in the center with their knight without fear of blocking their own pawns in. However, the following sequence of moves is almost never seen:

```
[FEN ""]
1.d4 f5 2.f4 Nf6 3.Nf3

```

I understand why this *particular* version is so rarely seen: the e5 square is given a needless amount of protection while leaving e4 defenseless. However, in general, you still never see players at the master level try to go for f4 and Nf3 against the Dutch, regardless of how the first few moves shake out. Why is this? I know anecdotally that it's good practice to put your pawns in front of your knights, but if that's the case, why do it only on the queenside and never on the kingside? In the first example up there, white usually plays Nf3 anyway, blocking their own pawn in. Why does this double standard exist?

# Answer
> I know anecdotally that it's good practice to put your pawns in front of your knights, but if that's the case, why do it only on the queenside and never on the kingside?

Precisely because your king is on the kingside. By moving that f pawn, you're weakening your king along the 2nd rank and along the g1-a7 diagonal. In general that's a very bad idea. Many games have been lost because this weakening of the king led to a direct assault.

> In the first example up there, white usually plays Nf3 anyway, blocking their own pawn in. Why does this double standard exist?

While it may seem like a double standard, it's actually not. Honestly black does not want to play f5 either for the same reasons that white does not want to! However, as black, you have to sacrifice something to get something. In this case, black is trying to argue that having a firmer grip on the e4 square is more important than the weakening of their king. A lot of top players disagree with that conclusion and that's why the dutch itself is very rare at the top level as well.

There's one further reason not to play f4+Nf3 in the Dutch. The e4 square immediately becomes a hole for your opponent to use. We have already played d4 weakening e4 slightly, but only after combining d4 and f4 does the e4 square become a true hole. Black does not often play f5+d5, giving up the symmetric e5 square. Doing this is called "the Stonewall Dutch." It's pretty dubious because while you're trying to get a firm grip on one color complex in the center, there's a complete and total disregard of the other. As soon as you play both pawns forward, your c8 bishop is just such a sad piece. Why would white do this unprovoked?
> 11 votes

---
Tags: opening, dutch-defense
---


title: Lichess Cloud Evaluation Flaw?

text:
# Question
Title: Lichess Cloud Evaluation Flaw?
In the following position that's in the Traxler Counterattack: https://lichess.org/analysis/r1b1k2N/ppp1q1pp/5n2/3Pp3/2Bn4/8/PPPP1bPP/RNBQ1K1R\_w\_q\_-\_1\_9

```
[fen "r1b1k2N/ppp1q1pp/5n2/3Pp3/2Bn4/8/PPPP1bPP/RNBQ1K1R w q - 1 9"]

9. d6 cxd6 10. Kxf2 Bg4 11. Qe1 (11. Qf1) Nxc2 12. Qf1 Nxa1 13. h3 Be6

```

The evaluation is "+0.4" at depth 54 if you enable cloud analysis on Lichess, suggesting a draw, with the following engine line: 9. d6 cxd6 10. Kxf2 Bg4 11. Qe1 Nxc2 12. Qf1 Nxa1 13. h3 Be6. (https://i.stack.imgur.com/u0hGe.jpg)

What happens if the game continues: 9. d6 cxd6 10. Kxf2 Bg4 11. Qf1 instead? Lichess Stockfish evaluates this at +3 at lower depths but according to the previous analysis, at depth 54 it showed +0.4. What is the drawing line after 9. ...cxd6 (I know 9. ...Qxd6 draws but according to the cloud evaluation so did 9. ...cxd6)? Or is this an incorrect evaluation at depth 54?

# Answer
> 2 votes
You are right this is a flaw. Although the best move `d6` is correct, the subsequent move is not — cxd6 is wrong, correct is Qxd6.

Analysis of latest stockfish (130222, stronger than current released version 14.1) on my desktop at multipv=2 reaching depths 58 and 57.

r1b1k2N/ppp1q1pp/5n2/3Pp3/2Bn4/8/PPPP1bPP/RNBQ1K1R w q - 1 9

```
0.00/58 9.d6 Qxd6 10.Nf7 Qe7 11.c3 Bg4 12.Qa4+ Nd7 13.Kxf2 Qh4+ 14.Kf1 Bh5 15.cxd4 Qf4+ 16.Kg1 Qxd4+ 17.Kf1 Qf4+ 18.Ke1 Qe4+ 19.Kf2 Qf4+

```

```
0.00/57 9.h3 Bh4 10.c3 Nf5 11.d4 Bd7 12.Kg1 O-O-O 13.Nd2 exd4 14.Nf3 Bg3 15.Nxd4 Ne4 16.Nf7 Nxd4 17.cxd4 Bf2+ 18.Kh2 Rf8 19.Ne5 Bg3+ 20.Kg1 Qh4 21.Qd3 Bf2+ 22.Kh2 b5 23.Bb3 Bg3+ 24.Kg1 Bf2+

```

---
Tags: engines, evaluation, lichess
---


title: Benefits Of PGN Files

text:
# Question
Title: Benefits Of PGN Files
I’m wanting to improve at Chess and reduce my number of mistakes and blunders in order for me to win more games. Can Pgn files help me with my quest to improve? If not then what can I do? What is a good strategy to use in order improve my rating.

# Answer
I am only going to address this question here: `Can Pgn files help me with my quest to improve?`

Getting your games into `pgn` or any other other format does not increase your strength of play and, as a consequence, your rating. It's only a format of how you keep the record of your games. However it will definitely have an influence on your overall experience of analysing, sharing or archiving your games.
> 2 votes

# Answer
Like what pavel Nefyodov has stated above, "Getting your games into pgn or any other other format does not increase your strength of play".

However, you should try to play a lot of (serious) chess and review your games. Try to start slow games e.g. 10mins game. You should also study multiple openings and critical endgames positions that will help you in your chess games. Also, try to be open to criticism about your games, so you can receive feedback and learn how to improve your gameplay strategy. You should also try to review games played by high rated players, to get a sense of how pros play, and take notice of how they activate their pieces, or use a specific opening. More tips can be found here
> 0 votes

---
Tags: beginner
---


title: Programming FEN diagrams

text:
# Question
Title: Programming FEN diagrams
I'm thinking about creating ANKI flashcards deck with my games positions as a training tool. Is there a way to programmatically (can be whatever programming language, I'll figure it out) generate diagrams from a bunch of FEN strings?

# Answer
> 5 votes
You can make use of the online fen2png.com site, calling it with wget or curl:

`curl 'https://fen2png.com/api/?fen=r1b1k1nr/p2p1ppp/n2B4/1p1NPN1P/6P1/3P1Q2/P1P1K3/q5b1%20w%20kq%20-%20-&raw=true' > ~/a.png`

Or you can use a similarly-named python code (which I have not tested):

https://github.com/tikul/fen-to-png/blob/master/fen2png.py

---
Tags: fen, diagram
---


# Question
Title: How do you encourage juniors to play slower?
Question to chess coaches: the common problem with beginning juniors (ages 5-8 years old) is very fast playing. What are your methods to convince/encourage your pupils to play slower chess?

# Answer
Be careful what you wish for - **right now they are playing & having fun**. Slowing down, thinking, calculating, being precise - that may actually deter them from the game.

**Later, once they're teenagers, they might come to you and ask how to slow down!**

If you insist, though, then I recommend gradually introducing thinking patterns. i.e. Before making a move:

* Check all checks.

Then once they've got used to that, introduce another pattern:

* Does this move give my opponent any checks?

Gradual increments like that will likely be successful, without over-stressing a young and fun-centric mind.
> 2 votes

# Answer
I am a fast player because I started to like playing bullet and ultra bullet when I started learning chess. Doing so can actually be bad for you, as this does not invoke any learning.

It is better to start letting them play slower games, e.g. 10 minutes. This will make them play slowly and learn which moves are best and evaluate the position. This s essential when players are still beginners or intermediate players

I, however, am not a coach, just your neighborhood friendly chess player. My advice may be biased, contradictory, or wrong, but I hope it helps you out.
> 0 votes

---
Tags: training, psychology, time-management, children, coach
---


title: Free chess engine with a tablebase

text:
# Question
Title: Free chess engine with a tablebase
So I've downloaded Stockfish and the Arena GUI, but I'm having trouble getting any tablebase I download to either load into Arena, or be compatible with Stockfish. Any suggestions? I'm willing to download a different GUI if it is easy to get a tablebase loaded.

# Answer
> 4 votes
If your GUI allows custom UCI options (I think you can do it in Arena, but check its documentation), you should be able to add a syzygy path yourself. Otherwise, you may try the popular `Deep Fritz` GUI. Check this link:

http://talkchess.com/forum/viewtopic.php?t=50554&highlight=syzygy+deep+fritz

# Answer
> 2 votes
So Arena uses Gaviota Tablebases, so if you want to use GUI tablebase option then you can download them and configure Arena to use them,

Stockfish only uses Syzygy tablebases, So you will need those bases and then when you are configuring the engine you'll find and option for Syzygy Path. You'll need to set it to the directory where your syzygy tablebases are.

---
Tags: software
---