Is there a first move for white in Chess960 in which white can immediately blunder a piece or lose a significant advantage (say -2.0 or so)?
-
12Since the 960 variant is named for the number of initial positions it allows, it is difficult to answer the worst opening movement of any of those 960 initial positions.– djnavasCommented Jan 28, 2020 at 7:06
-
16@djnavas: I'm assuming he means taking all possible opening positions into account, what's the worst white move in them. That's difficult but questions are allowed to be difficult.– RemcoGerlichCommented Jan 28, 2020 at 9:09
3 Answers
This calls for some scripting, so here's my first hasty attempt at it ;)
Here's a quick way you can do the search on your own in python, using stockfish 10
and only the python-chess
package. All open-source and free-software!
Briefly, what the script will do:
- Consider all 960 positions, one at a time
- For each position, it scans over all legal white moves
- For each move, it evaluates the position with a engine ponder time given by user (e.g. 1 second)
- If the evaluation is below the given threshold (e.g.
-2.0
) then it shows the board, the FEN, the move and the evaluation. - At the end everything will be saved in a text file, so you don't need to log the printouts in the terminal.
Examples found running the script for first 5 chess960 positions
Let's showcase it for the first 5
chess960 positions where:
- The evaluation threshold is set to
-1.0
- The ponder time is
1.0
second per move.
Here are the found cases: (below is the saved results in a textfile, first column is the chess960 position FEN, 2nd column the move whose evaluation fell below the threshold, and the 3rd column is the corresponding evaluation)
bbqnnrkr/pppppppp/8/8/8/8/PPPPPPPP/BBQNNRKR w KQkq - 0 1 g4 -2.19
bqnbnrkr/pppppppp/8/8/8/8/PPPPPPPP/BQNBNRKR w KQkq - 0 1 g4 -1.51
bqnnrbkr/pppppppp/8/8/8/8/PPPPPPPP/BQNNRBKR w KQkq - 0 1 g4 -1.66
qbbnnrkr/pppppppp/8/8/8/8/PPPPPPPP/QBBNNRKR w KQkq - 0 1 g4 -1.35
1.g4
seems to be commonly the worst move among the first 5 setups.
Not so surprising, since in all the so far considered chess960 positions, namely the first 5, the king stands on the usual kingside (specifically, on g1
).
Thus, 1.g4
is a highly weakening move with the king on g1.
Here are the positions (updated, 3 more examples found by running script longer):
eval = -2.19 eval = -1.51 eval = -1.66 eval = -1.35 eval = -2.8 eval = -2.07 eval = -2.12
Continue the search on your own using the script
To go over all 960 positions takes a lot of time and computational resources. So I leave it up to you and other if they are interested, to run the script for longer ponder times, to scan all 960 positions, and to play with the evaluation threshold of interest. To do that on your own, here's the python script, using Python 3.7.4
, python-chess 0.30.1
, and Stockfish 10
(place the engine file in same folder as the script):
import chess
import chess.engine
import os
import sys
arguments = sys.argv
pondertime = float(arguments[1])
evalthreshold = float(arguments[2])
#here we assume the engine file is in same folder as our python script
path = os.getcwd()
#Now make sure you give the correct location for your stockfish engine file
#...in the line that follows by correctly defining path
engine = chess.engine.SimpleEngine.popen_uci(path+'/'+'stockfish-10-64')
lsfens = []
lsmoves = []
lsevals = []
numberofpos = 960
for i in range(numberofpos):
board = chess.Board.from_chess960_pos(i)
print('Currently analysing the position below')
print(board)
print('--------')
for el in board.legal_moves:
info = engine.analyse(board, chess.engine.Limit(time=pondertime), root_moves=[el])
t = str(info["score"])
if t.startswith('#'):
print(str(board.san(el))," eval = mate in ", t)
else:
if round(int(t)/100.,2)<evalthreshold:
print('Starting 960 position index: ', board.chess960_pos())
print('Position FEN: ',board.fen())
print(str(board.san(el))," eval = ", round(int(t)/100.,2))
lsfens.append(board.fen())
lsmoves.append(str(board.san(el)))
lsevals.append(str(round(int(t)/100.,2)))
print('--------------------------------------')
engine.quit()
with open('FoundPositions_Pondertime_'+str(pondertime)+'_threshold_'+str(evalthreshold)+'.txt', 'w') as file:
for i in range(len(lsfens)):
file.write(lsfens[i]+'\t'+lsmoves[i]+'\t'+lsevals[i]+'\n')
How to run the script:
- Copy paste the code into a textfile and save it with a name like
960evaluator.py
- Make sure you have python3 installed, similarly for
python-chess
module (see here for installation) and have downloaded the stockfish binary for your OS. - Place the engine file and the script in the same folder, and open a terminal in that folder
- Run the script with the command
python 960evaluator.py 1.0 -2.0
- Note the first argument you give after the script name is the ponder time per move in seconds. The higher the ponder time value, the more accurate the evaluation.
- The second argument is the evaluation threshold: that is, all positions with 1st move evaluations below the given value (in this example
-2.0
) will be printed in terminal and saved at the end (you could do the saving while running so you can crash the script without losing the so far found cases). - Again, the found cases will be printed in terminal as they are found, but also saved in a text file placed in same folder as your script.
The terminal printouts will look like:
Currently analysing the position below
b b q n n r k r
p p p p p p p p
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
P P P P P P P P
B B Q N N R K R
--------
Starting 960 position index: 0
Position FEN: bbqnnrkr/pppppppp/8/8/8/8/PPPPPPPP/BBQNNRKR w KQkq - 0 1
g4 eval = -2.19
Have fun scanning, though do so with caution: running chess engines for long times on personal machines is bit risky as it quickly heats up!
-
4Does Stockfish 10 know about the chess 960 castling rules, and do you call it in a way that it knows this is is 960? Commented Jan 28, 2020 at 10:51
-
4@RemcoGerlich Good question! I reckon the evaluation is just considering the position by itself, so without knowledge of castling rules in chess960. Nonetheless, for the purposes of all the showcased positions, the castling makes negligible difference considering that short castles keeps the king on kingside (so still suffering from the weakened light squares induced by
g4
) while long castles is far too many tempi away to be relevant. But for the remaining chess960 positions, it might make a difference in the eval. Should be easy to assess those cases manually once the search is finished.– EllieCommented Jan 28, 2020 at 11:06 -
1@user253751 it's a just a word of caution, since the (unexperienced) user might use high ponder times and leave the search on (which can take hours) with the laptop lying on a surface (like carpet) that causes inadequate ventilation.– EllieCommented Jan 28, 2020 at 13:27
-
2@JollyJoker and per position it needs to scan about 20 branch-outs (total legal moves per position), so it's 1 second per move, and the number of starting moves varies with the 960 positions. Say 20 starting moves per position, then we have 20 seconds per position, so about 6 hours of runtime for all 960 at 1 second ponder time (which is already quite low per move, going lower the reliability in the evaluation suffer drastically).– EllieCommented Jan 28, 2020 at 14:26
-
2I am afraid this experiment tells us only that Stockfish's evaluation function penalizes heavily having a hole in front of the king. Commented Jan 29, 2020 at 13:36
Using @Phonon's Python script, I was able to determine that the worst move is 1. g4??
from the BBQRNNKR
starting configuration, or 1. b4??
from its mirror image.
This evaluates to -2.5
in one second of Stockfish search. Not quite a minor piece, but still a substantial handicap to recover from.
Why is this position so powerful for the opponent? The black Queen is able to threaten the advanced pawn as soon as its way is unblocked by 1. … d5
; once there, White is in check after move 2! Then, after 3. … Qxf2
Black is able to fork several of White's pieces on the back rank, possibly including the other Rook.
This line begins:
1. … d5
2. c3 Qxg4+
3. Ng3 b6
4. d4 c5
Additionally the black Bishops have similarly direct lines to the white Kingside Rook and its pawn. White can defend, but doing so immobilises several pieces and thus loses a lot of development tempo. He also no longer has a viable pawn structure in front of his King.
The above is not even Stockfish's preferred line for Black:
1. … h5
2. gxh5 b6
3. Ng3 Ne6
4. Ng2 c5
…after which Black has a Rook on a semi-open file, two Bishops pointing at White's King and several pieces (which, as predicted, are pinned down in defensive positions), and a quite acceptable pawn structure and control of the centre. White has none of these things.
Extending the analysis time to 5 seconds, the evaluation of this position and its mirror image deepen to -2.79
and -2.81
respectively. Their nearest rivals are around -2.54
at this level.
-
2Great work!
BBQRNNKR
is possibly the most harmonious arrangement of pieces to launch a kingside attack and white'sg4
even further encourages a kingside battle, a positional disaster!– EllieCommented Jan 29, 2020 at 8:58 -
1It is unclear to me what the variation is supposed to be after 1.g4 d5 that leads to 3...Qxf2.– EvargaloCommented Jan 29, 2020 at 9:45
-
@Evargalo That's my amateur analysis which assumes
2. … Qxg4
or something very similar. Stockfish does a better job, of course. Commented Jan 29, 2020 at 12:11 -
@Chromatix : I wasn't debatting the quality of your analysis, it is just that you don't provide the moves in between and they are not obvious to guess...– EvargaloCommented May 25, 2021 at 12:04
You said "blunder a piece" or "lose significant advantage", so how about mate since that is even worse? I could only find a few, but here they are.
Since it takes at least two moves for there to be any interaction between pieces, I am going to start there, and use some logic, but I could still only find a very few.
First, you have to keep in mind that traditional chess can, and has, been one of the starting positions in actual competitions, so this horrid opening comes to mind first as a logical starting place.
[FEN ""]
1. g4 e6 2. f4 Qh4#
From that, we know that THE worst openings have to be mates of white in two moves (it still takes three moves for white to mate black). Of course, you can have the famous two-move mate that on the other side too.
From here, I am just going to use pictures since I am not sure how PGN/FEN works for Chess 960.
Here is another mate with the queen.
Here is another that is similar. I could just move this over a file, but I will not add any more like this with the king just hemmed in by rooks since you get the idea.
-
13The question title says "worst opening move", though the question itself could be interpreted a bit more generally. Regardless of the quality of the opening move, in these examples the second move seems to be the blunder, since there are obvious second moves by white which would capture the black queen if black played the check. Commented Jan 28, 2020 at 14:15
-
2@alephzero, I realize, but when he added "white can immediately blunder" to the question, and it is clear that that is impossible on the "opening move", I thought it opened the door to the phrase "opening moves", rather than just "opening move". At the time I was compiling my answer, Phonon had not yet posted, and I did not want to throw away 20+ minutes of work. I also thought that there might not be any additional answers at the time, so that mine might be better than nothing. I did upvote his answer. Commented Jan 28, 2020 at 14:25
-
Your third example is not valid, since the king must start between the rooks in Chess960. Commented May 25, 2021 at 19:18