F.Huber wrote:Well, you've already answered this question yourself, at least partially: "The GUI will of course not let you move."
Exactly! And there might be other actions which the GUI shouldn't let the user do while the engine is thinking (because it could influence the search in an unexpected way).
It will not let you move before the engine stops searching, and it will not let you move after the engine stops searching. It will not let you move because you told it the engine is playing (say) white, and in the current position white is to move. It will only allow you to enter a move when the turn reverts back to black (by the engine doing a move), or when the user intervenes to tell the GUI that the engine should now play black. (Which is usually not what you want after a failing mate search.)
Sorry, but I don't understand this - we seem to have 2 completely different philosophies about the meaning of the GUI (and the communication between GUI and engine).
IMO there are 2 different situations in principle (despite of pondering, which is of no interest for matesearching):
Either the engine is thinking (because you have told it to do so with any "go" or "move" command), then it's the engine's turn - and in this case you shouldn't change ANYthing concerning the current game or position (or would you e.g. play around with the pieces while your opponent is thinking in a human game?).
There are IMO perfectly valid reasons for communicating with my engine while it is searching. I already mentioned changing number of CPUs. (E.g. as operator in a tournament I start a game and notice my engine is onlyusing 1 CPU in stead of 8, because I forgot to alter some setting I used during testing. Why should I be forced to wait untilthe next move to enable the other threads.) This might be YOUR philosophy, and it is perfectly OK you have one, but you can simply implement that in your engine by making it deaf for any setoption command while it is thinking. Othe engine authors might have other philosophies, and the GUI should not make it impossible for them to do things according to their philosophy.
Or the engine is NOT thinking (because it has finished its search, or you have stopped it), then it's YOUR turn (of course only after the GUI has executed the move if the engine has found one) - and NOW you can do whatever you want, either make a move by yourself, load a new position, change any options or even tell the engine that it should start thinking again (for your side).
Most GUIs don't work that way. You have to give them commands to tell them what you want. Does it have to accept illegal moves, like emptySquare x ownPawn, because you want to set up a position, do they have to accept only legal moves, and if so, must the computer automatically generates replies to them or not. There are a lot of GUI states. Intis particular case only the user can know what he want to do next. So the GUI should better sit and wait to be told.