else if (token == "ponderhit")
Threads.main()->ponder = false; // Switch to normal search
- else if (token == "uci" || token == "usi" || token == "ucci" || token == "xboard")
+ else if (token == "uci" || token == "usi" || token == "ucci" || token == "xboard" || token == "ucicyclone")
{
- CurrentProtocol = token == "uci" ? UCI_GENERAL
+ CurrentProtocol = token == "uci" ? (CurrentProtocol == UCI_CYCLONE ? UCI_CYCLONE : UCI_GENERAL)
+ : token == "ucicyclone" ? UCI_CYCLONE
: token == "usi" ? USI
: token == "ucci" ? UCCI
: XBOARD;
string defaultVariant = string(
#ifdef LARGEBOARDS
CurrentProtocol == USI ? "shogi"
- : CurrentProtocol == UCCI ? "xiangqi"
+ : CurrentProtocol == UCCI || CurrentProtocol == UCI_CYCLONE ? "xiangqi"
#else
CurrentProtocol == USI ? "minishogi"
- : CurrentProtocol == UCCI ? "minixiangqi"
+ : CurrentProtocol == UCCI || CurrentProtocol == UCI_CYCLONE ? "minixiangqi"
#endif
: "chess");
Options["UCI_Variant"].set_default(defaultVariant);
std::istringstream ss("startpos");
position(pos, ss, states);
- if (is_uci_dialect(CurrentProtocol))
+ if (is_uci_dialect(CurrentProtocol) && token != "ucicyclone")
sync_cout << "id name " << engine_info(true)
<< "\n" << Options
<< "\n" << token << "ok" << sync_endl;
+ // Allow to enforce protocol at startup
+ argc = 1;
}
else if (CurrentProtocol == XBOARD)
expect eof
EOF
+cat << EOF > ucicyclone2.exp
+ spawn ./stockfish ucicyclone
+ send "uci\\n"
+ expect "uciok"
+ send "position startpos\\n"
+ send "d\\n"
+ expect "rnbakabnr/9/1c5c1/p1p1p1p1p/9/9/P1P1P1P1P/1C5C1/9/RNBAKABNR w - - 0 1"
+ send "quit\\n"
+ expect eof
+EOF
+
cat << EOF > xboard.exp
spawn ./stockfish load variants.ini
send "xboard\\n"
expect eof
EOF
-for exp in uci.exp ucci.exp usi.exp ucicyclone.exp xboard.exp
+for exp in uci.exp ucci.exp usi.exp ucicyclone.exp ucicyclone2.exp xboard.exp
do
echo "Testing $exp"
timeout 5 expect $exp > /dev/null