[Chessx-users] GUI sending ucinewgame inappropriately?
Chess Database and PGN viewer
Brought to you by:
hognose
From: Louis Z. <zu...@la...> - 2014-06-28 10:26:53
|
Hi, I'm using version 1.1.0.0, with Stockfish (a UCI engine). I paste a fen and click analyze. While the analysis is ongoing, I make a move on the board. The previous analysis stops and a new analysis is begun. However, it seems that the GUI is sending the ucinewgame command each time I make a move, immediately after it sends the stop command to the engine. This has the effect (at least with Stockfish) of clearing the hash, which is highly undesirable if one is analyzing a line of play. bool UCIEngine::startAnalysis(const Board& board, int nv, int mt) { m_mpv = nv; m_moveTime = mt; if(!isActive()) { return false; } if(m_board == board) { return true; } m_board = board; m_position = board.toFen(); m_waitingOn = "ucinewgame"; send("stop"); send("ucinewgame"); send("isready"); setAnalyzing(true); return true; } The UCI protocol suggests that sending ucinewgame in this situation is incorrect: * ucinewgame this is sent to the engine when the next search (started with "position" and "go") will be *from a different game*. This can be a new game the engine should play or a new game it should analyse but also the next position from a testsuite with positions only. This behavior does not seem to exist in 0.9.7.0 (which I had and could check). How can I work around this, or do I need to edit source code and recompile to achieve what I want? Thanks, Louis |