mirror of
https://github.com/opelly27/Stockfish.git
synced 2026-05-20 09:47:46 +00:00
Fix Chess960 regression
Introduced by me in before 1.9 and found by Tord that says: The 'isChess960' slot in the 'Position' class is currently set depending on the initial files of the rooks, and not on the value of the UCI_Chess960 parameter. This is incorrect, as there are lots of Chess960 positions where the rooks start on the usual files. As a consequence (unless I am missing something), Stockfish will occasionally output castling moves as e1g1/e1c1 rather than the correct e1h1/e1a1 format in Chess960 games. It is possible that some or even most GUIs are robust enough to accept both notations, but I wouldn't bet on it. And in any case, Stockfish's behavior clearly violates the protocol. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
+2
-2
@@ -484,7 +484,7 @@ bool think(Position& pos, bool infinite, bool ponder, int time[], int increment[
|
||||
std::string name = Options["Search Log Filename"].value<std::string>();
|
||||
LogFile.open(name.c_str(), std::ios::out | std::ios::app);
|
||||
|
||||
LogFile << "Searching: " << pos.to_fen()
|
||||
LogFile << "Searching: " << pos.to_fen(Options["UCI_Chess960"].value<bool>())
|
||||
<< "\ninfinite: " << infinite
|
||||
<< " ponder: " << ponder
|
||||
<< " time: " << myTime
|
||||
@@ -570,7 +570,7 @@ namespace {
|
||||
Iteration = 1;
|
||||
|
||||
// Send initial RootMoveList scoring (iteration 1)
|
||||
cout << set960(pos.is_chess960()) // Is enough to set once at the beginning
|
||||
cout << set960(Options["UCI_Chess960"].value<bool>()) // Is enough to set once at the beginning
|
||||
<< "info depth " << Iteration
|
||||
<< "\n" << rml[0].pv_info_to_uci(pos, alpha, beta) << endl;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user