# Question
Title: How to calculate USCF's Modified Median (with or without byes)?
The calculation is described in the "USCF Chess Rule Book", chapter 34E1,

> 34E1. Modified Median
>
> The Median system, also known as the Harkness system for inventor Kenneth Harkness, evaluates the strength of a player’s opposition by summing the final scores of his or her opponents and then discarding the highest and lowest of these scores.
>
> In the Modified Median system, players who tie with even scores (an even score is equal to exactly one half of the maximum possible score), have the highest- and lowest-scoring opponents’ scores excluded. *The system is modified for players with non-even scores to disregard only **the least significant opponents’ scores***: the lowest-scoring opponent’s score is discarded for tied players with plus scores and the highest-scoring for tied players with minus scores.
>
> For tournaments of nine or more rounds, the top two and bottom two scores are discarded for even-score ties, the bottom two scores for plus-score ties, and the top two scores for minus-score ties.
>
> These scores are adjusted for unplayed games, which count a half point each, regardless of whether they were byes, forfeits, or simply rounds not played after an opponent withdrew. So an opponent who won the first two games, lost the third, withdrew and did not play rounds four or five would have an adjusted score of 3 points (1+1+0+0.5+0.5 = 3). These adjusted scores are used only to calculate the opponent’s tiebreaks. The player’s own score is not changed.
>
> If the player involved in the tie has any unplayed games, they count as opponents with adjusted scores of 0.

What is unclear to me is the term: **the least significant opponents’ scores**. Does this include a Bye, which is a score without an actual opponent. Or is the Bye excluded from the modification procedure?

> I find the text ambiguous and open to multiple interpretations, as in the answers below. Therefore, I would like to see how the calculations are performed in actual USCF tournaments.

**Update-2**

A cross table including the four USCF tie-breaks can be found here 2007, 128th (=129th) Annual New York State Championship. From this cross table one can conclude the unplayed games are part of the deletion process.

**Update-1**

Consider the 2022 US Open Championship, 30 July - 7 August, 2022· Rancho Mirage CA.

Are the default US Chess tiebreakers applied? Why is Aleksey Sorokin champion?

```
No.  Name                       St  Rate  Pts Rnd1  Rnd2  Rnd3  Rnd4  Rnd5  Rnd6  Rnd7  Rnd8  Rnd9
   1  SOROKIN, ALEKSEY          TX  2648  8.0 W193  W125  W 65  W 36  W  3  D 15  D 17  W  7  W  9
   2  MORADIABADI, ELSHAN       NC  2614  8.0 W370  W269  W 78  W 46  W 81  W 14  D  5  D  9  W 15
   3  JACOBSON, BRANDON         NJ  2626  7.5 W281  W124  W 68  W 37  L  1  W157  W 39  D  5  W 17
   4  EIDELMAN, GABRIEL         CA  2249  7.5 W272  W 84  W 85  L 10  W112  D 12  W 81  W 35  W 32
   5  NARODITSKY, DANIEL A      NC  2699  7.0 W135  W 73  W 41  W 19  W 33  D 17  D  2  D  3  D 10
   6  AKOBIAN, VARUZHAN         MO  2655  7.0 W277  W123  W 64  D 18  D  8  W 37  W 38  D 17  D 12
   7  SHABALOV, ALEXANDER       PA  2607  7.0 W138  W 51  W 42  W 22  D 16  D 39  W 61  L  1  W 38
   8  Hong, Andrew              CA  2604  7.0 W235  W 31  W216  W212  D  6  L  9  W108  W 24   -H-
   9  MATVIISHEN, VIKTOR        TX  2558  7.0 W152  W126  W 70  D 15  W 72  W  8  W 16  D  2  L  1
  10  SHENG, JOSHUA             CA  2558  7.0 W 97  W217  W 27  W  4  L 17  D 16  W 44  W 25  D  5
  11  SCHMAKEL, SAMUEL ARTHUR   IL  2504  7.0 W140  D 76  W175  D 39  W 45  W 22  W 46  L 15  W 42
  12  COSTELLO, ALEXANDER JOHN  CA  2379  7.0 W271  W 83  W 28  L 17  W213  D  4  W 48  W 52  D  6
  13  MELIKIAN, GNEL            CA  2338  7.0 W 99  W167  D317  D213  W214  D 26  D 28  W 46  W 57
  14  MEI, AUSTIN R             CA  2265  7.0  -X-  W 57  W218  D 47  W 50  L  2  W 76  D 33  W 34

```

# Answer
> It would be nice to see an example where this rule is applied. Just to be sure.

Here's a small 5 round Swiss.

```
 Pair | Player Name         |Total|Round|Round|Round|Round|Round|
 Num  |                     | Pts |  1  |  2  |  3  |  4  |  5  |
 ----------------------------------------------------------------
    1 | A                   |4.0  |W   5|W   4|D   3|D   2|W   6|
-----------------------------------------------------------------
    2 | B                   |4.0  |W   7|D   3|W   6|D   1|W   4|
-----------------------------------------------------------------
    3 | C                   |3.0  |W   8|D   2|D   1|L   4|W   9|
-----------------------------------------------------------------
    4 | D                   |3.0  |W   9|L   1|W   7|W   3|L   2|
-----------------------------------------------------------------
    5 | E                   |3.0  |L   1|L   6|W   9|B    |W   8|
-----------------------------------------------------------------
    6 | F                   |2.5  |H    |W   5|L   2|W   7|L   1|
-----------------------------------------------------------------
    7 | G                   |2.0  |L   2|W   8|L   4|L   6|B    |
-----------------------------------------------------------------
    8 | H                   |2.0  |L   3|L   7|B    |W   9|L   5|
-----------------------------------------------------------------
    9 | I                   |1.0  |L   4|B    |L   5|L   8|L   3|
-----------------------------------------------------------------

```

For player A, the opponents' scores (after adjusting for the byes) are 2.5, 3, 3, 4, and 2.5. Because player A has a plus score, the lowest score (2.5) is excluded. The modified median tiebreaker score is 12.5.

For player B, the opponents' scores are 1.5, 3, 2.5, 4, and 3. The lowest score (1.5) is excluded. The modified median tiebreaker score is 12.5. This is the same tiebreaker score as Player A.

For player G, the opponents' scores are 4, 1.5, 3, 2.5, and 0. Because this player had a minus score, the highest score (4) is excluded. The modified median tiebreaker score is 7.

For player H, the opponents' scores are 3, 1.5, 0, 0.5, and 2.5. The highest score (3) is excluded. The modified median tiebreaker score is 4.5. Player G would win this tiebreak over Player H.

Player F is not tied with anyone, but their opponents' scores are 0, 2.5, 4, 1.5, and 4. This player has an exactly even score of 2.5/5, so to calculate the tiebreak we would exclude both the lowest score (0) and the highest score (4). The modified median tiebreaker score would be 8.

> What is unclear to me is the term: the least significant opponents’ scores.

The "least significant" opponent's score is the highest opponent's score for a low-scoring player, or the lowest one for a high-scoring player.

> Does this include a Bye, which is a score without an actual opponent. Or is the Bye excluded from the modification procedure?

"If the player involved in the tie has any unplayed games, they count as opponents with adjusted scores of 0." The bye is not excluded from the modification procedure; it is treated like any other 0 score. In Player F's case, the 0 from the bye was the lowest score, and we threw out the lowest score, so this score was thrown out. But in the case of Player G and Player H, the *highest* score was thrown out, so the 0 for the bye stayed in the calculations.
> 2 votes

# Answer
> What is unclear to me is the term: the least significant opponents’ scores

As described in the text:

1. If the tied players have a plus score then for each tied player their lowest scoring opponent is excluded from the calculation
2. If they have a minus score then each player's highest scoring opponent is excluded.

> Does this include a Bye

As you say, a bye does not involve an opponent with a score. Byes don't take part in the exclusion process.
> 2 votes

---
Tags: rules, tournament, uscf, tie-breaks
---


title: Manual pairings in tournaments

text:
# Question
Title: Manual pairings in tournaments
I had recently participated in a tournament and I think there is some manual pairing hidden inside which causes my friend to play against me. Since my friend had a higher score, I had to give up and let my friend win for the team. This is the link of the tournament and I am no.10. Is there any code that can check manual pairing and can someone help me to check? Thanks for helping.

Link: https://chess-results.com/tnr795955.aspx?lan=1&art=1&rd=7

PS This is my first time using this web. If I had done something wrong, I would appreciate any guidance or feedback to improve my experience and interactions here. Please feel free to let me know how I can use this platform more effectively or if there are any specific guidelines I should follow. Thank you for your support!

# Answer
> 4 votes
> I had recently participated in a tournament and I think there is some manual pairing hidden inside which causes my friend to play against me.

You are wrong. To a trained arbiter the pairings are very obviously correct. With 128 players, all but 4 of them unrated (and those 4 ratings are not FIDE ratings, they are likely estimated ratings), nobody in their right mind is going to try pairing by hand and nobody in the organization of such a large event cares anything about two insignificant players out of 128. Running a tournament with 128 players is an enormous amount of work and fiddling with the pairings is only going to make it worse.

Let me explain the 5th round pairings.

Here is the position after 4 rounds. You will see that 7 players are on 4/4 and 2 players are on 3.5/4 and the players on 3.5/4 actually played each other in round 3. Your friend has the lowest starting rank of the 7 with a starting rank of 124. Of the two players on 3.5 you have the highest start rank of 38.

If you check the scoring of each of these players including colour, which you can do by clicking on their name in the list, you will see that 4 of the 7 players on 4/4 have the colour sequence WBWB and so are due white in round 5. Three have the colour sequence BWBW and so should have black in round 4. The 3 players expecting black are paired against the top 3 players expecting white according to start rank number. The odd one out is you friend who is expecting to play white.

So, your friend is down floated to the 3.5 score group. If we look at the colour sequences for the two players there we see that you are expecting black and the other player is expecting white. You and the other player on 3.5 played each other the round before. You cannot be allowed to play again. Your friend is expecting white and you are expecting black so the two of you are paired against each other and the other player is down floated to the 3/4 group. If the colour history for you and the other player on 3.5 were reversed then the other player would have been paired against your friend and you would have been down floated.

The pairings are exactly as would be expected.

If you want to check the pairings yourself then you will need a copy of Swiss Manager, the pairing program that was used. You can order a copy here. You will need the full version costing 150 euros because there are more than 50 players in the tournament. You will also need the help of somebody familiar with the program because it is not very intuitive.

---
Tags: software, cheating, swiss-pairing
---


title: Why 6.Qf3 is bad in this game/position?

text:
# Question
Title: Why 6.Qf3 is bad in this game/position?
I played this game a few days ago with a friend of mine which is quite stronger than me. I also report here the position after 6.Qf3 to clarify a little bit more, in the game I was **white**:

```
[title "Me - My Friend"]
[fen "rnbqkbnr/2p2ppp/p3p3/1p6/2pP1B2/2N1PQ2/PP3PPP/R3KBNR b KQkq - 1 6"]

```

I was wondering why the move 6.Qf3 in the game is so bad, indeed I noticed that Stockfish's evaluation on lichess goes from -0.2 to -1.3 after black's response Ra7.

I know that is rarely a good idea to move your queen before you've developed all your minor pieces, but in this case I felt it could be not too bad. My decision was based on the contents of a course on evaluation I recently saw; in the course the teacher said that if you have better pieces activity, then you most likely have a dynamic advantage and, when you have such type of advantage, is generally a good idea to try to exploit fast, using the fact that your pieces are temporarily more "strong" and "powerful". The usual way to exploit such an advantage is to try to get even more activity/square's control with your pieces and make constant threats, possibly with tempos.

So i thought that since he was far behind in development and more or less none of his pieces was really playing, I had a dynamic advantage (given by my lead in development and my higher pieces activity), thus decided to put even more pressure with my queen, also blocking him to play either Nf6 or Bb7, slowing it down further in development.

I know that Qf3 takes the f3 square away from my Ng1, but I decided it wouldn't be so bad...

Where am I doing wrong here?

# Answer
> 2 votes
The drastic change in evaluation isn't that much about the queen misplaced on f3 but rather about the necessity to play a4 as soon as possible.

If you go 6.a4 right now, Black can't reply with ...c6 as 7.axb5 cxb5 8.Nxb5 would follow. So you're forcing 6...b4 to be played and now your light-squared bishop has gone from having nothing to do to threatenning the weak c4 pawn.

The position is still fairly playable for Black because you'll now have to retreat with your c3 knight back into b1 (so you've basically lost two tempi developping and then un-developping it).

All things being said, it looks like White scores well even with 6.Qf3, so it's fair to assume that Black's position is uncomfortable to play even when holding the extra pawn.

# Answer
> 2 votes
As has been pointed out elsewhere in this thread, the correct move is 6.a4. This move is awkward for black to face. White is threatening to just take the pawn on b5, and the only good way for black to defend it is to advance it. However, this leads to another problem for black, as the pawn on c4 is now weak! In the long run, black will have to face many difficult dilemmas for taking the pawn on c4, which is what gives white compensation for the pawn in the first place.

Let us now, in contrast, consider your move. 6.Qf3 is really easy to deal with for black. If black moves their rook to a7, there is no follow-up threat and white has to figure something else out. Moreover, with a rook on a7, black can play ...Bb7 next, forcing white's queen back and taking over the initiative (a.k.a the only thing that white has to compensate for being a pawn down).

When you have the initiative you shouldn't jump on the possibility to make **random** threats if they are easy to defend against, you should try to make threats that are **awkward** to deal with. You write that you wanted to "put even more pressure" on black's position with your queen, but it seems like you're thinking about this in too abstract terms, which is a common trend I've seen with novice players who started as adults. I think it has to do with a desire to "understand" the game on a more conceptual level, but the problem is that such an lofty and abstract understanding cannot be achieved before you have a fundamental and practical understanding at an intuitive level first.

I recommend that you try to answer the following question: What is the concrete nature of the "pressure" you're applying with 6.Qf3? In other words, what specific flaw with black's setup is highlighted and made more of a problem for black after 6.Qf3? It is important that you try and make the argument precise, and that you understand exactly what it means in the context of the specific position at hand. Otherwise it's just fluff that means nothing in an actual game. Furthermore, if you apply this more concrete reasoning to your game it will make learning quicker, as it makes it easier for stronger players to help you get a better understanding of the game.

You could also try and give a concrete answer to what "pressure" 6.a4 is putting on black's position. In fact, I think it could help you immensely in learning how to play the QGA properly if you do, as it's an absolutely essential component of the entire opening.

# Answer
> 1 votes
The reason is simple (credits to FM Dr. Hauke Reddmann pointing it out in a comment):

**You are down a pawn without compensation!**

Black took a pawn that you won't get back after 6.Qf3 and you don't even quickly get a strong center in return, as you would in some other variations of the QGA and the Slav.

Here is some "proof" that it really is because you are a pawn down:

```
       [FEN "rnbqkbnr/2p2ppp/p3p3/1p6/2pP1B2/2N1P3/PPP2PPP/R2QKBNR w KQkq - 1 6"]

```

Disregarding the best move a4 (which wins a pawn, which is why it is your only on move 6 in your game), this position where I added back your missing c pawn, the move d5 is evaluated with +0.8 and the move Be2 is evaluated with +0.5.

You already commited a mistake in the opening at move 4. After 3. ..a6 you should play 4. cxd4 (as has happened in almost all master games in the db, avoiding the issues you experienced with the pawn). You didn't appreciate, that 3. ..a6 has some interesting ideas (just like ..c6). If Black had played the more frequent move 3. ..Be7, Bf4 would've been a great move.

However, after 3. ..a6 4. Bf4, White already has to play very precise to even keep equality where you have to find multiple only moves in a row after Black's best response which is not hard to find for Black! It is logical that you wanted to get the bishop out, before playing d3 to not lock it behind the pawn chain. Even playing 4. d3 is better than getting the bishop out though, because c4 is defended and can be taken back by the bishop.

The only move that keeps equality for White is 6. a4, because it is the only move that wins the pawn back (and it is thematic not only for these variations but also in the Slav, so you should remember it): If Black doesn't want you to take twice on b5, he can only advance it to b4, after which the Black pawn on c4 is hanging (attacked by the bishop) and cannot be saved.

> in the course the teacher said that if you have better pieces activity, then you most likely have a dynamic advantage and, when you have such type of advantage, is generally a good idea to try to exploit fast, using the fact that your pieces are temporarily more "strong" and "powerful". The usual way to exploit such an advantage is to try to get even more activity/square's control with your pieces and make constant threats, possibly with tempos.

Positionally and logically, your moves make a lot of sense: getting the bishop out before closing the pawn chain, getting the Queen out with a tempo. However, **chess is a very concrete game** and we don't get away with schematic thinking.

IM Andras Toth would probably phrase it "don't just be a great story teller - if your decisions are not backed by concrete variations, you're not playing chess".

You chose to go for a variation where you sacrificed a pawn for activity (something very concrete), without actually calculating and checking how your initiative works out concretely. Which weakness exactly will you attack? How exactly are you going to bring the other pieces into the attack? What does the Queen do on f3 exactly (you will need another move to bring it to g3!)? How many moves do you need to bring your pieces on good attacking positions if you had "free moves" (always considering that your opponent can develop, too!)? With every move, your relative development advantage gets reduced (4-1, 5-2, 6-3,..). It seems that you didn't calculate deep enough, but that you hoped that you would get enough activity.

> I know that Qf3 takes the f3 square away from my Ng1, but I decided it wouldn't be so bad...

Qf3 isn't *much* worse than Be2 or Nf3, but consider that you still don't have enough pieces in play to generate a dangerous attack. It is very important to 'bring all the guys to the party'. Your minor pieces have priority, as they're less mobile and less valuable than the queen. Your queen has multiple ways to get out, however the enemy pawn on c4 restricts you (your bishop can only get out via e2), so you need a good plan for how to get your pieces out quickly. 6. Qf3 is somewhat a one-mover, as after you gain a tempo on the rook, the queen likely needs to move again, costing you another move. You only 'net gain' a tempo if you can move the queen to a good square with another tempo.

# Answer
> -1 votes
The f3 square is not at all awkward for the queen and the move does serve a purpose: attacks a hanging rook that cannot be defended with the seemingly natural ... Nc6. The reason why a human would likely recommend Ra7 is to prepare Bb7, developing the bishop to a powerful diagonal with a tempo on the queen. At a very deep depth on my CPU though, Stockfish 15 NNUE recommends c6, enforcing the b5 pawn and taking away the sting of the natural ...a4 attacking the strong dark squared pawn chain.

---
Tags: evaluation
---


title: Do "white to lose in X" puzzles exist?

text:
# Question
Title: Do "white to lose in X" puzzles exist?
The most common form of chess puzzle is white/black to win in X.

I'm curious whether a form of "white to lose in X" exists. For instance, a position that seems winning for white, but if they play a particular move, there is now mate in X against them. The first move would be the worst possible, but every subsequent move would be expected to be the best possible move.

(Not to be confused with selfmate puzzles, in which the first player constantly makes a losing move.)

(Inspired by a game I just played in which my position was completely winning, except I think I played the one move that gave my opponent an unexpected mate in 3.)

# Answer
Yes, you're not the first being interested in this. Look at this position that I took from my answer to a related question:

```
  [FEN "k1B5/p1P1p3/P3P3/8/1p6/bpp5/qnp3R1/2K4B w - - 0 1"]

```

After Bd7, White loses in 1, even though every other legal move would have won.
> 3 votes

# Answer
Similar things do exist. I recently saw a YouTube video by Eric Rosen where one side made a move that sort of "self-mated" them.

https://www.youtube.com/watch?v=NB9feImSQVo

This might not be exactly what you want, but it's in the ballpark, I think.
> 1 votes

# Answer
I'm not sure I understand the question correctly, but when I was a little kid I once played this game, where I mixed up the moves (14. Re4 Qxh2 15. d3 is the line) and tried to set up one last trap. After move 18 it is Black to play and lose in 2.

```
[Title "Black to play and lose in 2"]
[fen "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1"]
[StartPly "35"]

1. e4 e5 2. Nf3 Nc6 3. Bc4 Nf6 4. Ng5 d5 5. exd5 Nxd5 6. Nxf7 Kxf7 7. Qf3+ Ke6 8. Nc3 Ncb4 9. a3 Nxc2+ 10. Kd1 Nxa1 11. Nxd5 Kd6 12. Re1 c6 13. Rxe5 Qh4 14. d3 Bg4 15. Re6+ Kd7 16. Re4 Bxf3+ 17. gxf3 Qxf2 18. Bf4 cxd5 19. Bb5+ Kd8 20. Re8#

```
> 0 votes

---
Tags: puzzles
---


title: slav defence: 3. nc3?

text:
# Question
Title: slav defence: 3. nc3?
```
[fen ""]
[Startply "40"]

1. d4 d5 2. c4 c6 3. Nc3

```

I found no slav defence (or other) tutorial discussing this move. It seems 3. Nf3 is always played, but I found no reason why not play it this way, meaning how to punish it.

Also, what if 3. e3? I see this blocks the dark-square bishop, but would like to know the way to punish it. Should black then go for the standard a6 line, counting on white not having Bf4?

# Answer
> 6 votes
3.Nc3 is very decent move. It has been less often used than 3.Nf3 when White is aiming for the main lines of the Slav defense because it gives Black two more options:

* The Winawer gambit, 3.Nc3 e5!? 4.de5 d4 5.Ne4 Qa5 etc.

Its reputation has evolved along the years. Although it's probably fine for White theoretically, why give yourself something more to study ? 3.Nf3 avoids this altogether.

* The early capture 3.Nc3 dc4!?

This is a more modern approach. Whether White plays solidly (4.Nf3, 5.e3) or tries to punish Black (4.e4), Black will hold to the extra pawn at least temporarily with 4...b5 and the Nc3 will sometimes need to be re-routed because of a potential ...b4 at any time.

Meanwhile, the only upside of 3.Nc3 compared to 3.Nf3 appears if White tries systems without Nf3, mostly the delayed exchanged variation : 3...Nf6 4.cd5 cd5 5.Bf4 Nc6 6.e3, intending Bd3, Nge2 and probably f3. It has had some small bursts of popularity (GM Anatoli Vaisser played like this at a time) but it has never become a big danger to the Slav defense. Another example is the agressive 4.e4 against the triangle defense (3...e6).

# Answer
> 0 votes
On Chessable in the Chebanenko Slav Short and Sweet, Alex Colovic recommends 3....Nf6, and, after 4 e3, he suggests 4....a6, which often transposes into the more main line variations.

The S and S course is free.

---
Tags: opening, slav-defense
---


# Question
Title: Is there a software to measure a player's strength based on a game?
I flicked through some papers that described how one can obtain an ELO estimate based on a game. (Basically we were comparing players' moves to the best moves suggested by a strong chess engine. My question is, is there any online/offline resource when I can do this?

# Answer
> 5 votes
It's a matter of how much data there is. When you first get a rating in a tournament, it is a provisional rating until you reach X number of games. In the US I think you need 20 games. The provisional rating fluctuates more because of a single loss or win.

However, I recently obtained a copy of Houdini Pro 4. In the help contents is this: "Unix inventor and computer chess pioneer, Ken Thompson, has developed an algorithm which allows one to create an Elo rating list out of an arbitrary set of games".

There is also a step-wise process to generate an Elo list. So, perhaps it can not be done based "on a game", but maybe not too many more are needed using Ken's algorithm? Not sure, I never tried using that tool.

# Answer
> 2 votes
Jack Welbourne created a program like this called Chess Game Report.

http://rybkaforum.net/cgi-bin/rybkaforum/topic\_show.pl?tid=16085

# Answer
> 2 votes
Since about April 2023, chess.com's game review has an estimated rating feature. Unfortunately, unless you have a membership you only get one review a day. I can't vouch for its accuracy either.

# Answer
> 1 votes
Software based on a game, probably not to be honest, the best way to get your strength 'measured' is by playing on some internet chess server where you can obtain an online rating.

Although this website can give you elo rating estimate based on a series of exercises which you do. http://www.chessmaniac.com/ELORating/ELO\_Chess\_Rating.shtml

# Answer
> 1 votes
You are lucky, because I have just published an Android App that does exactly what you need. It is called "Analyze your games" and you can get it here for free:

https://play.google.com/store/apps/details?id=com.bento.analyzeyourgames

# Answer
> 0 votes
Elometer.net estamates your ELO rating on finding the best moves in 76 game-situations.

---
Tags: engines, elo
---


# Question
Title: Looking for online Swiss pairing software for reporting USCF tournaments
We organize a monthly USCF tournament. We would like to know if an online Swiss pairing software for USCF tournaments exists.

In the following Chess Stack question (Looking for online Swiss pairing software), we found very good information. However, it seems that none of the online websites mentioned in that question help to report the results to USCF. What do you know about it? Are you a USCF tournament director who uses any of these websites?

We are looking for a software that automates or simplifies the reporting of results to the USCF. At this time, we are doing it manually using the USCF website.

If what I am looking does not exist, I would like to know what are the best options. We are willing to pay if that helps. At this time, we have found that Chess Manager has a free version for 20 players or less, and it costs 49 dollars per year for the full version.

# Answer
> 1 votes
ChessManager here! Just wanted to let you know we just released a new version with USCF Reports:

* Set Country/Federation to "United States"
* Enable "Local Rated Tournament" Toggle
* Fill "Data for Local Federation" Form
* Download by clicking "Local Registry Report"

---
Tags: uscf
---


# Question
Title: Any engine that can play like Petrosian?
So, I am a big big fan of Petrosian and his Style. I tried to search for engines that can actually try to imitate it's style, instead I found Tal's engine (Opental 1.1). Can anyone help me?

# Answer
> 0 votes
ShashChess which is a Stockfish derivative has a `Petrosian` UCI option which you can use to make the engine play in a similar style to Petrosian. There're also options for Tal and Capablanca, moreover you can mix these options (e.g. Tal+Capablanca). Read more here in the documentation: https://github.com/amchess/ShashChess#shashin-section

# Answer
> 1 votes
Avataruci.org has an interesting way to mimic your own style. You can get all of your games in one pgn and upload it, get a weight file and run the with their engine. It will try to imitate your style. Similarly, download Petrosian's games from pgnmentor and try doing it (I think they already have his weight file in their website, you just have to download it from there).

# Answer
> 0 votes
You can use Rybka chess engine, his skills are similar to Petrossian style.

---
Tags: engines, positional-play, famous-players
---


# Question
Title: Is this the right way to respond for Bishop Opening?
For the Bishop opening,

> 1. e4 Nc6 2. Bc4

is this the right way to respond?

```
    [fen ""]
    1. e4 {[%clk 0:10:00]} Nc6 {[%clk 0:09:57.8]} 2. Bc4 {[%clk 0:09:56.1]} a6 {[%clk 0:09:54.7]} 3. Qf3 {[%clk 0:09:51.1]} Ne5 {[%Clock 0:00:00.1] What would like to give up over this board, I may tempt to ask, may I. Play you part.!]}

```

# Answer
> 5 votes
2...a6 does not seem like the best way to respond. The bishop has already gone to c4; preventing it from going to b5 isn't something you need to do. You're essentially *hoping* they'll play 3.Qf3 so you can spring your trap. But what if they play something like 3.d4 or 3.Nf3? Then all you've done is waste a move. A normal developing move would probably be better.

3...Ne5 seems like the best move after the Qf3 move, though. You're defusing the checkmate threat and getting the bishop pair.

# Answer
> 1 votes
In addition to DMs perfectly acceptable answer:

a) Here is the Stockfish quick rating of the moves

* 1.e4 +0.2 Works since centuries
* 1...Nc6 +0.4 Nimzowitsch defense, playable
* 2.Bc4 -0.2 Not the best, e6 and d5 will win a tempo
* 2...a6 +0.8 Waste of time
* 3.Qf3 -0.7 Bad, you get the bishop pair and probably development tempi by attacking the Q

But how probable is that this comes on board? Four principled possibilities:

* White and Black are beginners: The advantage of the bishop pair would be near to meaningless since White probably doesn't know how to use it
* Black is a beginner, White not: Black knows better ways to defuse shepherds mate AND get a slight edge
* White is a beginner, Black not: White knows better ways to get a slight edge than testing whether Black knows the shepherds mate
* Neither White nor Black is a beginner: White wouldn't try Bc4 in the first place but rather play standard theory, say 2.d4

---
Tags: bishops-opening
---


# Question
Title: A puzzle where you must find the mate in 3 solution but avoid mate in 2 and mate in 1 solutions?
I want to see if a puzzle could exist where you must avoid finding mate in 1 or 2 but just find the mate in 3 solution.

This is not subjective it is a hard math problem to make a move that forces mate in 3 while avoiding other moves that force an earlier mate

# Answer
> 1 votes
```
6k1/4Q3/6K1/8/8/8/8/8 w - - 0 1

```

Just take n moves, without threefold repetition, doing a king walk that goes back to g6 or h6. Then Qg7#. This will be your forced checkmate in n+1 moves.

EDIT:

```
k1B5/r2rrrrr/R7/R7/R1N5/R7/R6B/K7 w - - 0 2

```

---
Tags: problems, checkmate
---


# Question
Title: How to run lichess stockfish analysis locally?
I am working on a research project where we need to run stockfish on hundreds of thousands of pgns we have collected. We need to extract all information generated from stockfish like centipawns, inaccuracies, blunders, mistakes, etc. I know you can download stockfish .exe and some gui to use it with. But we need to run it on large number of existing pgns in an automated manner preferably using python.

# Answer
> 4 votes
Download Stockfish form official website. Note that there are different versions for different cpus - pick first one that works.

Then you can communicate with stockfish using UCI protocol. For python library python-chess supports it.

For distributed analysis Lichess developed Fishnet which is open source. Maybe you can adapt it for your needs?

# Answer
> 1 votes
Nibbler appears to have partial Stockfish support; it's Leela-oriented.

I've requested for Lichess to make their feature available locally - it helps if they hear from more users, consider commenting. Since it's open-source, locality is of course possible for an outsider to implement, if willing.

---
Tags: analysis, stockfish, pgn, lichess, python
---


# Question
Title: Weekly pairings in a non repetitive way?
I'm part of a local chess club and we play once a week, 4 or 5 games.

The way pairings are done is by Swiss style pairings where in the first round the top half is paired against the bottom half. Which is fine if it's a one off but what ends up happening is the pairings are the same every week. There are people who I haven't played in months even though we've come every week just due to the pairings. The chess club only has about 10-15 regular members.

Is there a way we can mix up the pairings so everyone plays everyone but it still preserves the "tournament" feel?

# Answer
> 2 votes
The effect you are seeing is a result of the initial ranking which is done automatically on ratings. When you set up the new tournament you can choose either to have the players sorted by rating or to leave the sort order as the order the players were entered.

You can then do what big international tournaments sometimes do to make the first round more exciting and draw for start number. In regular FIDE rated tournaments this is normally fine. A few years ago when the Isle of Man did this for a tournament which was also a qualifier for the Candidates FIDE objected but for your small local tournament there should be no problem.

# Answer
> 0 votes
Well, sure. You can do pairings however you like, so long as your tournaments aren't rated by some external organization like FIDE.

The best way might be to just swap the seeds of some of the players sometimes. If 1 always plays 7, wins, and then plays 4, then if you swap 7 with 8 and 4 with 5 they'll have different opponents for the first two rounds. Then maybe next week you instead swap 6 with 7 and 3 with 4. If you keep the swaps small you preserve the general style of top half vs bottom half in the first round, without having the exact same pairings every time.

---
Tags: tournament, swiss-pairing, tournament-directors
---


# Question
Title: Chess Programming, Have to clear my transposition table after every move
I am developing a chess engine and have implemented various basic algorithms such as negamax search, alpha beta pruning with move ordering, and quiescence search. I have a transposition table with an always-replace scheme because it seems to work better, however I've found that if I don't clear my transposition table between every move, the engine sometimes makes terrible blunders like hanging mate in one. I've looked online for solutions and a common error I found was that the table can sometimes become polluted with draw scores, however I've set up my code such that any draw scores simply aren't stored in the table, but that hasn't fixed the problem. I've made sure my zobrist hashing is working correctly, I'm not really sure what else could be causing this issue.

I've based my negamax search off this website.

https://en.wikipedia.org/wiki/Negamax

Any help would be appreciated.

Edit: Here's a link to my code if anyone wants to go further in detail. https://github.com/nikhilsarin1/Chess-Engine

```
public int search(int depth, int ply, int alpha, int beta) {
    int alphaOriginal = alpha;

    long zobristKey = model.getZobristKey();

    TranspositionEntry entry = model.transpositionTable.getPosition(zobristKey);

    if (entry != null && entry.ply() >= ply) {
      if (entry.flag() == TranspositionEntry.Flag.EXACT) {
        bestMoveForCurrentSearch = entry.bestMove();
        return entry.score();
      } else if (entry.flag() == TranspositionEntry.Flag.LOWER_BOUND) {
        alpha = Math.max(alpha, entry.score());
      } else if (entry.flag() == TranspositionEntry.Flag.UPPER_BOUND) {
        beta = Math.min(beta, entry.score());
      }
      if (alpha >= beta) {
        return entry.score();
      }
    }

    if (model.isCheckmate()) {
      return -mateScore + ply;
    } else if (model.isDraw()) {
      return 0;
    }

    if (depth == 0) {
      return quiescenceSearch(alpha, beta);
    }

    int evaluation = -999999999;
    Move bestMoveAtCurrentDepth = null;

    for (Move move : model.getBitboard().getLegalMoves()) {
      searchCount++;
      model.movePiece(move, false, depth);
      int score = -search(depth - 1, ply + 1, -beta, -alpha);
      model.undoMove();

      if (score > evaluation) {
        evaluation = score;
        bestMoveAtCurrentDepth = move; // Update the best move at this depth
      }

      alpha = Math.max(alpha, evaluation);

      if (alpha >= beta) {
        model.getBitboard().recordKillerMove(move, depth);
        break;
      }
    }

    TranspositionEntry.Flag flag;

    if (evaluation <= alphaOriginal) {
      flag = TranspositionEntry.Flag.UPPER_BOUND;
    } else if (evaluation >= beta) {
      flag = TranspositionEntry.Flag.LOWER_BOUND;
    } else {
      flag = TranspositionEntry.Flag.EXACT;
    }

    if (evaluation != 0) {
      model.transpositionTable.storePosition(
          zobristKey, ply, evaluation, flag, bestMoveAtCurrentDepth);
    }

    bestMoveForCurrentSearch = bestMoveAtCurrentDepth;
    return evaluation;
  }

```

# Answer
Ok, I've finally found the root cause of your problem: you are storing the ply rather than the depth in the transposition table. This is wrong, and it ultimately causes your table to save only the results that you have the least information about, and only accept the results which are least informative.

In a transposition table, we save the value of the depth parameter because this tells us how much further we searched beyond that position before we reached the calculated score. The ply tells you how far into the search you were before you reached this position. The evaluation of a position does not depend on history (which is what the ply would hint at), it only depends on what happens after the position. It does not matter if we reached the position on move 1, 5, 10, 50, the best follow-up will always be the same.

When retrieving the results from the table, we compare the depth that the saved result was searched to against the depth that we need to search to. If the saved result was searched at least as deeply as we were planning to search, we can return that result immediately. If not, we can't accept the prior results and need to continue further. As implemented currently, you are essentially doing the opposite. If the saved result was searched more deeply than you plan to search, you ignore it, but if it was searched less deeply, you accept it, leading to blunders due to the low search depth in these evaluations.

---

The fix is not too difficult. In the Search, you should be saving the value of `depth` in the TranspositionTable, and comparing the `depth` against the saved depth in the entry. You should also update the names of the relevant variables in TranspositionTable and TranspositionEntry so that it is clear that you are saving depth, not ply.
> 4 votes

---
Tags: engines, programming
---


# Question
Title: Swiss pairings software ignoring colors?
I am looking for a tool that could manage a tournament and calculate the pairings (with Swiss or accelerated Swiss system) with an option to ignore black and white colors.

This software, with the option activated, would not take into account the prefered color of any player (no "you had White in round 1, so you should have Black in round 2") but otherwise apply all the usual rules for Swiss system (split players in a same bracket by rating, manage floating players, forbid facing twice the same opponent, etc).

Does such a software exists ?

The purpose is to use it for 1v1 sports without colors (e.g. tennis) or for games where colors are not attributed but picked at ramdom before the game (e.g., shogi). Internet searches have not brought satisfying results.

# Answer
Try *Sevilla* by *JBF Software*. Sevilla supports match and minor scores, e.g. 2-0, (3-2). Amalfi-pairing is also supported.

Some configuration is required as the program focuses on chess.
> 1 votes

---
Tags: software, swiss-pairing, shogi
---


# Question
Title: How to run perft with Stockfish in the terminal on a macbook?
I just got a Macbook and I'm attempting to build a chess engine, so I want to run the perft function on Stockfish to compare my perft results. When I was on PC, I was able to download the engine from the website and run the perft function fine, but I can't figure out how to do it on mac. I tried downloading Stockfish with Homebrew which apparently worked but when I tried the `./stockfish` command to run t it outputted this error: `zsh: no such file or directory: ./stockfish`. Can anyone provide complete steps to do this? Or if there's any alternative that has a feature equivalent to what Stockfish's perft does that would be good too.

# Answer
Solution: I downloaded stockfish through homebrew and was able to run it on the terminal with the command `stockfish`. All other commands are the same.

Credit: @qwr in the comments
> 0 votes

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


# Question
Title: Chebanenko Slav vs Queen's Gambit Declined?
I am around 1400 ELO (on chess dot com) and mostly play daily chess.

I like solid positions where I get to a roughly even middle game without a lot of blazing tactics.

Right now, I am learning the Chebanenko Slav against 1. d4 and it's going OK, but Chessable has a new course on the QGD, that looks like it might suit me even better.

What are the differences between them?

# Answer
The main difference between the Slav and QGD is that black in the Slav plays c6 and delays playing e6, while in the mainline QGD, black plays e6 first and might play c6 or c5 later depending on the variation. The initial pawn structure is the big difference between the two and can result in different strategies. For example, since the Slav delays playing e6, there are many variations in which Black's c8 bishop goes to a more active square like f5, whereas in the mainline QGD, that possibility is almost always sealed up after black plays 2...e6. Additionally, an idea in the Chebenenko (and sometimes in the Slav) is to threaten to capture dxc4 eventually and gain the pawn or some tempo with ...b5. If you're playing a mainline QGD as black, you're almost never going to do that. Slav and non-mainline QGD's in general are usually more aggressive than the mainline, although the Slav is also well-known for its high draw rate in some variations. The mainline QGD is generally regarded as a solid opening, but black has to defend for a period of time before he can consider counterplay. Finally, if you dislike playing against a Catalan setup as black, many Slav variations have the advantage of equalizing quickly against the Catalan, while mainline QGD structures for black are, again, somewhat passive versus a Catalan setup.
On the other hand, the QGD mainline is still playable and used quite frequently. It's considered to be a slightly passive but pretty solid opening in general. It's also a very straightforward opening to learn, and with regard to you saying that you don't like highly tactical openings/middlegames, there's not much tactical motifs you need to know in the mainline as far as I remember. I played the QGD mainline as black for a while, and many positions in the mainline are similar to each other so the ideas carry over quite well.
As someone who plays 1. d4 d5 queen pawn openings as both white and black, I would rather play a Slav-like setup than a QGD mainline as black, and there are times when I do not enjoy playing against it as white. If you don't like some aspects of the Chebenenko or the Slav in general or the mainline QGD, you could also consider learning the Janowski (1. d4 d5 2. c4 e6 3. Nc3 a6) which is what I play now and combines some features of both. At the end of the day, both are playable and it's up to personal preference.
> 1 votes

---
Tags: opening, queens-gambit-declined, slav-defense
---


title: Correcting a wrong name on a FIDE ID

text:
# Question
Title: Correcting a wrong name on a FIDE ID
My child is a new member of FIDE. However, his name is wrong. As such, I need to correct the name FIDE have for them.

How does one go about doing this?

# Answer
You need to contact your national federation and ask them to initiate the change for you. FIDE deals with member federations rather than individual members.

The person in your federation who is responsible for these things is the IRO (International Ratings Officer). You can find your IRO's contact details via the FIDE website. Go to the FIDE Directory page, click on "Member Federations" and a list will appear grouped by continent. Find your federation and click on the link and you will see the details for your federation. For instance, the English federation is here and the US federation is here.
> 5 votes

---
Tags: fide
---


# Question
Title: In a blitz game , Leela zero failed to win a winning 7 pieces endgame. Why?
The following position : WHITE King on e2 Bishop on d1 Knight on d2 pawn on f3 BLACK King on d7 Rook on c4 pawn on c5 BLACK to move Is a 7 Pieces endgame indicated as a White win by Syzygy 7 Pieces tablebases. In a blitz game , though , the game ended in a draw from there , although White was Leela zero. Is Leela zero still week in the endgame?

# Answer
As far as I can tell, the latest update in regards to tablebases is from August 2018.

> The support in v0.17.0 is partial only, only WDL tables are probed, but not DTZ. That means, that Leela is only able to query tablebase for positions immediately after captures and pawn moves, and for other positions it has to think by itself.
>
> While it improves strength of the play in average, often lack of DTZ queries causes weird endgame playing effects and losing play.
>
> For example, Leela may have a 7-men position with considerable advantage (probability of win 99%) and then “simplify” to 6-men “won” position by just giving up the material. That 6-men position is “won” from the point of view of tablebases, so it has probability of win 100%, and Leela happily goes there. However, after that move Leela has to play by itself, and that position may be really hard for Leela to win without tablebases. It’s not rare that that leads to drawn or lost games, which Leela would win or draw if it played without tablebases at all.

From your observation, it appears that Leela Zero is still relying on its own evaluations for the bulk of the endgame. That doesn't necessarily mean that it is weak in the endgame, just that it does not play the positions perfectly and is thus susceptible to losing against engines which do use the the tablebases for endgame play. However, as explained in the last paragraph above, the partial reliance on the tablebases can lead Leela into positions that are theoretically best if the specific sequence of moves is played, but if those moves are difficult to find, it may not be the best path to go down.
> 1 votes

---
Tags: computer-chess
---


title: What are the 18 moves?

text:
# Question
Title: What are the 18 moves?
Last week New in Chess' book of the week was *Zlotnik's Middlegame Manual* by Boris Zlotnik. Zlotnik was Caruana's coach during his youth when he was living in Spain and Caruana wrote a foreword for the book. As part of their promotion for the book New in Chess gave a link for a pdf extract from the book.

*Chapter 6 - The d5 square in the Sicilian* includes this annotation of the Byrne-Fischer game in Sousse 1967.

```
[Title "Byrne - Fischer, Sousse 1967"]
[fen ""]
[Startply "10"]

1. e4 c5 2. Nf3 d6 3. d4 cxd4 4. Nxd4 Nf6 5. Nc3 a6

```

It continues:

> One of the most popular positions in modern chess. It is curious that, in search of an advantage in this position, **White has tried eighteen (!) moves**, i.e. every reasonable move. I think that on the one hand this is a sign of the richness of the game of chess, while on the other hand it indicates that in the opening stage of the game the concept of ‘best move’ is often a relative one. The move played in the game was a favourite of Fischer himself, together with 6.h3

What are the 18 different moves white has tried in this position and where they have names what are they?

# Answer
I don't know which 18 that Caruana specifically had in mind. In Chess Tempo's Opening Database between 2700+ players there have been 18 moves tried:

1. 6.Be3
2. 6.Be2
3. 6.f3
4. 6.h3
5. 6.Bg5
6. 6.g3
7. 6.a4
8. 6.Bc4
9. 6.Bd3
10. 6.Nb3
11. 6.Rg1
12. 6.a3
13. 6.f4
14. 6.h4
15. 6.Qd3
16. 6.Qe2
17. 6.b3
18. 6.Nf3

Between 2500+ players, there have additionally been: Bd2 and Qf3
> 1 votes

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


# Question
Title: How many initial moves are possible in Chess, 20 or 21?
Each pawn, of which there are 8 white, can move 1 or 2 squares forward. Each knight, of which there are 2 white can move forward and left or forward and right.

That gives 20.

But white can also resign, and in some tournament situations this might be sensible.

But is resignation a move?

I sometimes attend quiz nights and this is a common question, and the answer is always said to be 20. I, however, always say it is really 21 because of the resignation option. But, is resignation actually a move?

# Answer
> 12 votes
Your question essentially reduces to asking whether resignation is considered a move or not. To be exact, you are asking about *legal* moves, the topic of which is addressed in (and defined by) Article 3 of the Laws of Chess. Resignation isn't mentioned there, so it's not a move.

A heuristic argument: you are allowed to make a move and then resign immediately, i.e. if resignation was a move, you have effectively made two consecutive moves, which is not allowed.

Or more simply: since you can resign even when it's not your move, it follows that resignation is not considered a move.

# Answer
> 5 votes
According to the FIDE rating regulations -

> 5. Unplayed Games
>
> 5.1 Whether these occur because of forfeiture or any other reason, they are not counted. Any game where both players have made at least one move will be rated.

It looks like "resigns" is not a move. Games will only be rated if each side has moved at least one piece.

I believe this regulation was introduced after an incident in the last round of a big weekend tournament in England in the mid 1970's. Tony Miles was leading the competition and only needed a draw in the last round to guarantee sole first place. He met his opponent, Stewart Reuben, in the bar the night before and agreed a draw. The next day they played no moves and simply wrote on their scoresheets "draw agreed". Tony Miles won first place and Stewart Reuben shared second with several other players. They were given their prize money and everybody was happy until somebody noticed they had played no moves. Then the organizer was unhappy. The result between Miles and Reuben was cancelled and they were required to repay their prize money. Now this practice is explicitly banned.

If you look in the FIDE Laws of Chess you see that the full title of article 3 is -

> Article 3: The moves of the pieces

From this you can also see that in chess moves are moves of pieces. "Resigns" is not a move of a piece and is therefore not a move.

So, the correct answer is 20.

# Answer
> 1 votes
I can see that you are referring to standard chess and not Chess960 :)

In 960 however, it can even be 21 for certain positions where you can castle on the first move itself.

https://lichess.org/analysis/chess960/rbnnbkrq/pppppppp/8/8/8/8/PPPPPPPP/RBNNBKRQ\_w\_KQkq\_-\_0\_1#1

```
[Variant "Chess960"]
[FEN "rbnnbkrq/pppppppp/8/8/8/8/PPPPPPPP/RBNNBKRQ w KQkq - 0 1"]

1. O-O (1. a3) (1. b3) (1. c3) (1. d3) (1. e3) (1. f3) (1. g3) (1. h3) (1. a4) (1. b4) (1. c4) (1. d4) (1. e4) (1. f4) (1. g4) (1. h4) (1. Nb3) (1. Nd3) (1. Nc3) (1. Ne3)

```

**EDIT** for some reason replayer breaks when I castle on first move here. lichess works tho

# Answer
> 0 votes
Resigning is stating you do not want to make another move. A draw is recognition that you can not make another move, either way they are both situations where no move is made.

If either of this situations were considered moves, then it would follow both logically yet absurdly that deciding who plays what color is a move! and simply setting up the board would be a move!

So while resigning, offering a draw, picking a color and/or setting up the board are all part of a chess game they are not chess moves!

---
Tags: opening
---


title: How to implement Zobrist tables?

text:
# Question
Title: How to implement Zobrist tables?
I am making a chess engine and trying to implement Zobrist tables into my engine. From what I've read, my understanding is that you first calculate the Zobrist hashcode, then get the modulo of the hashcode divided by the size of your transposition table to find the storage index, then store all corresponding evaluation values into that index. I have a 64-bit Zobrist hash function written, but I have some questions on how to implement the actual table and Zobrist hashing in general:

1. From what I've read, I should make an array of entries to store hash/eval info. How big should I make an array like that be to fit all the hash functions over an entire game?
2. If the index at the modulo of a hash function is already stored, would I just follow regular hashing rules and keep traversing every n elements in the array from the index until I find an empty index? Is this also the protocol for Zobrist hashing?
3. Correct me if what I'm saying is wrong, but I've read that when searching through the hash array, if the depth searched of a hashed position is different from the current depth you're searching, even if the hash value between your position and the hashed position is the same, you're not supposed to use the past evaluation. I understand the logic behind this, but doesn't this practically make Zobrist hashing useless? Realistically, an engine is not going to evaluate a position at the exact same depth every time, right?
4. Say a position with hashcode `x` and evaluation depth 5 exists in the hashtable and has a final evaluation of `a`. I evaluate the same position `x` but this time at depth 6, so I find the new evaluation value to be `b`. Do I update the past evaluation `a` for `x` at depth 5 to the current evaluation `b` at depth 6?

# Answer
> 1 votes
I will try to answer some of the questions.

1. Is the question how large your hash table should be? I think the simple answer is, make it as big as you can on your system. If you have 16 GB of RAM you can for example make it 8 GB big. (usually the number of entries will be a power of 2 e.g. to make the index calculation a simple bit operation, though you can use other sizes) Most programs have this size be configurable.
2. This is not usually how things are implemented. For most applications it is essential that stored elements are retrievable again. However, in chess you don't lose much if you lose one entry, you can simply redo the search. Because of that, when writing to a cell that already contains a value you can simply overwrite it without losing correctness. What I do in my program is to have at every index a bucket of 4 entries (16 Byte each, so together they nicely fit into a 64 Byte cache line) then I can store up to 4 entries per index. But of course in a long enough search that will eventually fill up, in which case I simply discard the least useful entry. (there you also have some options of how to value different entries against each other)
3. There are two possible approaches here. The standard approach is to only use entries that have depth *at least* as high as you need. So if you need a depth 8 value for a position but only have a depth 9 value, you still take that one. This is simply and the most efficient and because of that is the default option. However, it has some undesired consequences: the most apparent one is that your search is no longer equivalent to minimax, since a minimax depth 8 search would get a different result than a depth 9 search. Depending on your evaluation, you might have some odd-even effect where the player with the most recent move tends to get a better evaluation by virtue of being able to use that last move. In that case depth 8 and depth 9 might not compare super nicely. If you want to avoid this, you can store one entry per depth. So you might have a depth 7, 8 and a depth 9 entry for the same position. You can for example do this by storing the position at index (hash % table\_size) + depth. This costs some more memory but you avoid some of the above problems. Are these exact matches even useful values? Yes, because of transpositions. Assume for example you calculate 1.d4 Nf6 2.c4 or 1.c4 Nf6 2.d4 from the start position. For the second line you will get an exact depth match. Furthermore, if you play against the engine, after making a move the engine will still have the previous search results in the hash table so when starting to calculate for the next move you get a "head start" by reusing the previous calculations.
4. In the scenario where you only have one entry per position you change both the evaluation and the depth of that entry. (as well as the best move and whatever else you might store) In the alternative approach of one depth per entry you naturally don't meddle with the lower depth entry, but rather would simply create a new entry.

And finally a small general note: Zobrist hashing is one specific type of hash functions. I think your questions seem to be more about transposition tables in general?

---
Tags: engines, software, programming, evaluation, minimax
---


title: Are Chess Engines Humanoid Figures?

text:
# Question
Title: Are Chess Engines Humanoid Figures?
On Youtube it shows chess engines as humanoid robots (here, for instance). Is this true, and if so do they play chess over the board according to their software? That would explain why they don't always play the best move according to their algorithm.

# Answer
No, chess engines are not humanoid robots. That is just something that the YouTube channel uses to represent the engine so that the videos are more approachable for the intended audience. Chess engines are simply software that run on computers. People may make a robot or animated personality to go with the engine, but that would be entirely separate from the engine itself, and it would not change what the engine does.

Strictly speaking, a chess engine is just a piece of software that defines some criteria for differentiating between good and bad positions. When given a position to analyze, it will yield the best move according to this criteria. It takes time and resources to find this best move, so the same engine analyzing the same position with different amount of time or computer resources may yield different results. This would be especially noticeable when comparing to the performance of an engine that is playing a match, where time is limited, to the same engine analyzing a position after a match, where time is unlimited.
> 3 votes

---
Tags: engines, stockfish, otb-chess
---


# Question
Title: FIDE and USCF: What do the rules say when a player insults an arbiter?
FIDE and USCF: What do the rules say when a player insults an arbiter?

This is an uncommon situation. In general, chess players are very polite people. 30 years ago, I was in training with Paul Klein, who was the Arbiter in Chief of the FIDE World Chess Championship between Karpov and Korchnoi in 1981, and several FIDE Olympiads. He taught us that FIDE rules do not want to cover all possible situations. He told us that FIDE assumes that the arbiter must have very good common sense.

My common sense tells me that the arbiter must give a warning, and if the player does not apologize and/or correct their behavior, the player must be expelled from the tournament. I would think that this sanction needs to be reported to FIDE and/or USCF. However, that is just my intuition. What do the current FIDE and USCF rules say about this circumstance?

# Answer
> 5 votes
> He taught us that FIDE rules do not want to cover all possible situations.

Like 100% of laws anywhere in the world, there are always edge-cases and trying to cover all edge cases may introduce loopholes.

---

FIDE's The ethics and disciplinary code §11.3 states:

> The following conduct shall constitute a violation of this Code (in each case, whether committed directly or indirectly) if committed by any person subject to this Code:

§11.9 :

> e) Abuse and obscenity: Players must refrain from audible or visible obscenity, verbal, emotional or physical abuse toward any other player, tournament official or spectator;

> j) Attempt to Undermine Honour: Any person who attempts to undermine the honour of another person subject to this Code in any way, especially by using offensive language, gestures or signs;

There are no requirements to report §11.9 incidents (as opposed to §11.8-related incidents about betting and match fixing). The common sense of all parties involved (victims, witnesses...) the tipping point about if a report under §11.9 should be filed.

There might also be tournament-specific rules about this, especially about expelling... and, in any case, both the Tournament Director and the chief arbiter will also have their own judgment to make the decision.

---

USCF CoE seems to follow the same common-sense approaches but encourages reporting if there was a warning.

§6

> The list is not intended to be exhaustive, and any action or behavior that is unlawful or violates US Chess rules and regulations, or is inconsistent with the principles of fair play, good sportsmanship, honesty, and respect for the rights of others, may be considered to fall within the scope of this code of ethics.

> a) Intentional violations of tournament regulations, or of any other regulations pertaining to USCF activities and goals, **particularly after being warned.**

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


# Question
Title: What are some good "club-player" Sicilians?
My criteria for good "club-player" openings are:

1. objectively good
2. as little memorization is needed as possible
3. forgetting theory / messing up move orders / playing mediocre moves won't kill you immediately
4. **easy to play and understand**, clear plans/ideas/pawn breaks

A nice to have would be if the opponent needs to be precise in order to keep an edge and if one could avoid passive positions (like the Maroczy bind).

I'm aware of the fact that it will be challenging to have everything at once and that every Sicilian player should be willing to learn some concrete theory.

My three candidates fulfilling as many of these criteria as possible that I have found so far are

* The Hyper Accelerated Dragon
* The Taimanov Sicilian
* Shankland's Classical Sicilian (i.e., aiming for the Dragon setup while avoiding the Yugoslav attack and discouraging all anti-Sicilians. However, against the (critical) 6.Bg5 there will be no Dragon setup.). \[Here is a free summary of the lines Shankland recommends\]

What would be your recommendation(s) for club-player-friendly (1600-2000 Elo) Sicilians (for Black)?

# Answer
> 3 votes
**Methodology**

I went through all Sicilian variations of GM Moulthun Ly's Sicilian Defense Tier List, where he ranks the Sicilian variations by quality and amount of theory/difficulty of play.

1. **Quality**: I discarded every variation that he regarded worse than 3rd class / mediocre quality in his final ranking (even though I briefly considered the Nimzovich Sicilian)(i.e. I excluded the Nimzo, Godiva, Pin variation, O'Kelly (which he has a video on as a simple Sicilian), Paulsen-Basman, Katalimov).
2. **Difficulty/Theory**: I discarded every variation he considers highly difficult (i.e. Sveshnikov, Classical, Scheveningen, Dragon, Najdorf). All remaining openings are already interesting for a club player.
3. I removed variations that allow major alternatives to the open Sicilian, such as the Rossolimo variation (and therefore more **theory** to know, e.g. the Kalashnikov variation) and variations where Black is **passive** (e.g. Kan variation, Hedgehog, HAD).

Only two openings remained (Taimanov Sicilian and Sicilian 4 knights), which I investigated with the help of books/chessable openings courses, video lectures the lichess opening statistics and an engine. Because I wasn't proceeding systematically from the start, I also analysed/read books/courses on the Classical Sicilian, Sveshnikov Sicilian, (Hyper-) Accelerated Dragon and played all of these openings in at least a few Blitz / Rapid games each to get a feeling for how fun, intuitive and understandable the positions are.

In the end, I chose the **Four knights Sicilian** for practical reasons (and will probably later switch to the Taimanov, if required at any point).

1. There is even less theory (there are only two good options for White, and White has to play very precisely).
2. Black has a **very simple plan** of pressurizing the center with Bb4 or quickly breaking with d5 if allowed. At the same time, most of White's typical ideas against the Sicilian that work in other variations are too slow.
3. Black develops quickly and actively. No time "wasted" on moves like a6. If White doesn't react immediately, Black is at least fine or even better.
4. The opening scores exceptionally well (more points for Black than White!) in amateur statistics (lichess database). Nobody seems to be prepared for this line.

The one big drawback of the Four Knights Sicilian is its objective value. In some lines, Black never equalizes (this is also acknowledged in FM Plichta's Chessable course on this opening). When following a well-scoring sideline suggested by FM Hacker, one can even end up by force (playing the best engine moves acc. to SF15 depth 23-30) in a position that is +1.2 for White. In Molton's Tier list, the quality was ranked the same as variations that went into the excluded tier ("just tricks").

However, these positions have never been reached in amateur games on lichess and only extremely rarely in master games. Also, the position is complex, with the potential for both sides to go wrong. There is potential counterplay and complication. It is highly unlikely, that 2000-rated players will find the best way to punish this opening choice (unless they prepare it at home). And even if they reach a position that is better for them, they would still need to play precisely and convert the advantage (far from easy with our counterplay).

Therefore, I concluded, that it is better for an amateur player to spend time to learn tactics/strategy/endgames rather than to learn more opening theory by playing the Taimanov instead of the Four Knights.

# Answer
> 0 votes
I would like to mention that you can be forced into playing the Sveshnikov from a Taimanov after white plays Ndb5 and Bf4. So I think that should rule out the Taimanov leaving only your suggestion of the Four Knights.

Looking a little deeper into the 4N's I found that it too can be forced into playing the Sveshnikov.

Maybe we should just play the Sveshnikov, lol.

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


# Question
Title: How to improve performance of Quiescence Search?
Thanks to information provided by a previous answer I added a quiescence search to the end of my negamax search to ensure I am not left with a piece hanging. I think it works however it takes a very long time, how can I change the code to speed it up? Here is my code: (C#)

```
private float quiescenceSearch(Board board,float alpha, float beta)
{
    qCount++;
    //Evaluation without captures
    float stand_pat = Evaluate(board);
    if (stand_pat >= beta) return beta;
    if (stand_pat > alpha) alpha = stand_pat;
    Move[] legalMoves = board.GetLegalMoves();
    foreach (Move move in legalMoves)
    {
        board.MakeMove(move);
        if (move.IsCapture||board.IsInCheck())
        {
            float eval = -quiescenceSearch(board, -beta, -alpha);
            board.UndoMove(move);
            if (eval >= beta) return eval;
            if (eval < alpha) alpha = eval;
        }
        else    board.UndoMove(move);
    }
    return alpha;
}

```

# Answer
One thing you can do if your quiescence search is taking too long (more than 90% of your total search time) is limit the maximum depth of the quiescence search. This can be done the same way you would limit a normal search. Another unrelated tip that doesn't make much of a difference: for your eval function you can return a result in centipawns or millipawns so you can use an int for eval instead.
> 1 votes

---
Tags: engines
---


# Question
Title: How can I make my chess engine more efficient?
First, here's some context. My chess engine uses bitboards and works like this: A single gameboard is created as a 2d array at the start of the program. Like this:

```
[[-4 -2 -3 -5 -6 -3 -2 -4]
 [-1 -1 -1 -1 -1 -1 -1 -1]
 [ 0  0  0  0  0  0  0  0]
 [ 0  0  0  0  0  0  0  0]
 [ 0  0  0  0  0  0  0  0]
 [ 0  0  0  0  0  0  0  0]
 [ 1  1  1  1  1  1  1  1]
 [ 4  2  3  5  6  3  2  4]]

```

Where each number represents a piece. This 2d board is then converted to 12 bitboards, each representing a set of white or black pieces for each color. The possible legal moves are then generated using various bitboard techniques.

Now to my question: I've written the engine in Python, and so far, the search and evaluate function (a.k.a the minimax function) can only reach a ply of 4. When I try to start going to a ply of 6, the program takes about a good 45-60 seconds to calculate the best move. Any higher ply would make the computer take too long.

Is my implementation inefficient? If not, then any advice on why my engine is so slow would be appreciated. I imagined that with bitboards I could at least reach a ply of 8-12 in Python, even though it's not a very efficient language.

Edit: Also yes, I'm using alpha-beta pruning.

# Answer
> 5 votes
Generally, I would avoid using Python for chess programming altogether. Consider converting to Cython or better yet, use a modern system language such as Rust, Zig, etc.

# Answer
> 1 votes
If you are not yet using move ordering, I would strongly suggest you do so. Even some basic MVV-LVA helped increase my Python engine's speed by almost 500 percent. Here is some sample code if you want:

```
def OrderMoves(board, moveList):
    moveScores = []
    pieceIndexDelta = 6 * sideToMove  # given as zero or one, one for white
    for moveIndex in range(len(moveList)):
        currentMove = moveList[moveIndex]
        if move is castling:  # this is only necessary if you handle castling weirdly
            moveScores.append(0)
        elif move is promotion:
            moveScores.append(37 + promotionType)
        elif board[endSquare]:  # if move is a capture
            moveScores.append(6 * (board[endSquare] - pieceIndexDelta) -(board[startSquare] + PieceIndexDelta - 6))
        else:
            moveScores.append(0)
    return [n for _, n in sorted(zip(moveScores, moveList), reverse = True)]

```

This function will return the moves but sorted with good captures in front. If you have already done this I recommend you explore some more options such as null move pruning, MTD(f), iterative deepening, and quiescence search, all of which are easily accessible on Chess Programming Wiki.

Edit: for this code my piece list is as follows:

0: empty square
1: white pawn
2: white knight
3: white bishop
4: white rook
5: white queen
6: white king
7: black pawn
8: black knight
9: black bishop
10: black rook
11: black queen
12: black king

---
Tags: engines, programming, computer-chess, python
---


title: Wrong ELO calculation

text:
# Question
Title: Wrong ELO calculation
My daughter is a chess player. My concern is about her FIDE rating calculation in the August 2023 rating list. My daughter is Huseynova Lala Fide İD 13431781.

She played in 2 tournaments, the Paracin Open (6-15 July) and Serbian Open (16-24 July). She took part in only one tournament in June, the Azerbaijan Championship (16-26 June).

Why was her calculation lowered?

K=24 was used, NOT k=40. Our federation gave the results of the Azerbaijan championship late. My daughter is missing 97 elo. This is not our fault.

# Answer
The first thing to note is that FIDE make the rating calculations not Chess Stack Exchange. We can try and explain their calculations but we cannot change them or influence them in any way.

Here is the page on the FIDE website where your daughter's August 2023 calculations are made. As you correctly point out a K factor of 24 was used instead of 40. Three tournaments were rated in which she played a total of 29 games.

FIDE Rating Regulations effective from 1 January 2022 is the document on the FIDE site which explains how the rating calculations are made. Regarding the K factor it says:

> 8.3.3 K is the development coefficient.
>
> K = 40 for a player new to the rating list until they have completed events with at least 30 games.
>
> K = 20 as long as a player's rating remains under 2400.
>
> K = 10 once a player's published rating has reached 2400 and remains at that level subsequently, even if the rating drops below 2400.
>
> K = 40 for all players until the end of the year of their 18th birthday, as long as their rating remains under 2300.
>
> **If the number of games (n) for a player on any list for a rating period multiplied by K (as defined above) exceeds 700, then K shall be the largest whole number such that K x n does not exceed 700**.

I have added emphasis to the important part of the rules above.

Your daughter has 29 games in the rating period. 29x40=1160, much bigger than 700. The largest whole number such that K x n does not exceed 700 is 24 when n=29. 24x29=696. That's why a K factor of 24 was used.
> 24 votes

---
Tags: fide, rating, calculation
---


# Question
Title: FIDE and USCF: If an arbiter is watching a chess game and observes that a rule has been violated, should the arbiter intervene?
FIDE and USCF: If an arbiter is watching a chess game and observes that a rule has been violated, should the arbiter intervene? Or should the arbiter intervene only if a player complains? Some people would think that if the arbiter intervenes, he/she would be making noise and interrupting the entire chess tournament. On the other hand, some people would think that if the arbiter does not intervene, he/she would not be fulfilling his/her role, like a police officer who sees a crime and does not stop it. On the other hand, this situation would not be a crime but a violation of a rule. They are not the same. What do the rules say about this situation?

# Answer
> 7 votes
**The arbiter must intervene**

In a Fide event, the arbiter is supposed to intervene and make sure that the rules are respected.

From FIDE Handbook :

> Article 12: The Role of the Arbiter (see Preface)

> 12.1 The arbiter shall see that the Laws of Chess are observed.

> 12.3 The arbiter shall observe the games, especially when the players are short of time, enforce decisions he/she has made, and impose penalties on players where appropriate.

> 12.6 The arbiter must not intervene in a game except in cases described by the Laws of Chess. He/She shall not indicate the number of moves completed, except in applying Article 8.5 when at least one flag has fallen. The arbiter shall refrain from informing a player that his/her opponent has completed a move or that the player has not pressed his/her clock.

The arbiter is the only one (beside the players) who can interfere:

> 12.7 If someone observes an irregularity, he/she may inform only the arbiter. Players in other games must not to speak about or otherwise interfere in a game. Spectators are not allowed to interfere in a game. The arbiter may expel offenders from the playing venue.

**Anecdote**

I once witnessed a player, whose opponent was away from the board, play a move, notice that it was a mistake, take it back and play something else - which is obviously illegal. Although his opponent had seen nothing of it, the arbiter had noticed the take back and stepped in to ensure the position was corrected back with the move that was first played.

**USCF**

I have no idea about specific USCF rules, but if a USCF-led tournament is FIDE-rated, I expect the Laws of Chess to be enforced.

> 0.2 Preface

> A necessary condition for a game to be rated by FIDE is that it shall be played according to the FIDE Laws of Chess.

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


# Question
Title: Why is 4. e3 preferred over 4. e4 in this line of the Slav?
Why is 4. e3 preferred over 4. e4 in this line of the Slav?

```
 rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1
 1. d4 d5 2. c4 c6 3. Nf3 dxc4 4. e3

```

I would expect 4. e4 to be preferred, as it grabs more space in the center. The line usually continues 4. ... b5 5. a4 and if 4. e4 had been played, this would be very similar to some QGA lines, with a pawn structure identical to those QGA lines.

# Answer
> 3 votes
It seems that the center becomes weak after 4. e4 and white has trouble regaining the pawn as a result. For example,

```
 rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1
 1. d4 d5 2. c4 c6 (2. c4 dxc4 3. e4 Nf6 4. e5 Nd5 5. Bc4 Nb6 6. Bd3 Hc6 7. Ne2 Bg4 8. f3 Bh5 9. Be4) 3. Nf3 dxc4 4. e4 (4. e3) b5 5. a4 (5. Nc3 Nf6 6. e5 Nd5 7. a4 e6) Nf6 6. e5 Nd5 7. axb5 cxb5 8. b3 e6 9. bxc4 bxc4 10. Bxc4

```

In this position specifically, white has wasted two or three more moves trying to regain his lost pawn than he would have with 4. e3. As you can see, playing 4. e4 instead of 4. e3 gives black the opportunity to gain a tempo after 4...Nf6, which allows him time to equalize quickly by either defending his queenside pawns, which are his main weakness, or giving the pawn back and gaining massive piece activity and weak d4 and e5 pawns to target in the middlegame.
This is one line, but there are also lines in which black's light-square bishop gains activity down the a8-e4 diagonal, or in which white can only regain his pawn at the expense of losing both of his center pawns. If white plays 4. e3 instead of 4. e4, he has the advantage of still attacking the c4 pawn while also not compromising the integrity of his pawns. 4. e4 is a massive overextension of the center pawns that will be difficult to defend both now, and in the middle and endgame
After 2. e4 in the QGA, the pawn center is usually attacked by black, but it is also fairly defendable. This is because, as you probably know, protecting the c4 gambit pawn as black is usually a terrible idea, mainly because he must first protect the pawn with b5, then spend another few tempi protecting his b5 pawn, which can allow for white to gain a massive attack. As a result, unlike in the Slav, white doesn't have to bother recapturing the c4 pawn, because he knows he can do so at any time. Because of this, white can spend more tempi building up a center with 3. e4 and protecting his center pawns while also putting his pieces on nice squares.
Let's go back to the Slav with 4. e4 that you described. Again, the white center pawns are objectively pretty weak, and black can easily target them. The difference now is that black just has to play b5 to protect the c4 pawn, and not have to spend additional tempi to protect b5 from attack, as it is already defended by c6. Thus, compared to the QGA, protecting the c4 pawn becomes a real threat from white's POV, as black can do it easily and without too much loss of tempo. So now, white must defend his pawn center, which is still weak, while also trying to recoup the pawn on c4. (It's also important to note that the b5 pawn restricts white's knight, because if black plays ...Nf6 attacking e4 and white responds with Nc3, then b4 is now also a threat).
If you look at the variation I posted in my answer, white gets overloaded from those two tasks fairly quickly. White is basically forced to give black's knight a nice blockading outpost on d5, making his center pawns basically dead in the water, while also running the risk of not ever regaining the c4 pawn. So, in order to actually regain the pawn white has to play e3 as not to overextend himself. While white has pawns in the center, they are actually very weak, and looking through the lines below, he has nothing to show for his pawn center and all his pieces either on the back rank or doing absolutely nothing. Now compare this to a sample QGD line with e4 that I have also put down below. Whereas white does have a slightly weak center, 1) he can easily protect it and 2) his piece activity and coordination more than makes up for it either way. Notice how in the QGA position, all of white's pieces are poised well for an attack on either side, while in the end Slav position below, the center looks nice and the pieces are out, but the pieces aren't actually achieving any purpose and the d4 pawn is going to be targeted in the long term. It's also important to note that black gets an outside passed a-pawn from this, which may be useful in the endgame.
Basically, white can afford to play e4 and protect his center in the Queen's Gambit Accepted, while in this Slav line, white is overextending himself if he plays e4 and gets nothing from putting his pawns in the center

---
Tags: opening, slav-defense
---


title: Iterative deepening speed expectation

text:
# Question
Title: Iterative deepening speed expectation
I have developed a chess engine with these features:

* alpha beta
* transposition tables
* iterative deepening
* use any prev result from transposition table as first move if the result cannot be used directly, e.g cutoffs or not deep enough.

The alpha beta algorithm is implemented so that check if calculated in each new node, then the legal moves are calculated progressively so that a cutoff will end new legal moves from being calculated. If no legal moves are found, it is either checkmate or stalemate depending on the previously calculated check.

The algorithm work logic wise as confirmed by letting it play against itself on different depths. Deeper versions bet more shallow ones at least 95% of the time, otherwise it's draw.

The problem is speed. On a standard computer I get these times per move (in seconds) for different depths:

{1: 0.0034837227599999986, 2: 0.013043862759999995, 3: 0.24758806587999999, 4: 1.7778337413599996, 5: 17.16384055096, 6: 70.89946676716}

I know that in ideal cases this grows as n\**(d/2) where d is the depth and n is nr moves. Worst case is n\**d.

So I fit a curve to match t+1=n\**(alpha\*d) where alpha is unknown. This gives alpha 0.17 which is less than 0.5 and not expected. Probably the number of values are too small to give an accurate estimate. But it's already taking more than a minute on depth 6! Should this be the case? I was expecting to be able to run to at least a depth of 10-15..

**UPDATE**

Here is data showing the performance of 3 different settings of the engine:

1.Plain alpha beta. No transpositions nor any move ordering

\['depth', 'nstates', 'time/state', 'hits'\]
\[5, 634505, 0.00032971293255529906, 0\]

\['depth', 'hits', 'cutoffs'\]
\[1, 0, 43\]
\[2, 0, 135\]
\[3, 0, 6077\]
\[4, 0, 22345\]
\[5, 0, 0\]

2.Alpha beta with transpositions

\['depth', 'nstates', 'time/state', 'hits'\]
\[5, 508015, 0.00017707277515624539, 159165\]

\['depth', 'hits', 'cutoffs'\]
\[1, 0, 43\]
\[2, 0, 135\]
\[3, 1164, 4915\]
\[4, 2880, 18179\]
\[5, 155121, 0\]

3.Alpha beta with transpositions and use best move in transpositions as first move

\['depth', 'nstates', 'time/state', 'hits'\]
\[5, 507076, 0.00020099950737759227, 158794\]

\['depth', 'hits', 'cutoffs'\]
\[1, 0, 43\]
\[2, 0, 135\]
\[3, 1150, 4910\]
\[4, 2868, 18123\]
\[5, 154776, 0\]

\*nstates is the number of nodes traversed \*time/state is the average time in seconds spent in each node

So start counting depth at 0 for the single top node, the fastest version above (3) takes over a minute on depth 5. I tried to run for depth 6 and it took about 10 times longer. Is this normal? Are the values above normal?

Observe, I'm not using bitboards yet! Not sure how much faster that will make it, but I'm in doubts.

# Answer
This is completely normal if you are not using any advanced move pruning techniques. For an engine such as Stockfish, a search depth of 20 is completely reasonable. If you look at the n^(d/2) best scenario case for depth 20, assuming n = 30, you get about 6 × 10^13, which is far beyond what you would expect any computer to be able to handle.

The reason depth 20 on Stockfish is possible is that Stockfish uses many techniques such as search extensions, advanced move ordering optimizations, and obviously way more things as well.

If you want your chess engine to perform better I suggest you implement MVV-LVA, null move pruning, and probably also killer move heuristic if you haven't already.
> 2 votes

---
Tags: transpositions, performance
---


# Question
Title: Why is Leela Chess Zero rated low on CCRL leaderboards?
Lc0 routinely makes it far in the Top Chess Engine Championship (TCEC). Latest, it defeated Komodo Dragon and nearly tied Stockfish:

Yet, we see on CCRL 40/15, Lc0 is ranked **#32, 159 ELO behind Komodo**!

The gap is greater for 40/2 (#24, 499) but smaller for BLITZ 2+1 (#7, 56).

I get there's hardware and maybe time control differences, but the gaps seem exaggerated.

# Answer
> 5 votes
They test under CPU-only conditions. CPUs are not a good platform for neural network inference (because they are designed to do well on a large variety of workloads, as opposed to more specialized hardware, which can be designed to specifically run neural networks efficiently), and therefore Leela, being an engine heavily relying on neural networks, is much weaker under CPU-only conditions than it is when having access to a good GPU. Basically, the core computational workload of neural networks comes from doing many large matrix-vector multiplications, and graphics hardware is very good at doing those efficiently.

# Answer
> 2 votes
There's quite a bit to pay attention to when comparing engines: time control, hardware, opening book, etc. In the case of CCRL and Leela, this is the key line:

Leela is a GPU engine - it needs GPU resources to be optimal. This compares to CPU engines, which both Komodo and Stockfish are. It's why hardware was so controversial when Leela first appeared (you can't run Komodo and Stockfish on GPU, and Leela on CPU is much weaker, so how can you have a "fair" match between them?).

CCRL uses CPU to do their benchmarking, which means Leela is much weaker, and is why Leela is rated so poorly.

---
Tags: engines, rating, leela
---


# Question
Title: Can my K-factor change in the middle of the month?
So, at this point, I have played 25 FIDE-rated games, and I expect to have played the full 30 games by the end of the month. According to the FIDE handbook, this means my K-factor will be reduced from 40 to 20 next month. However, being quite underrated due to my underwhelming early performances, I want to make use of the fact that my K-factor is still 40 this month and register for another tournament; I'm hoping that my K-factor remains 40 this month no matter how many games I play, and that I am hence be able to gain some rating before the month ends. Is this assumption justified? Or will the K-factor change to 20 as soon as the 30 games are up, despite the fact that the month won't yet have ended? And if so, will the K-factor change in the middle of the event or only after its completion?

# Answer
As you state it, yes.
Your k-factor can change in the middle of the month/event.

Your k-factor will remain 40 until you played your first 30 games.
This is stated in the FIDE Handbook: `K = 40 for a player new to the rating list until they have completed events with at least 30 games.`

For game 31 your k-factor will become 20 (if your elo doesn't exceed 2400). Elo calculation will be based on the elo that you've reached in the first 30 games.

Note that the formula for calculation of the first 30 games is different than the 'normal' elo calculation.
There are some exceptions but generally that's it.
> 1 votes

---
Tags: fide, rating
---


title: Question on FIDE Rating List Submission

text:
# Question
Title: Question on FIDE Rating List Submission
I am playing in a tournament on the 19th-20th of this month and I have a question regarding FIDE rating change for the end of the month when the new list is published.

I have done very well in some tournaments at the start of the month and I am going to gain around 100+ elo based on some calculations I have done for the list coming out at the start of the September month. Let's just say for simplicity I am 1700 FIDE and that means I will be 1800 FIDE next month assuming I don't play any more tournaments.

The issue is however the tournament organizer has a tendency to send in the results of the tournament late and way into the next month's list, so I was wondering if the rating change would be based off the previous month's list when the games were played. In simpler words if the tournament results come in for next month will they count as if I was 1700 FIDE originally or when I become 1800 FIDE.

# Answer
> I was wondering if the rating change would be based off the previous month's list when the games were played

Ratings are calculated according to when the results are submitted to FIDE not when the games were played. Hence games which were played in August but were not submitted to FIDE until September will be rated using September ratings not August. To do otherwise would require that previous rating lists be invalidated and ratings recalculated.
> 1 votes

---
Tags: rules, learning, fide, rating
---


title: Who is the Hübsch gambit named after?

text:
# Question
Title: Who is the Hübsch gambit named after?
According to Lichess, the Hübsch gambit starts with 1. d4 Nf6 2. Nc3 d5 3. e4:

```
[FEN "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1"]

1. d4 Nf6 2. Nc3 d5 3. e4

```

This article states:

> Second, despite being named in honor of an unknown player, Hübsch, who achieved a spirited victory in 1922 with the White pieces over the renowned Saviely Tartakower \[...\]

Who was this Mr(s) Hübsch, does anyone have any further information?

*Edit*: this article claims that his/her name starts with "E".

*Edit*: Another page claims that the first name starts with an "F".

*Edit*: the video description of this video cites a book and the following text:

> On December 20, 1922, an unknown young man entered the chess room at the Café Central, walked straight up to Grandmaster Tartakower, who was sitting idly by, and challenged him to a game of chess for a high stake. (DeepL translation)

# Answer
Not a definitive answer, but going through google nGram viewer produces a publication showing the actual game in British Chess Magazine, 1923. There the notation is E. Hubsch, and the annotation states that it is abridged from *Kagan's Neueste Schachnachrichten*.

I could not find online versions of the Kagan volume(s), however there are several volumes of that available through various antique resellers. There appears to be at least one collection partially available online through google books, but I am not conversant in German to be able to know if this is relevant or not. Archive.org may also have some resources in their scan collection.
> 4 votes

---
Tags: history, gambits
---


title: Why would white play Qf5

text:
# Question
Title: Why would white play Qf5
I was playing the following puzzle on lichess playing the black pieces and found the move `Bf5`, expecting either `Qe2` or `Qe3`, resulting in me taking the white bishop on `c2` and completing the puzzle.

The play by white however surprised me as white instead played `Qxf5`, allowing for me to take the queen with `exf5`

If instead white had played either `Qe2`or `Qe3` I would at most have won a bishop on `bxc2`. and left me with no more ways to threaten the queen (`Qe5` doesn't work due to the D pawn, `Kd4` dito with C pawn), and it doesn't look like white gains a superior position due to the sacrifice

Am I missing some other big opportunity here that would give black a big advantage if white had not sacrificed the queen?

```
 r3k1nr/5pp1/p1nqp2p/1p1p4/3P2b1/2PQ1N2/PPBN1PPP/R3K2R b KQkq - 1 12

```

# Answer
No, the best move would have just been taking White's bishop on c2, like you assumed.

Why Stockfish has a slight preference for Qxf5 is a little puzzling. If you think about it though, White has to choose between losing a bishop (a loss of ~3 material points in human estimations) versus losing a queen for a bishop and pawn (~5 material points). Then there's the fact that White will be the only one with a nice bishop, as opposed to Black's bishop ruling supreme. Also, Black's pawn chain is broken up a bit.

In any event though, the position is dead lost for White in either case.
> 6 votes

---
Tags: puzzles, sacrifice
---


title: Minimum break between rounds

text:
# Question
Title: Minimum break between rounds
I am an assistant arbiter in an open tournament which is happening over the weekend, with 1 round on Friday, and 2 rounds on Saturday and Sunday.

There were 5.5 hours between the two rounds on Saturday and Sunday, but some players finished their game just before the scheduled start of round 2.

The head arbiter gave them a 30-minute break before they had to start their second round, which seems appropriate, but I cannot find any rules or requirements from FIDE regarding this.

Searching for this topic, I only found rules regarding tie-breaks, with requirements for breaks between a match and the tie-break playoffs, and break between games in the tie-break.

Is there anything in the FIDE Laws of Chess, or anywhere else, or is it completely up to the tournament organizers how much time between rounds the players can get?

# Answer
> 4 votes
I couldn't find anything in the FIDE handbook either.

The USCF has rule 17A:

> All games must be played in the tournament rooms at the times designated by the organizers unless the director specifies otherwise. For example, a player whose game ends late or is adjourned may be granted additional time to eat or rest (a half hour is common), or a first-round game may be scheduled for play before the start of the tournament.

It says the player "may" granted additional time, not that they "must" be granted this time, so it does seem to be up to the discretion of the organizers in the USCF.

---
Tags: rules, tournament, arbiters
---


# Question
Title: Which officer type makes (on average) the most moves in a chess game?
I suppose K the least (endgame will up the ante for K, but not that many games will reach the endgame) and N the most (the knight is slow in regrouping) but I don't have access to a megabase. I expect the exact percentages to be dependent on which database you use (e.g. only GM games) but the general trend should stay. It seems to be a close call, as this sample shows:

German Youth Ch 2023 (3500 games), approx : B 40000 N 45000 R 40000 Q 35000 K 35000

# Answer
> 9 votes
### **Database** : Chess Compiled 2019-2022 2500+ ELO

### **Methodology** :

* I first passed it through kentdjb's pgn-extract to remove erroneous games from the db (you could restrict it by openings here) :

```
pgn-extract -o valid.pgn merged_2019_2022_25.pgn

```
* I then wrote a python script (using Python chess) that extracts what piece moved and the move from a game and puts it into a `pandas` `DataFrame` and then to a CSV file

```
....
for move in game.mainline_moves():
    move_info = {
        'piece': board.piece_at(move.from_square).symbol().upper() if board.piece_at(move.from_square) is not None else None,  # noqa: E501
        'move': board.san(move).upper()
        }
    moves.append(move_info)
    board.push(move)
df = pd.DataFrame(moves)
df.to_csv("moves.csv")

```
* Passing it back to a DF and counting it :

```
df = pd.read_csv("./moves_up.csv")
print(df.groupby('PIECE').count())
print(df.groupby('MOVE').count())

```

---

### Results

#### Whole database :

| Piece | N moves | Average |
| --- | --- | --- |
| P | 2072118 | 23.058 |
| R | 1512889 | 16.835 |
| N | 1403186 | 15.615 |
| B | 1253473 | 13.949 |
| K | 1109101 | 12.342 |
| Q | 963072 | 10.717 |
| Total | 8313839 |  |
| Number of Games | 89864 |  |
| Average number of half-moves in a game | 92.52 |  |

---

Extracted are the move themselves (5731 distinct entries, multiple pieces (i.e. `QF6F5`), check/checkmate, and promotions are counted as their own entries):

| Move | Count |
| --- | --- |
| O-O | 144493 |
| NF6 | 101235 |
| NF3 | 100404 |
| D4 | 89831 |
| D5 | 80752 |
| E4 | 80105 |
| NC3 | 77145 |
| C4 | 72839 |
| E5 | 72662 |
| C5 | 71730 |

The most played in promotion is (`A8=Q`) the 931st move overall, having been played 783 times, and the most played under promotion is actually `E8=N+` (2667th, played 13 times)

---
Tags: statistics
---