# Question
Title: How is this kind of performance rating calculated?
On this website, I came across three ways of calculating performance rating:

* **Performance rating (the proper method)**
* **Performance rating (FIDE)**
* **Performance rating (Linear approximation)**

I'm familiar with the last two methods, but I was wondering how the first kind of PR is calculated.

Does it use some iterative algorithm? If so, what is it?

I'd be glad for the details of the method involved.

# Answer
> 2 votes
The ELO rating is based on the assumption that the expected score of a player A against an opponent B is:

E\_A = 1/ (1 + 10^((R\_B - R\_A)/400))

where R\_B and R\_A are the ratings of B and A, respectively.

Now, what could be done is that based on the data you give a rating average is computed and the score (per game) that was obtained is computed, this is plugged in for E\_A and R\_B, respectively. Then, one solves for R\_A. \[Given that only the global score is entered, whatever is done should be based on the average.\]

In other words the hypothetical rating is computed that would yield an expected score matching the actual score obtained. This is how I would interpret the description on the site.

This does however not match what the site does or there are numerical errors.
Maybe they use a different formula for the expected score.

To get a definite answer you might need to contact the maintainer of the site.

# Answer
> 1 votes
Well, in many cases FIDE and the 'proper' performance are pretty close to each other or the same. But fide performance is an approximation to a strict mathematical performance. In this case the 'proper' refers to a strict mathematical definition of performance. You can typically see the big differences in some special cases. For instance try to input 1 in the score and 2000 in the rating field. Essentially you have an infinite high performance, since your score is 100% and the calculator also shows infinity. Now Fide has a cut off in cases like this and you will see the performance as 2800. To be honest in cases where somebody scores 100 %, it's in my opinion a bit meningless to calculate performance. There are also a few other areas where the two methods differ a lot , try to input 0 and 2000 and in a strict mathematical since your performance is negative infinity. There are various ways to calculate the mathematical performance, when it's different than 0 or 100%, iterative being one way, but I believe there are other ways to do it

---
Tags: rating
---


title: Alphazero Learning vs Playing mode

text:
# Question
Title: Alphazero Learning vs Playing mode
Is there any fundamental difference (in algorithms etc.) between Alphazero training by playing against itself and when playing a match against Stockfish? Or were the match games basically treated as training game with the only diferrnce that half of the moves were coming from outside?

Also, did they use the same hardware during training and match?

# Answer
AlphaZero trained itself by self-playing. It used the gradient descent algorithm for convergence (equation 1 in the paper). Please note the training phase had **nothing** to do with Stockfish.

Later, Google matched the "fully trained" AlphaZero against Stockfish. It's like you practice chess with yourself for four months, participated in a tournament then won all your games!

Hardwares were different in training and playing:

> Training proceeded for 700,000 steps (mini-batches of size 4,096) starting from randomly initialised parameters, using 5,000 first-generation TPUs (15) to generate self-play games and 64 second-generation TPUs to train the neural networks.

and

> ... in chess, shogi and Go respectively, playing 100 game matches at tournament time controls of one minute per move. AlphaZero and the previous AlphaGo Zero used a single machine with 4 TPUs...
> 1 votes

---
Tags: alphazero
---


title: Complexity of critical positions

text:
# Question
Title: Complexity of critical positions
I understand that chess is pretty complex regarding the game tree complexity (Shannon number) or number of possible positions. If we were trying to solve chess (whuch I know is impossible for practical reasons), however we might not be interested in all positions. For instance I remember reading that for the 7 men tablebase they excluded positions where one side had a bare king.

Is there an estimate for the complexity of chess if clearly won positions are excluded?

# Answer
The problem every time you have such enormous number of configurations, is that any "simple-minded" description of configurations to discard will remove an insignificant portion of the total.

In the case at hand, there are trillions upon trillions of positions with a bare king (for instance), but they represent a small fraction of a percent of all positions.

You still have to deal with the bulk of configurations that make chess hard, so the difficulty of the original problem is still there.
> 3 votes

# Answer
I'm guessing that by complexity, you mean an estimate for the number of legal positions that aren't 'clearly' lost by some measure (otherwise the answer is exponential, despite the addition of your constraint), as if to build a tablebase that can play through non-trivially lost/won positions (ignoring the technicalities of the missing tablebase problem that would arise...).

One estimate of the number of 'sensible' chess games; 3^(40\*2) ~ 10^40 seems reasonable; however, this answer doesn't work in this setting, because of the way your question is phrased.

I claim that our hypothetical 32-man, 'non-trivial' tablebase is composed mostly of positions arising from games that would have otherwise been drawn. I argue as follows: 60% of grandmaster games are draws; let's say (an arbitrary guess) that a third of this are agreed draws i.e. 20% of games at move 30. Another arbitrary assumption: let's say material is equal at these positions at move 30, 3 pawns and 3 pieces having been exchanged. Each side has to trade off 9 more pawns/pieces to get to bare kings. Assuming an exchange every 4 or 5 moves, again with 3 'sensible' moves in each position, the number of games concluding in this manner would be approximately 3^(30\*2) * 0.2 * 3(40\*2) = 0.2 * 3^160 ~ 10^80, which dwarfs the estimated number of 'sensible' chess games.

This highlights the significance of exponential growth: the percentage of agreed draws doesn't really matter (as long as it's not zero), and neither does 'clearly' won/lost positions in the setting of a '32-man' tablebase.

My main point is, a fairly reasonable estimate to your required answer would still be of the form n^m where n is the average number of 'sensible' moves in a position, and m is the expected number of half-moves to get down to bare kings.

Also, to be precise, the number of positions (double/triple/multiple-counting transpositions) is closer to m\*(n^m).

Now of course, if you include trivially drawn positions, things become really tricky, but we have to draw the line somewhere...
> 2 votes

# Answer
It's hard to see if a position is clearly won or not, especially when just counting material:

```
[FEN "3N2rk/4K1bb/4nn2/8/8/8/7q/qqqqqqqq w - - 0 1"]

1. Nf7#

```

or the various positions with pawn chains all over the board, which can't be broken by rooks or a bishop of the wrong color.

So I doubt exclusion of clearly won positions is going to make much of a difference in terms of complexity; it's even likely to make it *more* complex.
> 1 votes

---
Tags: tablebases
---


# Question
Title: Representing Moves found via BitBoards, applying them, and removing them
I understand how to find all valid moves for all pieces on the board. For example I know that a certain knight can hit all of the 1's in this board

```
01000000
00100000
N0000000
00100000
01000000
00000000
00000000
00000000

```

How do I store these as individual moves, how do I apply them to my BitBoards, how do I take back the move?

I've already written an engine before, but I did not use bitboards.

# Answer
My last chess engine used bitboards to store position information. It represented moves as a vector of simple move structures that looks something like this:

```
struct move_info {
    char move[2];        //origin and destination squares (0 - 63)
    bool side;           //side moving LIGHT=0 or DARK=1

    char piece;          //king=0, queens=2,rooks=4,bishops=6,pawns=8
    char captured_piece; //king=0, queens=2,rooks=4,bishops=6,pawns=8
    bool capture;        //is this move a capture

    bool canCastle_off[4];
    bool isCastle[4];

    bool passant_capture;   //is this move a capture using en passant
    char enPassant;         //if the pawn is pushed two places, set en passant square, along with the square the pawn is on for capture porpoises

    bool promotion;
    char promotion_piece;
};

```

Then to make the move it would take the move info in a node of the moves vector and update all bitboards. Essentially this means there is a 'position' represented by bitboards, and a list of moves that effect that position. Note that this engine was written when I was a much less experienced programmer.

I'm currently working on a new chess engine which will have a class named 'Position' which carries all needed information for a single position in bitboards. Then, I'll create a linked list of positions for the game tree. I think this will be more efficient then having a list of 'moves'.

Hope this helps a bit, if it does and you want more detail, shout out :)
> 5 votes

# Answer
This is a very deep subject, but here's a few basic thoughts that might get you going.

A bitboard consists of 64 bits. If you designate one corner of the board as the most-significant bit and the opposite corner as the least-significant bit, you can store a bitboard in a single 64-bit integer.

For example, suppose A1 is the LSB and H8 is the MSB. We will fill up the 64-bit integer moving left-to-right (A-to-H) and then down-to-up (1-to-8). Your sample turns into:

```
0000000000000000000000000100000000100000000000000010000001000000

```

and this 64-bit integer represents the possible "landing" locations of a knight located at A6. In C this could be stored like:

```
long long knight_a6 = 0x4020002040;

```

We can do this for *every* possible location of the knight, in the same order that we filled out the bitboard (left-to-right, down-to-up). In other words:

```
A1: 0000000000100000010000000000000000000000000000000000000000000000
A2: <bitboard for a knight at A2>
...
B1: <bitboard for a knight at B1>
...
H8: <bitboard for a knight at H8>

```

This will take up 64 entries * 64 bits each = 512 bytes of space. Now we can determine the possible landing locations of a knight at *any* location, just by looking at the corresponding entry in the table. In C it could look something like this:

```
long long knight[64] = { 0x0020400000000000,
                         <bitboard for a knight at A2>,
                         ... };
long long knight_a6 = knight[40]; /* A6 = index 40 */

```

These are all static bitboards: they're just there for your convenience when programming. But you'll probably also want some active bitboards that represent the state of the game. For example, you'll probably want a bitboard that represents where all the pieces are. At the start of the game ranks 1, 2, 7, and 8 are full, so the bitboard looks like this:

```
1111111111111111000000000000000000000000000000001111111111111111

```

Or in C:

```
long long game = 0xFFFF00000000FFFF;

```

So what can you *do* with bitboards? Well, for starters you can determine if a piece (say, a knight at A6) is attacking another piece. To do this you perform a logical AND between the game bitboard and the static bitboard for the attacking piece. Let's say the game looks like this:

```
00000000
00k00000
N0000000
00000000
00000000
00000000
00000000
000000K0

```

The white king is on G1, the white knight is on A6, and the black king is on C7. The game bitboard would look like this:

```
0000001000000000000000000000000000000000100000000010000000000000

```

Let's see if the white knight is putting the black king in check. First, we look up the white knight's "landing" bitboard as described earlier.

```
0000000000000000000000000100000000100000000000000010000001000000

```

Now we AND that bitboard together with our game bitboard.

```
    0000001000000000000000000000000000000000100000000010000000000000
AND 0000000000000000000000000100000000100000000000000010000001000000
    ----------------------------------------------------------------
    0000000000000000000000000000000000000000000000000010000000000000

```

The result is **not** all-zeroes, so the selected piece is attacking *something*. Here's it is in C:

```
long long game = 0x200000000802000;
long long attacker = knight[40]; /* A6 = index 40 */
if (game & attacker != 0)
{
  /* The knight at A6 is attacking something! */
}

```

The next step is to see what he's attacking. There are multiple ways to do this: you could see where the 1 appeared in the ANDed bitboard and find the corresponding square, or you could keep a bitboard for every different type of piece. Let's leave it at that for now though.

Next let's see how pieces can be moved. We'll remove the black king from the board for simplicity.

```
00000000
00000000
N0000000
00000000
00000000
00000000
00000000
000000K0

Bitboard: 0000001000000000000000000000000000000000100000000000000000000000

```

Looking at the knight's landing bitboard we can see there are four one's, so four possible moves. Let's take the first one - so we'll erase all the other zeroes in the bitboard for now.

```
0000000000000000000000000100000000000000000000000000000000000000

```

To move the knight, we erase him from the game bitboard, and then AND the game bitboard with the knight's move bitboard.

```
       0000001000000000000000000000000000000000100000000000000000000000
ERASE  0000000000000000000000000000000000000000100000000000000000000000
       ----------------------------------------------------------------
       0000001000000000000000000000000000000000000000000000000000000000
OR     0000000000000000000000000100000000000000000000000000000000000000
       ----------------------------------------------------------------
       0000001000000000000000000100000000000000000000000000000000000000

```

The new gameboard looks like this:

```
00000000
00000000
00000000
00000000
0N000000
00000000
00000000
000000K0

```

Now, there are a **lot** of things brushed over in this answer:

1. How do you track what kind of piece is at each location?
2. How do you distinguish between white and black?
3. How do you distinguish between captures and normal moves?
4. How do you determine which squares are "shielded" behind another piece?
5. How do you handle pawns, which move in a different way than they capture?
6. How do you handle the initial pawn move and capture en passant?

Not all bitboards are the same, either. What if we filled out the bitboard in a fancier order than just going left-to-right, bottom-to-top? Maybe there's some other way to assign squares to bits that makes certain checks or moves faster. The way we've written it is just the simplest to picture.

Again, this is a very deep subject, but hopefully this at least explained some of the basics about how bitboards are used.
> 8 votes

# Answer
Smallchess berated me but didn't understand my post. I can't put a comment yet, so I will detail my example with more step by step explanations in this new post :

bmna6 contains 4 bits at 1, for the squares b4, c5, c7, b8 bg1 contains one bit at 1, for square g1. If you put b := bmna6 OR bg1, you obtain a bitmap b with 5 bits, which is different from bmna6. So g1 is not attacked by the Na6.

If the king is on c7 instead, then bmna6 == (bmna6 OR bc7), so the king is in check.

You can do a AND and compare to 0, but afaIk the processing time to compare an unsigned int to zero is the same (on x64/x86 at least) as the processing time to compare to a positive unsigned int, and the OR and AND binary operators also have similar processing times. So the two methods are the same for processing time. One advantage of doing a OR instead of a AND is that the resulting bitboard can be used again, for calculating paths to checks (ie to determine how a rook can give check in 2 moves, or a knight in 3 moves.. this can be very useful, for instance if coding a chess problem solver, or a SPG solver, etc..). While we already know the result of the AND in case of check, it's the bitboard giving the square where the check happens, which is bc7 in the second exemple, so no new information generated : we already know where the king is.

On the other hand, let's say that instead of wanting to test if the Na6 gives check, you want to test if it's able to capture something. Then you will use a AND between bmna6 and the bitboard of all the black pieces. It will give us a very useful bitboard : the list of squares where the Na6 can capture something. That is what Glorfindel's explanations actually show (but it's best suited for testing non specific captures, not checks, unless you play a fancy feeric variant where black has several kings or where black s pieces are undetermined, one of them possibly being the king).

Also, just to clarify, to check if a king in g1 is attacked by a knight on a6, with bmna6 being the predefined bitboard mask of the possible landing squares of a N on a6 and with bsqg1 being the bit map with a 1 only for square g1, you do a OR of bmna6 and bsg1, and if it's equal to bmna6(which isn't the case) then the king is in check by that knight. Obv it's more complex for long range pieces.

To generate and store moves, you need to define a chessboard class and a move class, with the infos that interest you for whatever your purpose is (usually the chessboard stores at least whose turn it is to play. You can for instance have him store the list of legal moves, have a method chessboard.play(move) which will both update the board, update the player whose turn it is, update the list of legal moves.. possibly keep an history of previous moves as well.. UP to you, really depends on what you want to do. You won't code exactly the same way wether you want to code an engine, a mere replayer, or a problem solver who also solves serial-movers..
> 1 votes

---
Tags: programming, bitboard
---


# Question
Title: Question about Arena and strength of chess engines
I had downloaded Delfi because I read that it function in the range "1000..2300 ELO" so that means I will be able to play with it at a level that I am (beginner/intermediate). But I'm confused about how to get it to the particular strength. I am using Arena and the only thing I notice is that in the "details" section of the engine I can change the "strength" of the engine from 1-100%. But how does that correspond to a particular ELO rating?

This is not just an issue with Delfi but with other engines too I assume. If you want to bring them down to, say, 1200-1300, or 1600-1700? Thanks.

# Answer
You cannot compare human (FIDE) Elo ratings with settings of any engine. Besides of the problems of comparing human Elo and any computer ratings (see below), I see another problem:

Making a chess engine as strong as possible is a well defined task, but having it play at a certain level is not so clear. You could cripple it by limiting the depth, or force it to make a blunder every second game or... Lots of options that can affect the playing strength, in the same way that you have all kinds of different human players. For instance Alice at rating 1800 could be a very stable player, drawing most of the games because of her rather conservative playing style. On the other hand you can have Bob at the same rating of 1800 playing attacking chess winning brilliant games, but also blundering many games.

Trying to map these options to a single number (1-100%) is impossible. Personally if I was to play against engines, I'd rather have settings to let me chose the playing style of the engine (e.g. attacking, defensive, passive, "opening guru", endgame nerd,...) than having it play at a certain strength (whatever that means).

In order to find a setting of your engine which you like, why not play a few games at some setting and depending on the outcome change it? But if you want to get better don't set it too low.

Personally I find playing against humans on or off-line much more enjoyable. And if you do this you will not have a problem finding a player that is of comparable strength.

---

## Why computer Elo cannot be compared with human Elo?

This should really go into some kind of FAQ as it pops up very regularly here.

In principle you can give an ELO rating to a chess engine. However ELO (or glicko or any other rating) is made in such a way that it will only give you the relative strength of people or computers in the pool of people/computers that use this same rating system.

So if you have a FIDE Elo as many human chess players do, this will tell you how good you are among all these FIDE Elo human players, because the FIDE Elo is calculated from the outcome of many games between FIDE players only.

There are also people running engines against each other (CCRL, CEGT,...) creating Elo lists for computer engines. These Elo lists will tell you how good computer engines are relative to each other, because the computer ELo are calculated from the outcome of many games between computer engines only. They do not tell you how good computers are relative to FIDE Elo players because they are separate pools.
> 4 votes

# Answer
You can't give a precise ELO rating to a chess engine in Arena.

The option `1-100%` is a mapping function. Let me give you an example.

Stockfish defines 20 playing strength.

* If you give 50% to Arena, you will play strength 10
* If you give 100% to Arena, you will play strength 20
* If you give 0% to Arena, you will play strength 0

Arena doesn't know the ELO rating for Delfi. It simply maps you to something reasonable.

You will need to read the documentation for Delfi and work out what percentage to give.
> 1 votes

# Answer
Looking at engines playing on TCEC.chessdom.com/live.php I would say that we have to add about 300 to 500 Elo points to Engine's Elo rating to view engine's Elo as "human" rating, for comparison. Example: Engine's Elo + 500 = Engine's Human Elo (to compare with humans). Monsters.
> 1 votes

---
Tags: engines
---


title: Losers Chess variant engine

text:
# Question
Title: Losers Chess variant engine
Is there a strong Losers chess variant engine?

I had a look at stockfish, but it doesn't support Losers chess, seemingly.

(to be used on a Linux platform)

# Answer
> 8 votes
> https://github.com/ddugovic/Stockfish

has what you want. Not an offical version, but should be stable for production.

# Answer
> 4 votes
Sjeng supports losers chess too since release 9.

---
Tags: engines, chess-variants, linux, losing-chess
---


# Question
Title: What is a good defensive repertoire against a d4 opening?
I've been looking for a good response to a d4 opening. All the repertoires I've studied are against e4? Any suggestions, thanks

# Answer
The Queen's Gambit Declined. Get "Playing 1.d4 d5 - A Classical Repertoire by Nikolaos Ntirlis"
> 1 votes

---
Tags: chess-variants
---


title: Looking for pgn openings file

text:
# Question
Title: Looking for pgn openings file
I am looking for a file containing several (\>50 let's say) popular openings in PGN format.

The aim is to use it with cutechess to do engine testing on different opening scenarios.

# Answer
> 1 votes
I would recommend that you take a look at the **Silver Openings Suite** by Albert Silver. It's a hand-crafted set of 50 opening positions designed for balanced play, based on some non-trivial statistical analysis using ChessBase.

Cheers!

# Answer
> 0 votes
You can download a pgn of ECO openings from ChessVisor. It contains 2014 variations of different openings.

The answers to the question Is it possible to download a big txt file containing many openings may also be helpful.

# Answer
> 0 votes
There is a suite of 2400 test positions in PGN format available from the gaviota chess engine website. (look for "gaviota-starters.pgn.zip")

See also: The Test Positions page on the Chess Programming Wiki, and this collection of PGN and EPD openings posted to the CCC forum.

---
Tags: opening, engines
---


title: The illegal moves in Carlsen-Inarkiev

text:
# Question
Title: The illegal moves in Carlsen-Inarkiev
In the first round of the World Blitz Championship in Riyadh. Magnus Carlsen played Ernesto Inarkiev and the game ended strangely.

```
[FEN ""]
[StartPly "53"]
[Event "World Blitz Championship"]
[Site "Riyadh KSA"]
[Date "2017-12-29"]
[Round "1"]
[White "Magnus Carlsen"]
[Black "Ernesto Inarkiev"]
[Result "1-0"]

1. e4 c5 2. a3 Nc6 3. b4 cxb4 4. axb4 Nxb4 5. d4 d5 6. c3 Nc6 7. exd5 Qxd5 8. Na3 Bf5 9. Nb5 Rc8 10. Nxa7 Nxa7 11. Rxa7 e5 12. Nf3 exd4 13. Nxd4 Bd7 14. Nb5 Qxd1+ 15. Kxd1 Bc6 16. Bd3 Bc5 17. Re1+ Ne7 18. Ba3 Bxa3 19. Rxa3 Rd8 20. Nd4 Kd7 21. Ra7 Rhe8 22. Kc2 Kc7 23. Rb1 Rb8 24. f3 Nd5 25. Nxc6 Kxc6 26. Bb5+ Kb6 27. Rxb7+ Ne3+?? {An illegal move by Inarkiev; he leaves his King in check} 28. Kd3?! {Carlsen plays on; Inarkiev now calls an arbiter}

```

As can be seen above, after Carlsen played 27 Rxb7+, Inarkiev made the illegal move 27...Ne3+, leaving his own king in check. At this point Carlsen could have claimed a win because of an illegal move, however, he played 28 Kd3. At this point *Inarkiev* called an arbiter and claimed a win because Carlsen made an illegal move.

As far as I read the arbiter first ruled in favor of Inarkiev. Later it was offered to continue the game from the position ~~before the illegal move~~ on the board, i.e. after 28. Kd3 (which was lost for black), which Inarkiev declined, after which Carlsen was declared the winner.

What rules (if any) cover a situation like this?

Also I've seen claims that Inarkiev has pulled this "trick" before. If true, when and where was that?

# Answer
> What rules (if any) cover a situation like this?

3.10.2 of the FIDE Laws of Chess defines when a move is illegal -

> 3.10.2 A move is illegal when it fails to meet the relevant requirements of Articles 3.1 – 3.9

Articles 3.1 - 3.9 basically describe the moves of the pieces. Inarkiev's move was illegal because it breached 3.9.2 -

> 3.9.2 No piece can be moved that will either expose the king of the same colour to check or leave that king in check.

3.10.3 defines when a position is illegal -

> 3.10.3 A position is illegal when it cannot have been reached by any series of legal moves.

After Inarkiev made his illegal move the position was illegal because his king was in check and it was not his turn. After Carlsen made his (perfectly legal) move the position was legal again because Inarkiev was in check and it was Inarkiev's turn. Inarkiev was wrong to stop the clocks and claim an illegal move. The first arbiter made a mistake. Presumably Inarkiev said that Carlsen had made an illegal move and the arbiter took his word for it without checking - very unprofessional.

Article 7.5.1 defines when an illegal move has been completed (different from "made") and what should happen next in standard play games -

> 7.5.1 An illegal move is completed once the player has pressed his clock. If during a game it is found that an illegal move has been completed, the position immediately before the irregularity shall be reinstated. If the position immediately before the irregularity cannot be determined, the game shall continue from the last identifiable position prior to the irregularity. Articles 4.3 and 4.7 apply to the move replacing the illegal move. The game shall then continue from this reinstated position.

The same definition for the completion of an illegal move applies to rapid and blitz however the way the illegal move is handled is different unless certain strict conditions apply.

In blitz illegal moves are handled like this (i.e. "Competition Rules apply") only if -

> B.3.1 The Competition Rules shall apply if:
> B.3.1.1 one arbiter supervises one game and
> B.3.1.2 each game is recorded by the arbiter or his assistant and, if possible, by electronic means.

With 69 games they would need 69 or more arbiters. I don't believe they had that so according to B.4 Rapid rules apply -

> B.4 Otherwise, play shall be governed by the Rapid chess Laws as in Article A.2 and A.4.

The relevant article is A.4.2 -

> A.4.2 If the arbiter observes an illegal move has been completed, he shall declare the game lost by the player, provided the opponent has not made his next move. If the arbiter does not intervene, the opponent is entitled to claim a win, provided the opponent has not made his next move. However, the game is drawn if the position is such that the opponent cannot checkmate the player’s king by any possible series of legal moves. If the opponent does not claim and the arbiter does not intervene, the illegal move shall stand and the game shall continue. Once the opponent has made his next move, an illegal move cannot be corrected unless this is agreed by the players without intervention of the arbiter.

So, the sequence of events was -

1. Inarkiev makes an illegal move
2. Neither the arbiter nor Carlsen spots it and Carlsen makes a legal move.
3. Inarkiev incorrectly tries to claim the game.
4. The arbiter who deals with it incorrectly believes Inarkiev without checking and awards the game to Inarkiev.
5. The Chief Arbiter correctly overturns the decision and rules that Inarkiev must make a move in the position in which he made his incorrect claim.

I don't know if the Chief Arbiter did this but in his position I would also award Carlsen an extra minute on the clock in accordance with article B.2.

> B.2 The penalties mentioned in Articles 7 and 9 of the Competition Rules shall be one minute instead of two minutes.

EDIT: Checking on the FIDE web site I see that they have published the regulations for the World Rapid and Blitz Championships which confirm that Rapid rules apply in the case of illegal moves -

> 6.14 Tournaments will be played according to the rules of the inadequate supervision of the Rapid play Laws of Chess (FIDE Handbook, E.I.01B Appendices, art. 1 to 4). In addition, if a player displaces the pieces during the game: for the first time he receives a warning but for the second time he will be forfeited.

EDIT2: Perhaps I should just also point out for anyone reading this after 1st Jan 2018 that FIDE are unhappy with the "one illegal move loses in rapid and blitz" rule and this is changing from 1st Jan 2018. The new rules have a new article A.4.2 -

> A.4.2
>
> If the arbiter observes an action taken under Article 7.5.1, 7.5.2, 7.5.3 or 7.5.4, he shall act according to Article 7.5.5, provided the opponent has not made his next move. If the arbiter does not intervene, the opponent is entitled to claim, provided the opponent has not made his next move. If the opponent does not claim and the arbiter does not intervene, the illegal move shall stand and the game shall continue. Once the opponent has made his next move, an illegal move cannot be corrected unless this is agreed by the players without intervention of the arbiter.

This basically says that in the case of an illegal move in "unsupervised" rapid and blitz the rules regarding when an illegal move is spotted and handled remain the same (if neither the players nor the arbiter spot it and stop the game then the game continues) but the penalties are as in standard play with a time penalty and restored position in case of a first offence and losing the game in case of a second offense.
> 29 votes

---
Tags: rules, blitz, carlsen, illegal-move
---


# Question
Title: What should the opponent do when the player knocks over pieces as he presses the clock?
Article 7.4.1 of FIDE Laws of Chess states -

> If a player displaces one or more pieces, he shall re-establish the correct position in his own time.

What normally happens when this happens as a player makes his move and presses his clock is that the opponent presses the clock without making a move so that the player puts the knocked over pieces back in place before himself pressing the clock.

But 7.8.1. now says -

> If the player presses the clock without making a move, it shall be considered as an illegal move.

What should the opponent do when the player knocks over pieces as he presses the clock? Particularly at blitz or rapid if he doesn't want to lose because of an illegal move.

# Answer
> 4 votes
This question seems to have generated a lot of heat but not so much illumination. As IA Petr Harasimovic suggests in one of his comments I think I know the answer although it is nowhere near as simple as he suggests.

Let me start by quoting from the preface to the FIDE Laws of Chess -

> The Laws of Chess cannot cover all possible situations that may arise during a game, nor can they regulate all administrative questions. Where cases are not precisely regulated by an Article of the Laws, it should be possible to reach a correct decision by studying analogous situations which are regulated in the Laws. The Laws assume that arbiters have the necessary competence, sound judgement and absolute objectivity. Too detailed a rule might deprive the arbiter of his freedom of judgement and thus prevent him from finding a solution to a problem dictated by fairness, logic and special factors. FIDE appeals to all chess players and federations to accept this view.

This seems to me to be one of those cases and I originally asked the question to find out what others thought.

Let's start with the question of the "illegal move".

Suppose player A while making his move and pressing the clock knocks over some pieces. His opponent, player B, immediately presses the clock back so that A can restore the position on his own time. In view of 7.8.1 is this an illegal move?

After some thought the answer is obviously "No". 7.8.1 applies when it is B's turn and the only correct possibilities for B are to resign, claim a draw or make a move. In this situation the position on the board is not the position in the game and so it would be very wrong for B to make a move and press the clock. If he cannot make a move then it cannot be wrong for him to press the clock although it may be undesirable.

Player B has two legitimate courses of action. One is to press the pause button and call the arbiter and the other is to press his clock to allow A to correct the position on his time.

Which one is the better option depends on the situation. There are problems with both courses of action.

If B just presses the clock then when A has put the pieces back he will also press the clock and both players will have had an additional increment to which neither was entitled. In standard play with say, 90+30 (90 minutes for the moves with a 30 second increment), this is much more serious than in say, 3+2.

If B presses the pause button and calls the arbiter then he will give him an additional 2 minutes (1 minute in blitz). Whether this is good or bad depends on the situation.

In a 3+2 game the problem with this approach is that it will take time for the arbiter to come, it will take more time to explain the situation to the arbiter and yet more time while the arbiter adjusts the clocks. This additional thinking time (for that is what it is) is very large compared to the increment and probably to the total thinking time left for the players. This will very likely advantage one player much more than the other. This advantage could decide the game but in any case is likely to be much greater than the additional 2 second increment that each player gains if B just presses the clock.

As an arbiter what would I like you to do if this happens in your game when I am the arbiter?

In a standard game with something like 90+30 please press the pause button and call me. In a normal situation I will adjust the clocks and you can continue once the position is restored.

In an extreme situation, say you have 30 minutes left and your opponent is playing on increment I will tell you to play on without adjusting your clock since this extra thinking time would immediately advantage your opponent. Instead I will come back in 20 minutes time and if the game is still in progress I will give you your additional 2 minutes then when you are about to need it.

In a rapid competition I would give the same advice / request.

In a 3+2 blitz or similar I would suggest you just press the clock. In such a situation I think this gives the "best" results. There is the least disturbance to the players, the additional 2 second increment is tiny compared to the additional thinking time available if the arbiter is called and so is much less likely to change the course of the game in an unfair way.

# Answer
> 5 votes
Indeed this can be a tricky matter to handle, specially in extreme time trouble. Pressing the clock quickly again so your opponent adjusts their fallen pieces is fine in general as in most cases the player (or possibly both) will quickly re-adjust everything and nobody will mind, but every now and then you will face opponents trying to call you out on any potentially broken rule in order to claim the game. So to be on the safe side, in such circumstances, you should **not** press your clock but instead *pause* the clock and call the arbiter to explain the situation (this is almost always what you should do when your opponent is at fault regarding any rule). The arbiter then relaunches the opponent's clock telling them to re-adjust under their own time (and possibly a warning). This is essentially article 7.3: (*this is the exact article, except I've substituted "he" and "his" by "they" and "their" respectively, as to make the statement agnostic to gender, it's shameful how the FIDE laws are written with such disregard!*)

> 7.3 If a player displaces one or more pieces, they shall re-establish the correct position on their own time. If necessary, either the player or their opponent shall stop the clocks and ask for the arbiter’s assistance. The arbiter may penalise the player who displaced the pieces.

Though I admit this scenario happens very rarely, at least in my experience, as most (courteous) players understand immediately that they have to set their pieces properly once you've quickly pressed your clock again, so there's no conflict. But if you see it's just a messy situation and your opponent couldn't care less about playing properly, then pause and call the arbiter.

---
Tags: fide
---


title: Starting elo rating at chess.com

text:
# Question
Title: Starting elo rating at chess.com
I am confused about the starting elo rating of new members at chess.com. Most of them start at 1200 but some of them have 800, 1000, 1400, 1600 or even 1800. How is it decided what is the initial value of the elo rating of a new member?

# Answer
You can select your starting rating on the register page by changing the skill level options.

For example, if you select "expert" your starting ratings will be 1800 (at least when I tried it).

So, to answer your question, "How is it decided what is the initial value of the elo rating of a new member?", it is decided by what option the user chooses.
> 9 votes

# Answer
The ratings on chess.com are determined using the glicko rating formula, which is different from the elo rating formula. The initial start point in the glicko formula is 1200 so new ratings start at 1200.
> 1 votes

---
Tags: rating, elo, chess.com
---


# Question
Title: What's the best plan for white in this position?
I have come this far and am not sure what to do further in the game. I have been doing some maneuvering here but it seemed quite disoriented. What is a good plan that will help white win?

```
[FEN "2r2kr1/8/2b1p1q1/p2p1pP1/3P4/2N3R1/3QP3/2K2BR1 w - - 0 1"]

```

# Answer
White should be winning in this position quite comfortably with the extra piece.

One relatively simple plan is to play `1.Rh3` in order to move the rook to h6 to push the passed g pawn. If black moves the queen, then `g6` is very strong.

For example:

```
1.Rh3 Bd7 (to defend the loose rook on c8)
2.e3 (Rh6 is not possible immediately because of Qxh6! winning both rooks for the queen) Qf7
3.Ba6 Rc7
4.Qb2 (Δ Qb8+) Bc8
5.Bxc8 Rxc8
6.Qa3+ (and next move white will take the Pa5)

```

Another plan is to play `e3` in order to free the bishop (so that white can make use of the extra piece), but this is less ambitious than playing `Rh3` immediately.
> 5 votes

# Answer
Even though white is a piece up, one major factor that sticks out on the position is the vulnerability or potential exposure of the white king, standing right on the open c file and right on the line of the black rook on c8. Unlike the black king which at the moment is not facing any immediate danger or threats so it's safer than white's king, plus the three black pawns on the center make it difficult for the white pieces to penetrate at the moment.

So, taking that `KING SAFETY` factor into account makes it "really easy" to follow that the best plan for white from that position is to first bring his king to safety as soon as possible and, only then make the extra piece count.

If you don't need more elaboration on that, skip this paragraph. Queen side does not look very safe either, where the b file is also open and when black's rooks could "easily" come into play if black plays whichever is more convenient of Ke7 or Kf7 or Kg7. So it follows that placing the white king on the center files behind his e pawn is a better bet than the queen side.

Now that we know what is going on in the position, it becomes obvious white's first move should be:

1.Kd1

Followed by 2.Ke1 (if opponent permits).

See how after 1.Kd1 the white knight could no longer be subjected to a pin along the c file; and it would be free to jump if convenient or necessary (squares a4, b5 become immediately protected by the knight and would stop any attempt of the black bishop into white's camp).

Secondly, after white plays Ke1 the king is on a black square which makes it very very hard for the black pieces to reach or attack.

After \[white\] king safety no longer being a major/sensitive factor in the position, white will start looking for moves to make his extra piece count which, at the moment it's that white bishop sitting on his original square f1 and blocked by his own pawn on e2 which, at the moment plays a more important role of protecting white's king, so it may take a little while to bring that extra piece into play.

After white has finished the king safety part of his plan, I see 3 possible ways for white to press black king by penetrating into black's camp, depending on circumstances and what black permits:

Penetrating with the white queen via Qf4-Qd6 or via Qb2-Qa3-Qd6 hitting c6, e6 or penetrating with the rook Rg1-Rh1-Rh6 (if black does not play Rh8 to stop Rh1) hitting e6 and f6. That incursion turns the king safety factor against black king and would create difficult to stop threats against black position. If the black e6 pawn falls the black position crumbles if white hits the f5 pawn with Rg1-Rf1 and/or Rg3-Rf3. If black manages to hold e6 and f5 then when it is tied down defending/holding, white could start thinking getting his bishop into play via Bf1-Bh3 and target a possible return of the extra material by pointing both his rooks to f5 and then sacrificing Bxf5 with devastating effects for black's king.

If not forced to move them away, white will keep his knight on c3, his pawn on e2, and his rook on the third rank, as long as possible until black's position starts going down hill.
> 2 votes

# Answer
White is clearly winning with a piece up and strong passed g5 Pawn... You should aim for a winning endgame and also attack Black's King if Black avoids trades. Combine these two plans and act accordingly. I'd say Qf4 with idea Qe5 / Qd6. Black's only threat is Pawn to a4, a3, etc. but once the Queen is on d6 you are more than ok, with maybe Rh1 - h6 idea to follow soon, crushing Black position once and for all. (g3 Rook is defending c3 Knight, so I'll leave it where it is).
> 0 votes

---
Tags: strategy, analysis
---


title: Searching Deep Fritz 14 Database

text:
# Question
Title: Searching Deep Fritz 14 Database
So I just got Deep Fritz 14. This is my first "real chess program." I know Deep Fritz probably wasn't the best choice for a first program, but it's what I got. I've been trying to learn how to use it by just poking around and testing things out. By doing this, I found the game database. I thought it might be a great way to study games of famous (or not so famous) players to improve my own skills. However, there seems to be no way to search through the database for a particular player or opening. Can someone tell me how to do this?

Also, probably best for another question, but can someone link some tutorials to Deep Fritz 14?

# Answer
You can see help menu for user manual. Or you can see this link for a more detailed manual, written for Fritz 13, but there is no difference at all. Engines are changing but GUIs are almost the same.
> 1 votes

# Answer
https://www.youtube.com/watch?v=m3CL8WWd83Q&list=PLRziwL2\_NOku7UokUz3\_obokoo\_qgQK6U&index=12 explains how to filter games from the database screen. http://steamcommunity.com/app/276750/discussions/0/522730699421109355/ is people with the same question. Chessbase claims that there is no manual.

I only have chessbase 10 so the interface is different. There is a menu item under Edit, Find Position. THe catch-all answer for every software problem, reinstall and see if that works.

Get similar people together and demand that Chessbase writes a patch to fix their product. http://en.chessbase.com/pages/download for just the reader without fritz.
> 0 votes

# Answer
I have been often in your situation. I hate to read reams of pages explanations before getting to the point. I don't have the time nor the patience. I am often frustrated by my attempts in figuring out by exploring on my own, the interface, IMHO, is not friendly. However, for the case in point I may have been lucky and I hope this will help you.

I wanted to search for a certain board position in my database. I used the command filter games as follows:

1. Open one game with that position or otherwise create that position on the board,
2. Assuming you opened that position in a game, you are now in the Home menu; click Copy Position,
3. Now go back to the database where you are doing the search and click Filter Games,
4. Click Position in that window and the click Copy board, now you have that position in the Filter Games window
5. Click OK A list of all the games in the given database having that position will appear.

I hope this is useful. Happy 2018 everyone!
> 0 votes

---
Tags: fritz
---


title: FIDE-approved opening names

text:
# Question
Title: FIDE-approved opening names
The Wikipedia article on the Latvian Gambit says that the name *Latvian Gambit* was made official by the FIDE Congress of 1937. I didn't realise that FIDE was in the business of approving names of openings, so my question is:

> What other opening names have been made official by FIDE?

# Answer
FIDE has long given up on trying to standardize opening names. In 1935 they published a booklet (in French) which attempted to do this, but it had little to no impact. The Latvian Gambit ("Gambit leton" in French) is an ancient opening that was previously known as the Greco Counter Gambit. For some reason the new name for the Latvian Gambit took hold; most of the other proposed new names did not.

Today, as always, opening names are simply a matter of tradition and convention and may vary between countries and writers. For example, in Eastern Europe the Benko Gambit is usually called the Volga Gambit.

See http://www.chesshistory.com/winter/extra/fidehistory.html#Section\_7:\_Attempts\_by\_FIDE\_to\_openings\_ for more info.
> 6 votes

# Answer
You're asking for a list that isn't really available and might never be complete even if it is. For what it's worth, I'm not aware of any other openings that have had their titles FIDE approved.

In general, FIDE does not deal with the names of openings - to give one simple example there is still ambiguity about whether to call `1.e4 e5 2.Nf3 Nc6 3.Bb5` the `Spanish Opening` or the `Ruy Lopez`. These things are normally more a matter of convention and influenced almost entirely by the use of names in the written works about them. As a result, I believe that the approval of the name 'Latvian Gambit' was more a special recognition than a matter of actually attempting to codify opening names on any significant scale.
> 0 votes

---
Tags: opening, fide
---


# Question
Title: What are the best repertoire books for White with the English Opening?
What are the best repertoire books, from White's point of view, with the English Opening?

# Answer
In the Grandmaster Repertoire series, there are three books covering the English opening from white's perspective, written by GM Marin in 2009 and 2010: Volume 1, Volume 2 and Volume 3.

More recently, in 2016, IM Cummings wrote a repertoire book based on e3 systems, rather than fianchettoing the bishop with g3.

**Update:** In 2018, a new repertoire series from white's point of view is published: The Modern English, written by GM Georgiev and IM Semkov. In Volume 1, the authors discuss 1.c4 e5.
> 3 votes

# Answer
For many years the standard work on the English was the four volume series written by John L Watson - "English I: ...P-K4", "English II: ...N-KB3", "English III: ...P-QB4", "English I: ...Other Lines". Written in descriptive notation and republished a few years ago by Harding Simpole.
> 2 votes

---
Tags: opening, english-opening, repertoire
---


# Question
Title: How to build a simplified Sicilian defence reperoire
I have been playing chess practically all of my life but during phases, I would play a lot for a couple of months and then spend a whole year without playing.

Right now I am in one of those phases but I am determined to stick with it and really improve so I have been taking on tactics and end game studying but my Achilles heel has always been the opening theory.

I really like to play the Sicilian defense, in particular the Dragon and have a couple of books on it but there are so many different replies and variations after 1. ..., c5 that going this route seems like an impossible undertaking, I've even read somewhere about the "Sicilian Jungle", and I've had a few bad experiences when trying to force a Dragon-like structure without considering white's responses.

So my question is; considering white's most common responses to the first couple of moves, which variations are the ones the would be more beneficial to begin this training and that can help limit white's options?

Thank you.

# Answer
> 1 votes
There actually is one (semi-respectable) sicilian, that really cuts down on white's options: The Nimzo-Sicilian. The Nimzo-Sicilian is characterised by the moves 1.e4 c5 2.Nf3 Nf6!? Now 3.d4 hangs the e4 pawn … you will encounter that a lot in blitz. After 3.Nc3 there is 3…d5 leaving the usual sicilian structures behind. After 3.e5 you play 3…Nd5, where play can transpose to the Alapin. The very sharp mainline is a pawnsac 1.e4 c5 2.Nf3 Nf6 3.e5 Nd5 4.Nc3 e6 5.Nd5 ed 6.d4 Nc6 7.dc Bc5 8.Qd5 Qb6 … After 1.e4 c5 2.Nc3 you have to play 2…e6 first. Here you can chose to go for a number of variations, maybe the Kan is actually a good choice. But you have to realise that 2.Nc3 is already a concession by white: Even the accelerated dragon is now better than after 2.Nf3.

Now this seems like a pile of variations already, so what did you actually gain? \- No Bb5-variations (and you could still transpose to the Sveshnikov!). \- No Maroczy-bind: Which is a nice way to play against the Kan via 1.e4 c5 2.Nf3 e6 3.c4 ... \- The GrandPrix-Attack (1.e4 c5 2.Nc3 …3.f4) is not as strong as against 2.d6 (because you are ready to play d5 in one move). \- You can play the same move against the Alapin (2.c3 Nf6). \- The Nimzo-Sicilian is very rare, so usually your opponents won't have much of a clue about it.

So why doesn't anybody play it? In the pawnsac-mainline the current theoretical assessment is a worse endgame for black, that probably deters GMs. But to get there white has to survive several tactical shots with a king in the middle of the board and playing this mainline isn't even forced for black!

I have played it for years and it usually leads to an open fight, where both sides are quickly out of book (my opponent, because the variation is so rare, and I, because I'm to lazy to prepare). To me the Nimzo Sicilian is also an transposition paradise: You can cut out a lot of options for your opponent and still often reach the Kan or Sveshnikov. It is also a pain for Bb5 or Maroczy-players, because they suddenly realise that they didn't actually solve their "sicilian problem".

# Answer
> 2 votes
Alas, the Sicilian is not an opening for the faint of heart. It strives to exploit the complexity and dynamic nature of the position, so it is quite hard to find shallow solutions. At risk of avoiding your question, I would say that it is best, if you want to avoid theory, to pick up a line more alike the open game. Still, I did my best to show a nice plan.

First, lets handle the move 2 anti-Sicilians (**2. c3**). In general, they are in fact designed to reduce complexity, so a small bit of knowledge can go a long way. Against **2. Nc3**, you should continue with the move that you use against **2. Nf3**. The closed Sicilian is a relatively complex opening still, but I find that up until 2000 USCF (or 1800 FIDE), Closed Sicilian players do not have a grasp of theory, so you can likely be safe to skim on that section of your study.

Against the Alapin Sicilian, the general recommendation is **2... Nf6**. However, I think the line **2... e6** is underrated, so you may be able to use it to avoid theory. After all, particulars have to be studied individually. It is recommendable to find a personal line that is intuitive, but your general idea is to play **d5**.

For a generic solution against the open Sicilian **2. Nf3**, you will want to avoid playing the Najdorf at least as every chess player and there grandmother has a way to play against it. Your try of using a Dragon-esque system was likely difficult as it is a highly theoretical variation and even then, semi-dubious. In addition, it seems troubling to play any line starting with **2... Nc6** due to the Rossolimo and the very sharp nature of the lines here.

My recommendation has to be the Kan variation (**2... e6 3. d4 cxd4 4. Nxd4 a6**). While it can be a bit difficult to learn, it is one of the less sharp lines and it is seldom studied by lower rated players. I would try playing around in some relatively short games and seeing where you falter. There is plenty of material on the specifics of the Kan variation, but the general idea is to play Nf6, d6, Be7, O-O, Nbd7, and Re8. This sort of "hedgehog" style position gives plenty of opportunity to both sides and should not require too much theoretical knowledge.

Good luck :)

# Answer
> 2 votes
Look I would like to categorize the Sicilian opening and I believe that after reading this you should feel somewhat comfortable.

* First you must avoid Sicilian Dragon when you are new to the Sicilian. The Dragon requires a lot of extra courage to play and because White's K-side attack is just too fast black somewhat fumbles in the opening itself if he does not know how to counterattack. Black's g6 pawn can be hooked early by White for tearing the K-side attack.
* Second Sicilian Kan/Najdorf/Scheveningien/Richter-rauzer/Taimanov are kind of transposable. If you are playing this line then you ought to know all the above variations. There are lot of exceptions to these though but they can be ignored as of now . In majority of the Vast games played in the above line the basic principle if that black will attack in the Q-side and in the center & black needs to stall White's attack in the K-side. If black has that dare then only he should attempt these lines .
* Third the best Sicilian to start with is Sveshnikov. It removes the complexity and does not need sharp opening theory. It is easy to understand and black can have a good fair game. Most important is that it an entirely different line and Sicilian Pelikan is one more branch of this line. Black can choose this opening and white cannot transpose it into any other Sicilian opening.
* Fourth you should be aware of some other Sicilians also like Rossolimo/Alapin/Smith Morra/Grandprix Attack. Actually these lines depend upon white what he would play in the second or third move and Black cannot avoid the opening knowledge preparation. So these lines are indispensable.
* Fifth if you want to know the Najdorf kind of Sicilian then try understanding the Scheveningien. It is the best and it will give you the entire insight of Sicilian games as a whole.

# Answer
> 1 votes
Sicilian is a good opening and it is double edged. Unless I read books, I was not able to play with anyone. I guess Richter-Rauzer is missed in the previous comments, which is possibly a part of open Sicilian I presume

```
[FEN ""]

1.e4 c5 2.Nf3 Nc6 3.d4 cxd4 4.Nxd4 Nf6 5.Nc3 d6 6.Bg5 e6 7.Qd2 a6 8.O-O-O Bd7 9.f4 h6 10.Bh4 Be7 11.Be2 Qc7 12.Bf2 Rc8 13.Nb3 b5 14.Bf3 Na5 15.Nxa5 Qxa5 16.Kb1 b4 17.Ne2 e5 18.Nc1 O-O

```

It is fun to play it.

# Answer
> 0 votes
The dragon indeed requires remembering many sharp lines. Try the hedgehog formation . Play early a6 and e6 to limit white possibilities. I personally play this and i don't remember any lines just general ideas key squares maneuvers e.t.c
It works well against virtually anything white might play (maybe excluding 2. c3 )

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


# Question
Title: How do computers play three-check chess?
* How do computers evaluate three-check chess positions where the first side to check the other side three times wins?

+ How do they value the first and second checks?
    + It looks like the position evaluations would be tricky but it also looks like three-check chess would be an easier game to solve than standard chess.

# Answer
> https://github.com/ddugovic/Stockfish

Very active development, this is the Stockfish version used by lichess.

What you need to do is search this macro:

> #ifdef THREECHECK

Evaluation function:

> https://github.com/ddugovic/Stockfish/blob/master/src/evaluate.cpp

Checks are given **extra bonus** unlike normal chess:

```
    if (pos.is_three_check())
        score += ChecksGivenBonus[pos.checks_given(Us)];

```

`pos.checks_given` gives the number of checks already done. `ChecksGivenBonus` is an array of bonus values.

The bonus values are:

```
  S(444, 181),  // first check
  S(2425, 603), // second check

```

`444` is the bonus for opening/middlegame, and `181` is the bonus for endgame. The bonus for the second check is much greater.

I'm not sure positional evaluations in three-checks is tricky. I can see the parameters have changed, king safety improved, but the overall structure is identical to regular chess.
> 13 votes

# Answer
1. I have been working on the aforementioned code of Stockfish for three-check chess, so I will try to summarize the most important **evaluation changes** (in terms of Elo gain) we made **compared to standard chess**. As was mentioned before, apart from these changes the evaluation is very similar to normal chess, with only some parameter tweaks.

* **Bonus for the number of checks**:
        + In the middlegame, one check is worth about 2/3 of a minor piece, whereas the value of two checks is around 3 minor pieces, but such positions usually are highly dynamic, so they are hard to evaluate statically.
        + In the endgame, checks are not worth that much, since material is much more important. One check is worth about a pawn, two checks correspond to a bit less than a minor piece.
    * **Much higher bonuses/penalties for safe/unsafe king positions**, e.g., for the number of attacking pieces or for holes in the pawn shelter.
        + The **king safety evaluation** is also scaled **depending on the number of checks** the opponent has already given, so that king safety is more important if he is close to giving the third checks.
    * **Piece values slightly differ from standard chess.** Pawns are worth a bit less in the middlegame, since dynamic factors like open files are comparatively more important, and rooks are more valuable in endgames, since they can easily threaten to give check if only few pieces are on the board.
2. Regarding the second part of the question, I think that **evaluation is tricky in closed positions**, because it then is hard to evaluate imbalances regarding the number of checks and material. If the position is highly tactical, then the search should usually be able to resolve inaccuracies of the evaluation.
3. **Solving three-check chess** most probably is easier than for standard chess, because games tend to be shorter. One important point is the game theoretical value with optimal play. If white can force a (relatively short) win, then a proof might be feasible, but if it is a draw with optimal play, then the required proof tree would probably be much too big.
> 15 votes

---
Tags: engines, chess-variants, check
---


title: Is Deep Blue outdated?

text:
# Question
Title: Is Deep Blue outdated?
I bought a laptop, a Dell, model XPS 13. I found a technical review which mentioned the Fritz test:

Fritz is a chess benchmark that tests the computing capabilities of the CPU with various chess moves. The Intel Core i7-8550U managed to get 10.675 million moves per second. For comparison, one of the most powerful computers, Deep(er) Blue, was able to squeeze out 200 million moves per second. In 1997 Deep(er) Blue even beat the famous Garry Kasparov with 3.5 to 2.5.

But then I found this link that claims that even an iPhone 5s would be almost better than Deep Blue.

I am now confused, are Deep Blue and Deeper Blue different? Are algorithms more efficient today?

# Answer
IBM claimed the machine could search for **200** million moves per second, while Stockfish in the recent AlphaZero match could "only" search for **80** million per seconds on a modern multi-core machines. But... it was unclear how exactly IBM derived the number. There's **no** universe definition on how an engine calculates number of moves per second. How it's done is implementation dependent. It's not always possible to compare engines by number of moves searched per seconds. There was a somewhat related discussion on Rybka:

> http://talkchess.com/forum/viewtopic.php?t=30992&start=0&postdays=0&postorder=asc&highlight=report+engine+speed

Deep Blue is **out-dated**, it was made before this century. Please note I was too young for the project, so my understanding might not be 100% correct.

Deep Blue had a paper. I just had a quick 10 minutes look. Let's give a try:

* 2018, nobody uses human grandmaster games for tuning
* Deep Blue didn't focus on deep search as much as modern engines like Stockfish (https://en.wikipedia.org/wiki/Deep\_Blue\_(chess\_computer)#Aftermath supports my argument)
* Deep Blue was running on a dedicated machine. We don't do that in 2018.
* IBM had 32GB hash table, we can do better than that in 2018
* Deep Blue didn't have something known as null move pruning. (page 5 in the paper). I'm very confident all modern engines use it. It's a simple technique.
* Deep Blue didn't use late move pruning (I failed to see in the paper)
* Deep Blue used MPI for parallel search. This doesn’t happen anymore.
* Deep Blue was running evaluation on hardware, make no sense in 2018. If Stockfish did that, you wouldn't be able to use the engine on an iPhone.
* Deep Blue had very basic move ordering (http://www.talkchess.com/forum/viewtopic.php?t=64021&postdays=0&postorder=asc&topic\_view=flat&start=10 by Alvaro Cardoso supports my argument)
* Deep Blue had a 5-piece tablebase. Stockfish has 6.
* Deep Blue pruned less than modern engines.
* The algorithms was hardware specific (e.g. generating moves). We don't do that anymore in 2018. We have efficient 64 bits operations.
> 15 votes

---
Tags: engines, computer-chess, chess-algorithms, kasparov
---


# Question
Title: How does an engine decide which node to search first?
This is a follow-up question to Randomness in Engine Play. SmallChess's answer indicates that in one instance, Stockfish searched a given number of nodes after 20s, and a different number in the other 20s, hence there is randomness.

The question: if each node is a given position, how does Stockfish decide which node to search first? Take for example the first half-ply. White has 20 possible first moves, so there are 20 nodes. I demand that Stockfish play a move after searching five nodes. Does this mean that Stockfish might only have evaluated 1. a4, 1. a3, 1. b4, 1. b3 and 1. c3 before it has to make a move? A systematic search like this would mean Stockfish hasn't evaluated the most common first moves however.

I imagine that, later in the game, there'd be a massive jump in the number of nodes per half-ply. That would mean that Stockfish would sometimes decides to make a move even though it hasn't finished evaluating every node in the half-ply. How would it know that it's searched the most promising nodes?

# Answer
> 5 votes
http://rebel13.nl/rebel13/ideas.html explains this well.

The basic idea is to order the moves based upon what the program thinks is the best move without searching. This score is usually based upon mobility, piece-square value, center control, history, attacking potential, captures, and other elements the programmer thinks is important. Just as humans base their candidate moves based on intuition and history, the computer searches the highest scoring move first.

If the computer is limited to only five nodes, then yes, the computer will only search the five highest scoring moves. This time limit factor could cause to computer to miss a mate-in-one if it was scored poorly. The first method to correct for this was to establish fail-safes. These would cut short a search if the position became noticeably worse or significantly better. The hope was to allow for more time to search more variations that might use the time better. Other search algorithms, iterative deepening, have improved the time management as they have a shorter length before they enact a fail-safe.

# Answer
> 0 votes
This problem is rather similar to some coding problems. Stockfish already has multiple pre-computed move sets. It represents the state of the chessboard using multiple bitboards, which it then uses to evaluate the board positions using a categorical(checks, tempos, checkmates) and statistical representation(piece values). Almost immediately, it uses an advanced alpha-beta search algorithm. In order to not analyze the same position several times, a transposition table is used. This is essentially memorization applied to the search function, which is a fundamental in many graph-theory programming problems. Thus, it actually uses a rather simple algorithm. Here is some research done before:

Step 1. Initialize node

Step 2. Check for aborted search and immediate draw. Enforce node limit here. (This only works with 1 search thread, as of Stockfish 2.3.1.)

Step 3. Mate distance pruning. Even if we mate at the next move our score would be at best mate\_in(textssrightarrowtextply+1textssrightarrowtextply+1, but if alpha is already bigger because a shorter mate was found upward in the tree then there is no need to search further, we will never beat current alpha. Same logic but with reversed signs applies also in the opposite condition of being mated instead of giving mate, in this case return a fail-high score.

Step 4. Transposition table lookup. We don’t want the score of a partial search to overwrite a previous full search. We use a different position key in case of an excluded move.

Step 5. Evaluate the position statically and update parent’s gain statistics

Step 6. Razoring (is omitted in PV nodes)

Step 7. Static null move pruning (is omitted in PV nodes). We’re betting that the opponent doesn’t have a move that will reduce the score by more than futility\_margin(depth) if we do a null move.

Step 8. Null move search with verification search

Step 9. ProbCut. If we have a very good capture and a reduced search returns a value much above beta, we can (almost) safely prune the previous move.

Step 10. Internal iterative deepening.

Step 11. Loop through moves. Loop through all pseudo-legal moves until no moves remain or a beta cutoff occurs

Step 12. Extend checks and also dangerous moves

Step 13. Futility pruning.

Step 14. Make the move

Step 15. Reduced depth search (LMR). If the move fails high will be re-searched at full depth.

Step 16. Full depth search, when LMR is skipped or fails high.

Step 17. Undo move

Step 18. Check for new best move

Step 19. Check for split

Step 20. Check for mate and stalemate

Step 21. Update tables. Update transposition table entry, killers and history

I shall attempt to explain what the professor's research is talking about. Stockfish creates a search tree of the legal move. Then, it begins to evaluate whether each move is good or bad, and how good or bad it is, by executing a shallow search field first, and then using the resulting alpha/beta cutoff values as start values for a deeper search. Stockfish also prioritises pieces. For instance, knights would be prioritised at the centre, so if a knight and bishop get forked at the centre, it will move the knight, unless there are other significant gains by moving the bishop. While this may seem complicated, this execution is approximately log(number of possible moves), hence making it rather fast still.

---
Tags: engines
---


# Question
Title: Why is it common to castle right after the opponent castles?
After watching many chess games, I've noticed that many players castle right after their opponent castles. Is this a coincidence? Or is there an unspoken benefit of this?

Edit: And by *right after* I also mean *right before*. I.e. games where both castling taking place one turn apart.

# Answer
> 8 votes
Castling is a certain 'committing' move; if you castle kingside, your king is stuck there until the late middlegame / early endgame, and you cannot easily launch a pawn storm on that side. The first allows your opponent to castle queenside and know he/she can launch a king attack (but possibly allowing your attack as well); the second allows your opponent to castle kingside and know his/her king is relatively safe.

Also, the castling move doesn't threaten anything (like capturing an undefended piece, or a fork), so if you castle, the opponent doesn't have to defend and has time to castle as well.

A final thing to note is that castling can occur as early as move 4, and really late (move 20 or later is not that uncommon), but in most games it happens between moves 6-12*. This makes the probability that both castling moves (if both players castle) happen right after each other much higher than if castling would happen throughout the entire game.

*: I'm just making an educated guess here; I'm very interested in the actual statistics.

# Answer
> 5 votes
GM Ben Feingold recently published a lecture to Youtube on Castling vs. Non-Castling positions which helps to answer your question.

> When one player castles and the other doesn't, it creates an imbalance in the position. The non-castling player is trading King safety for some amount of tempo/activity. The castling player now has the opportunity to attack a less safe King.

The reason you often see two players castling in succession is that the players are attempting to maintain the balance in the position. Also, they may be ensuring that they have the time/opportunity to castle. If they delay, their castled opponent may be able to apply sufficient pressure to make castling either impossible or imprudent.

# Answer
> 3 votes
A couple reasons: 1. It is the natural flow of developing. Just as one side gets their pieces out so does the other and when clear to castle they often do so and so does the other. 2. Often one side waits for the opponent to commit their king and once it is committed so then they commit theirs.

# Answer
> 3 votes
Once the first castling took place, the castled rook can easily face the king on the other side. This is a potential threat, which should be neutralized in advance. One way of handling this threat is by responding with castling, which explains the frequent cases in which castling is a consecutive move on both sides of the board.

Note that another way to neutralize such a threat in advance would be protecting the vulnerable squares between the opponent's rook and the threatened king.

---
Tags: castling, patterns
---


# Question
Title: In encountering a draw by [x number of moves], when does the draw actually occur?
I played a game of chess recently where we agreed to a rules modification: When one player was reduced to a lone King, a draw could be declared after 16 moves without capture/Pawn move. During this game, the player with material delivered checkmate on move 16. So what happens? Does the checkmate count first, or does the draw?

# Answer
Typically for the 50 move rule it's 50 ply from both sides without a pawn move or capture so the claim can only be made AFTER 50 moves. The position on the board always stands so checkmate is checkmate.
> 4 votes

# Answer
Obviously, checkmate, the agreed upon stalemate was "AFTER" the 16th move. The opponent was mated on the 16th move, so checkmate.
> 1 votes

---
Tags: draw
---


# Question
Title: Prove the pawn's color and the knight's position
I was recently given a retrograde analysis problem to solve. Even though I've managed to at least intuitively get close to an answer, I don't know how to put it in the form of an acceptable proof. For example, I can see that the a5 bishop must be a promoted piece, but I don't see how it could have escaped White's pawn structure, unless f2 square was originally free and is now occupied by a Black pawn. But for the knight question, I don't see a clear way of distinguishing it. I am hoping that someone could show how to tackle such problems on a firm footing.

```
 [FEN "r2qk2r/1ppbp1p1/1pn2n2/b2pP3/3P4/2N3P1/PPP5/R2QK2R w - - 0 1  "]

```

We are told that neither kings have moved yet, that there's a pawn on f2 square, and a White knight on either the f3 or f4 square.

**Prove the f2 pawn's color and whether the White knight belongs on f3 or on f4.**

# Answer
In both parts we know one to be true, which means it suffices to disprove one possibility for each and that settles the proof.

**Part one:** Let's start by assuming the pawn on `f2` is white and work our way up to see if we hit any inconsistencies. So here's our diagram:

```
 [title "Assuming f2 pawn is white"]
 [fen "r2qk2r/1ppbp1p1/1pn2n2/b2pP3/3P4/2N3P1/PPP2P2/R2QK2R w - - 0 1 "]

```

First trivial observation is the fact that the black bishop on a5 is a promoted piece as the original dark square bishop could never have escaped from `f8`. This means either the `h` or `f` pawn has promoted on `g1` into a bishop that is now on `a5`. Having a white pawn on `f2` also implies that the `g3` pawn isn't the `h`-pawn having made a capture on `g3` or else the promoted bishop could never have escaped white's kingside and reach `a5`, thus, `g2-g3` is played at some point, and it was on `g2` when black made the promotion (else no escape route). This in turn means the promoted black pawn must have been the `h`-pawn. But how did it get passed the `h` pawn? We know that white is down three pieces, the two bishops and the `h`-pawn. Additionally, we know that one piece was captured on `b6` and one on `g1` (for black's h-pawn to promote). Now both `b6` and `g1` are dark squares, but 'h2' pawn couldn't have been captured on either, nor could have the `f1` bishop as it is a light square piece. Therefore, white must also have a promoted piece, as nothing else accounts for the missing captured piece, for instance a knight (or any other non-pawn) being captured on `g1` by the `h7` pawn and the `h2` having promoted into a knight. So clearly the `h` pawn hasn't been captured but has instead been promoted. But therein lies the conflict: one of the `h`-pawns must have made *at least* two captures to get passed the other `h`-pawn. It couldn't have been the white pawn as black has only lost one piece so far, but it cannot be the black `h`-pawn either, because it must have then made 3 captures, 2 to get passed the white `h`-pawn and one last capture on `g1` to promote into the `a5` bishop. Knowing a capture on `b6` has also taken place, this accounts for a total of 4 captures, but white has only lost 3 pieces at most. Thus, neither `h`-pawns could have legally promoted given that the `f2` pawn is white, so our starting assumption must be wrong. **We conclude the `f2` pawn must be a black pawn.** Notice that throughout the analysis, the position of the knight either `f3/f4,` would have made no discernible difference on the resolution of the `f`-pawn's conflict, so we were safe to do the analysis independently. The reverse is not true, namely, the knight's position is very much dependent on the fact that the pawn on `f2` is black.

**Part two:** Knowing now that the `f2` pawn is a black pawn, let's take the most restrictive case and assume the knight is on `f3` and perform a similar analysis to see if we hit any walls. So here's the corresponding diagram:

```
[title "Assuming the knight is on f3"]
[fen "r2qk2r/1ppbp1p1/1pn2n2/b2pP3/3P4/2N2NP1/PPP2p2/R2QK2R w - - 0 1 "]

```

It is the most restrictive consideration as it forces the `f7` pawn to have made at least 2 captures to reach `f2,` because the white knight is assumed to be on `f3`, which means that `f7` pawn must have just made a capture on `f2` from `e3` (that it reached from yet another capture). So far we have accounted for 4 white pieces having been captured and the `h7` and `h2` having promoted for black and white respectively. The only1 way the latter could have happened is if the `h7` pawn (i) made two captures to go around the white `h`-pawn, or (ii) made only one capture from `h3` (so taking something on `g2`) while white's `h2` pawn still untouched. (i) is impossible by just considering the piece count, because so far there has been one capture on `b6`, two captures by `f7` pawn and two by the `h7` pawn, and that is already more captures than the number pieces white has lost. So only option is (ii): we know that the `h7` pawn must have captured a non-pawn piece on `g2` (as the `g3` white pawn couldn't have been from either the `h` pawn which promoted, or the `f2` pawn as black only lost one piece and that was the original `f8` bishop on its original square). This in turn implies that `g2-g3` must have been played by white before `h7` captured on `g2`. But that means the promoted black bishop could not have escaped white's kingside via the `g3-e5` diagonal anymore, therefore, it must have escaped from the `f2-d4` diagonal instead, which settles the fact that the `f7` pawn couldn't have captured a pawn on `f2` (from `e3`), or else the bishop could never have reached `a5`, had there still been a pawn on `f2` just presumably captured by black's `f7` pawn. Now here's the dilemma: what on earth happened to white's `f2` pawn in all this? Can we logically account for it knowing black just took a non-pawn piece on `f2` and there's a white knight lying on `f3` (starting assumption)? It definitely couldn't have been the piece that the `f7` pawn captured to reach the `e-file` either as white only made one capture and that was on `f8`, so `f2`-white-pawn couldn't have magically been on the `e`-file. Trivially, it couldn't have been captured on `b6` or `g2` either. It couldn't have been promoted either as it would have forced black's king to move (disallowed in the starting description). So `f2` pawn couldn't have been promoted, or been accounted for by any of the four captures performed by black, but somehow it isn't on the board, thus, we can conclude that we've reached an inconsistency again, meaning there's no logical set of events that would legally reach the position given above with the knight standing on `f3` which was our original assumption, **so the knight must be on `f4.`**

Come to think of it, there's a much shorter way of realising that the knight cannot be on `f3` without focusing on the fate of the white `f2`-pawn: quick recap of captures: we know a dark square piece has been captured on b6, two non-pawn pieces captured one on e-file and one on `f2,` one non-pawn piece also captured on `g2`. But how many non-pawn pieces has white lost? The two bishops and another non-pawn (we cannot know which because we don't know what piece the `h2` pawn promoted into) on the `e`-file. That's 3, so there's no other non-pawn left for black to have just captured on `f2` (we already know it couldn't have been a pawn on `f2` captured). And that's another formulation of the same inconsistency. Notice that if we are to assume that the non-pawn captured on `f2` was a piece that resulted from the promotion of the `f2`-pawn, then it implies that the `f2` pawn reached `f7` with a check and was not captured by anything thus allowed to promote, but that's impossible as we know neither kings have moved yet, in other words, if the `f2` pawn were to ever promote it must have gone passed the `f7` square without being captured, which is impossible. Anyhow, let's end with the final correct diagram:

```
 [title "Solution"]
 [fen "r2qk2r/1ppbp1p1/1pn2n2/b2pP3/3P1N2/2N3P1/PPP2p2/R2QK2R w - - 0 1 "]

```

If you're interested in these kinds of discussions, have a look into the books of Raymond Smullyan, I even recall similar puzzles in one of his books but I have no copies at my disposal at the moment to check for you, maybe someone else can verify.

---

1: as the white pawn couldn't have made two captures to go around the black `h` pawn, because white has only made one capture in this game and that has been the `f8` bishop on its original square.
> 7 votes

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


# Question
Title: Is it ethical to take a zero-moves draw in the last round of a tournament if one is already assured of first place?
Suppose I'm playing in a small, 6-round tournament. I win the first five rounds, which also guarantees at least a share of 1st regardless of the results of the last round. What are the ethics of play in the last round? Say the opponent comes to the board and offers a draw before making a move. He judges he's not likely to beat me, so a draw is a good result for him. He's of the opinion that since the result doesn't matter to me, I might as well accept. Should I accept? What if the opponent plays a few moves, and offers a draw in a position I assess as better for me, but still has a lot of play left in it? What if the opponent offers a draw in a position in which he is dead lost?

If I take the draw, I insulate myself from a potential blunder. I also guarantee I win the tournament, not just share first. However by not beating my opponent, I give him an undeserved half-point and more prize money, and it's not fair for my opponents in the first five rounds who had to play me when I was incentivized to win.

Is there some kind of convention for this kind of situation?

# Answer
> 14 votes
USCF rule 14B6 states that "it is unethical and unsporting to agree to a draw before a serious contest has begun".

Also, according to USCF rule 20L, manipulating results is not only prohibited, "severe sanctions" are called for, which might even include revocation of the offenders' USCF memberships.

According to rule 20J, even discussing the possible results with your opponent is improper.

You are not, however, required to ignore the crosstable. There's nothing wrong with taking a draw to ensure a tournament prize - provided you don't collude with your opponent.

---
Tags: rules, etiquette
---


# Question
Title: Candidates 2013: could Ivanchuk have legally/ethically offered a draw (and thus make Kramnik champion)?
In the last round of the Candidates of the 2013 World Championship, there were two players left in contention. Kramnik (black vs. Ivanchuk) needed to outperform Carlsen (white vs. Svidler). In the event, Carlsen lost, so Kramnik only needed to draw, but he also had a lost position and resigned shortly afterwards. Carlsen went on to win the tournament and the title.

Now suppose that Ivanchuk hates Carlsen and really doesn't want Carlsen to win. Could he have offered a draw to Kramnik? That would be match manipulation of a sort - he's effectively making Kramnik champion. However I don't see how an outsider can stop him from offering a draw in a winning position, unless they offer him advice during the game ("you're in a winning position! Don't offer a draw!") which should be illegal. Afterwards he can always claim that he didn't think he was winning.

Is there some kind of rule that prevents this kind of scenario? Strictly speaking, a Carlsen-hating Ivanchuk could also have thrown the game ("I just happened not to see that my queen was *en prise*"), which would've forced Carlsen to win.

# Answer
Other than the catchall rule mentioned by D M, Article 11.1: *The players shall take no action that will bring the game of chess into disrepute.*, I don't think there is a rule that prevents such scenario directly.

Also I believe that it is pretty much impossible to set up such rule, because there are too many possibilities. Also it would be very difficult to enforce it. Think of the following:

* You would have to prove intent, which seems rather difficult.
* Games at this level are rarely played out to a completely won position. It would have been easy to either make a small blunder to equalize the position, or just to claim that you evaluated the position incorrectly as draw.
* The outcome of one game can affect many things. Apart from the direct points, it might also affect tie-break scores or the Elo rating (which could be relevant for instance for participation in the candidate tournament). Whatever the outcome of the game somebody will always be unhappy and could claim that the result is match manipulation.
* If there was such a rule every time you make a blunder you would be under suspicion of match manipulation.
* Last round quick draws in tournaments are pretty common as are not-fought-to-the-end games in team competitions (if it secures a win for the team for instance). Seems like match manipulation to me as well, and not much is being done to prevent it.
> 5 votes

---
Tags: rules, draw, etiquette
---


# Question
Title: What's is the Least significant File and Least Significant Rank?
I'm Reading this tutorial and there are 2 definitions that confuse me :

https://chessprogramming.wikispaces.com/Square+Mapping+Considerations

What's is the Least significant File and Least Significant Rank ?

# Answer
> 2 votes
LSF and LSR are two ways to encode a chess board coordinate into a single integer number. LSF does that by { a1, b1, c1, ... } while LSR encodes by { a1, a2, a3 ... }.

# Answer
> 2 votes
According to the web site you cited: LSF squareIndex = 8\*rankIndex + fileIndex (rank \<\< 3 | file) LSR squareIndex = 8\*fileIndex + rankIndex (file \<\< 3 | rank) (It also shows two bitmaps showing you both cases.)

These just index each square either continuing along the ranks first or the files first. Using the rank first, lsr, you align the board more to what you imagine the chessboard to be. Using lsf, you generate pawn attack faster.

My opinion is to use lsr with the starting square being a8. This allows for faster FEN and GUI conversions.

---
Tags: engines
---


title: Lecture/Book on AlphaGo/AlphaZero

text:
# Question
Title: Lecture/Book on AlphaGo/AlphaZero
I am very interested in how AlphaGo resp. AlphaZero works. It seems to me, the related Google Papers are very dense and not easy to read.

Is there any textbook or lecture that explains on a technical level how it all works? I.e. starting with neural networks/deep learning, Monte Carlo Tree Search until reaching at AlphaGo/AlphaZero?

I have a master in computer science, but I never worked with artificial intelligence/machine learning.

Right now it looks to me that all the related information are scattered around, and I don't have time to listen to (online) lectures about machine learning that contain maybe only 10% on what is relevant to understand AlphaGo...

Can someone point me in the right direction?

# Answer
**EDIT**

@unutbu's link in the comment is a good introductory read.

---

Solid understanding for AlphaZero most likely require a quantitative degree (PhD?). Are you asking for a crash course in AlphaZero?

Please note unless you invest **significant** amount of your time, nothing I say will work. There is no book that can possibly cover everything. You will need to work very hard.

Let's give a try. Crash course for AlphaZero.

**1.** Basic understanding in machine learning

Countless number of books. But if you don't have time, I'd recommend Professor Andrew Ng's machine learning courses on Coursera.

Your keywords: *training sets, test sets, stochastic gradient descent, learning rate, GPU, cost function, cross entropy*.

**2.** Deep neutral networks

You need to understand about neural networks. I'd recommend Professor Ian Goodfellow's deep learning book if you're serious. If you don't have time, please again follow Professor Andrew Ng 's online course on Coursera. You don't have to go though all chapters (but you should!).

YouTube has many quick introduction to neural networks, try them.

Your keywords: *neuron, layers, weights, bias, mini-batch, activation*.

**3.** Monte Carlo Tree Search

You should understand what Monte Carlo is. Books about Monte Carlo is everywhere on Amazon. Read the wikipedia about MCTS if you don't have time.

Your keywords: *sampling, expansion, simulation, rollouts, backpropagation*.

**3.** Reinforcement learning

Your keywords: *policy gradient, gradient descent, learning rate*

**5.** Chess board representation

The paper itself is simplest. The model encodes the board state (e.g. pieces) as a series of one-hot encoding binary values.

**6.** MCTS vs alpha-beta
> 10 votes

# Answer
I don't have enough reputation to comment, but AlphaGo Zero Explained In One Diagram is pretty good.

I also really like this tutorial.

Note that the first link doesn't describe when to create (expand) nodes. That part can be a little confusing. This link may help.
> 7 votes

# Answer
This presentation summarizes the journey to AlphaGo

This is a presentation of the underlying theory

This is the book

Plus, I guess, anything on deep convolutional neural networks.
> 3 votes

---
Tags: chess-algorithms, alphazero
---


# Question
Title: Chess dot com says this was my best move yet I don't have a clue why
Whites turn the analyzer suggests that my best move is Nxe5 I really don't see why as I would just be trading away my knight for a pawn I don't see why this would be a good move

# Answer
> 13 votes
Black has an undeveloped queenside, a weak bishop on g7, lots of weaknesses on the light squares and consequently a very weak king position. This suggests potential tactics.

The point of 1. Nxe5 is that it opens the way for the white queen to h5. Together with the white bishop on c4 this should remind you of Scholar's mate or variations of it. Even though you don't end up with immediate mate here, the position with the white queen and bishop entering black's position looks extremely dangerous for black and moves like Nxe5 or potentially moving the knight to other squares should certainly be considered.

Concretely, whichever way black captures the knight on e5 (dxe5 or fxe5), white can regain material by 2. Qh5+ Kd7 (2...Kf8 or 2...Ke7 are answered with 3 Qf7 mate) 3. Qg4+ Kc6 (or Ke8) 4. Qxg7 and end up with a winning position due to the extremely weak black king.

If black does not capture the knight on e5, white still has a decisive advantage due to threats like Nf7 and its dominance on the light squares. Also white is up a pawn, though that is not essential here.

---
Tags: analysis
---


title: When to move/centralize king?

text:
# Question
Title: When to move/centralize king?
```
 [fen "8/3k1ppp/2p2n2/r2p4/p2Pp3/4P3/PP2BPPP/4K2R w - - 0 1 "]

```

At this position Stockfish has recommended `Kd2`, and noticing how the black bishops are off the board the king seems safer centralizing itself, but ultimately when do you decide to advance/center the king and especially over advancing pawns or getting major pieces in better positions?

# Answer
**The general rule of thumb is that**: if the queens are off the board then it's generally safe to keep the kings central in order to use them as active pieces (specially in endgames) instead of tucking them away into a safe corner.

But that's just a general rule, and like any other rule in chess it is to be taken with caution, because at the end of the day everything still depends on the precise context (i.e. concrete assessment of main lines). Easiest cases to assess are when there are not many open files and diagonals towards the king, because otherwise, well-coordinated minor pieces can tactically exploit an exposed king's position to either win material or win tempi.

In your example, `Kd2` is very natural because it *successfully* achieves two goals: it centralizes your king (so bringing it equally close to weak points such as `b2` and `f2`) and it activates your rook. I emphasize *successfully*, because concretely speaking, there are currently no direct threats which prevent you from playing `Kd2.` If instead you castle (assuming it's legal in this position), sure the rook gets activated, but the semi-open `b`-file (e.g. `...Rb5` though currently prevented by the bishop on `e2`) will eventually bound your rook to the defense of the `b2` pawn, potentially followed by `a3`, and that's a healthy initiative for black with a dangerously advanced `a`-pawn. But with the king on `d2,` your king starts covering your queenside (`Kc3-Kb4`, or `Kc2`), enabling your rook to create counter-threats.
> 11 votes

# Answer
**TL;DR** There is no real guideline. When the kings come out is a matter of intuition, i.e. experience.

> **When you need to activate the king - and when it's premature - is a matter of "king feeling"**
>
> "King feeling" is a subtle sense of knowing when it is safe to bring your king out of it's protective shell. This is not a matter of calculation ... and it's not a matter of applying rules

In the following game, black plays unconventionally. Instead of closing the position with 1...e5, he centralises his king:

```
[FEN "3r3r/p2nkp2/1p2p3/3P2pp/4Bq2/5P1Q/PP3P1P/2R1R1K1 b - - 0 1"]
[White "Shirov"]
[Black "Karpov"]

  1. Ne5            dxe6
  2. f5             Rc7+
  3. Kd6            Rxa7
  4. fxe4           e7
  5. Nxf3+          Kf1
  6. Rde8           Qd7+
  7. Ke5             *

```

Source for quote and example game: *The wisest things ever said about chess* by GM Soltis
> 2 votes

---
Tags: endgame, positional-play, kings
---


title: clubs -> tournaments?

text:
# Question
Title: clubs -> tournaments?
I live in Maharashtra, India, and can't find any tournaments (that don't take a lot of entry fee) to participate in, and I really want to. There are some clubs near me, though. What I wanted to ask is that will chess clubs notify me regularly about tournaments (I want to participate in ANY tournament I can, that doesn't cost TOO much in entry fee, and is not TOO far from me) that I can participate in?

# Answer
> 2 votes
Yes, chess clubs usually inform their players about tournaments organized in the vicinity. Anyway, you can ask any particular club about its policy before joining it.

# Answer
> 2 votes
Yes, even if the club does not formally inform you of tournaments, you would most likely learn about them by talking to other players.

Also most clubs would organize club only tournaments and other small local tournaments that are difficult to learn about from the internet. Besides, you might be able to participate in team league competitions.

---
Tags: tournament, clubs
---