title: Bathroom cheating

text:
# Question
Title: Bathroom cheating
A serious threat to human chess competition seems to be phone-in-the-bathroom cheating. Is anything being done to address this problem?

# Answer
"Yes" is the answer according to FIDE.

They have published their Anti Cheating Guidelines which highlight the section of the new laws regarding this:

> 11.3.b. During play, a player is forbidden to have a mobile phone and/or other device capable of processing or transmitting chess analysis in the playing venue. If it is evident that a player brought such a device into the playing venue, he shall lose the game. The opponent shall win. The rules of a competition may specify a different, less severe, penalty.

They also highlight the powers the arbiters and organizers have to enforce this rule:

> The arbiter may require the player to allow his clothes, bags or other items to be inspected, in private. The arbiter or a person authorized by the arbiter shall inspect the player and shall be of the same gender as the player. If a player refuses to cooperate with these obligations, the arbiter shall take measures in accordance with Article 12.9.

Since amateur players often need their mobile phone on the way to the playing venue or on the way back to arrange lifts, etc, the commission amended the rules for amateur players as follows:

> “In tournaments open to amateur players, the prohibition to introduce electronic devices in the playing venue may, and indeed should be waived. However, under no circumstances a player shall be allowed to carry a mobile phone or other device capable of processing or transmitting chess analysis, whether switched on or off, working or not, on his body during play. This includes, but is not limited to, carrying a device in a bag or in the pocket of a jacket. Any player found carrying such a device shall immediately be forfeited his game, with rating points calculated. A second offense during the same tournament shall imply an immediate ban from the tournament, with the player’s name forwarded to the ACC for further investigation.”

The net effect of this is that at our level we may take our mobile phones with us to the competition. They must be left switched off in a bag which may be by our feet when we are playing or alternatively left with the arbiter / organizer if they have made arrangements for this (some do, some don't). We may not take the mobile phone with us whether it is in a bag or not when we leave the board. If it is suspected that we have then the arbiter can request a search or pat down. Refusal results in the loss of the game.
> 10 votes

# Answer
FIDE has proposed an Internet-based Game Screening Tool (see here for more information) in order to identify possible cases of cheating by assessing how much computer-like a player has played.
> 1 votes

# Answer
The Continental Chess Association (USA) has the following rule for its biggest tournaments:

> A table will usually be provided near the bathroom for players to temporarily check devices. If such a table is provided, players may not possess devices inside the bathroom. See rule 10 for penalties. Players whose games have finished and spectators are also not allowed to possess devices in bathrooms. Cellphone detecting wands will be used to spot check players who have exited bathrooms.

http://www.chesstour.com/devices.htm
> 1 votes

---
Tags: cheating
---


# Question
Title: When is a bishop and knight stronger than the rook?
Often times, players will trade their rook for the opponent's knight and bishop.

This seems to have a slight advantage materialistically as a rook is worth 5 and a knight and bishop are worth 6 total. But from a strategic view, this seems quite unnecessary as it is very hard to coordinate the knight and bishop together (it takes 33+ moves to checkmate by themselves versus a King) let alone deal with a rook at the same time.

Midgame though, they might have an advantage as with all (or most) of the pieces all over the board, the rook may have trouble navigating through the board. The bishop-knight pair though should be sound since the knight should just jump all over the board. Endgame though, I just don't see how a knight and bishop can overpower a rook.

So my question is, when is a bishop-knight pair generally stronger than a rook?

# Answer
> 9 votes
N+B is generally considered to be superior to R+P, because of their greater coverage of squares and the ability to attack the same point twice rather than once. N+B is drastically better than a lone rook in a normal position.

Except for positions with immediate tactics, the only time I can think of that a rook might be superior is in an endgame with passed pawns for both sides. Rooks excel in such circumstances.

# Answer
> 6 votes
In an ending it will often come down to who has the weak pawns and if BN can cooperate. If the R-side has a weak pawn that can be attacked by both B and N, it will be lost. Coordinating BN to do that is a lot easier than chasing a lone K all over the board. If the BN-side has a weak pawn, just one piece is enough to defend it. This is the sort of reasoning that favors the BN.

On the other hand, Mihail Marin, in "Learn from the Legends" shows a number of instances where Tal was successful with a very active R, and that chapter discusses the question nicely.To be effective, the R also needs partners to collaborate with.

---
Tags: strategy, rook-and-minor-endgame
---


# Question
Title: Would you exchange your queen for two rooks?
The question is general, not pinned to a particular position. But for example here is a self-fabricated position:

```
[FEN "6k1/p4ppp/1r1r2n1/1N6/P7/3Q4/2P3PP/1K6 w - - 0 1"]

1. Qxd6 Rxd6 2. Nxd6

```

# Answer
> Only a lonely queen fears two rooks

Source: *The wisest things ever said about chess* by GM Soltis, paraphrasing Fischer.

The point behind the quote is that if there are more pieces on the board, the queen tends to outperform the rooks. If there are just pawns (no pieces) then the rook side tends to be better.

> Fischer showed that when there are minor pieces present - even just one pair - the queen has no reason to fear the rooks
> 9 votes

---
Tags: strategy, exchange
---


# Question
Title: Modified move-order in the KID 4. ..0-0. What is the point and how to react?
A main line in the King's Indian Defense is this 1. d4 Nf6 2. c4 g6 3. Nc3 Bg7 4. e4 d6. However, black could castle instead of d6:

```
[FEN " "]
1. d4 Nf6 2. c4 g6 3. Nc3 Bg7 4. e4 O-O

```

Is this a more-or-less inconsequential move order inversion or does white need to be careful to avoid some pitfall?

Specifically, in the usual mainline I would play the Sämisch Variation (5. f3) and it does not feel quite right to play f3 there right away, but maybe it is? If not, what should one do as a Sämisch player, Be3 right away?

Or, is this 4. ... O-O an error that white can try to exploit? If so, I assume the refutation ought to be 5. e5. But is this is good idea?

I am most interested in answers geared towards Class A or B players, but will be grateful for any input.

# Answer
In the vast majority of the cases, 4....d6 and 4....0-0 transpose into each other.

However, with 4....0-0 black keeps the option of playing c6 and d5. Recently, this idea has been played by GM Jobava, known for his original approach in the opening: Lupulescu-Jobava, So-Jobava and Vitiugov-Jobava.

About the last game, chess.com comments "Just giving away the g6-pawn. This reporter is at a loss". The engines do not approve Jobava's opening, but somehow he was able to create enough counterplay and to draw the game.

As you play the Sämisch, it makes sense to start with 5.Be3, as Ng4 is not possible. Clearly, 5....d6 6.f3 would transpose to your repertoire. After 5....c6, white has two popular ways to seize the initiative and to obtain an advantage: 6.e5 Ne8 7.f4 d6 8.Nf3 (e.g. Parligras-Fier) and 6.f3 d5 7.cxd5 cxd5 8.e5 Ne8 9.h4 (as in Vitiugov-Jobava). The former should result in a slight but stable advantage for white, while the latter leads to sharper play.

```

      [StartPly "7"]

      [FEN ""]
      1.d4 Nf6 2.c4 g6 3.Nc3 Bg7 4.e4 O-O (4...d6) 5.Be3 (5.f3) c6 (5...d6 6.f3) 6.f3 (6.e5 Ne8 7.f4 d6 8.Nf3) d5 7.cxd5 cxd5 8.e5 Ne8 9.h4

```
> 15 votes

---
Tags: opening, 1.d4, kings-indian
---


# Question
Title: What is the name of this Sicilian Variation?
What is the name of this variation:

```
[FEN ""]
1.e4 c5 2.Nf3 d6 3.d4 cxd4 4.Nxd4 Nf6 5.Nc3 a6 6.Bg5 Nbd7

```

# Answer
> 7 votes
It's an old main line of Sicilian Najdorf, and according to Wikipedia, it's the De Verbeterde List, or Improved Strategem, due to recent efforts by Dutch players to revive it.

---
Tags: opening, sicilian-defense, najdorf
---


# Question
Title: Is there a site with preparation ideas for opening tabiyas?
I deal with this problem every time. I have some 'default' repertoire and when preparing against concrete opponent, I find that it is highly probable we will reach some concrete well known position and I want be the one to come with system he can't expect me to play. Ok I can use book, engine, games to create interesting system myself, but it takes soooo much time. People already made thousands of preparations like this, coming with a sharp forcing idea hard to refute over the board, playing new move with completely different approach compared to main lines... Is there somewhere something like market of these ideas? Just pgn with 20 lines, for example. Or text. Anything that is good for titled players, computer checked lines, dangerous surprises for one game etc.

# Answer
The SOS ("Secrets of Opening Surprises") books and articles (in New in Chess magazine) can be good references. Once in the USATW I was paired up against a 2450 rated player. I found references with a quick online search that he played the Caro-Khan. I walked in the bookstore and looked in an SOS book and found a line Kasparov used in blitz a lot. After 10 minutes of preparation I was armed to get my well booked opponent out of his element and I won my best game of the tournament. I've done such things with the Chess Informants a lot including preparation against Yermolinsky in the US Open. I would say Chess Informant is best if you have the time and money.
> 1 votes

# Answer
i don't know you want a opening repertoire for positional or attacking one. I use to play mainly positional repertoire but for some blitz chooses attacking one. I followed some lectures of yassar serwain's from saint luis club , it is available in youtube . I also follow a pdf of gufeld's repertoire Repertoire of Gufeld and another man

And also following some advice from GM Arthur Yusupov . But at last I must say that if you do not rely on your repertoire then you cannot become a good player , and if you do not make a hard work on your openings then you cannot make a solid typical opening (most of the player don't like this type of opening which has been analysed , like with 48 moves or more!! ) like Lev poluguasky (Pronouncing wrong?!) , His openings homework was great , every player was scared to play with him , he is mainly known for his hardwork on openings (his favorite opening was sicilian najdorf , and he invented the opening Sicilian Najdorf Poluguasky variation , which is sharp like axe ) , if you make a hardwork on your opening you can be one like him . And at one stage he said by this hard work attitude he can prepare any master player into world champion.
> -1 votes

---
Tags: opening, websites
---


title: How should one resign properly?

text:
# Question
Title: How should one resign properly?
In some of the tournaments I've been to, there were pretty indecent people (some of whose licenses were revoked).

One of my friends had a terrible incident. At the end of the game, he was dominating and his opponent looked at him, told him that he resigned, they shook hands and reset the pieces. When the referee came, their opponent claimed that they agreed for a draw.

Even though the referees asked the other players, they just said they shook hands and reset the pieces together. Naturally, cameras showed the very same thing. At the end of the day, he was not able to prove the fraud and lost half a point from an already won game.

A similar thing might be observed at the end of Carlsen's defeat against Anand in Dubai. What prevents Carlsen from claiming that they agreed to a draw?

Moreover, unfortunately, these types of frauds do not only occur in local tournaments. For instance, there was the game Tal vs. Adamski where Tal's wife saved the day.

Thus, my question is somewhat two-folded. How should one resign properly, and proceed when the opponent tells that they resign?

# Answer
In the USA, we have to notate our games. This would likely prevent issues where an opponent claimed a draw fraudulently.

I played tournament chess for years and never knew of a single instance of the sort of fraud and cheating that you mention. (My point is that I have not had to deal with it so others may have more germane experience.)

EDIT - good observation by @ghotir. If you agree to a result, write the result, sign the scoresheets, and do not reset the board until this has been done. Even so you both have the scoresheets. That's how it happens at tournaments.
> 12 votes

# Answer
I can't imagine making additional actions to avoid something so ridiculous. Defending against something that never happens won't help you make chess friends. The probability of this happening is 0% and the probability of this happening to you is even bigger 0%. How many times do you think player can repeat such a behavior unpunished? What sense does it make for the player? Who is going to risk his career / good name this way? People capable of that will use engine assistance in the first place. It's just half a point at risk...
> 2 votes

# Answer
1) When I resign, I usually do all of these: drop my king, say 'I resign', and stop the clocks, and offer a handshake.

2) When my opponent says he resigns, I will not shake hands immediately, rather, I will stop the clocks and call the arbiter. After the arbiter comes, I will ask my opponent to state his resignation to the arbiter.

Quod Erat Demonstrandum.
> 1 votes

# Answer
The real question here does not seem to be how to resign, but how to deal with cheaters. There are ways of dealing with cheaters which are not specific to chess.

After the fact, some might suggest a fistfight, :-) while others might suggest social shaming (i.e., making sure everybody in the club/tournament learns that the person is a cheater). You can also request not to be paired against the cheater in the future. Tournament directors are not required to accommodate your request, but they can consider it. Finally, you can file a formal complaint, although there better be evidence.

Before the fact, you can either be "paranoid" about it (for example, by demanding that the director witness the resignation as someone else suggested), or you can relax and assume good faith knowing that cheating is very rare (unless you play in an environment very different from what I know!). Up to you.

In any case, keeping score is always advisable, for a variety of reasons.

Back to the incident in question: the tournament director has a lot of discretion when dealing with "ambiguous resignations" (ambiguous is how they look to a TD in a "he said, she said" situation). Here's what Tim Just, editor of the USCF rulebook, had to say about it in his book, *Just Law*:

> If an ambiguous resignation is disputed promptly enough, then the game can simply continue. If the unclear resignation is not discovered until much later, then the waters get muddy. Some TDs like to award one point to the player who says they won the game and a half-point to the player who says they drew the same game—I am not a fan of this method, but it is widely used. TDs may be able to go over the game score and adjudicate the result based on the final position. If the TD cannot determine what happened, they may declare the game a draw or let the reported score stand. The worst option is for the TD to declare the game a double forfeit. I cannot recommend that. But players who get tied up in disputed resignations may want to be prepared for any of these TD decisions.

(This is all in the context of USCF rules, of course. Your mileage may vary under other jurisdictions.)
> 1 votes

# Answer
If you keep a written record of games, the ending position can be reconstructed. Then the referee can reason from the board position whether a resignation or a draw is the more equitable result from the position.
> 1 votes

---
Tags: rules, etiquette, resigning
---


# Question
Title: What makes white's first move tempo advantage so valuable?
White player wins much more often. Is there a kind of statistics of how much more often? Mentally it seems to be half a point per game. At the same time, it is very easy to lose a tempo during the game. Castling long often leads to King b1 as an extra defense, for example. One tempo is immediately decisive in a zugzwang endgame, but a tempo from the very first move when all the peaces are in a useless mess, should quickly be diluted after a few moves, I would think.

A tempo advantage is normally temporary, one has to immediately turn it into a lasting advantage in material or position. Like keep on checking. So how come the one tempo advantage of white on the first move shows so clearly on the scoreboard?

I wonder if white's advantage says something generally (statistically) about the value of a tempo won during the game. If black wins a tempo in the midgame, shouldn't then black have the advantage as if he played white?

# Answer
> 4 votes
At the amateur level games are often decided by tactics. From simply hanging a piece at beginner level through to more complicated tactics at club level.

At the professional level players don't often lose material. If they are down material, they tend to have some compensation for this. Therefore professional players have learned to take advantage of every little thing, whether it is slightly more space, the bishop pair or just one tempo.

That is why white's first move advantage is important. It is one small advantage that a strong player will nurse over many moves until it becomes something more concrete, e.g. one more tempo becomes a small spatial advantage, which then becomes pressure on the king position, which later may result in a player losing a pawn etc.

# Answer
> 4 votes
Having the first move often leads to another kind of advantage. This could be a lead in development, space, better placed pieces, or just pressure.

Due to the first move advantage, white scores 53% to black's 47%.

White moving the king to b1, for more safety, loses a tempo, but castling on the queenside gains a temp by having the rook on an open file. In many Sicilians, white moves the king to h1 for safety, but pushing the f pawn activates the rook. Giving one advantage for another.

In an endgame, there are many examples where the game is decided by one tempo, however they also teach you how to lose a tempo by triangulation with the king or by the bishop.

The main advantage of the tempo is by the pressure. By using the extra tempo to apply pressure on your opponent, you will force them to make subpar moves, which may force them to make some concession.

http://www.chessgames.com/perl/chessgame?gid=1290698 http://www.chessgames.com/perl/chessgame?gid=1228798 http://www.chessgames.com/perl/chessgame?gid=1106540

---
Tags: advantage
---


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

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

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

```

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

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

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

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

E.g.,

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

1.gxh8=R+

```
> 52 votes

# Answer
In the first position which you've given, there could have been a white pawn on b7 and a black piece on a8 prior to that with white to move. Then by capturing the black piece with the white pawn and promoting it to a rook, the position shown would have been reached, with black to move. The board is typically shown from the white perspective with the pawns moving up the board.
> 3 votes

---
Tags: checkmate, problems, retrograde-analysis
---


title: Illegal promotion in FIDE blitz game?

text:
# Question
Title: Illegal promotion in FIDE blitz game?
In a FIDE rated blitz (3+2) tournament (following the official FIDE rules), the following position occurred:

```
[FEN "8/1k5P/q7/8/8/8/6K1/6Q1 w - - 0 1"]

```

White played `1.h8Q`. But since both queens were on the board, the White player had no choice but to take a White rook, flip it and then place it on the h8 square. He then pressed the clock to complete the move.

The Black player immediately stopped the clock, complained to the arbiter because the flipped rook wasn't a legal chess piece. Thus, the Black player argued his opponent had made an illegal move in the blitz game.

The arbiter agreed and awarded the game as a win for Black due to the illegal move.

**Q1:** What does the FIDE rule say? Was the arbiter's decision correct?

**Q2:** If it was indeed an illegal move under the FIDE blitz rule. What should the White player have done? How would the player promote to queen (not rook!) when the White queen was already on the board? All other chess boards (and the queens) were occupied.

# Answer
> 10 votes
The rules do not mention a flipped rook, nor is there any rule that says a move can be illegal due to how the piece is placed on the square. It's a legal move.

That said, it's just a rook. The opponent could have said "j'adoube" and placed it correctly, or waited for the rook's first diagonal move and then claim illegal move.

The player absolutely did have a choice: if a piece you want to promote to isn't readily available, that's a perfectly good reason to stop the clock and ask the arbiter to give you one. Rule 6.12.b:

> **6.12.b** A player may stop the chessclock only in order to seek the arbiter’s assistance, for example when promotion has taken place and the piece required is not available.

That all other queens are in use is not the player's problem, but the arbiter's. Personally when I'm arbitering I always have one of each color in my pockets, and my games aren't even FIDE rated. An arbiter without spare material (also a spare clock or two) in a FIDE tournament is extremely incompetent.

---
Tags: rules, fide, pawn-promotion, illegal-move
---


# Question
Title: Is the Sveshnikov Variation a subvariation of the Lasker-Pelikan Variation?
Wikipedia says that the Sveshnikov Variation is :

```
[FEN ""]
1.e4 c5 2.Nf3 Nc6 3.d4 cxd4 4.Nxd4 Nf6 5.Nc3 e5

```

While chesstempo says that is the Lasker-Pelikan Variation, and the Sveshnikov is strictly :

```
[FEN ""]
1.e4 c5 2.Nf3 Nc6 3.d4 cxd4 4.Nxd4 Nf6 5.Nc3 e5 6.Ndb5 d6 7.Bg5 a6 8.Na3 b5.

```

# Answer
There is no central authority for opening names, and the ones used shift over time. So a definite answer to this question isn't possible.

Bad\_Bishop quotes *Silman's review* of "Sicilian Sveshnikov: Move by Move", which is a bit odd as the book itself treats all variations after 5...e5 (see the PDF preview of the book, chapter "Sixth Move Alternatives".

The same is true of "The Sicilian Sveshnikov" by Kotronias (PDF preview).

But these are repertoire books for black; if you play 5...e5 and white wants to, he can basically force 6.Ndb5 d6 7.Bg5 a6 8.Na3 b5 as there are few serious alternatives for black. So if you play the Lasker/Pelikan, you play the Sveshnikov too, and vice versa. It's logical that they want to treat white's alternatives at move 6 too, so that the book is more widely useful. But then, why not call it "The Lasker/Pelikan: Move by Move"?

I think the name "Lasker/Pelikan" is *obsolete*, at least in English language chess publications. I've never seen it used in any book or periodical or website in at least twenty years, it's always Sveshnikov. You can easily find many books on the Sveshnikov, and I don't know any on the Lasker/Pelikan. Apart from that Silman review, but he has played chess for a long time.

ECO (and thus the Informant) calls it the Lasker/Pelikan, but its codes and their names are set in stone since the 1960s. Those codes and their names have also ended up in many computer files of opening names, but as far as I can see it's not actually *used* by anybody anymore.

It's just the Sveshnikov.
> 7 votes

# Answer
RemcoGerlich's answer is excellent: the Lasker-Pelikan and the Svechnikov are basically the same variation; it is defined by 5...e5 but the line until 8...b5 is the main continuation afterwards and the resulting position where White can choose between 9.Bxf6 and 9.Nd5 can be considered as its real tabyia. The name "Lasker-Pelikan" is outdated, almost obsolete, and nowadays "Svechnikov" is the way to call that variation.

To complement the historical evolution, the variation was known as the "Lasker-Pelikan", or just the "Pelikan" until the beginning of the 70's, when it was considered dubious and was not popular at all. Then youngsters like Svechnikov, Timoshchenko and Vladimirov gave the line a boost, but because they were no famous grandmasters (yet!) but just some obscure teenagers, Russian theoreticians named the line from the city they were coming from, Tcheliabinsk - for about 10 years 5...e5 became "the Tcheliabinsk variation" (or even sometimes "the Tcheliabinsk-Novossibirsk variation" !).

In the eighties, Svechnikov became a strong grandmaster, kept being successful with his pet line and wrote a good reference book about it, so more and more people referred to the line as "the Svechnikov Sicilian" and that is the standard name ever since. Yakovich's, Rogozenko's, Kotronias' and Lakdawala's books about the variation all have the name "Svechnikov" in their titles.

Evgenny Svechnikov's own book about the line is actually entitled "The Sicilian Pelikan". I think it was published in 1986 or 1987 in the USSR, what is sure is that the English translation went out in 1989. This title is a display of modesty by the author, since the names "Svechnikov", "Svechnikov-Vladimirov", and "Tcheliabinsk" were already much more in vogue than "Pelikan" in the eighties.

***Addendum Jan,2,2019:***

Another early expert from the city of Chelyabinsk who contributed a lot to the develoment of this opening, Gennady Timoshchenko, just published his own book about the variation, entitled *"Sicilian Defence - the Chelyabinsk Variation"*.

Its "*Part I The History of the Variation and Its Development*" includes a chapter "**About the Name of the Variation**" that would be very interesting in regard to this question. Especially if we consider the author's contempt for Svechnikov's analyses !
> 6 votes

# Answer
This is IM Silman's review of Sicilian Sveshnikov: Move by Move, the emphasis is mine:

> Cyrus Lakdawala’s latest book for Everyman also uses the Move by Move format, engaging the reader with a question and answer format that should make **the Sveshnikov** (1.e4 c5 2.Nf3 Nc6 3.d4 cxd4 4.Nxd4 Nf6 5.Nc3 e5 6.Ndb5 d6 7.Bg5 a6 8.Na3 b5) accessible to a much wider audience that previous works on the subject.

So the longer line is the Sveshnikov. The other lines are sub-variations, often with their own names.

I wouldn't get too caught up about naming conventions. To quote Bruce Pandolfini in the *Chessmaster* academy:

> But this is chess, that is names.
> 3 votes

---
Tags: sicilian-defense
---


# Question
Title: Getting started in position-counting by computer
I have quite a bit of programming background, and even game programming background, but have never looked at a real chess engine before.

I recently stumbled on this puzzle-question, which asks for the number of four-piece positions where the next move (whosever it is) will be checkmate. The number has to be somewhere between 400 (the count found by the OP) and 381,225,600 (the total count of four-piece positions), so it ought to be easy to enumerate them all by computer.

I'd like to make a quick program like this:

```
for white_king_pos in [0, 64):
  for black_king_pos in [0, 64):
    for white_piece_pos in [0, 64):
      for black_piece_pos in [0, 64):
        for white_piece_kind in {Q,B,N,R,P}:
          for black_piece_kind in {Q,B,N,R,P}:
            if next_move_wins_for(black) && next_move_wins_for(white):
              count = count + 1

```

What library should I use in order to make writing the `next_move_wins_for` function as painless as possible?

(My program is so simple that I don't care about the library's choice of programming language. But FWIW, my fluent languages are C++, Python, and C.)

Edited to add: Same question for other ways of accomplishing the goal, e.g. tablebases. :)

# Answer
> 3 votes
You can do that easily in Python.

> https://pypi.python.org/pypi/python-chess

1. Create a FEN position based on your loops
2. Make it white to move in the FEN
3. Use the FEN position to create `Board` (http://python-chess.readthedocs.io/en/latest/core.html#board)
4. Use the `legal_moves` function to generate all possible moves
5. Use the `push` function to make the move
6. Use the `is_game_over` function to check for checkmate
7. Use the `pop` function to undo the move
8. Go back to `push` until you have tried all legal moves
9. Now make it black to move in the FEN and repeat step three

**PS:** If you want to add tablebase support. There're two ways:

1. Use API provided from https://syzygy-tables.info/apidoc?fen=4k3/8/8/8/8/8/8/4K3%20w%20-%20-%200%201.
2. If you prefer to do it locally, download Syzygy files from http://kirill-kryukov.com/chess/tablebases-online. Use chess.syzygy for probing.

---
Tags: engines, software, programming
---


title: Game Analysis Software

text:
# Question
Title: Game Analysis Software
## What I need

Is there any software/engine/website (preferably free) that can analyze a given game (or PGN) of mine and tell me:

* Whether my moves were excellent, good, bad or terrible.
* Possible variations at different positions.
* Reasons why a **bad move** was bad, and suggestions for a better move.

## What I found

The thing I found closest to that is the **computer analysis** option on Chess.com , which tells me how many of my (and my opponent's) moves were good, bad and awful, and also suggests better moves in place of my errors. However, despite being rather good, it seems (to me) that it analyzes only the games I play on the site.

### Any suggestions?

# Answer
> 5 votes
LiChess.org is free and easy, but you have to register. Almost every interface can give you what the computer thinks is best.

http://www-lucaschess.rhcloud.com/ is a good program for beginners, but at more advanced levels the computer seems to hang. Lucas chess has a game analysis.

The output shows current evaluation, best move, your score relative to the best score, and, under indexes, average centipawn loss with other stats.

The program comes with many adjustable parameters. The main problem, other the the hanging engine, is that it is difficult to find which function you want. They do have links to many videos showing how to use their program.

If after watching the videos you still have problems, we could start a thread about this problem.

# Answer
> 2 votes
The old Fritz 5.32 was (and still is free). You can download it from here http://freechess.50webs.com/fritz.html. You will probably need to have Windows 7 and run in compatibility mode for XP to get this old program to run but it is still quite powerful.

If you want free chess software then http://freechess.50webs.com/index.html is an excellent place to start.

# Answer
> 1 votes
I find stockfish pretty good.

Runs on Windows and Linux.

# Answer
> -1 votes
Stockfish / Droidfish: just put the PGN files that you download to the file of Droidfish PGN. You can view and analyze games .. you can download PGN files in pgnmentor for a specific opening or specific player.

---
Tags: engines, analysis
---


# Question
Title: Why did GM Kogan play such a bad opening in this 1997 game?
```
  [FEN ""]
  [Date "1997"]
  [White "GM Kogan"]
  [Black "IM Watzkin"]
  [StartPly "8"]

  1. Nf3 d5 2. c4 dxc4 3. Na3 a6 4. Nxc4 b5 5. Na5 c5 6. b4 cxb4 7. Qc2

```

The first four moves are common, but then ... 5. Na5 c5 6. b4 cxb4 7. Qc2

Why would a strong GM purposely go in to an opening that is so bad that it is already lost? After move 7 Stockfish evaluates the position as -1 or something like that.

# Answer
> 12 votes
The reason is probably that GM Kogan didn't have the opportunity to consult Stockfish during this game …

If you play unorthodox moves to pose unorthodox problems, sometimes you stumble yourself. And it's not like he played completely stupid moves. He sacrificed a flank pawn and has now a majority in the centre and b2 for his bishop. The knight on a5 at least hinders the normal development Bb7.

Humans don't play like computers. Of course he played risky and aggressive chess, but whether his opponent can punish him for it, is still entirely unclear at this point in the game.

If you take a look at Tal's games you might find that ideas don't have to be sound to be dangerous.

# Answer
> 15 votes
haha well, I was in inspired mode and played one of the MOST creative games of my career that brought me many compliments from genius creative GM as Benko (that watched the game LIVE) and few others too :-) Not everybody can appreciate 'creative chess' or rather concrete chess with concrete ideas that created big problems and search for HARMONY (for a pawn gambit!)disturbing opponent's normal DVP, while fighting for big center etc and Josh was also shocked and even after the game didn't really appreciated what happened.. (he was 'too conservative' as a player and I could already feel he will never become a GM...) in one point I was with big edge close to winning, but did the old sin to enjoy the position too much and made a blunder... Greetings from Spain! Arthur www.olalachess.com

---
Tags: opening
---


# Question
Title: Has there ever been a successful FIDE or significant historical chess player, that refused to lose any and all pieces in his competitive gameplay?
Rather, has there ever been a significant chess player that avoided sacrifice or even equal exchanges at all costs?

Rather, has there been a significant player that was solely bent on maximum pawn and overall piece advantage, having only gains and no loss of pieces against his opponent?

# Answer
> 8 votes
No, because such a player could never become a significant chess player :)

If you refuse to exchange in every type of position, you won't make it very far in chess (no matter how good you are). There were definitely players that loved to attack and do tactics (such as Garry Kasparov and Mikhail Tal), but even these players exchanged pieces when it was the best option.

No champion can be only good at attacking - you have to be well rounded to a certain degree.

# Answer
> 5 votes
My brother and I used to play in this way as children. We thought that 'losing' any material (even in equal trades) was bad. Games were long, knights were powerful in the inevitably blocked positions and games were won by who could stay awake the longest. All of this sounds anathema to me now I'm a stronger player.

In fact, exchanges are a vital part of the game. E.g. many attacks need open lines, which implies some pawn trades:

> No pawn exchanges, no file-opening, no attack

Source: *The Wisest Things Ever Said About Chess* by GM Soltis, quoting Aron Nimzowitsch

---
Tags: positional-play, style
---


# Question
Title: Can White get a theoretical advantage against the Sveshnikov Sicilian in today's theory?
I'm looking for an opening expert or an experienced Sveshnikov player that knows the answer to this.

The Sveshnikov has been increasingly popular and it has also proven to be very good for draws. However, is there a line that like grants an unclear line that will give White a chance to fight for an advantage?

Also which line is considered better for avoiding a draw, the Bxf6 first line or the Nd5 line?

# Answer
> 1 votes
Let me answer your second question first: According to chesstempo db there are 6% less draws after 9.Bxf6 than after 9.Nd5, with White and Black each getting 3% more wins! As far as a theoretical advantage: hoacin's comment is accurate. Of course like all openings it is more about heading to the positions you like or are more comfortable with; thus many GMs would say that 3.Bb5 is the best move against the Sveshnikov.

---
Tags: opening, theory, sicilian-defense, sveshnikov
---


# Question
Title: Is there a resource that lists many of the different chess set styles?
I know that there's the Staunton, Zagreb, and Dubrovnik style chess pieces which have seemingly been standardized.

It also seems that there's a common generic style of chess piece that I've seen in plastic, glass, and wood.

I just don't know the name of it.

I've searched and searched for a resource that would list the different piece styles (or at least the most common ones) but I only seem to be able to find short lists.

So is there a resource out there or does anyone know off hand what some of the different piece styles are?

# Answer
> 3 votes
## The Illustrated Guide to World Chess Sets (Chessmen for Collectors) by Dr Victor Keats

A part from the books webpage:

> Country by country each chapter of Chessmen for Collectors systematically charts the development of chess sets in chronological order, giving the collector an instant means of identification. The accompanying mass of illustrations (50 colour and 273 black and white) gives details of the diverse materials used - ivory, wood, porcelain, bronze - precise heights of pawns and pieces, their provenance and date.

<sup>*Ivory Indian chessmen, chariots and juggernauts, late eighteenth century* </sup>

> Ivory Indian chessmen, chariots and juggernauts, late eighteenth century The text and illustrations together highlight the variation of style in English Staunton sets, Indian ivory sets, Spanish 'pulpit' chessmen and delicate French eighteenth-century sets, as well as highly unusual, 'one-off' sets from Africa and America. The whole amounts to a highly authoritative, wide-ranging reference work for any kind of chess collector.

---

## Other minor sources

This page lists some modern designs: http://inspirationfeed.com/inspiration/industrial-inspiration/20-aesthetic-chess-set-designs/

This online store has a lot of differently themed chess sets: https://www.chesshouse.com/collections/themed-chess-pieces

---
Tags: chess-set
---


title: What does "penned in" mean in Chess?

text:
# Question
Title: What does "penned in" mean in Chess?
> Bishops are worth more than knights except when they are penned in.

What is meant by penned in? Does that mean that they are blocked by other pieces?

# Answer
> 14 votes
I believe Brian Towers and user58697 are correct, and the author wrote/meant *pen* instead of *pin*. The dictionary tells it's a small enclosure for animals, or an abbreviation for penitentiary, which seems more appropriate. Still, it's the first time I encounter this word in a chess setting, so it's not common and the confusion is understandable.

---

While @Bad\_Bishop provides the general (and, AFAIK, only common) use of the term *pin* in chess, I believe the author of your quote meant something along the lines of

> Bishops are worth more than knights except when they are blocked by their own pawns.

(which matches your thoughts on the subject). Ironically, those bishops are often called bad bishops, like the white one in the diagram below:

```
[FEN "8/5pp1/3bp2p/1p1p4/1P1P4/2B1P2P/5PP1/8 w - - 0 1"]

```

One could argue that all pieces (including rooks and queens) have the same value when pinned (as in the common use of the word), but this is not entirely true; a pinned piece still prevents the opposing king from moving to certain fields, and a pinned bishop covers more squares than a pinned knight.

# Answer
> 5 votes
I dont think that the OP mis-spelt. S/he really meant penned in and not pinned in.

Penned in is a phrase meaning to be confined in an enclosure. From the MacMillan dictionary online.

1. same as pen
We penned the sheep in for the night.
2. to make it impossible for someone to get out of a place
A van was parked behind me, penning me in.
3. to make someone feel that they cannot escape from a situation.

The application in chess would be to situations where a Bishops mobility is blocked by other pieces, usually pawns, as in the post by @Glorfindel

# Answer
> 0 votes
From wikipedia

> When a piece is attacked but cannot legally move, because doing so would expose the player’s own king to the attack; or when a piece is attacked and can legally move out of the line of attack, but such a move would expose a more valuable piece (or an unprotected piece) to capture.

Here is an example:

```
[FEN "4k3/3q4/2B5/8/8/8/8/2R1K3 w - - 0 1"]

```

The queen is pinned to the king by the bishop as the queen cannot legally move. This would expose the king to capture.

---
Tags: terminology, bishops
---


# Question
Title: Free online analysis board between two players (both players can move the board)
Other than F.I.C.S., where can a friend and I analyse our games online together free where both of us can move the pieces on the board.

# Answer
**Lichess.org** has a feature called studies. You can add your game as a *chapter* in a study, invite your friends as contributors and make that study public or private. You have a (rather weak) engine analysis, a small database of chess games, and a chat. You can annotate your game, add alternative lines and so on. The multi-chapter option makes that very useful for much more than game analysis. I'm using it primarily for opening studies.

Here is a screenshot from my Caro-Kann study:

Not free, but also worth a mention: **Chess24.com** has an analysis board for premium members. Very similar features, but there is only one game per analysis, not multiple chapters. The database is better (larger and properly cleaned up names, lichess is sometimes a bit annoying in that regard). You have to *start a broadcast* (see screenshot), and then you can invite your friend who doesn't need a premium membership for that. The downside is that the chat vanishes once you stop the broadcast.

In both cases you can move pieces on the board, and all other participants can see and annotate these moves.
> 7 votes

---
Tags: analysis
---


# Question
Title: How could I have improved my attack in this game?
I won the game easily because my opponent left a rook hanging in the end. I believe I missed opportunities to build a stronger attack, but I am not sure how I could have done so.

```
[FEN ""]
1.d4 e5 2.dxe5 Qe7 3.Nc3 Qxe5 4.e4 Nf6 5.Nf3 Qe7 6.Bd3 Qb4 7.O-O Be7 8.e5 Ng4 9.Nd5 Qc5 10.Nxe7 Qxe7 11.Re1 O-O 12.h3 Nh6 13.Nd4 Qh4 14.Re4 Qe7 15.Bxh6 gxh6 16.Qh5 d5 17.Re3 f5 18.Rg3+ Kh8 19.f4 Nc6 20.Nxc6 bxc6 21.Qxh6 Qe6 22.Qxf8+ Qg8 23.Qxg8#

```

# Answer
> 5 votes
16. Nf5 would win the queen one way or another because of the threat Qg4+, Qg7++. For instance 16. Nf5 Qe6 17. Qg4+ Qg6 18. Ne7+

Other than that, when you are attacking and the opponent's pieces are undeveloped or discoordinated you really want to open files and not create a closed position. Therefore 17. exd6 e.p. or even better 18. exf6 e.p. seems natural. Then white will bring a rook to e7 and black should be lost soon.

# Answer
> 2 votes
exd6/exf6 as mentioned above are good just because they open lines and the pawn isn't likely to anchor the knight.

I really like 17. Rh4 because it forces Qg5, then Qxh6 gets both h pawns and the game's pretty much over.

Black has a resource of ...Qg5 to try to trade queens, but White's so far ahead in development it isn't a real threat to dissipate his advantage.

19 Nxf5 seems fine too as Qf7 (or) Qxe5 Qxh6 and ...Qf5 allows Qg7 mate, so White is just a pawn up and has opened up Black's kingside a bit more.

Sometimes it's easy to overthink stuff and not go for the clear captures. And a move like f4 appears to build up your position, but the e-pawn doesn't need protection. Open lines are important.

20 Nxc6 seems to let Black off the hook too. You should avoid piece exchanges while you're ahead unless they lead to a clear endgame. Yeah, you mess up his queenside pawns a bit, but you need to think bigger. It's nice to win a pawn, but as opposed to the line above, which also wins a pawn, the game is a bit closed off.

A good way to continue the attack after ...Be6 instead of Qe6 looks to be Rg3-g5-h5 and Kh2 and Rg1 and g4. White will break through on the g-file. Black will have trouble exchanging queens since the queen has to guard the bishop, and if that moves, Qxc6 works. Meanwhile White brings his rook into the game, either with Ra1-e1-e3-g3 or Kh2, Rg1, g4.

# Answer
> 1 votes
You could have started with a tempo with:

4. Nf3 Qe7
5. Nd5

which threatens Nxc7+ and winning a rook. Continuing with Black's best response:

5. ... Qd8
6. Bf4 d6

Bf4 adds an attacker to the c7 pawn so d7 is forced. After this has happened, we are left with:

```
[FEN ""]
1. d4 e5 2.dxe5 Qe7 3. Nc3 Qxe5 4. Nf3 Qe7 5. Nd5 Qd8 6. Bf4 d6

```

Black wasted 6 moves basically to trade a pawn and advance the d pawn, which was forced. White however, has developed both Knights and a Bishop. White's development will continue with e4, posting the strong d5 Knight. If Black plays Nf6, then White further develops with Bc4.

```
[FEN ""]
1. d4 e5 2.dxe5 Qe7 3. Nc3 Qxe5 4. Nf3 Qe7 5. Nd5 Qd8 6. Bf4 d6 7. e4 Nf6 8. Bc4

```

Note that Black did not capture White's e4 pawn because though undefended, Black will lose the Knight to a pin with Qe2. If Black tries to defend with f5:

```
[FEN ""]
1. d4 e5 2.dxe5 Qe7 3. Nc3 Qxe5 4. Nf3 Qe7 5. Nd5 Qd8 6. Bf4 d6 7. e4 Nf6 8. Bc4 Nxe4 9. Qe2 f5 10. Bg5 Qd7 11. Nd2 Be7 12. Bxe7 c6 13. Nxe4 fxe4 14. Qh5+ g6 15. Nf6+ Kxe7 16. Qg5 Qd8 17. O-O-O Bf5 18. Nxe4+ Kd7 19. Rxd6+

```

and the Queen is lost as the King can no longer block the Rook from attacking the Queen.

---

In eight moves (board 2), White has created a tempo, developed all minor pieces, has strong command of the center, and caused Black to be severely underdeveloped. White also has the option to castle King's side and Queen's side if the Queen moves. If Black does blunder (board 3), White's superior position will easily win the game with the right attacks.

Though I agree that the midgame moves are improvements, I believe a strong position and attack in the *beginning* is much, much better.

# Answer
> 1 votes
```

[fen ""]

[White "?"]
[Black "?"]
[Result "1-0"]

1. d4 e5 2. dxe5 Qe7 3. Nc3 Qxe5 4. e4 Nf6 5. Nf3 Qe7 6. Bd3 {Bc4 looks more
active, but the e pawn is under pressure.  e5 followed by Bc4 seems best.} 6...
Qb4 7. O-O Be7 8. e5 Ng4 9. Nd5 Qc5 10. Nxe7 {This exchanges too quickly.} (10.
c4) 10... Qxe7 11. Re1 {The pawn is protected by the pin on the e file.} (11. h3
Nh6 12. Bxh6 (12. Bg5)) 11... O-O 12. h3 (12. Bxh7+) (12. Bg5) 12... Nh6 13. Nd4
Qh4 14. Re4 {The knight's not under attack, but this or Bxh6 is the best move.}
14... Qe7 15. Bxh6 gxh6 16. Qh5 (16. Nf5) 16... d5 17. Re3 (17. exd6 Qxd6 18.
Nf5 Bxf5 19. Qxf5 {Threatening Rg4+ and Qxh7#}) 17... f5 18. Rg3+ Kh8 19. f4 Nc6
20. Nxc6 bxc6 21. Qxh6 Qe6 22. Qxf8+ Qg8 23. Qxg8# *

```

The game was well played. You need to open more lines, create more weaknesses, and practice more tactics.

# Answer
> 0 votes
You're fine, because your queen on h6 attacks the pawn on c6, as well as a number of points on the kingside, and Black can't defend them all. His best is probably 21... Be6 (shields the pawn). Then you play, 22. Ba6 Rb8 23. Rb3 RxR 24. axb3. The c pawn is still en prise, and you threaten to move the B, uncovering an attack by your a rook on the Black a pawn as well.

# Answer
> 0 votes
16) Qh5 should have been delayed and Nf5 is even more forcing. How to consider this fact?

Whenever you play your move you must make sure about the strongest reply from your opponent: d5 is the freeing move which black was willing to play ASAP, and Qh5 allowed that. True, the queen on kingside makes it look scary, but Nf5 attacks the queen and the h6-pawn. In the entire game, the knight on d4 could not move on to a better square because other pieces occupied those squares.

---
Tags: analysis, tactics, positional-play, attack
---


# Question
Title: Should a member of a national chess federation register himself separatef for FIN?
I know a player that is already a registered player of a National Chess Federation (NCF). Is he required to register separately with FIDE to obtain a FIN?

According to \[FIDE's rules,\](http://www.fide.com/fide/handbook.html?id=180&view=article\] I'd say no

> All NCFs are required to register their players with FIDE. The FIDE Regulations on Registration, Transfers and Eligibility shall apply. All players who already have a FIDE ID number before 1 January 2015 are considered to be registered.

But I've been asked by a FIDE arbiter to tell the player the procedure (and that he has to pay 25€ for that). The player I'm talking about has been registered already in the NCF for 2016 and 2017.

# Answer
The section you quote from the FIDE handbook is very clear. It is the responsibility of the individual national chess federations to register their players. It is not the responsibility of the players. It is the responsibility of the national federations to pay the fee required by FIDE to FIDE.

That said some national federations will have more than one level of national federation membership for individuals. They will charge more for FIDE registered players than for non-registered FIDE players and recoup some or all of the FIDE registration fees that way.

Different federations handle this in different ways and it is nothing to do with FIDE. It might be helpful if you said which national federation you are talking about.

EDIT: Doing some research I see that you are Italian. The Italian chess federation (Federazione Scacchistica Italiana or FSI) has 3 levels of membership, junior (10 Euros), ordinary (25 Euros) and adult (42 Euros). You must be a member of the FSI to play chess in Italy organized by the FSI. Normally you join (and pay) for membership through your chess club. If you want to play in a congress but are not a member of the FSI (through a club or otherwise) then you have to pay the congress your FSI membership fee.

Note that the membership fees I have quoted are old and may be out of date.
> 3 votes

---
Tags: tournament, fide
---


# Question
Title: Would this clock time mode be useful at all?
I want to encourage more games to be played with "thinking" chess instead of "video game" chess like in lightning and blitz. When I play at super fast time controls, I tend to stop calculating at all and just push wood. So my chess thought process becomes very sloppy, which makes those fast time control games pretty much useless to me in terms of improving my level.

What if there was a clock mode where a minimum time was required to be spent by a player on a move like say 10 seconds and if this rule were violated then the game would be forfeited?

I know that time delay and increment already exist, but I find there is too much temptation to gain time on the clock and move quickly.

I guess what I want is to find a clock mode that doesn't tempt me to turn off my calculating brain but where the games finish reasonably quickly.

Any thoughts on this idea?

# Answer
Perhaps this could be somewhat useful in practice games, but I don't see much point in having a minimum time control in real games. Some reasons (let's assume the minimum is 10 seconds but could be any number):

* sometimes you are doing forced moves (or known opening moves) where having to wait 10 seconds would be annoying
* conversely, there are situations where you have to think a lot longer than 10 seconds, so here the minimum time would not help at all
* you might run into the problem that you end up trying to make moves just after 10 seconds (particularly in time trouble), with the added annoyance that you now also have to keep track of when 10 seconds have passed

Overall I think that you should rather try other methods like sitting on your hands, analyzing your games with respect to time spent on moves (and relation to blunders), etc. to improve your time management. An important factor in improving your chess is also to know when to spend more time and when you can make more or less automatic moves.
> 4 votes

# Answer
The Bronstein delay is similar your suggestion. It is formally described in the following way:

> 6.3.2 The time saved by a player during one period is added to his time available for the next period, where applicable. In the time-delay mode both players receive an allotted ‘main thinking time’. Each player also receives a ‘fixed extra time’ with every move. The countdown of the main thinking time only commences after the fixed extra time has expired. Provided the player presses his clock before the expiration of the fixed extra time, the main thinking time does not change, irrespective of the proportion of the fixed extra time used.

(see the FIDE rules , approved in 2017)

The only difference between your suggestion and the Bronstein delay mode (called "time-delay mode"), lies in that playing before one's extra time expires simply leads to forfeiting the remaining extra time. This rule might correspond to your idea of a clock mode, which does not tempt players to "blitz out" their moves, but allows them to finish their games reasonably quickly.

Other sources of information about Bronstein clock include: ChessCom, Wikipedia.
> 0 votes

# Answer
Back in the day they had 10 second tournaments. Every ten seconds, a bell would ring, and you had to make your move during the bell sound. A second before or after meant an immediate loss. If this time control was popular enough to hold a tournament, I'm sure that your time control would be successful.
> -3 votes

---
Tags: time-control, calculation, time-management
---


title: Random position from database

text:
# Question
Title: Random position from database
How do I get a random position in chessbase 13 software from megadatabase to guess the best move , is this facility available in chessbase software which is availabe is softwares like Chess Hero, Or is there any other software provides such facility?

# Answer
Although it isn't chessbase 13, https://www.chessable.com/ is a site, designed to help you learn chess, that works in a similar manner to that described in the question.

The student gets books (usually openings, but there are some endgames) and learns variations - but the default learning pattern is to be shown random positions from those variations, and "guess the move". (This isn't really a "guess," since you learned the variation, but still...)

The base part of the site is free (and a number of books are free); there are other learning elements that are only available to paid members. The "library" is growing, including works by several FMs, IMs, and even a few GMs.

**TL;DR**: It's the same idea as the question, just not on as wide a database. (One could argue this allows the student to focus on an area; one could also argue it's not as powerful.)

*For full disclosure, I have nothing to do with the site itself, though I am a paying member: I've just had such luck with it I'm like a walking billboard.*
> 1 votes

# Answer
I have looked for similar online. Chessgames.com has a premium guess the move section. I think you can play the Paulsen - Morphy game for free. I am trying to work on putting something together on my site but will keep you posted!
> 0 votes

---
Tags: software, database
---


# Question
Title: Answering slow Sicilian set up (including Bc4) as Black
I usually answer `1. e4` with the Sicilian, then after `2. Nf3` I play `2...d6` hoping for a Najdorf or other open Sicilian lines. I have quite a hard time though with slow set up like `3. Bc4` followed by `d3` and `Nf3` (not necessarily in this order). I tend to lose against these set up (I just find them boring). What plan would you recommend for Black? I feel like refusing to play `d4` early in the game should be punished but I don't see how. Thanks in advance!

# Answer
I don't think that 3.Bc4 is so bad that Black should get an advantage. I believe that Adams played it several times with decent results, and it's not the worst way to avoid deep theory. But Black has easy equality. You can play ..a6 (to which he will usually play a4) and ..e6. What then is that Bishop doing? Having played against it once or twice I agree that it's boring but there is not much you can do about it.
> 2 votes

# Answer
There's unfortunately no way to immediately punish this kind of play - it just leads to a slow Sicilian setup. Here are a few ways you can play against it (after the move 3. Bc4):

* e6, Nf6, Be7, 0-0, Nc6, a6. Now you have a few plans, but the main one is to push ...d5. If White plays Bg5 to prevent this (since now your Nf6 is under attack), you just complete your development with Bd7 and Qb6. It seems hard for you to do much, but remember that you are always poised to strike in the center should White move a piece away. You could also prepare the move: Nd4.
* Dark squared strategy: Nf6, Nc6, Bg4, g6, Bg7, 0-0. The point of this setup is to control the central dark squares. Nc6 and Bg7 control e5 and d4, while Bg4's role is to take out Nf3 (White's main defender of these squares). Your plan would be to try and push b5 (Rb8, a6, etc) and also play Nd7 (opening up Bg7). This kind of position seems easier to play than the above line, but it is also easier for White to execute a plan.

Those two setups are the main ones. An important note: If you're a Najdorf player, do not play Nc6 until White has committed his pawn to d3. If you play Nc6 too early, White could play d4 in one go. Now you're stuck in an open Sicilian line with your Knight on c6 (normally in the Najdorf the Knight is better suited on d7).

This kind of game with 3. Bc4 can be quite boring to play, but at least you aren't required to memorize 20 moves of theory like in the 6. Bg5 main lines :)
> 1 votes

# Answer
There are a couple antidotes to non-open Sicilians. 1. lock down on the dark long-diagonal 'typically with fianchetto' and often sinking a knight in on d4; combined with queenside expansion or 2. try to get d5 in; this is a strategic goal in most Sicilians and with the Bishop on c4 to tempo against White doesn't have the e4-e5 response.
> 0 votes

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


# Question
Title: How to write a simple chess engine to statically evaluate a position?
I want to evaluate positions statically. So I've written a code which evaluates from a FEN string.

However it is a tedious to copy FEN and then paste for a complete game. So I wanted to know if it is possible to write such a code which can run with `WinBoard` and which could evaluate the current position statically.

It does not need to generate moves,be able to play a game, deep evaluation ,quiescent search etc.

I'm also not interested in performing `King Safety`/`Mate Threats`.

So the program should just give me only a number as output when loaded in `WinBoard`.

Is there a simple way to perform such a task or a simple enough engine I can modify to do this?

# Answer
> 2 votes
Why can't you just make a Winboard chess engine, but evaluate a position statically??

You will need to follow the Winboard protocol:

> https://www.gnu.org/software/xboard/engine-intf.html

Although everybody uses alpha-beta/nega-max pruning, but Winboard doesn't know your code. All you need to do is just give an evaluation score from your static function.

Your "engine" will wait for the `go` Winboard command. Print thinking output like:

> ply score time nodes pv

where score will be your static evaluation score. Your engine doesn't need to make a move, Winboard will wait forever for a move. You can always setup a new position in Winboard.

# Answer
> 0 votes
The easiest way to accomplish the goal is to download Winboard with its own engine. The GUI can be set to output the current evaluation. You can recode the eval function to your own parameters.

http://chessprogramming.wikispaces.com/Evaluation provides some resources about programming the eval function. However, getting a well-documented source code for the eval function I find easier. Avoid the higher engines like Crafty, but a simple one like http://www.tckerrigan.com/Chess/TSCP/ is easy to understand.

Winboard is the best option, but you can create your own interface. You could modify a PGN viewer to return an eval after every move or put the FENs into a PGN file and loop through all games. You could download https://www-lucaschess.rhcloud.com/ or another chess interface which can analyse a game and use its output.

For the actual question, the chess eval is broken up into many factors.

The easiest is material: just loop over the board and count the material.

Next is pawn structure. Assign a penalty to isolated and doubled pawns. A bonus for passed pawns. (Pawns near the king is under king threats.) This can be modified further by changing the penalty based on the distance from the center.

Next is the pieces in relation to the pawns. A bonus for a rook on a open or half-open file. A bonus for a bishop which isn't trapped behind its own pawns.

Next is the pieces in relation to the center. The closer to the center the piece is, the more it is worth. This also includes a bonus for a rook on the seventh rank. (Trapping the king would improve this score, but this would fall under king safety.)

There is a bonus for having a bishop pair and the values of the minor pieces (the bishops and the knights) are adjusted based upon how closed the center is. A bonus can be added for more mobility (either absolute or for each piece) and/or space control. (Concentrated force(s) is a factor normally reserved for mating threats.)

This is a short list.

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


# Question
Title: White's reply against Reti advance (2...d4)
I enjoy playing `1.Nf3` as an interesting transposition device, and for other reasons, but after `1...d5 2. c4` don't find a proper answer to the advance variation, `2...d4`:

```
[FEN ""]
1. Nf3 d5 2. c4 d4

```

Main answers are :

* if `3. e3`, Black can reply `3...Nc6` and some exchange of knights are usually occuring and the black queen is coming right in the middle of the board.
* `3. b4` looks interesting but only if Black wants to play in a reverse-Benko/Blumenfeld gambit style. After `3...f6,` I don't see a nice answer for White.
* `3. g3` looks the best (rightly so, it's played the most according to databases) but what is the White plan if any? Or at least ideas. Maybe because I'm not familiar with this setup.

Am I missing something ? What would you play as White on the third move?! Thanks.

# Answer
Focusing on the 3. g3 line, you have the Advance Variation of the Réti. There is an extensive discussion of this line available here, an offshoot of this page on Understanding the Réti.

These are the main lines listed there:

> **Main line:**
>
> a. 3...Nc6 4. Bg2 e5 5. d3 Nf6 6. O-O
>
> b. 3...Nc6 4. Bg2 e5 5.O-O
>
> c. 3...c5 4. Bg2 Nc6 5. d3
>
> d. 3...g6 4. Bg2 Bg7
>
> **Critical line:**
>
> e. 3...Nc6 4. Bg2 g6 5. d3 Bg7 6. O-O

The reason for the popularity of 3. g3 is that by advancing to d4, black has weakened their hold on the center, opening the way for control of the center diagonal with a fianchettoed bishop. As noted by Bad\_Bishop this is a reverse Benoni, with the crucial difference being that you have an extra tempo to play with. Alexander Delchev has a good book on the Réti, with 28 pages devoted to the reverse Benoni (The Modern Réti). As Delchev notes, you're likely going to want to make the most of your extra tempo and play a very sharp game. Unfortunately, this counts against 3. g3 assuming Black counters with 3. ...Nc6!. If, however, black plays 3. ...c5 then you can counter with a strategy similar to the Benko (likewise for 3. ...g6). I'll start with an overview of the kingside fianchetto, and then delve into specifics.

## General Strategy for a Kingside Fianchetto

The purpose of 3. g3 ... 4. Bg2 is to exert control on the central h1-a8 diagonal with the fianchettoed bishop. This bishop will become the lynchpin of your King's defense, since any move of a pawn in front of the king opens lines of attack, as well as a great tool for indirect control of the center in the hypermodern style. This bishop is very valuable and should not be traded without significant advantage as compensation. The e2 pawn is usually important to keep in place to help protect f3 and avoid pesky attacks from a knight (but this rule of thumb has many exceptions). A common strategy for trading off bishops is for black to double their queen behind their bishop on the c8-h3 diagonal and then push Bh3, attempting to pin the fianchettoed bishop to the rook on f1 (after castling) and trade with Bxg2. In the event of a queenside castle by black, you could wind up with a pawn attack on the h-file, aiming to break up the pawn structure of your fianchetto (this is the common line in the Yugoslav attack in the Sicilian Dragon). Since you're playing white here and already have a slight developmental lead, however, this strikes me as too slow to be practical.

You typically want to avoid a closed position to exploit the full power of your bishop's influence on the central diagonal. Usually you will attack queenside, with a pawn storm in slow games and careful maneuvering of minor pieces in quicker games. Given this, your pawn chain will generally extend from e2 to c4, giving you a structure similar to what you would find in the English, Reverse Dragon variation. Your big obstacle here will be how to open a file for your queenside rook, given that trading cxd5 is no longer an option. For this reason b4, leading to something like the Benko gambit, will be a popular choice in most of the lines following 3. g3.

## Black Plays 3. ...c5

```
[FEN " "]
1. Nf3 d5 2. c4 d4 3. g3 c5

```

With 3. ...c5 (as well as 3. ...g6) you win up in the reversed modern Benoni. This move serves two main purposes: it protects the pawn on d4 and allows development of the knight with Kc6 without blocking in the pawn on c7. You'll notice that black doesn't have a lot of control over the light squares -- this is something that will work to your advantage.

You want to stick to your plan of development play Bg2 and d3, getting the pawn structure I mentioned above. The main line above makes these moves immediately, with 4. Bg2 and 5. d3. Going this route will generally lead to a slower game where you launch a pawn storm on the queenside.

The more aggressive option is the reverse Benko Gambit given by 4. b4, preparing the way to open a file for your queenside rook. This is usually accepted with 4...cxb4. With 5. a3 you force Black's hand, and will usually be met with 5. ...bxa3 6. Bxa3.

```
[FEN " "]
1. Nf3 d5 2. c4 d4 3. g3 c5 4. b4 cxb4 5. a3 bxa3 6. Bxa3

```

At this point you should see that you've gotten a considerable amount for that pawn. You have your rook on an open file, with another open file right next door on b, and you have developed your queenside bishop to possibly assist in a queenside attack (but likely not).

Black's strategy at this point is usually going to involve 6. ...Nc6 followed by e5, at which point you'll be forced to trade bishops on f8. Your plan is going to involve finally completing the fianchetto with Bg2 and following up with d3 for the e2-c4 pawn chain -- extending towards your point of attack. See the linked page for more discussion.

## Black Plays 3. ...g6

```
[FEN " "]
1. Nf3 d5 2. c4 d4 3. g3 g6

```

Like 3. ...c5 this usually winds up in a variant of the reversed Modern Benoni, but a bit slower for Black. Given how sharp that defense is, the extra tempo can be exploited to great advantage. You're going to likely want to pursue a similar strategy involving a Benko-like push to b4, assuming that black eventually plays c5. Otherwise, it will likely transpose into the critical line (e) -- though Delchev disagrees that (e) is the line to worry about.

## Black Plays 3. ...Nc6

```
[FEN " "]
1. Nf3 d5 2. c4 d4 3. g3 Nc6

```

This is usually considered Black's best line. Your plan will stay largely the same. You'll follow with Bg2 and d3, leading to a queenside attack. I typically prefer to hold off on castling, so would probably opt for the sequence in the main line (a). The point of 4. ...e5 is obviously the same as the move of the pawn to c5 in the other variation -- to protect the pawn on d4. You might be tempted to attack with f4, but I'd (generally) avoid weakening your fianchetto with such a move. The central diagonal is still open for your fianchettoed bishop, but you'll have to pay attention to the c pawn since c6 is still on the table once the knight is moved -- weakening your bishop's control of the diagonal. Better to simply follow with 5. d3 or 5. O-O (with the move you don't make coming shortly after).

Suppose the sequence goes as follows: 4. Bg2 e5 5. O-O Nf6 6. d3. The move Delchev considers best for black here is 6. ...a5!, which pre-empts the Benko-like push 7. b4.

```
[FEN " "]
1. Nf3 d5 2. c4 d4 3. g3 Nc6 4. Bg2 e5 5. O-O Nf6 6. d3 a5!

```

This sequence is actually what leads Delchev to reject 3. g3 as being too slow (he comes to a similar conclusion regarding 3. e3 which is also best responded to with 3. ...Nc6 and popularly continued with 4. exd4 Nxd4 5. Nxd4 Qxd4 6. d3 c6! which tends to cramp White's position and restrict its knight).

This line is one case where the e3 pawn seems advisable. See this game between Kujawski and Kiolbasa to get an idea of how things might develop. The basic idea will be to follow with 7. e3, which is best answered by 7. ...dxe3! since allowing White to initiate the trade with something like 7. ...Be7 8. exd4 exd4 9. Na3 O-O 10. Nb5 aids your development by giving you the active knight.

```
[FEN " "]
1. Nf3 d5 2. c4 d4 3. g3 Nc6 4. Bg2 e5 5. O-O Nf6 6. d3 a5! 7. e3 dxe3 8. exd4 exd4 9. Na3 O-O 10. Nb5

```

Now, the Critical Line according to the linked page is 3. ...Nc6 4. Bg2 g6 5. d3 Bg7 6. O-O.

```
[FEN " "]
1. Nf3 d5 2. c4 d4 3. g3 Nc6 4. Bg2 g6 5. d3 Bg7 6. O-O

```

Delchev actually doesn't consider this, having concluded that the previous sequence involving 6. ...a5! as decisive against 3. g3. From my analysis, I think Black's best strategy here is to simply follow normal development. The pawn on d4 is awkwardly placed since it blocks the fianchettoed bishop. So, I'd figure this would continue with 6. ...Nf6 7. b4, preparing to pseudo-sac the b-pawn in order to open a file for the rook and establish an attack.

```
[FEN " "]
1. Nf3 d5 2. c4 d4 3. g3 Nc6 4. Bg2 g6 5. d3 Bg7 6. O-O Nf6 7. b4

```

If 7. ...Nxb4 then 8. Qa4+ Nc6 9. Ne5 putting a lot of pressure on c6.

```
[FEN " "]
1. Nf3 d5 2. c4 d4 3. g3 Nc6 4. Bg2 g6 5. d3 Bg7 6. O-O Nf6 7. b4 Nxb4 8. Qa4+ Nc6 9. Ne5

```

Black can go with either 9. ...O-O or 9. ...Bd7. Either way you capture 10. Nxc6 and eventually get Black's b-pawn or a nice lead in development and good initiative. For 9. ...O-O we have

```
[FEN " "]
1. Nf3 d5 2. c4 d4 3. g3 Nc6 4. Bg2 g6 5. d3 Bg7 6. O-O Nf6 7. b4 Nxb4 8. Qa4+ Nc6 9. Ne5 O-O 10. Nxc6 bxc6 11. Qxc6

```

Whereas for 9. ...Bd7 there are two branches,

```
[FEN " "]
1. Nf3 d5 2. c4 d4 3. g3 Nc6 4. Bg2 g6 5. d3 Bg7 6. O-O Nf6 7. b4 Nxb4 8. Qa4+ Nc6 9. Ne5 Bd7 10. Nxc6 Bxc6 11. Bxc6 bxc6 12. Qxc6

```

and

```
[FEN " "]
1. Nf3 d5 2. c4 d4 3. g3 Nc6 4. Bg2 g6 5. d3 Bg7 6. O-O Nf6 7. b4 Nxb4 8. Qa4+ Nc6 9. Ne5 Bd7 10. Nxc6 bxc6

```

If you face the latter, I'd hold off on taking the pawn and develop your knight and rook with Nd2, Nb3, and Rb1.

## Why does Delchev suggest 3. b4?

Though my main focus has been exploring 3. g3 and trying to provide some insights into the dynamics of play with a kingside fianchetto, Delchev recommends 3. b4 as the best move.

```
[FEN " "]
1. Nf3 d5 2. c4 d4 3. b4!?

```

His reasoning is that it offers you the sharpest play and makes the most of the extra tempo. You essentially jump right into a Benko-like gambit and exert maximum pressure. Optimal play continues 3. ...f6! (as you note) then 4. e3 e5! where it gets tricky. You have to be bold. VERY bold (not for the faint of heart). 5. c5 positions White for another gambit and is best answered by 5. ...a5!.

```
[FEN " "]
1. Nf3 d5 2. c4 d4 3. b4!? f6! 4. e3 e5! 5. c5 a5!

```

From this point, the main lines break into 6. Nxe5, 6. Bc4, 6. Bb5+.

The move 6. Nxe5 leads to a forced draw after 6. ...fxe5 7. Qh5+ Kd7 8. Qf5+ Ke8 9. Qh5+:

```
[FEN " "]
1. Nf3 d5 2. c4 d4 3. b4!? f6! 4. e3 e5! 5. c5 a5! 6. Nxe5 fxe5 7. Qh5+ Kd7 8. Qf5+ Ke8 9. Qh5+

```

With 6. Bc4 you face 6. ...axb4! then play naturally continues 7. exd4 exd4 8. O-O Bxc5 and now Black has two pawns and more space.

```
[FEN " "]
1. Nf3 d5 2. c4 d4 3. b4!? f6! 4. e3 e5! 5. c5 a5! 6. Bc4 axb4! 7. exd4 exd4 8. O-O Bxc5

```

It seems the line following 6. Bb5+ is the key. It leads to very sharp play, and while not necessarily to White's advantage, the knowledge imbalance should tip the scales in White's favor. The theory ends with 6. ...c6! 7. Bc4 Ne7!? 8. O-O!? axb4 9. Bb2, at which point Delchev concludes that White has compensation for the pawn and the attack.

```
[FEN " "]
1. Nf3 d5 2. c4 d4 3. b4!? f6! 4. e3 e5! 5. c5 a5! 6. Bb5+ c6! 7. Bc4 Ne7!? 8. O-O!? axb4 9. Bb2

```

The critical line continues 9. ...dxe3 10. fxe3 Nf5 11. Qe2 Bxc5 12. d4 Ba7!:

```
[FEN " "]
1. Nf3 d5 2. c4 d4 3. b4!? f6! 4. e3 e5! 5. c5 a5! 6. Bb5+ c6! 7. Bc4 Ne7!? 8. O-O!? axb4 9. Bb2 dxe3 10. fxe3 Nf5 11. Qe2 Bxc5 12. d4 Ba7!

```

At this point the three branches considered by Delchev are 13. a3?! e4, 13. dxe5 Nd7!, and 13. Nbd2 Qe7 -- none of which are simple or clear cut. Engines can hold the line for Black, but things are complicated to say the least. From what I can tell, the idea is a continuation of the theme of this variation: make things sharp, make things complicated, and hope you know more about the opportunities and pitfalls of the variation than your opponent. For what it's worth, I play the Sicilian Dragon with the same strategy in mind. If my opponent knows the Yugoslav attack -- and they usually do if they're any good -- I believe they have a slight edge on paper. But the opening is so sharp and bookish (I believe the book line is settled for something like 22 moves) that unless I'm against another Dragon specialist they can rarely avoid some mistake that I know how to exploit.

## The Bottom Line

The line with 3. e3 is safe and slow, perhaps too slow (though I haven't discussed it in detail). At any rate, it isn't my style. 3. g3 has potential if you're able to exploit some of the gambit opportunities, but could be turned into a slower game in the 3. ...Nc6 line. 3. b4 is very aggressive and sharp, but an interesting option if that's your thing. I'd probably go with 3. g3 since I'm more familiar with that sort of pawn structure and I'm a big fan of keeping the pawn structure similar across my various openings/defenses. If, however, you're not comfortable playing with fianchettoed kingside bishops and aggressive gambits then it might be a bit much for you to jump right into.
> 13 votes

# Answer
After 2...d4, we have a reversed Benoni. Consistent in this is playing:

* g3, Bg2, O-O. These moves secure the king before challenging the d4 pawn
* Re1, d3, e3. These moves challenge the d4-pawn and liberate white's pieces

The move order depends on what black plays, but you can research the Benoni and double check that the same ideas apply with an extra tempo.
> 5 votes

# Answer
I believe you should rethink your assertion: "if 3. e3, Black can reply 3...Nc6 and some exchange of knights are usually occuring and the black queen is coming right in the middle of the board." In the position with the Queen on d4 you can play Nc3 followed by Be3 pushing the queen out with tempo. Therefore, I think you should consider the plan with e3 as you seem to not like the lines where b4 is ignored and Black creates the f6, e5, d4 pawn chain. In GM Mihail Marin's excellent 3 book series on the English Opening there is much related to the Reti, and you can find in-depth coverage of there.
> 0 votes

---
Tags: opening, reti-opening
---


# Question
Title: What was the lookahead capability for Carlsen's Queen sacrifice?
How many moves ahead did Carlsen see his Queen sacrifice in the final game, and how many moves ahead did the strongest chess program spot it?

# Answer
Assuming you are talking about this game.

**Short answer**

Carlsen probably *calculated* the sacrifice only a few moves before actually playing it, when he was pondering over 46.Rc1 or 47.Qxf4. However, he must have had the pattern with Qh6+ in a corner of his mind for much longer.

**Detailed answer**

Since Carlsen's position looked winning for a while, at least since the operation starting from 31.Bxd7 and ending with 37.Nxb3, he did not have to be calculating his own attacking possibilities very far ahead: his main goal during that phase (moves 38-46) was to consolidate his material advantage.

I think he calculated the variation that occured in the game until the end before grabbing the pawn with 47.Qxf4. Since allowing both Black's major pieces on his second rank looks risky, that's when he needed to be back up his choices with precise calculation. Moreover, he played the moves afterwards pretty fast. Of course, the calculation itself is very simple for players of that level.

On the other hand, it is very possible that he had the pattern Qh6+! in a corner of his mind for at least ten moves. With Rf5 and Ph5 on the board, and black having a weak back rank, Carlsen's pattern recognition must have scanned the kingside for possible mating ideas, and spotted a long time ago that a check on h6 would be decisive.

As far as computers are concerned, they can find the mating line in a few milliseconds if you feed them the position after 46...Ra7, and they will confidently grab the f4-pawn and give a question mark to 48...Qf2. Before move 46, play doesn't have a forced character at all, so they cannot predict what will appear on the board, but their trees of variations must be full of mates starting from Rc8+ and Qh6 anytime the 8-th rank and the c1-h6 diagonal are cleared.
> 5 votes

---
Tags: strategy
---


# Question
Title: Windows chess program that can load PGN files per command line
the program should display a PGN file, be fast to run, and absolutely be expected to be callable by the command line (passing the PGN file as an argument). The reason is I began to create a concept map about an opening, and I can call from this map some EXE programs. I would like to display some games as examples of the nodes.

I already searched, but till now I found nothing.

# Answer
There are at least two Windows programs that you can start per command line: Arena and SCID (or SCID vs PC).

### Arena

To open a PGN file in Arena, call it with:

```
Arena.exe -loadgamefile "path/to/sample.pgn"

```

There are many more options listed in the help file under *Miscellaneous/Command Line Parameters*. `analyze` is particular useful.

### SCID and SCIDvsPC

Both come with the same very small set of command line options. Again see the help file.

Open a PGN file with:

```
scid.exe "path/to/sample.pgn"

```

Arena's command line support is far superior in my opinion.
> 5 votes

---
Tags: windows
---


title: Max Lange Attack - Materials to Study

text:
# Question
Title: Max Lange Attack - Materials to Study
I am looking for quality materials such as books, magazines and video series to help me to study Max Lange Attack. I'll be grateful if you recommend one and share the link.

# Answer
Two other sources:

*Dangerous Weapons: 1 e4 e5* (2008) by Emms, Flear and Greet has a chapter on the variation with `8. fxg7`.

*Beating the Open Games* (2007) by Marin also has a chapter on the Max Lange Attack. The nice thing about the latter book is that you can find an update for free at the site of the publisher. The Max Lange Attack is discussed from page 35 in the pdf document.
> 6 votes

# Answer
https://www.youtube.com/watch?v=jsLWP611jOM and https://www.youtube.com/watch?v=TrkyE78II-M are decent. There are other videos on youtube, but most of them are cheap opening traps.

A Startling Chess Opening Repertoire by Chris Baker only has one chapter and just covers the basics.

Winning With the Giuoco Piano and the Max Lange Attack by Andrew Soltis is better, but still only good for people under 2000.
> 4 votes

# Answer
The book "An Opening Repertoire for the Attacking Player" by Raymond Keene and David Levy covers the Max Lange as the "backbone of the repertoire". The book was published in 1984 and is now out of print but Amazon lists several second hand copies available. I based my repertoire around this book in the 1980's and rated it highly. It is probably a bit out of date now but could give you an interesting aggressive way of looking at the opening.
> 1 votes

---
Tags: opening, books
---


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

---

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

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

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

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

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

Please take a look at:

> http://talkchess.com/forum/viewtopic.php?start=0&t=61003&topic\_view=flat

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

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

// definitions for chess board representation

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

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

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

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

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

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

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

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

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

// data related to command line parameters

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

bool mirror = false;

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

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

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

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

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

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

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

```
> 6 votes

---
Tags: endgame, programming
---


# Question
Title: Undermining pawn chains at the "wrong" end
Usually if there is a blocked pawn chain one is trying to attack it close to its base with a pawn from the side.

For instance, in the classical king's Indian black is playing f5 (not c6) and later (if white plays f3) perhaps even g4 etc. White on the other hand is pushing c5 (not f4).

I am aware why attacking chains in this way is generally the best choice.

Are there any examples in openings or famous games (besides the French defence f7-f6) where the pawn chain is attacked at the other, "wrong" end?

# Answer
This is rule for strategic chess with no tactics involved. This rule was good in days when players liked their pawn structures and didn't go too crazy with their moves. I think this is Nimzovich's rule from My System, but I'm not certain about this.

In my opinion, this rule should be taken very lightly today, as there is really a lot of examples, when players attack the "bad end" of a chain.

The reason is simple: Pawn is for 1, knight and bishop are for 3, rook for 5 and queen for 10. You should point your attention to place where you have advantage in total firepower. Pawns are very small part of that.

There is however higher probability that your pieces are aimed towards the "correct end" of a chain. That's reason why a lot of players respects this rule a lot. When you have bishops on d3 and c1 in closed french type position, you certainly want to play on a kingside.

Some examples:

In King's Indian it is very typical black plays c6 move even in some of the racing lines. On the other hand white sometimes play 0-0-0 with g4 h4 attack.

In french both black's f6 and white's a3 b4.

In e5 carocan white often pushes c4 and black takes some breathing space with f6.
> 2 votes

# Answer
The first example that springs to mind are the Benoni structures:

```
[FEN ""]

1. d4 Nf6 2. c4 c5 3. d5 (3. dxc5? e6 {Black recovers the pawn favourably, so we see that 2...c5 induces the d-pawn forwards to be challenged later.}) e6 {Black challenges the head of the pawn chain, rather than the base.} (3... b5 {Attacking the base of the pawn chain with the Benko gambit is also a popular try.})

```
> 2 votes

# Answer
This is the best way to attack instantly the pawn chain and not only the pawn is attack it sometimes also opens rook files; opens bishops diagonals etc. In the king's Indian defense.
> 0 votes

# Answer
I'm not sure what is discussed in the examples above constitutes a pawn chain as Nimzo spoke of it. As such, Nimzo's advice to attack the base does not yet apply. A chain implies a fixed interlocking of pawns, where the base is the base and no other pawn can be promoted to the base. In the examples shown here, if you were to attack the "base", the other side could reply with a pawn move that would potentially provide a NEW base. In the example above, if black replied 3...b5 attacking the "base" - white could reply 4. b3, wherein the real base does not yet exist since there is still pawn tension. In this case, there is no "base" to attack (yet) since the pawns are not in their final, locked position.
> 0 votes

# Answer
Indeed, this is Nimzovitchs advice that is being quoted, Before dismissing it as out of date it might be worth reflecting that Nimzovitch would still win your club championshio without breaking a sweat. And his reasoning still holds good. You want the opponents base to be somewhere that you can attack it. But progress often proceeds by first formulating general rules and then finding the exceptions.

There is an excellent discussion of this topic in John Watson's "Modern Chess Strategy, Advances since Nimzovitch". And you don't need to know the conclusion. You need to consider the arguments on both sides.
> 0 votes

---
Tags: strategy, pawn-structure
---


# Question
Title: Which chess site has the most rapid players?
It is common advise that a chess player trying to improve should limit their blitz chess. Online chess is filled with people playing blitz and bullet and I often have trouble finding players to play longer time controls. Is there a chess site with a lot of rapid players? I'm thinking that unfortunately, chess.com is the best option, but sometimes I feel like it takes too long to pair up, and the opposition is not so strong. I've heard that ICC isn't too good for long time controls either. Anyone have any information?

# Answer
> 2 votes
The vast majority of online chess games played on any site are played with very short time controls. Because of this fact, if you want to play longer games, you will have to wait longer, on average, than you would for a game shorter time control.

If you are looking for quality chess games and you want relatively **long time controls** and decently **high-rated players** then you can try limiting your searches to high rated players.

You can select custom rating ranges on lichess and on ICC. This will allow you to, for example, filter out lower-rated opponents if you want a strong opponent.

---

Another possibility is to play in the long-time-control tournaments that most popular chess sites have on a regular basis. Both ICC and lichess have regular tournaments with relatively long time control. The advantage of this is that once the tournament starts, usually the wait time between games is not that long.

# Answer
> 1 votes
## Chess With Friends

It is available as an app for android and iOS. There is a time restriction of 5 days per move. Falling foul of the time restriction forfeits the game.

The game has it's own ELO system independent of any official ones and it's not tremendously accurate (I am rated about 200 points higher than my real rating)

But it's matching system works really well and it picks opponents for me who are a good match for my skill level.

I am currently playing about 12 games simultaneously. Each night after dinner I will sit down and play one move in each game. If I miss a night because I'm busy or tired it's no big deal. Sometimes I won't be able to play a move because my opponent has not moved yet, but I will still spend a few minutes looking at the position.

That style of play won't suit everyone, but the app is definitely worth a look.

There is a free version which has 100% functionality but has quite a lot of ads. The paid version is quite cheap and worthwhile in my opinion.

---
Tags: online-chess
---