# Question
Title: My question is about inconsistencies in Stockfish 7 outputs
I have the Stockfish 7 engine loaded. I was playing through a variation of the Ruy Lopez \[Open Berlin Defense\], up to move 15, using SFish. I let the engine run to a search depth of 25, and selected the best move. A short time later, I played the same sequence of moves and, at move 10, the suggested move and subsequent line of play had changed. On the first analysis, it suggested 10.Nc3-e2, and on the second run through, it came up with 10.Nc3-e4, and the followup line was, of course, completly different. So, why the difference between the two runs? And if the engine analysis is going to change from one day to the next, how can we know for sure what the objectively 'best' move is in any given line of play?

# Answer
> 3 votes
Many expert chess engine users (such as correspondence chess masters) advocate using more than one engine to analyze a position, because each has strengths and weaknesses.

Generally, Stockfish is considered strongest in positions with tactical elements, while Komodo is biased toward positional / strategic strengths. Neither is a broad-spectrum solution.

As other responders have indicated, there's a lot of squishiness in the output of engines when there aren't any forcing lines, or transpositions are possible and undifferentiated. Engines do a fair amount of pruning, which saves computation but introduces problems with "horizon". The horizon is the depth of moves the engine will look at a variation that leads to a disadvantage. Such a variation may have a redeeming *comeback* move at the end, but may be just long enough that the engine gives up analyzing the line before it reaches the comeback move, because it's *over the horizon*.

On its way to a "final" evaluation, the engine is essentially *approximating*. That is, it evaluates the position, adds a few more moves and looks at the position, evaluates for the "best" move based on those, shifts to the next position, adds a few more hypothetical moves and evaluates, shifts, and so on.

At any one particular instant, the engine may be just about to shift from one evaluation of the position to another, even while the depth you're specifying is being reached. If you terminate the analysis manually (i.e. pick a move and make it, or just hit the Stop button), you may get a different "best" move recommendation in one millisecond, and another one a millisecond later, *even at the so-called maximum depth*.

The best way to ensure consistency is to *run the engine by itself in analysis mode* using software such as Fritz. The engine will evaluate the actual moves of a game (or an opening variation) offering improvements. The computation behind the improvements will be strictly limited by depth or time, as you specify. If you let the engine terminate the search at each position, you should get consistent (deterministic) results. Unfortunately, although it will annotate the improved variation at each position, this approach involves the engine resetting its analysis with each move/position of the move score that is analyzed. It won't move from improvement to improvement to improvement, leaving the game behind.

To get *that* kind of result, you need an *engine tournament*. Give two identical engines a starting position (such as the Berlin or Moscow Variations of the Ruy Lopez) that you want to improve from, set their limits as discussed, and let them duke it out. Play at least a dozen games, and see if anything shakes out. Two cautions:

1. This is time-consuming (but at least it's not your time), and
2. As you go further and further from known theory, the less likely that you'll ever see that position in an actual game played by anyone other than these engines, for the reasons discussed above.

BTW: As far as I know (and my research supports this), non-deterministic algorithms are not used in Stockfish or any other major engine. The reasons for this are self-evident - if you're looking for a solution to a deterministic problem, you use a deterministic approach. Stochastic approaches are only better in stochastic problem domains, or where a deterministic model is unavailable or problematic in itself.

As far as analysis depth goes, there's a point of diminishing returns that's determined by what you're trying to accomplish.

In different types of positions, the evaluation function of any engine will tend to stabilize at different points. For one type of position, there will be no noticeable difference in the evaluation or the recommended "best" move after about 20 ply. In another, you may need to hit 26 or 28 ply for the move to stop changing, and the evaluation function to stabilize at a terminal value to 2 significant digits (e.g. 1.*87*, instead of 1.86 or 1.88).

Clearly, if your goal is the perfect move / best evaluation accuracy, then if you can only choose one depth/time parameter limit, instead of a *stability limit / sensitivity threshold*, then you need one large enough to accommodate the most positions where the evaluation continues to be unstable to greater depth/for longer analysis time. You need to *aim high*.

But there's a tradeoff.

In an actual game, as the game proceeds, the probability increases exponentially that one or both (human) players will play a non-optimal move. Since the engine *only* calculates optimal moves, this means that in quiet positions (and in some complex tactical ones) the engine's choice of a move and the actual move played will almost always diverge, even if only slightly. It will also do so surprisingly frequently, often as many as a dozen times in a game *even between GM's*. This is, in fact, one of the indicators that TD's use to figure out whether a player at a tournament is getting outside help from an engine.

Because of this, if you're comparing a variation that an engine analyzes with a line that humans might actually play, the longer the variation, the more likely it is that the tail of the variation will only match the humans' moves when there is a forcing line. In fact, unless the line is forcing, a fair amount of the time not even the opponent's *first reply* will match the engine's expected optimal reply.

The more unclear or quiet the position, the shorter the useful tail of an analyzed variation will be, *even if the opponent replies with the expected move*.

So, if you're analyzing a murky or quiet position or opening, and you're curious to know whether an *engine* could *possibly* play a line better, then have at it. But if you want to know if it's possible to find a single winning line given the replies that the opponent would actually end up playing, the real odds start to look like a craps game as the variation gets longer.

That said, there are ways to optimize how you use the calculation time as you analyze a game or an opening variation.

As @GeorgeJempty indicated, you can get much better results at 35 *ply* (ply are half-moves; 12 ply is 6 moves for each side) than you will at 25. However, I use Stockfish on a Quad AMD at 2.9 GHz, and the positions where I need to go even 26 ply deep to find a hidden winning move that were missed at 25 ply are *very* few and far between (something on the order of 1 in 1,000). For me, that's simply not worth the extra compute time it takes to find it. What's more, the resulting improvement is almost certainly going to be negligible, because the probability that the opponent would have made the corresponding replies shrinks to zero, and the resulting end position would never appear.

In other words, the longer the move sequence, the greater the probability that any analysis will be *overtaken by events*. This is one reason that even Grandmasters rarely calculate beyond 12 ply (except in endgames), and often only calculate to 4 or 6, relying on positional intuition instead.

As for how much of a difference ply depth makes at extreme depths, I have some background in the problem. When I'm screening games for analysis targets (by this I mean trawling through large sets of them to find ones that had interesting highlights suggesting they're worth deeper analysis), I use just 23 ply. My configuration can get through about 10 games an hour at that clip, so I can process about 750 every night. Once I find these, I then reset the depth to 25, and rerun the analysis on those selected games.

Obviously this approach would only make sense if I'd tested it, and I have. I've run a few experiments to test the merits of different depths, and the settings I use turn out to be optimal for the compute time I'm willing to allocate. Only about 1 in 50 games turns out to have an interesting feature that shows up at 25 ply but gets missed at 23. Clearly, that suggests that some of the games I screened out using 23 ply would *also* have shown such elusive features if they'd screened *in* instead, and subsequently been processed at 25 ply. That's just the opportunity cost of the rate at which I choose to process games, and for my purposes, there's so much low-hanging fruit I don't really need to go climbing trees.

I would definitely take advantage of every CPU on your PC's chip, though. Most of the world's PC's computational power is incredibly underutilized. On my configuration, at 1 CPU Stockfish does about 1K positions / sec, while at 4 CPU's, it runs over 4K positions / sec. That quadrupling of the rate really tells when you're data mining, as I am.

To reiterate, I would also turn to Komodo for analyzing openings and quiet/murky positions as a comparative tool, and you should find that with one of the two engines the evaluations stabilize tolerably soon, at around 22-23 ply for most positions.

# Answer
> 1 votes
A chess engine's algorithm is "non-deterministic", meaning, given the same input, it will *not* necessarily provide the same output; see: https://en.wikipedia.org/wiki/Nondeterministic\_algorithm. I especially like the following quote: "a nondeterministic algorithm represents a single path stemming into many paths, some of which may arrive at the same output and some of which may arrive at unique outputs." The single path stemming into many paths rather aptly describes the choice of moves in a chess game.

I'm guessing you were not looking at multiple pv's (primary variations) but rather just one at a time? I highly recommend always looking at at least two pv's at a time; if their evaluation is within 0.05 they are basically equal. Furthermore you will have much better luck finding definitive best moves if you let the search depth to closer to 35 rather than 25. If you have a multi-core machine (most are quad cores these days, so 4) you could increase Stockfish's settings to use 2 or even 3 cores (if you don't think you'll be doing other intense computing in the meantime) and it will get to depth 35 a lot quicker than using 1 core.

# Answer
> 1 votes
1. Chess engines are not necessarily deterministic due to multi-threading and heavy pruning.
2. In many positions, there is no such thing as objective "best" move. Many possibilities are possible and sound. Stockfish would not be able to give you a consistent answer in this case. Chess engines are simply not powerful enough to solve an opening for us.
3. The next time you analyze the same position, Stockfish might have hashing to guide the search. This will likely give you different line.

---
Tags: engines
---


# Question
Title: C++ vs Java Engine move generation performance
I've just finished translating my Java Engine to C++11, expecting great speed improvements in move generation. The code is very straightforward and uses a pre-generate bitboards approach. I also generate only legal moves, ie, inside generateMoves() I check to see if the king is in check.

As a quick test, I ran Perft (6) from the starting position. The Java version finishes the test on ~11 seconds. The C++ version takes ~8.5 seconds (my perft stops at depth 1, and zobrist keys are being updated on makeMove and undoMove).

The same test on Stockfish runs under 1 second.

I was expecting the C++ version to be at least twice as faster as the Java one, and of course, somewhat slower than Stockfish.

After some investigation, it's clear that checking if the king is in check, for every move, is the major bottleneck. What can I do about this? I was trying to understand how to work with pinned pieces (https://chessprogramming.wikispaces.com/Checks+and+Pinned+Pieces+(Bitboards)), but I'm not sure how to follow. For example, what does `obstructed()` do in the link above?

NOTE: I already compiled it with the -O2 optimization flag.

EDIT: Here is some more details on the code:

**Q: How did you generate sliding pieces?**

I use the classfical bitboard approach, at program start I generate attack masks for all pieces:

```
void MoveGen::bishopMoves(Board& board, int side, MoveList& moves){
    int opp = side ^ 1;
    U64 bishops = board.bitboards[Board::BISHOP | side];
    U64 occup = board.bitboards[side] | board.bitboards[opp];
    U64 enemyOrEmpty = ~board.bitboards[side] & ~board.bitboards[Board::KING | opp];

    U64 *up_r = BitBoardGen::BITBOARD_DIRECTIONS[BitBoardGen::IDX_UP_RIGHT];
    U64 *up_l = BitBoardGen::BITBOARD_DIRECTIONS[BitBoardGen::IDX_UP_LEFT];
    U64 *down_r = BitBoardGen::BITBOARD_DIRECTIONS[BitBoardGen::IDX_DOWN_RIGHT];
    U64 *down_l = BitBoardGen::BITBOARD_DIRECTIONS[BitBoardGen::IDX_DOWN_LEFT];

    while (bishops != 0){
        int from = numberOfTrailingZeros(bishops);
        U64 upward =  upwardMoveTargetsFrom(from, occup, up_r, enemyOrEmpty) | upwardMoveTargetsFrom(from, occup, up_l, enemyOrEmpty);
        U64 downward =  downwardMoveTargetsFrom(from, occup, down_r, enemyOrEmpty) | downwardMoveTargetsFrom(from, occup, down_l, enemyOrEmpty);
        add_moves(board, from, upward | downward, Move::NO_FLAGS, moves);
        bishops &= bishops - 1;
    }
}

 //handle blocking
U64 MoveGen::upwardMoveTargetsFrom(int from, U64 occup, U64 dir_mask[], U64 enemyOrEmpty){
    U64 ray = dir_mask[from];
    U64 blocker = occup & ray;

    if (blocker != 0){
        int sq = numberOfTrailingZeros(blocker);
        ray^= dir_mask[sq];
    }
    return ray & enemyOrEmpty;
}

```

**Q: How did you generate legal moves?**

I only generate legal moves, so I check if the king is in check while generating moves. This is probably one of the problems, since most moves don't leave the king in check.

The generateAllMoves code:

```
MoveList genLegalMoves()
   valid = ()
   moves = getPseudoLegalForAllPieces (may leave the king in check)
   for move in moves
      board.applyMove(move) //its a local makemove, no zorbist involved
      atCheck = isAtCheck()  //dumb code, be more selective here?
      board.removeMove(move)//its a local undomove, no zorbist involved

      if !atCheck:
         valid.add(move)

  atCheck = isAtCheck() //again for castling
  if (! atCheck and canCastleKS)
     valid.add(castleKS)
  if (! atCheck and canCastleQS)
     valid.add(castleQS)
  return valid

```

**Q: How did you undo your move?**

My makeMove is like the following (this is fast):

```
int makeMove(int move):
    int undo = board.state
    incremental update zobrist key
    update board.board[]
    update board.bitboards
    update board.state
    return undo

void undoMove(int move, int undo):
    board.state = undo
    incremental undo zobrist key
    update board.board[]
    update board.bitboards

```

And finally, my `isAtCheck()` code goes like:

```
boolean isAtCheck(int side):
    locate king square
    get all opponent attacks mask
    return kingSquare & attacksMask

```

EDIT 2: I have changed the code to a pseudo-legal generator. The problem now is that I have to go to depth 0 to count only legal moves, and now it's taking ~16 seconds.

# Answer
Your code looks fine. We can't really give you the exact cause, but we can give you some hints.

**Q: How did you generate sliding pieces?**

Sliding piece generation is typically the slowest because we need to check the enemy pieces. Stockfish uses **magic bitboard**, which is also used by Houdini and Komodo.

**Q: How did you generate legal moves?**

Stockfish always generate **pseudo-legal** moves and only check when it's necessary.

**Q: How did you undo your move?**

Stockfish can easily undo a move by **zorbrist hashing**. Hash value can be updated efficiently.

------------------------ **EDIT** ------------------------

Your sliding generation and undo look okay to me. I think the bottleneck is your legal move generation. Look at this recent thread:

http://talkchess.com/forum/viewtopic.php?t=61797

> How do you ensure legality:
> a) by making/unmaking each move and testing whether it leaves the king in check, or
> b) by only doing this for the small set of moves that could actually be illegal (king moves, check evasions, ep captures, and moves of pinned pieces), or
> c) by doing clever move generation that knows how to avoid generating illegal moves?
> Only in case of a) I'd say you should spend effort to improve speed, since that could be done an order of magnitude faster, e.g. like b). Otherwise I'd keep it as it is, provided it is correct Smile

**Sven Schule** is a respected engine programmer, we should trust his words. Your implementation looks like **exactly** his point a.
> 4 votes

# Answer
Disclaimer: I can't support my claims with numbers. I don't have your engine to profile. It is mostly gut feelings.

It looks like a performance killer is a castling test.

Testing for `canCastle*S` (it *looks* like it is about King and Rook didn't move, and nothing is in between) is way cheaper than testing for King becoming exposed, so swap the tests order. C++ will short-circuit logical `and`.

BTW, for castling you need to test against `inCheck` at three squares:

```
if (canCastleKS && !inCheck(e_file) && !inCheck(f_file) && !inCheck(g_file)) {
    ....
}

```
> 2 votes

---
Tags: engines, stockfish, programming, performance
---


title: Tarrasch defense with 6. dxc5

text:
# Question
Title: Tarrasch defense with 6. dxc5
Chesstempo database gives white over 65% in all the variations after 6. dxc5 (130 games with both players 2200+). It has been used by Anand and Ivanchuk. So why the main line 6. g3 is way (2800+ games with both players 2200+) more popular where black scores much better?

It has to be because of black's preparation. But what should be the correct response? I don't see one using the database. Nor can I find one using chess engine.

```
[Event "?"]
[FEN ""]

1. d4 d5 2. c4 e6 3. Nc3 c5 4. cxd5 exd5 5. Nf3 Nc6 6. dxc5 d4 7. Na4 Bxc5
( 7... b5 8. cxb6 axb6 9. e3  )
( 7... Bf5 8. e3 d3 9. Qb3 )
8. Nxc5 Qa5+ 9. Bd2 Qxc5 10. Rc1

```

# Answer
> 3 votes
`6. dxc5` is just a good move, and you cannot really hope to refute it. It was given an exclamation mark in *Grandmaster Reportoire 10* by Ntirlis and Aagard, and their main line starts as in your diagram.

Moves such as `dxc5` were underestimated by older theory because they were thought to give the initiative to black. Nowadays with computers we can analyse more concretely and see if blacks initiative is something to be afraid of or not. In the case of `6. dxc5`, the analysis seems to suggest that white ends up with a small advantage.

# Answer
> 1 votes
First, I think your statistics are misleading. 130 games is not a very large sample set, and you didn't give the minimum rating for the players. Are these master games, grandmaster games, or games by players of all ratings? The winning percentage of white might be meaningful if all the games were played by super-grandmasters, but I don't think that's the case.

I think that the 6. dxc5 line is more forcing than other lines. This means that a well-prepared black player might have an easier time accomplishing a draw. The 6. g3 variation is slower, and allows for a more playable game where world-class players like Magnus Carlsen have more room to outplay an opponent.

Let's look at it from a logical point of view, too. White's goal is to isolate black's d5 pawn and attack it. White doesn't have to do this right away. Allowing black to play d4 changes the character of the game. Why not keep things as they are, slowly develop your bishop to a great square on g2, and isolate the pawn when you feel ready? This way, hopefully, we don't allow d4.

In the position you give, 10... Qb6 is the best response according to the chess24 engine. If you play through the line, you see that the pieces get traded off and it is pretty forcing.

---
Tags: opening, queens-gambit, 1.d4
---


title: Engame Play: Knight Endings

text:
# Question
Title: Engame Play: Knight Endings
Below is my effort from last night in the league.

```
[Event "My Team v. Their Team"]
[Date "2016.10.20"]
[White "A. Nonymous"]
[Black "Ian Bush"]
[ECO "A31"]
[Result "1/2-1/3"]
[WhiteElo "170"]
[BlackElo "148"]
[FEN ""]

1.d4 Nf6 2.c4 c5 3.Nf3 cxd4 4.Nxd4 e5 5.Nc2 d5 6.cxd5 Nxd5 7.a3 Be6 8.e4
Nb6 9.Qxd8+ Kxd8 10.Nc3 N8d7 11.Be2 Nc5 12.O-O Nb3 13.Rd1+ Kc7 14.Rb1 Bc5
15.Be3 Rad8 16.Bxc5 Nxc5 17.b4 Nca4 18.Nxa4 Nxa4 19.Ne3 Nb6 20.Bg4 Bxg4
21.Nxg4 Rxd1+ 22.Rxd1 f6 23.Ne3 Rd8 24.Rxd8 Kxd8 25.Nf5 Nc4 26.a4 g6 27.
Nh6 Ke7 28.f3 a5 29.bxa5 Nxa5 30.Ng4 Nc4 31.Kf2 Nb2 32.Ke3 Nxa4 33.Kd3 b5
34.Ne3 Kd6 35.g4 Nb6 36.Kc3 Kc5 37.h4 h5 38.gxh5 gxh5 39.Nf5 b4+ 40.Kb3
Nc4 41.Ng3 Nd2+ 42.Kb2 Nxf3 43.Nxh5 Nxh4 44.Nxf6 Kc4 45.Nd7 Nf3 46.Nb6+
Kc5 47.Nd7+ Kd6 48.Nf6 Ke6 49.Nd5 1/2-1/2

```

I'm currently rated ECF 148, ~1810 FIDE. As you can see my higher rated opponent (ECF 170 which is ~1975 FIDE) pushed too hard after declining a draw offer after 19 ... Nb6, and then dropped a pawn; however I couldn't win the game. As such I was wondering if people could help point out where I went wrong, if indeed I did go wrong, I'm not even sure if the ending is won or not. In retrospect I'm wondering if 37 ... h5 is all that good, all those pawns dropping off I feel can only be good for him, but maybe h5 was a symptom of earlier mistakes - should I be trying to get f5 in? More generally what thoughts should I be having in knight and pawn endings? I was playing pretty much in the dark. And if anybody wants to look at the rest of the game that would be great as well!

# Answer
> 3 votes
First off, let me say I've not put your game through an engine. I'm assuming you can do that yourself and in any case they're not terribly good at endgames.

Now for some appropriate general principles and observations:

1) King, Knight and pawn endgames are very similar to king and pawn endgames. The same kind of principles apply. With enough pawns on the board and an extra, distant passed pawn you should be looking for the win.

2) If the knights come off then it is an easy win for you

3) If too many pawns come off it is an easy draw for your opponent. He seems to have known what he was doing from about move 33 because with pawn advances and good use of his knight that is exactly what he achieved.

4) Two related principles. Pawns can only move forwards. They cannot move back. Patience is often the key to good endgame play. The immediate 33) ... b5 is too impatient.

5) On a4 your knight is badly offside. Your first task, given your opponent's immediate lack of threats, should be to get it over to the kingside where the action is. d4 looks like a wonderful square.

6) By the same token your opponent's knight is also in need of some improvement. d5 looks like the right square. From there it keeps half an eye on your b pawn, stays in touch with the kingside pawns and threatens your f6 pawn. Either your king is going to be tied down to its defence or it is going to have to advance and be swapped off. One small step closer to a draw. You should try and prevent this.

So, what I suggest for your first possible mini-plan is Na4 - c5+ - e6 - d4.

What happens next depends on white's reaction. I think it would be a mistake for him to go for your b pawn with something like Kd3 - c4 - b5 - b6. You would go for his pawns with your knight starting with Nc2 with the threat of Ne1 forking the f3 and g2 pawns. After Nc2 one possible (non-forcing) line might be:

1) g3 h5 2) Nf2 Ne3 (now aiming for f1 forking the h2 and g3 pawns) 3) h3 Nf1 4) g4 h4 and white's pawn structure is badly compromised.

More sensible for white would be a compromise where he plays Kd3 - c4 but then aims for Ng4 - e3 - d5+. Black might counter this by Ne6 - f4 instead of d4 to temporarily prevent Nd5+ and to start harrying white's pawns.

A second possible mini plan for black would be to start with Na4 - b2+. If white plays the tempting Kd3 - c3 than the paradoxical Nb2 - d1+ followed by h5 is going to force the knights off at the cost of a pawn when black's outside passed pawn plus better king position is going to win it for him.

So white can't play Kd3-c3. So white needs to play his king to c2. Then black can play his knight to c4 to prevent white's knight coming to e3 and protect the knight with b5 if attacked by the king.

If white goes after the b5 pawn with Kc3-b4 then black forces the white knight to the more passive f2 with h5. Rather than defend the b5 pawn passively with Nc4-d6 he could go after the white pawns with Ne3. Then I would suggest a (non forcing) sequence something like this:

1) g4 h4 2) Nd3 h3 3) Nf2 Nc2+ 4) Kxb5 Nd4+ 5) Kc4 Nxf3 6) Nf2 Nxh2 and, OK, with just 3 black pawns left it is looking difficult to win.

So, either defend the b5 pawn with Nd6 or go back to the Na4-c5+ plan.

If either of these two plans is black's best I'm not good enough to say, but they do pose white major problems to steer it to a draw. You have to make it as difficult as possible for white to find good moves in these positions.

---
Tags: analysis, knight-endgame
---


title: Bughouse chess strategies

text:
# Question
Title: Bughouse chess strategies
Are there any nice strategies for Bughouse? I wish for advice on opening and how to win. I have not found anything good on the web.

# Answer
This reddit page has a ton of information, coming from a strong player.

Excerpts (`z` means "crazyhouse") :

> **Opening**
> The standard rules apply: develop your pieces, control the center, and get your king to safety. But there are some opening ideas uniquely emphasized in z:
>
> * Flank pawns should usually be kept where they stand in the opening. Openings like the Bird or Dutch exposing this square are extremely dubious. Even openings like the English and Sicilian aren't to be recommended as they weaken the c2/c7 square respectively. Diagonal pieces can be dropped to exploit the weakened color complex. Guard the tender f2/f7 square from sacs so that your king isn't drawn out early.
> * Pawn gambits, especially those in which you delay the recapture, are almost without exception a bad idea; your opponent can accept and then simply drop the extra pawn to stabilize.
> * Note that getting your king to safety does not always mean castling: sometimes it means keeping it in the center and fortifying the tender points of egress.
>
> **Middlegame**
> The middlegame is almost always where the game is won or lost. This is where you should look to start exchanging pieces, breaking with your pawns, building up pressure on vulnerable squares, or cracking open your opponent's defenses with careful pawn drops or piece sacs. The midgame is rapidly achieved in crazyhouse, so be ready to join battle straight away!
>
> **Strategy Pointers** *and other midgame motifs*
>
> * On both offense and defense, be aware of positional sacrifices: knights and bishops or even major pieces can often be sac'd to expose the king in a manner which might be considered unsound in chess but which in z is very powerful. Similarly, a few points of material can be sacrificed to gain a foothold in enemy territory.
> * Scan for weaknesses: holes where pawns can be dropped, pieces vulnerable to a fork, weakly defended kingside squares, overloaded defensive pieces. Identify a weakness and then concentrate all your drops on that weakness.
> * If you identify a weakness but your pocket is empty, look to force exchanges. If your own position is weak, avoid exchanges until you're more solid.
> * Defend pawn drops on your kingside: know how to react to p@h3/h6. The knight is an excellent defensive piece in this scenario. \[...\]
> * Knights should be kept on hand until you can drop them to attack weak squares around the enemy's king, place extra pressure on a pin, or drop into a fork.
> * A knight and a queen is the most powerful complementary attacking combination because they each cover squares the other doesn't. Knights can be used to place un-blockable checks, and queens can be used to drop into mates.
> * (and a ton more)
>
> **Common Mating Patterns**
> \[...\]
>
> **My Opening Systems**
> (see this answer for an excerpt)
> 5 votes

# Answer
I think any strategy has to be based on the strengths and weaknesses of the players in a much more pronounced way than in the 2 person game.

Here is an example strategy where one player is a strong tactician and the other a strong positional player.

Generally speaking a piece in the hand is worth more than a developed piece particularly to a fine tactical player. If one player is a better tactician and the other better positionally then it might make sense for the positional player to quickly develop pieces with the intention of swapping them off to give the tactician extra pieces to play with and for the tactician to launch a pawn storm to swap off pawns to give to the positional player and to create an open position on his board with more weak squares for his paratroopers. Obviously this has to be co-ordinated so that the right pieces come along at the right time.
> 2 votes

# Answer
There is a lot of depth to the tactics and strategy. Assuming at least familiar with single board chess tactics such as a fork, pin, etc. then next up is understanding Time & Communication. Neither of these has a single board equivalent.

1. Communication

Agree on how communication works. It does no good for one player to say hold on trades, or no knights, if their partner moves and allows the ops to win because they got the knight they needed from the other board.

Before a game begins, some more advanced teams will agree on a multiboard plan. For example, 1 person will feed from their board, meaning lots of trades and they will move as fast as they can. They will try and keep the trades close to even. Most likely at some point they will go "I have stopped moving" meaning they are in the process of getting mated. No more move will be coming because all that will happen is they will lose material without getting anything more for their partner or mated.
2. Time

How time works in a two board game is significantly different from a single board. The op that can force you on time is the one playing your partner. If you have 2 minutes left, and they have 3 minutes left, they can force you to move by just moving themselves. If you could crush or would like a blocker or anything else, tough they have you on time. Note how much time your opp has left does not matter. If they only have 15 seconds but have you in a mate in 2, you have to stop moving.

Besides forcing, it is real bad for both players of a pair to have their time going. Bleeding time is bad. One of you need to move. Abandon whatever you are waiting for and get a move on. If your opponents are bleeding, do not say or do anything.

This is just a start. Enjoy.
> 1 votes

---
Tags: opening, learning, chess-variants, bughouse
---


title: Detect pinned pieces code

text:
# Question
Title: Detect pinned pieces code
This post is a follow up of this one: C++ vs Java Engine move generation performance

My goal here is to improve the performance of my move generator, which finishes perft (start\_pos, 6) in 8.5 secs. That's too slow for C++ code (the same Java code runs in 11 secs).

The bottleneck is the check for validity, which in turn tests if the king is in check. This is running for every move, and given that most moves are legal, it's a total waste of time. As pointed out by Student T, we should restricted this test for king in check, pinned pieces and en passant captures.

The king in check or walking to check cases are easy, this post is about pinned pieces code. So, the cpwiki code goes like this:

```
pinned = 0;
pinner = xrayRookAttacks(occupiedBB, ownPieces, squareOfKing) & opRQ;
while ( pinner ) {
   int sq  = bitScanForward(pinner);
   pinned |= obstructed(sq, squareOfKing) & ownPieces;
   pinner &= pinner - 1;
}

pinner = xrayBishopAttacks(occupiedBB, ownPieces, squareOfKing) & opBQ;
while ( pinner ) {
   int sq  = bitScanForward(pinner);
   pinned |= obstructed(sq, squareOfKing) & ownPieces;
   pinner &= pinner - 1;
}

```

And here's the code for xrayRookAttacks():

```
U64 xrayRookAttacks(U64 occ, U64 blockers, enumSquare rookSq) {
   U64 attacks = rookAttacks(occ, rookSq);
   blockers &= attacks;
   return attacks ^ rookAttacks(occ ^ blockers, rookSq);
}

```

**Questions:**

a) What is `obstructed()` doing?

b) After getting the `pinned` set, how exactly do I use it to test for a valid move?

Thank you all!

# Answer
**A:** Let's use bishop for our example. `xrayBishopAttacks` works if we have the following position:

but it **doesn't** work if you have this:

The f3 knight is not pinned because there is something else behind it. `obstructed` takes this into consideration.

**B:** Once you get the pinned pieces, you can just do XAND to check if the piece you want to move is pinned. If it's pinned, you can't move it.

\************** **EDIT** \**************

You won't find `obstructed()` because it's just a pseudocode function. You're expected to implement pinning in `obstructed()` yourself.

Forget the pseudocode, you should study Stockfish. Goto https://github.com/official-stockfish/Stockfish/blob/master/src/position.cpp

Find `bool Position::legal(Move m) const`

Check the following:

```
// A non-king move is legal if and only if it is not pinned or it
// is moving along the ray towards or away from the king.
return   !(pinned_pieces(us) & from)
    ||  aligned(from, to_sq(m), square<KING>(us));

```

This is **exactly** what I'm talking about.
> 5 votes

# Answer
Answering my own question here. I've managed to increase the speed of the move generation code, by implementing the `pinnedPices()` routine.

The C++ version runs Perft (start\_pos, 6) under ~3.5 secs, including hash updates. Here's some Java code for reference (messy indentation, sorry):

```
//return bitboard of pinned pieces for player side
public static long pinnedBB(Board board, int side, int kingSQ){
    int opp =  side ^ 1;
    long occup = board.bitboards[side] | board.bitboards[opp];
    long pinned = 0L;
    long pinner = xrayRook(board, board.bitboards[side],
            kingSQ, opp) & (board.bitboards[Board.ROOK | opp] | board.bitboards[Board.QUEEN | opp]);

    while (pinner != 0) {
       int sq  = Long.numberOfTrailingZeros(pinner);
       pinned |= BitBoardGen.rectLookUp[sq][kingSQ] & board.bitboards[side];
       pinner &= pinner - 1;
    }
    pinner = xrayBishop(board, board.bitboards[side],
        kingSQ, opp) & (board.bitboards[Board.BISHOP | opp] | board.bitboards[Board.QUEEN | opp]);

    while (pinner != 0) {
       int sq  = Long.numberOfTrailingZeros(pinner);
       pinned |= BitBoardGen.rectLookUp[sq][kingSQ] & board.bitboards[side];
       pinner &= pinner - 1;
    }
    return pinned;
}

  public static long xrayBishop(Board board, long blockers, int from, int side){
      int opp = side ^ 1;
      long occup = board.bitboards[side] | board.bitboards[opp];
      long attacks = bishopAttacks(board, occup, from, side);
       blockers &= attacks;
       return attacks ^ bishopAttacks(board, occup ^ blockers, from, side);
 }

  public static long bishopAttacks(Board board, long occup, int from, int side){
    int opp = side ^ 1;
    long enemyOrEmpty = ~board.bitboards[side] & ~board.bitboards[Board.KING | opp];
    long[] up_r = BitBoardGen.BITBOARD_DIRECTIONS[BitBoardGen.IDX_UP_RIGHT];
    long[] up_l = BitBoardGen.BITBOARD_DIRECTIONS[BitBoardGen.IDX_UP_LEFT];
    long[] down_r = BitBoardGen.BITBOARD_DIRECTIONS[BitBoardGen.IDX_DOWN_RIGHT];
    long[] down_l = BitBoardGen.BITBOARD_DIRECTIONS[BitBoardGen.IDX_DOWN_LEFT];

    long upward =  upwardAttackTargetsFrom(from, occup, up_r) | upwardAttackTargetsFrom(from, occup, up_l);
    long downward =  downwardAttackTargetsFrom(from, occup, down_r) | downwardAttackTargetsFrom(from, occup, down_l);
    return upward | downward;
}

```

The `rectLookUp` matrix stores the pre-generated bitboards representing the squares between two given squares.

Now, inside `moveGen()` you only need to test for illegal moves in these situations:

a) ep capture b) pinned piece c) at check d) king move

Everything else will be legal, assuming your pseudo-legal generator is bug-free. You can improve it further for cases 'c' and 'd' (checking only evasive moves for ex).

Hope it helps someone, thanks!
> 4 votes

---
Tags: engines, programming, illegal-move, performance, pins
---


# Question
Title: Returning scores for all possible moves from a chess engine
I am looking for a way to return scores for all possible moves from a chess engine (preferably, Stockfish).

The UCI protocol does not seem to require it, but is seems like a useful feature to include.

Are there any chess engines/extensions of UCI that implement that?

# Answer
Of course there's a way: I'm going to show you one way of doing it on your own, using only free software. We'll write a small script in Python (I'm using v2.7) and only use the wonderful python-chess library (licensed under GPL3, note that I'm using the version 0.14.0).

In short, the script will first load up the engine, we will stick to free and open source software so we'll use the amazing Stockfish engine \[\*\], then create a board instance of the position you want analyzed (using the FEN notation), generate all legal moves, and finally ask the engine to evaluate each move for a predefined amount of time (in this example it is set to 1 second ponder time). Here's a working sample:

```
import chess
import chess.uci

#Let's try our code with the starting position of chess:
fen = 'rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1'
board = chess.Board(fen)
handler = chess.uci.InfoHandler()

#Now make sure you give the correct location for your stockfish engine file
#...in the line that follows: e.g., /home/.../stockfish_6_x64
engine = chess.uci.popen_engine('stockfish_6_x64')

engine.info_handlers.append(handler)
engine.position(board)
if board.turn: print 'White to move'
else: print 'black to move'

for el in board.legal_moves:
    engine.go(searchmoves=[el],movetime=1000)
    print str(board.san(el)), 'eval = ', round(handler.info["score"][1].cp/100.0,2)

```

Note that this is not necessarily the best/most efficient way of doing it, I wrote this in 5 minutes just to showcase it at a basic level *without* using any advanced features of the engine, I'm sure you will do much better on your own. Anyhow here's the output once you run it (assuming you have python installed on whatever OS you're using, same goes for the python-chess library):

```
White to move
Na3 eval =  -0.39
Nc3 eval =  0.15
Nf3 eval =  0.15
Nh3 eval =  -0.37
a3 eval =  0.01
b3 eval =  -0.15
c3 eval =  -0.03
d3 eval =  -0.06
e3 eval =  0.12
f3 eval =  -0.49
g3 eval =  -0.33
h3 eval =  0.0
a4 eval =  -0.12
b4 eval =  -0.67
c4 eval =  0.07
d4 eval =  0.17
e4 eval =  0.17
f4 eval =  -0.15
g4 eval =  -0.74
h4 eval =  -0.15

```

There you go! The beauty of all this is of course the fact that you have now **your** own software to work with, modify and extend it as you wish...no limitations. All very easy to do, just acquaint yourself with the workings of the library we're using by following its documentation, and knock yourself out ;)

Don't hesitate to ask if you have any questions about the code, or adding potential functionalities.

\[\*\]: which also happens to be one of the strongest current chess engines.

---

## Edit to address the common request:

Here's the **updated version** of the same code using the latest version:

## **python-chess 0.30.0 and using the latest Stockfish**

```
import chess
import chess.engine
import os

#here we assume the engine file is in same folder as our python script
path = os.getcwd()
#Let's try our code with the starting position of chess:
fen = 'rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1'
board = chess.Board(fen)
#Now make sure you give the correct location for your stockfish engine file
#...in the line that follows by correctly defining path
engine = chess.engine.SimpleEngine.popen_uci(path+'/'+'stockfish-10-64')

if board.turn: print('White to move')
else: print('black to move')

for el in board.legal_moves:
    info = engine.analyse(board, chess.engine.Limit(time=1), root_moves=[el])
    t = str(info["score"])
    if t.startswith('#'):
            print(str(board.san(el))," eval = mate in ", t)
    else: print(str(board.san(el))," eval = ", round(int(t)/100.,2))
engine.quit()

```

The output for ponder time set to 1 second per found move `chess.engine.Limit(time=1)`:

```
White to move
Nh3  eval =  -0.43
Nf3  eval =  0.69
Nc3  eval =  0.29
Na3  eval =  -0.35
h3  eval =  0.41
g3  eval =  -0.2
f3  eval =  -0.62
e3  eval =  0.45
d3  eval =  0.03
c3  eval =  0.19
b3  eval =  0.1
a3  eval =  0.46
h4  eval =  -0.42
g4  eval =  -1.22
f4  eval =  -0.07
e4  eval =  0.82
d4  eval =  0.63
c4  eval =  0.57
b4  eval =  -0.26
a4  eval =  -0.02

```
> 17 votes

---
Tags: engines, stockfish, uci
---


title: Suggestions for endgame training

text:
# Question
Title: Suggestions for endgame training
I am an unrated player. I am looking for ways to improve my endgame. I am currently using:

1. Dvoretsky's Endgame Manual
2. Pandolfini's Endgame Course

(I am personally finding the former to be tough. So I am planning to revise the second first).

So here are my questions:

1. Please inform me about other sources I should check?
2. I have heard about endgame table bases on several occasions. But I felt them to be too much information and not enough wisdom. So I have ignored learning more about them. Please advise me about how to have a systematic principled way of assimilating the endgame tables.
3. I want to read more about mathematical expositions on chess. I am familiar with works of Shannon and Victor Allis. I want to read what Combinatorial game theorists have to say about chess. I for example know about this research group at UC Berkley. Please share if you know any interesting lead along this direction. (I am aware these efforts digress from the real problem of playing tournaments, but I am of the opinion these would help make a stronger player. Please tell me what do you think).

Thanks!

# Answer
> 4 votes
The kind of book you need depends on your level and what you are looking for. Dvoretsky's book is of high quality, well-researched, magnificently analysed and ... pretty much useless if you are under 2400. Well, OK, maybe not *useless*, but I prefer my chess study to be a little more enjoyable than studying advanced theoretical mathematics.

For something more engaging and accessible, I prefer "Fundamental Chess Endings" by Karsten Muller and Frank Lamprecht. It covers the same topics as Dvoretsky, but with less emphasis on highly theoretical analysis and more on problem solving and practical considerations. But I'm below 1600, so my needs may be different than yours.

End game tablebases, as far as I know, is a complete tree of chess positions that have been solved using a brute force technique by evaluating every possible move. There is no practical way for a human brain to remember the terrabytes of data that it contains for use in OTB games. It would be like learning to play Call of Duty by simulating every possible action of every possible player. The data will only be interesting to people trying to create bots.

# Answer
> 3 votes
As a source for other ways to practise endgames may I suggest my own website called http://chessendgames.com, which is dedicated to training and improving endgame techniques. It has an interactive interface where you play against the computer engine. The website allows you to measure your endgame technique improvements while you play.

# Answer
> 1 votes
40 years ago the answer would have been simple - Reuben Fine's "Basic Chess Endings" was the bible of endgames. Even as late as 15 years ago it was the standard reference that I consulted after messing up an endgame I wasn't familiar with.

Nowadays John Nunn's "Understanding Chess Endgames" is my first call when I have questions about a particular endgame. Nunn's books are usually very uptodate in terms of the latest computer analysis and his own analysis is pretty good too ;-).

For learning more about endgames as a book to just sit down and read through I really like "Just the Fact!" by Alburt and Krogius in their Comprehensive Chess Course series.

# Answer
> 1 votes
Both of those books are meant for a much more advanced player. 2100+ at least. There are many more suitable books for players your level.

Silman's Endgame Course is a great book for players 2000 and under as the sections are grouped by your rating and you can just read what is need for your rating group.

John Nunn's "Understanding Chess Endgames is a must for all serious chess players if they really want to improve on their endgame play. The examples are really easy to understand which makes this superb.

# Answer
> 1 votes
There are good books by Karsten Muller. Not sure I wrote the names correctly. I only studied these two endgame books.

* How to play chess endgames
* Fundamental chess endings

---
Tags: endgame, training
---


# Question
Title: Is there a list of ALL potential mates/traps under 10 moves or so?
Wiki has a couple of pages on opening traps, but I get the sense there must be more, and these are just representative samples:

List of chess traps
Checkmates in the opening

PS. The "10 move" limit is really just for practical reasons - I know that the opening can be longer, but I am just looking to make sure I don't fall for any famous trap early on in the game....

# Answer
I would suggest investigating Bill Wall's Chess Page, specifically:

1. 700 Opening Traps
2. Miniatures that relate to your favourite openings, e.g. 500 Caro-Kann Miniatures
3. The PGN files related to you favourite opening
> 5 votes

# Answer
> Is there a list of ALL potential mates/traps under 10 moves or so?

"No" is the obvious answer if you do the maths regarding just how many there could potentially (to use your word) be. Starting with all 32 pieces on the board the possible number of positions in the first 10 moves is mind-boggling.
> 2 votes

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


# Question
Title: Strongest / most aggressive 1. d4 openings
I'm curious to know what are some of the 1. d4 openings (Queen's Pawn), especially if they are highly agressive and/or are regularly used at higher GM level of play.

I really want to learn all I can and focus on d4 openings everytime I get to play white. I currently play the London System Opening.

All recomendations are welcome.

# Answer
> 4 votes
This is a partial recommendation, as your repertoire depends on what Black does.

I would recommend offering the Queen's Gambit, and if it is accepted to play e4:

```
[FEN ""]

1. d4 d5 2. c4 dxc4 3. e4

```

This becomes a true gambit. For more information, I would recommend:

1. *Starting Out: Queen's Gambit Accepted* by Reatsky and Chetverik
2. What are the main ideas for White in the Queen's Gambit Accepted, 3.e4 variation?

# Answer
> 5 votes
I feel that the most ambitious, principled and aggressive 1.d4 repertoire is the one given by John Cox in his book "Starting Out: 1.d4!". Of course these are the most ambitious lines for white in chess so they have also got extreme amounts of published theory and as they lead to very sharp positions, not knowing the theory may lead to quick losses for white.

The main criticism of the book was that a collection of lines fit for top players may not be suitable for the audience of "Starting Out" books, but you don't ask for easy openings :-). Ironically even the world top has now moved away somewhat from these lines because the theory had been worked out so far, they go for slightly more restrained lines with g3 or so more of the time these days.

It is based on 1.d4 Nf6 2.c4 and 1.d4 d5 2.c4.

The following list of the lines it offers is from Watson's review of the book (http://theweekinchess.com/john-watson-reviews/the-end-of-openings-part-1), as I don't have the book with me right now:

> Cox's book suggests a complete repertoire for White beginning with 1 d4. Here are a few of the main systems that he recommends:
>
> (a) versus the King's Indian: the main line 4 e4/5 Nf3/6 Be2/7 0-0 and 9 b4, the Bayonet Variation, , one of the most theoretical lines possible, with Black systems to cope with on every move that leads up to that move;
>
> (b) versus the Grünfeld: the main line of the 7 Nf3/8 Rb1 system, that is, the one that Edward Dearing recently wrote a densely-packed 205-page book about;
>
> (c) versus the Nimzo-Indian: 4 Qc2 and pretty much every main-line line that follows this most investigated of modern lines;
>
> (d) versus the Benoni: the Modern Main Line with h3 and Bd3, again the most-analysed current variation;
>
> (e) versus the Benko Gambit: g3 and Bg2 with the contemporary main variation 10 Rb1;
>
> (f) versus the Queen's Gambit Declined: the main line Exchange Variation with the sharp Nge2;
>
> (g) versus the Tarrasch Defence, the main line: 6 g3/9 Bg5, also ridden with traps and tricks to remember;
>
> (h) versus the Slav Defence: the main line with 6 Ne5, the most theoretical and complicated Slav line ;
>
> (i) versus the Semi-Slav: the main line Botvinnik Attack, one of the most-analysed variations in all of chess history.

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


title: 48 pieces on one board

text:
# Question
Title: 48 pieces on one board
I saw this picture on the Internet.

I am wondering if there is any way to play on this board. Does anyone know what the rules are for this type of chess?

# Answer
It is one of many forms of three-player chess, apparently called 3 Man Chess. Rules are explained here.
> 5 votes

---
Tags: rules, chess-variants, chessboards
---


# Question
Title: What is the name of this variation: 1. e4 b6 2. e5?
I had started playing Owen's Defense. My opponent pushed the pawn one step forward.

What variation did he try, securing this pawn he may play well.

```
r1bqkbnr/p1pppppp/1pn5/4P3/8/8/PPPP1PPP/RNBQKBNR w KQkq - 1 3

```

# Answer
> 2 votes
No idea whether this line has a name. The plan is apparently to prevent the natural development of the knight from g8 to f6. Also black might struggle finding a good spot for the bishop on f8. On the plus side for black it opens the long diagonal a8-h1 for the black bishop.

Likely white is sooner or later going to support the pawn on e5 with d4 and f4, and black should somehow work against this strong center with moves like c5, d6,..

Therefore I think that 2. ... Nc6 is not the best move as it blocks the pawn on c7 and also the knight might get attacked later if white pushes the d pawn d2-d4-d5...

# Answer
> 6 votes
I don't think that this variation has a name. Variations that are infrequently played are less likely to be named. I don't have access to Megabase right now, but I can't even find a game starting with 1. e4 b6 2. e5 in online databases. You're already well away from main lines with 1... b6. 2. e5 seems weird (2. d4 would be my choice) and 2... Nc6 will impede the bishop on b7.

# Answer
> 2 votes
There is no King's Gambit here, which begins with `1. e4 e5 2. f4`

This opening looks OK for getting White out of his book, but otherwise I don't know what Black has going for it. This would be a fine blitz opening for Black since it's unusual. I don't care a lot for White's `2.e5`.

Stockfish finds nothing remarkable after the OP's moves.

# Answer
> 1 votes
This is standard Owen's Defense, after your move to Nc6; white should play d4 for a strong center. In my opinion, your move to 2)...Nc6 is not the best; c5 to discourage d4, or d5 might keep your light squared bishop more flexible.

# Answer
> 0 votes
French defense Steinitz attack starts with 1. e4 e6 2. e5. It's very likely that after OP's initial moves, e6 will be played. So it might transpose.

---
Tags: opening, 1.e4
---


# Question
Title: What are some good resources one may use to get better at chess? (training etc)
What are some good resources one may use to get better at chess? (training etc)

i don't mind paying for a software like Chessbase or a website or any magazine subscription.

Thanks.

# Answer
> 4 votes
I don't think this question is a duplicate, but I'm going to shamelessly reuse my answer to a related question anyway:

The internet is an amazing tool - for good or for ill. All of the following will help people at a wide variety of levels.

I'd suggest looking into some sort of tactics training. chess.com has a good reputation; I personally use lichess; I used to look at chesstempo. Practicing a few a day (or an hour or so a day) can give you an amazing boost; this is probably the best "bang for the buck". (I speak from experience!)

Find a good YouTube channel with a presenter who speaks to your level and has a teaching style you enjoy; there are a TON of options out there. Depending on your level, something like the Backyard Professor, IM John Bartholomew, any of the St. Louis Chess Club, MetoJelic, Dereque Kelley, etc. I enjoy all of those and many more (they're at widely different levels) for different reasons. (I enjoy others like the Ginger GM, too - but I definitely wouldn't watch him at a "lower" level... he'll give you bad habits that he can get away with.)

If you want to improve some openings, I can't stress chessable enough. My online rating jumped about 200 points just by going to this site every day for two months. (Yes, online ratings are "worthless": it's the relative level, not the absolute.)

Another option would be to find a player whose style you like or have empathy with, and go to chessgames to look through all of their games. Walk through them slowly, trying to figure out why they made the moves they did (when they did) - and why their opponent did what they did.

Beyond that, play games - and then analyze them afterwards. Even just walking back through slowly, trying to identify what went right or wrong (and what could have been better) can help a LOT. Lichess has the option to analyze your games for free - which is a HUGE boost. I've seen the advice "play slower games" (10+ min. on the clock) from quite a few people, as those games give you more time to calculate, analyze, and think. Practice visualization!

If you don't like the internet, there are always physical books - but I'll let someone with more experience on them weigh in. I've got some, I enjoy them, but I don't know enough to make recommendations.

Good luck!

# Answer
> 2 votes
Not to diminish anything from the other answers, below's a list of things (by no means exhaustive) you could try:

* Solving puzzles to improve your tactics and general understanding of the game. It suffices to just google "chess puzzles" and you'll find plenty of resources to get started with. Keep solving them on a regular basis. (Note that you can be specific with puzzles based on your needs, e.g., search for "endgame chess puzzles").
* Read chess books: there are many freely available books online, but generally chess books are quite affordable. For recommendations, just search for "chess books" here on chess SE, here's the result.
* Use an engine (install a simple editor that handles uci chess engines, then set up your engine, e.g., Stockfish, or simply use lichess). Learning how to use an engine to analyse your games (or other games that you study) is one of the best resources, it really cannot be emphasized enough. Every game you play, just run it quickly through an engine, and find out about your inaccuracies (specially the common mistakes you tend to make, the engine will bring them to your attention if you use it regularly to study played games).
* Play online chess on a regular basis: whatever time control you may prefer, although you will find the practice to be more fruitful if you tend towards longer time controls (10 mins, 15... or with increment). chess24.com and lichess (e.g. on lichess you can freely analyze your games on the cloud without having to store them locally and run your own engine) are two very famous/stable platform to play on these days.
* Youtube: there are many strong chess players that record their online playing along with commentary on the moves-openings etc. I personally find these generally very insightful, as they often bring ideas to your attention that you'd never thought of in that way before. A couple that come to mind: chess24 youtube channel (where you'll find videos from GM Peter Svidler, GM Jan Gustafsson, to name a few). chessexplained youtube channel (IM Christof Sielecki is a very logical player, almost always he has a concrete idea for his moves, highly recommended). There are many others of course, try to find one you relate to better.
* Follow chess news: it will encourage you to follow top player's recent games on a regular basis, and also chess news platforms such as chess24.com, which quite often also publish educational articles.
* The list can go on... Just note that these ideas are not exclusive, try to come up with your routine and cover the mentioned elements to the extent possible. And whatever you decide, make sure not to limit yourself to one source, try some options and stick with those that fit better with your level and style of play.

# Answer
> 0 votes
You can sign-up at chess.com it has an excellent training for free but with a limit each day you can subscribe for paid user if you want unlimited daily lessons.

# Answer
> 0 votes
If you want an app on your phone, you can download thr app, Play Magnus. You are literally playing against Magnus Carlsen on his different ages. As he became grand master.

---
Tags: learning, training
---


# Question
Title: Real Chess Board which detects the moves we do
We a friend and I play chess we usually don't write down our moves.

It would be great if there would be chess boards which detects our moves.

We could play using a tablet computer, but we prefer to play with a real world chess board.

Are there chess boards which detects the moves we do?

The board does not need to be smart. For me it would be enough if it could act detect the moves and output the moves like a usb keyboard.

# Answer
> 6 votes
Yes, there are boards that record moves made automatically. This link should give you ample information about so called DGT-boards.

Because DGT-boards are pretty expensive, maybe you want to take a look at this discussion, in which the Novag Citrine board computer is proposed as a slightly cheaper alternative.

If the Novag is still too expensive, I would look further into the board computers/usb-boards, but those probably don't recognise the pieces automatically, which means they have to pressed on the starting and ending square of each move.

# Answer
> 3 votes
I can't find a link anymore, but I remember seeing somewhere (perhaps in the Netherlands?) that they used cameras or mobile phones suspended above the board in order to visually register the moves. Might not be as accurate though and perhaps you want some high contrast pieces/boards in order to use this.

---
Tags: chessboards
---


# Question
Title: Share a board in realtime to teach chess
A user of our community with solid experience in the game wants to teach others. There is a video broadcast in our site. I need to attach a shareable chessboard to the broadcast. Where a coach can manipulate with figures and students can see the changes simultaneously.

Is there any online service which allow to share a board in real time (I suppose to show it in a frame)?

# Answer
> 4 votes
> Is there any online service which allow to share a board in real time (I suppose to show it in a frame)?

Have you tried sharing your desktop in a Skype conference call?

Another alternative might be Google+.

# Answer
> 4 votes
Lichess has a feature called "study" which allows collaboration and best of all it is free: https://en.lichess.org/blog/V0KrLSkAAMo3hsi4/study-chess-the-lichess-way

# Answer
> 0 votes
Chess.com live chess last this feature. However, I think you should be premium member for that.

---
Tags: online-chess, chessboards, online
---


# Question
Title: Books/resources on Scotch (as white) and Petroff (both sides but mainly as black)
Could someone recommend books or online resources on those two openings for intermediate players (about 1800)?

Since my opponents at this level are likely to go out of theory on move 4 or 5, I want to have the knowledge to see why their move isn't that good and how to respond to it.

For example, 1 e4 e5 2 Nf3 Nc6 3 d4 exd4 4 Nxd4 **d6**. Here I used to trade 5 Nxc6 bxc6, and double black's pawns, but I'm told it actually helps black to open the b file and have an active middle game.

So I would like resources that have more explanations on the opening's idea/planning, not just comprehensive list of variations.

---

Edit: I bought the book "The Petroff: move by move". After reading for about 30min, I put it down and disliked it. The reasons are

1. This book is supposed to be an opening book. But it runs all the example games to the end. The author should make a judgement when opening is finished, provide evaluation of the board and plan for middle game, then go on to next example.
2. On one page, the author writes (for the Cochrane gambit) "(white's) Bc4+ should always be met with d5 since after Be6 Bxe6 Kxe6 black's king is pulled further to the center". And on the next page when white plays Bc4 a move later, black plays Be6, then the game continues Bxe6 Kxe6. No explanation here!
3. There isn't any dedicated section for game plan/pawn structure/piece placement etc. These advice are scattered in the example games. Moreover, its explanations are more towards "why this GM's move is good", not "guidelines to find good moves".

# Answer
I can only make recommendations for the Petroff Defence, as I have never played the Scotch:

* *The Petroff: Move by Move* by Cyrus Lakdawala. An engaging author using a question and answer format in annotated games
* *Petroff Defence* by Alexander Raetsky and Maxim Chetverik. This book is more orientated towards Black's point of view, but the explanations are accessible to the club player
* thechesswebsite YouTube video on the Petroff Defence
> 5 votes

# Answer
Fundamental Chess Openings - FCO, by Paul van de Sterren.

Good explanations on planning and ideas, light on deep lines.
> 3 votes

# Answer
"An Attacking Repertoire for White" by Sam Collins has a chapter on the Scotch which does cover many of the offbeat variations. After 4. ... d6 he writes "No one does this, for the simple reason that it fails to pressurise White's center and allows him a free hand in developing. After 5. c4 Nf6 6. Bc3 Be7... 12. b4! White has a clear advantage." "e4 White is Better" by GM Dragan Barlov and Milos Jovicic is just many variations, but they cover more lines in this opening book.

Lichess has a forum where you could ask more specific questions.
> 2 votes

# Answer
Quality Chess will publish a book on 1.e4 (hopefully in a few month) which will feature the Scotch as far as I know. It is part of a two book repertoire and will be about 1…e5, Caro-Kann and minor lines.

This will be a "Grandmaster Guide" and not a "Grandmaster Repertoire" so it is aimed at slightly weaker players. It should contain the Scotch and the Petroff and books by QC are generally excellent. And of course it will be brand new, so it strikes me as your best bet.
> 2 votes

# Answer
The best book on the Petrov is a book by Yusupov but it is very technical and high level stuff. You should look at the Chess Stars offer of books for the Scotch and also for the Petrov (in different books). There are also many books with entire chapters on the Scotch (ntirlis's quality chess book, emms's gambit book, etc...).
> 1 votes

# Answer
### On the Scotch

Gary Lane has written two good books, *Winning with the Scotch* (first Batsford in the UK and then Henry Holt in the US, 1993) and *The Scotch Game Explained*, Batsford, 2005.

*Starting Out: The Scotch Game* by John Emms (Everyman, 2005) is a good guide; it talks about the main ideas in each line before showing sample games (which are complete, once they reach the middlegame the commentary tapers off).

Batsford has also published *4...Qh4 in the Scotch Game* by Lev Gutman, 2001, which is an in-depth analysis of this line. It is considered the most dangerous line for White to face, but will have more material than you sound like you need. If you ever face the Scotch as Black, though, this is a great lifetime reference.

### On the Petroff

Janjgava wrote a definitive book, *The Petroff*, in 2001, published by Gambit. I also endorse *The Petroff Defense* by Raetsky and Chetverik, from Everyman.
> 1 votes

---
Tags: opening, books, scotch-game, petroff-defense
---


# Question
Title: How do the best centaurs compare to the best computers?
Do human-machine combinations still beat the best computer chess players, or have computer players gotten good enough to beat even the best computer-human duos?

# Answer
Two years ago, top GM Nakamura played a match against one of the top engines, Stockfish. In the first two games, he was assisted by a very strong engine, rating about 200 points lower than Stockfish. Still, this wasn't enough to win, he even lost this part of the match 1,5 - 0,5. More details, including games, can be found here.

Of course, a human assisting a computer player will be stronger than the same computer player alone, but this gives you an idea of how little we (human players) are able to add at the moment.
> 4 votes

# Answer
First and foremost:

**The centaur should get *at least* 50% of the points.**

As the centaur is not obliged to intervene at all, he could just let the software do the job, so it's best computer - best computer... with an expected result of .5.

How much better the centaur will perform depends on his ability (not necessarily chess skills alone) and rules. If he's allowed to to change engines and knows about strengths and weaknesses in the programs for certain kind of positions, choosing the right engine for the given type of position might gain an advantage. Also, the human might be better at time management.

Generally speaking I think the better the engines get (compared to the operator), the less advantage they have. And of course it's easy to ruin the game by bad decisions.
> 2 votes

---
Tags: engines, rating, computer-chess
---


# Question
Title: Reti opening with bishop aiming kingside
I try a variation of Reti opening these days where I aim both my bishops kingside.

```
[FEN ""]
1. Nf3 d5 2. c4 c6 3. b3 Nf6 4. Bb2 Bg4 5. e3 e6 6. Be2

```

And after that I struggle a lot trying to bring that bishop to c4 or d3.

Does anybody have a better suggestion how to take this repertoire forward?

# Answer
This is a good question, but I think it could use a slight reformulation: It's not so much a question of "how can we get our bishop to either d3 or c4", but rather "under which circumstances would the bishop become powerful on those diagonals".

If you're looking for positional ideas to further advance your repertoire in this line, it's often very useful to keep an eye on possible transpositions and openings that lead to analogous structures. For example, in the line you show, black has a very solid Slav structure, arguably even an improved one, since white doesn't have the Qb3 option anymore, so the Bg4 maneuver is perfectly sound. On the other hand, white's position has the same ingredients as most Larsen (1.b3) variants do.

As far as I remember (it's up to you to do the in depth search here), Larsen tended for the e3-f4 (instead of c4) pawn structure whenever he wanted to plant his bishops on b2 and e2. But he did have this Reti type of structure every now and then, see e.g. his game vs Ulf Andersson. So make sure you find out about the positional ideas Larsen used to employ in this system. But for a more extensive search, look into a database and search for all the games where this position has occurred and get inspired by how other players have gone about it. For example I use the TWIC database, I have a collection with many of the older series, and after a quick search I find about 200 games with this exact position.

What Bad\_Bishop has suggested to you in his answer is actually a very practical idea, with a relatively clear plan ahead: you're threatening to win the bishop pair, and the weaknesses you may induce in doing so are less important than they seem specially because your weakening of the light squares is coupled with taking away the opponents light square bishop! Although it must be noted that in this specific line, after 9.Nh4, I'd be a bit worried about Be4, as f3 doesn't work due to Nh5. (Make sure you check this variation).

A couple of positional suggestions you might want to consider: (by no means exhaustive, in fact these will be very crude, just to give you some rough ideas)

* A conservative approach: stick to the solid pawn structure and double the b2-g7 battery by bringing the queen to a1 or b2 and you coordinate your play around the control of the long diagonal. e.g. a sequence along the lines of: 7.d3 8.Nbd2 9.Re1 10.Qc2 11.Bc3 12.Qb2 etc should get you there... If you're not familiar with such battery ideas on the long diagonal, a good start would be to study this marvelous game by Peter Svidler playing as black: (notice that your pawn structure in this Reti line is completely transposable to that of Svidler's in this game):

-

```
[FEN ""]
[Event "Dortmund Sparkassen group-A"]
[Site "Dortmund GER"]
[Date "2004.07.26"]
[Round "5"]
[White "Arkadij Naiditsch"]
[Black "Peter Svidler"]
[Result "0-1"]
[ECO "B42"]
[WhiteElo "2574"]
[BlackElo "2727"]
[PlyCount "78"]
[EventDate "2004.07.22"]

1. e4 c5 2. Nf3 e6 3. d4 cxd4 4. Nxd4 a6 5. Bd3 Bc5 6. Nb3 Be7 7. O-O d6 8. c4 Nf6 9. Nc3 Nbd7 10. f4 Qc7 11. Qe2 b6 12. Bd2 Bb7 13. Rae1 O-O 14. Kh1 g6 15. Nd4 Rfe8 16. Nf3 Rad8 17. Ng5 Bf8 18. Qf2 Bg7 19. b4 Nh5 20. Rc1 Rc8 21. a3 Qd8 22. Nf3 Rc7 23. Rfe1 Nhf6 24. Qh4 Qa8 25. Qh3 Rec8 26. e5 dxe5 27. Nxe5 Nxe5 28. fxe5 Nd7 29. Bf4 Rxc4 30. Bxc4 Rxc4 31. Qg3 h5 32. Ne2 Nxe5 33. Rxc4 Nxc4 34. h4 Qd8 35. Bg5 Qd7 36. Nf4 e5 37. Nd3 Qd5 38. Nf2 Nd6 39. Rd1 Ne4 0-1

```
* Go for the king asap: 7.Nc3 (idea being to force the retake on d5 to be by the e pawn and securing the f5 square for your f3 knight - with a clear attack on the kingside) 8.Nd4 ... Here's an example I could find:

-

```
[FEN ""]
[Event "70th ch-GER"]
[Site "Bremen GER"]
[Date "1998.11.12"]
[Round "7"]
[White "Hickl, J."]
[Black "Jussupow, A."]
[Result "1-0"]
[ECO "A12"]
[WhiteElo "2540"]
[BlackElo "2640"]
[PlyCount "59"]
[EventDate "1998.??.??"]
[SourceDate "2011.01.01"]

1. c4 c6 2. Nf3 d5 3. e3 Nf6 4. b3 Bg4 5. Bb2 e6 6. Be2 Nbd7 7. Nc3 Bd6 8. Nd4 Bxe2 9. Qxe2 O-O 10. cxd5 exd5 11. Nf5 Bc5 12. Na4 Bb4 13. Nxg7 b5 14. Nf5 bxa4 15. Qh5 Kh8 16. Qg4 Bxd2+ 17. Kxd2 Rg8 18. Qxa4 Rxg2 19. Ke2 Qg8 20. Ng3 Qg6 21. Rac1 Re8 22. Qf4 c5 23. Kf1 Rxg3 24. Bxf6+ Nxf6 25. hxg3 Ne4 26. Rh6 Qg7 27. Rd1 Re5 28. Kg2 Ng5 29. Rc6 h6 30. Rxh6+ 1-0

```
* Transpose to a Queen's gambit decline type of position to secure the d3 square for your bishop: d4, Nbd2, h3, Bd3 ... Here's an example:

-

```
[FEN ""]
[Event "Golombek Mem"]
[Site "Paignton ENG"]
[Date "2000.09.05"]
[Round "3"]
[White "Bischoff, K."]
[Black "Hillarp Persson, T."]
[Result "1/2-1/2"]
[ECO "A12"]
[WhiteElo "2556"]
[BlackElo "2549"]
[PlyCount "37"]
[EventDate "2000.09.03"]
[SourceDate "2011.01.01"]

1. Nf3 Nf6 2. c4 c6 3. b3 d5 4. Bb2 Bg4 5. e3 e6 6. Be2 Nbd7 7. O-O Bd6 8.d4 O-O 9. Nbd2 Qb8 10. h3 Bh5 11. Bd3 Re8 12. Qc2 a5 13. Rac1 a4 14. Bc3 axb3 15. axb3 Bg6 16. Bxg6 hxg6 17. Ra1 Rxa1 18. Rxa1 e5 19. dxe5 1/2-1/2

```
* Similar to Bad\_Bishop's suggestion: start off with h3, make your opponent commit to a decision with the g4 bishop, but instead of an immediate rather committal g4, play the slow game: castles, d3, Nbd2, ... or possibly Nc3 specially if you plan to capture on d5 subsequently: two simple ideas to bear in mind: if black recaptures on d5 with the c-pawn, you want to take control of the c-file asap, if black recaptures with the e-pawn it's often possible to force the exchange of light square bishops in order to secure f5 for your knight. (I admit this is all still very crudely put).
* Finally, note that within such Slav structures for black, you'll never see your bishop on c4, it's just incompatible with black's control of the center. Alternatively, if you want your bishop on d3, your best bet is to transpose (as early as possible) into Queen's pawn type of positions. To play openings such as the Larsen, English or the Reti, you really must like slow-positional plays, and in my opinion these are by no means easier to learn/play than open positions, in fact they can get extremely complicated rather quickly. Intuitively, this is because strategic ideas tend to be very abstract and hard to grasp, whereas open positions are more tactical which makes them inherently more concrete. To give you an example of a highly strategic game, played recently, quickly leading to a highly non-trivial middle-game (see the game below). For your purposes I highly recommend studying GM Michael Adams' games in the English opening.

-

```
[FEN ""]
[Event "GRENKE Chess Classic 2015"]
[Site "chess24.com"]
[Date "2015.02.07"]
[Round "5"]
[White "Adams, Michael"]
[Black "Bacrot, Etienne"]
[Result "1/2-1/2"]
[WhiteElo "2738"]
[BlackElo "2711"]
[PlyCount "129"]
[EventDate "2015.??.??"]

1. c4 Nf6 2. g3 g6 3. Bg2 c5 4. Nc3 Bg7 5. Nf3 O-O 6. d4 cxd4 7. Nxd4 Nc6 8. O-O Qa5 9. Nb3 Qh5 10. Nd5 d6 11. Nf4 Qe5 12. e4 Bg4 13. f3 Bd7 14. Rf2 b5 15. Nd3 Qh5 16. Nf4 Qe5 17. c5 dxc5 18. Nd3 Qc7 19. Nbxc5 Rfd8 20. Qe1 Be8 21. Bf4 e5 22. Be3 a5 23. Rc1 Qe7 24. Rd2 Nd4 25. Nb3 Nd7 26. Nxd4 exd4 27. Bf4 Rdc8 28. Bh3 Rc4 29. Rdd1 a4 30. Bd2 Ne5 31. Nxe5 Qxe5 32. Bf1 Rxc1 33. Bxc1 Qe6 34. a3 Rc8 35. Bd3 Qb3 36. Qe2 Bd7 37. Bf4 Be6 38. h4 Bc4 39. e5 Bxd3 40. Rxd3 Qd5 41. Kg2 h5 42. Qd2 Rc4 43. Qe2 b4 44. axb4 Rxb4 45. Kf2 Qb5 46. Rd2 Qd5 47. Qe4 Qa2 48. Qc2 Kh7 49. Kg2 Qa1 50. Rf2 a3 51. bxa3 Rb1 52. Qd3 Rd1 53. Bd2 Rg1+ 54. Kh3 Rh1+ 55. Rh2 Qg1 56. Qe2 Bxe5 57. f4 Bd6 58. a4 d3 59. Qg2 Rxh2+ 60. Qxh2 Qd1 61. Qg2 Ba3 62. a5 Bc1 63. Qd5 Qf1+ 64. Kh2 Qe2+ 65. Kh3 1/2-1/2

```
> 5 votes

# Answer
I have no experience with this kind of setup, however I would question your approach to the opening phase. Having a fixed plan like "aiming the bishops kingside" seems a bit simplistic to me.

Whether this plan makes sense will also depend on black's setup (e.g. if black castles queenside your bishops won't threaten all that much anymore). Also general opening principals (like occupying the center, gaining space, developing pieces...) should not be forgotten.

The position after 6. Be2, seems fine to me. Not much going on and probably equal. If you don't like the plan with immediate h3, g4,... (which seems fine to me), you could complete your development and only move the kingside pawns if black castles kingside.

If you are playing for a win, you will want to create some imbalance somewhere and the kingside seems to be the most obvious place to do so.
> 2 votes

# Answer
Being a Slav and Caro-Kann enthusiast, I play the Black side of these types of positions quite often.

I would advise aiming to win the Bishop pair with 7. h3:

```
[FEN ""]
[StartPly "11"]

1. Nf3 d5 2. c4 c6 3. b3 Nf6 4. Bb2 Bg4 5. e3 e6 6. Be2 Nbd7 {This reinforces the f6-Knight and prepares ...c5} 7. h3 Bh5 (7...Bxf3 {White has the Bishop pair for no Kingside weaknesses}) 8. g4 Bg6 9. Nh4 {White will gain the Bishop-pair, but I advise delaying the capture if possible, for example after Black castles Kingside. It is also a psychological burden for Black to have the Bishop under tension like this.}

```
> 1 votes

---
Tags: opening
---


title: SyzygyPath in asmFish

text:
# Question
Title: SyzygyPath in asmFish
Can someone point to me whereabouts in asmFish I can hardcode the SyzygyPath into the source code. I can do it in StockFish 8, however I've yet to find it in the source code of asmFish. I'll be using the Linux version.

Any help much appreciated.

# Answer
1. I don't think you should hard-core SyzygyPath because the ASM engine follows the UCI protocol. You can just send the `SyzygyPath` option to the engine.
2. If you insist to modify the assembly language (I don't recommend), goto https://github.com/tthsqe12/asm/blob/f34c20b25c2160b27efda5c5c388ff5e66636d3e/asmFish/guts/Uci.asm.

Find this:

```
.SyzygyProbeDepth:
        lea    rcx, [sz_syzygypath]
        call   CmpStringCaseless
        lea    rbx, [.SyzygyPath]
        test   eax, eax
        jnz   .CheckValue

```

Try to replace the path with `'C:\MyPath\'`.

**Note**: My recommendation is not tested, but I am sure that's the code you'll need to change.
> 2 votes

---
Tags: engines, software, endgame, linux
---


# Question
Title: What are some beginner to advanced openings or variations I could use?
I’ve played chess for some time now, but I’ve really started to get into it these past few months. The thing I need help on is openings. I know about the different ones, and even attempted one or two of them, but I either end up forgetting the opening, or having the opening completely backfire on me. So what I’m wondering is, is there any opening that’s simple to learn but effective?

# Answer
It is hard to answer a repertoire question with little supporting information. On that basis, I would recommend 3 things:

1. Complete the quiz on chesspersonality.com. At the end you will receive recommendations on openings, for White and Black, based on your answers
2. To stick to one opening as White, and have 1 response as Black for 1. e4 and 1. d4. The other common opening moves, 1. c4 and 1. Nf3 are quite rare at a beginner level, and are chosen because they usually transpose into 1. e4 or 1. d4 openings anyway
3. Look at some opening videos on YouTube, such as those by Dereque Kelley. If you like the look of an opening, try taking the main themes into your next game
> 2 votes

# Answer
There is only one answer to this question: **Play what you like.**

If you are a beginner, you should not be worried about "studying" an opening, but only correcting your opening mistakes by reviewing your losses regularly and finding better moves in the lines you play (i.e., review with a better player is best, or, look up better lines). This iterative process will teach you way more than "memorizing" opening lines or studying an opening, because you have attached this experience to a middle-game in one of your games, so you see the results. In the end, you will either get better in the opening or drop it for something else, and that is a very natural process.

I used to play the Dutch Defense as black against 1.d4 a long time ago, then migrated away from it into the Slav/Semi-Slav, but have returned to using the Dutch Defense again because I like the middle-games I get and I feel comfortable in them. I don't play 1.d4 because I don't feel comfortable in the positions I get, and that is a personal choice.

Comfort is king.

We slow down on the highways because we don't feel comfortable driving at high speeds.
> 2 votes

# Answer
There are certainly openings which are easier to learn, because they have fewer variations, and also there are certain systems (like Kings Indian Attack with white) which you can play basically independent of what your opponent does.

Still, it is well worth to invest some time in learning some proper opening. If you play the same opening over and over again and analyze where you went wrong, sooner or later you will remember the lines. Start with learning the main line and go from there to add side lines as you encounter them.

I find it useful to write down the lines that I am playing together with commentary (can be done in a chess database system or on paper). If you reach a certain level, I suggest to follow a Grandmaster who is playing your opening and see how they handle it.

Also it is very important to not only learn the lines by heart, but also to understand the typical plans of the opening, which differ from opening to opening. This will be helpful also in later phases (middlegame, endgame) of the game.

I would not base my decision on how easy an opening is to learn, but rather on what kind of positions you like and whether you prefer quiet positional play or lots of action/tactics in your games. I like open positions with tactics, so I play 1. e4 with white and Sicilian, Kings Indian/Grünfeld with black.Can't give a concrete suggestion for you as I don't know what kind of player you are.

BTW, I don't think there are really *beginner* or *advanced* openings. When I started to learn chess I was playing the Italian, which you could call "beginner" opening, because it is very easy and obvious where to put the minor pieces and also because it is symmetric. However the same Italian is played increasingly at the highest level, so it would also be an "adanced" opening.
> 1 votes

---
Tags: opening, beginner
---


title: How is this position a draw?

text:
# Question
Title: How is this position a draw?
I played against a bot as a White and had this position. The computer claimed that it's a draw.

```
[FEN "2Q/k/3QP/8/3K/8/8/1N - - - 0 1"]

```

I thought it would be a checkmate because wherever the Black king moves, he will be captured. So, how this position is a draw?

# Answer
> 17 votes
Two conditions must apply for a position to be checkmate:

1. The player to move has no legal moves.
2. *His king is in check*.

The first is true here, but the second isn't, so it's not checkmate.

When a player to move has no legal moves but isn't in check, it's called *stalemate*, and it's an immediate draw.

# Answer
> 13 votes
This is stalemate; you're right that Black can't move, but (unfortunately for you) in Chess this means it's a draw.

# Answer
> 5 votes
Just to add Black can't move their king anywhere without being in check. When you have a few pieces and your opponent only has the king left you have to be careful to always leave your opponent somewhere to move unless you have them in check.

# Answer
> 5 votes
This is a draw by Stalemate, which is just like Checkmate, except that:

* Black's King is not in check.

if you had a Rook on A2 for example, the King would have no squares to go to, thus Stalemate,
**but** he would be in check *as well*, Thus, Checkmate!

In general, the best way to avoid stalemates is to look before every move, and ask yourself
`Can black move anywhere? Is he in check?`

That is a surefire way to avoid this unfortunate occurrence.

---

P.S. if you are *really* losing, a good idea is to try to fool your opponent into Stalemating *you*...

---

More reading:

---

Hope this helped!
~CSS

# Answer
> 1 votes
To elaborate a bit on

> I thought it would be checkmate, because anywhere the king goes he'll be captured.

This will never happen, though. A player must never oppose his king to attack, so he just has not a single move he can make. If it was ok to play an illegal move (moving into check), then he could just make any other illegal move at well, like capturing your king with his king, or capturing your queen - there is really no difference.

And as he's neither attacked, nor the game can advance any further, the game is drawn per the rules, which seems a natural choice.

Note that other chess variants (also Chinese Chess) might treat stalemate differently.

# Answer
> 1 votes
I know that this specific question has been thoroughly answered, but it's also a good idea to know all of the different ways to draw, of which a stalemate is just one. Repeating the same position three times with the same player to move is another. Perpetual check is a third. Exceeding 50 moves without a pawn move or piece capture is yet another. And a draw by agreement would also be another. Finally a draw also occurs when neither player has sufficient material to checkmate the opponent.

---
Tags: analysis, rules, checkmate, draw, stalemate
---


# Question
Title: In a simul what happens with timing when only one player is left?
When only one player is left in a simul, does he have to move at once or does he have 5 seconds per move?

# Answer
> 5 votes
The idea that there is a 5 second limit on thinking time in a simul is just nonsense. Early in the simul when the ordinary players have plenty of time while the simul giver is going round all the other players the player is expected to have his move ready and play immediately the simul giver arrives at the board.

That said, it is not unheard of for a player to "pass" or request a pass. Usually, in a well organized simul, there will be rules saying whether passes are allowed and if so how many (usually only one or two).

The simul giver is also not required to move immediately, particularly when it comes down to just 2 or 3 players. Believe it or not, he is often thinking about tricky positions in other games while he is making moves in the more routine positions and he is also affected by the cut down in numbers and the reduced thinking times.

Back in 1972 when I faced the late Viktor Korchnoi in a simul he rocked back and thought for a minute or two over one of my moves in the opening. He later accepted a draw which probably tells me a better player than me would have won my position ;-).

# Answer
> 2 votes
I played in an untimed simul against Bent Larsen in 1972. We had to have our move ready when he got to our board (out of some 20+ boards), with the option of one or two passes if necessary. I assume this could be decided upon differently in advance though by the exhibitor. Ultimately I was the last player left. I was probably the highest rated player of his opponents, although only Class A. At that point he sat down across from me and we continued at a relatively slow rate as I would have done in a normal non-timed game, taking perhaps two or three minutes per move. Naturally I lost, but at no point then did I feel rushed to make a move.

# Answer
> 1 votes
It is up to the organizer to decide on the rules, so anything is possible. A lot will depend on the level of players vs level of the exhibitor, so it is difficult to generalize. Most often simul exhibitions are fun events and rules are rather relaxed and participants cooperative.

In a typical simul players are expected to make their move promptly (e.g. within 5 seconds) when the exhibitors arrives at their board. If only few players are left it can make sense to give the players some extra time to think. For instance in this simul:

> As there are no clocks, the opponents should make their moves in a reasonable time when few boards are active.

If necessary this could be enforced with a clock.

There are other ways to avoid this problem of few players and time:

* clock simul, where players and exhibitor get a certain amount of time
* open ended simul, where when a game finishes a new game is started, so the number of players is always the same

---
Tags: simultaneous
---


# Question
Title: Carlsen vs Karjakin individual encounter results statistics so far?
I wonder how many times Carlsen and Karjakin played so far and who won the more number of games. Any idea?

# Answer
> 6 votes
There is a list of chess games between them here; I'm not sure if any games are missing. The list includes blitz, rapid and blindfold games, but there's a convenient statistics block at the top of the page:

> ### LIFETIME RECORD:
>
> Classical games: Magnus Carlsen beat Sergey Karjakin 4 to 1, with 17 draws.
> Including rapid/exhibition games: Magnus Carlsen beat Sergey Karjakin 18 to 8, with 22 draws.
> Only rapid/exhibition games: Magnus Carlsen beat Sergey Karjakin 14 to 7, with 5 draws.

---
Tags: statistics, world-championship
---


title: Scid vs Mac game interrupted

text:
# Question
Title: Scid vs Mac game interrupted
My Windows 7 Bootcamp partition failed me, so I'm using `Scid vs Mac OSX 10.9.5` app to test my engine. It works fine, but sometimes a tournament game is 'interrupted' and I don't know why. For example, in this game my engine was playing white:

1.e4 e5 2.Nf3 Nf6 3.Nxe5 Nxe4 4.Qe2 d6 5.Nxf7 Kxf7 6.Qxe4 d5 7.Qf3+ Kg8 8.Nc3 Be6 9.Qe3 Qf6 10.Nb5 Na6 11.Kd1 Bf7 12.d4 c6 13.Nc3 Nb4 14.a3 Re8 15.Qd2 Bh5+ 16.Be2 Bxe2+ 17.Nxe2 Na6 18.Qf4 Be7 19.Re1 Bd8 20.Be3 Qg6 21.Qg3 Qf5 22.Kc1 Bc7 23.f4 Kf7 24.Qf2 Rhf8 25.Ng3 Qg4 26.h3 Qh4 27.Ne2 Qxf2 28.Bxf2 Bd6 29.Bg3 Nc7 30.Kd1 Re4 31.Ra2 Rfe8 32.c3 c5 33.dxc5 Bxc5 34.f5 Nb5 35.a4 Nd6 36.b4 Nxf5 37.Rf1 Ke6 38.Rxf5 Kxf5 39.bxc5 Re3 40.Bf2 Rd3+ 41.Kc1 Kf6 42.Bd4+ Kf5 43.Bxg7 Rg8 White movetime 0.033 secs

We see this message: "White movetime 0.033 secs". What does that mean?

# Answer
I find out that my UCI protocol parsing had some nasty bugs, that's why all the Perft tests were ok, but the engine matches were buggy... ouch!

So it was not SCID's fault, sorry!
> 1 votes

---
Tags: engines, scid
---


title: Short castle in Trompowsky

text:
# Question
Title: Short castle in Trompowsky
In recent 1st Match between Maguns & Karjakin, started with Trompowsky. How can Karjakin prefer catsle even g file is open ( g × f6 at 3rd move ). Whats idea behind it?

# Answer
A few thoughts:

* Leaving the king in the centre or long castle are not attractive either with all the open lines and pinned knight on c6
* The g file is open but it is not easy for white to make use of it. White has exchanged its bishop which would have had a good square on h6. Also black's pawns on e6 and f6 cover important squares that could be occupied by white knights.
* The centre is open and if white concentrates forces on the king side, black will very quickly push through on the queen side and in the centre.
* It is an opening and has been analysed by humans and computers and found to be OK.
> 5 votes

# Answer
Also with a queens side castle it would take the king two extra moves to get complete safety for the king and that would make black lose tempo and might lose the game especially when it's against carlsen.
> 2 votes

---
Tags: opening, castling, karjakin
---


title: Change of venue of 1972 match

text:
# Question
Title: Change of venue of 1972 match
In 1972, when Fischer and Spassky played the championship tournament, Fischer demanded to play the games in a ping pong room stating *too much distractions* as his reason. Later (if I am not wrong) he returned to the main hall to play the rest of the games. What was all this about? I mean weren't there distractions then? What kind of psychological warfare was this?

# Answer
> 5 votes
Fischer objected to the proximity of the spectators, the intensity of the lighting, and the noise of the cameras. He did *not* request a separate venue. It was the organizers who suggested the ping-pong room as a compromise to address his objections. They then set to work modifying the conditions in the main playing hall to meet his demands.

By the start of Game 3, they had been able to reduce the lighting, rearrange the seating of spectators, and relocate the cameras so their noise would not be heard by the players.

---
Tags: world-championship, fischer, spassky
---


title: Does 1) d4 Nc6 have a name?

text:
# Question
Title: Does 1) d4 Nc6 have a name?
1) e4 Nc6 is Nimzowitch Defence.

The 1) d4 Nf6 defences are classed as Indian Systems (King's Indian, Queen's Indian, Bogo Indian, Old Indian, etc.) - https://en.wikipedia.org/wiki/Indian\_Defence

But does 1) d4 Nc6 have a name?

I recently played somebody who according to my research almost invariably replied to 1) d4 with Nc6. After 2) ... d5 they often transposed into a Chigorin but he often ended up in strange variations of other openings. I have never faced this and decided I needed to do some preparation so I could have some understanding of what kind of positions I should be aiming for and what kinds of traps to avoid.

I could find very little information about possibilities other than Chigorin's and decided that on the night I would chance my arm with 2) d5 aiming for a kind of queenside Alekhine's. Again I couldn't find anything published about this.

On the night he surprised me by replying with 1) ... Nf6 avoiding my last minute prep but falling into my much more extensive experience and knowledge of playing against this. Still, I'm curious.

# Answer
According to wikipedia:

> The **Queen's Knight Defense** (also known as the **Nimzowitsch Queen Pawn Defence** or **Bogoljubow–Mikenas Defense**) is a chess opening defined by the moves 1. d4 Nc6

From the same article, there are 3 named variations:

> * 2.d5 Nb8 (Montevideo Retreat)
> * 2.c4 e5 3.d5 Nd4 (Cannstatter Gambit)
> * 2.c4 e5 3.d5 Nce7 (Lithuanian Variation)
> 7 votes

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


# Question
Title: Draws by game number in championship matches
Some commentators have expressed surprise at the two relatively bland draws to open out the most recent (Carlsen-Karjakin) World Championships. I'm wondering whether there's been any study as to whether 'feeling-out' is a real phenomenon: are draws more likely to happen at the start of a championship match, in the middle, or towards the end? Has any objective research (whether specifically WCC or any high-level chess match play) been done on this?

# Answer
> 11 votes
I am not aware of a study of this kind, but why not make our own? Let us parse some WCC PGNs!

To me, this does not seem to have any definite regularities for when a draw is more likely (also note, that at the very high number of rounds, only a few games are available - there have been only a few very long WCC matches).

**EDIT**

Recent events only. Looks like more draws overall and slight tendency for more draws towards the end of a match.

---
Tags: draw, statistics, world-championship
---


# Question
Title: Where can I watch Carlsen - Karjakin with video + commentaries?
Does anyone have tips on where to watch the (now ongoing) World Championship match between Carlsen and Karjakin? I'm looking for live commentaries and a video feed if that's available. Thanks!

# Answer
> 9 votes
There's live commentary from two GMs on Chess24's youtube channel: https://www.youtube.com/user/chess24media

They have video, but only of the commentators (not the players), together with an analysis board

# Answer
> 5 votes
You can get live moves and commentary from various websites such as chess24 or Spiegel.de or...

If you want the video of the players you have to register and pay at the worldchess website.

Also, in Norway (and perhaps Russia) the match is broadcast on TV

# Answer
> 4 votes
There are several places you can watch live commentaries, and only one place you can watch the video feed of the players. Some of these are:

Some background information for the coverage of this year's world championship: Agon, the official partner of FIDE for the world chess championship cycle, owns the international rights to the official video feed(s) of the players through World Chess. Nobody else is permitted to broadcast it internationally.

(The feed is produced by NRK, the Norwegian public broadcaster, who retains the right to broadcast it on their national TV channels, and the Norwegian web TV channel VGTV has also purchased the rights to broadcast it from NRK. If you live in Norway (or can pretend you do), you can watch it for free, with Norwegian commentary.)

Agon *also* tried to retain the sole rights to relay the actual moves made in the games. They sued Chess24 because they planned to relay the moves with commentary anyway, and Agon lost the case. They are currently contemplating whether to appeal.

---
Tags: world-championship
---


title: Chess tactics training

text:
# Question
Title: Chess tactics training
I am looking for a tactic training software for Windows/Linux/Symbian. I think that I know all tactics by now, and I want to train myself in using them. I do not want tactical software that separate their lessons, such as Chessimo. I want them to have an Elo system of sorts that gives harder puzzles for an higher Elo, and easier puzzles for lower Elo.

The only examples that I can think of are Tactic Trainer for Android and the chess.com Tactics. I am quite sure that there is a similar thing for Windows. Also please not online, I'm looking for software. Price is not a issue, at least 'til $50.

Thank you people in advance.

# Answer
I thought this is the best for Windows: http://www.amazon.com/CT-ART-Chess-Tactics-Training-Software/dp/1886846677
> 5 votes

# Answer
Chess Hero is a free program. It does not select based on strength of puzzle but random choice, but I think it is the best offline trainer.

Here is a list of pdf files which are separated by difficulty.

If you want to invest the time, you could order a pgn/fen file from easiest to hardest.
> 3 votes

# Answer
There are many tactics software that are very good.

Free: chesstempo.com lichess.org

Paid: chess.com tactics CT-ARt

These are very common software and websites to improve tactics. Personally I like to use lichess.org because of the other uses it has like the study feature.
> 0 votes

---
Tags: tactics, training
---