Pause calculation / analysis engines

Discussion of anything and everything relating to chess playing software and machines.

Moderator: Ras

D Sceviour
Posts: 570
Joined: Mon Jul 20, 2015 5:06 pm

Re: Pause calculation / analysis engines

Post by D Sceviour »

Using pause in game play looks almost worthless or harmful since almost no other engine has pause/resume included. Pause looks easy enough for analysis mode. Add code something like this to the xboard search engine. However, one should be careful to resume after pausing because all resources are still open. If the engine is forced closed in pause mode then there is a dirty exit with open resources.

Code: Select all

  if (pause && analyze_mode)
    while (pause)
       sleep_ms(20);
D Sceviour
Posts: 570
Joined: Mon Jul 20, 2015 5:06 pm

Re: Pause calculation / analysis engines

Post by D Sceviour »

The debug files show that winboard does not send a "pause" signal to the engine after pressing the pause key. All it displays is:

Code: Select all

6765 <first : 19 17 152 3980864 d2d4 d7d5 e2e3 g8f6 g1f3 e7e6 a2a3 f8e7 c2c4 e8g8 b1c3 c7c5 d4c5 e7c5 c4d5 f6d5 c3d5 e6d5 b2b4
7225 >first : .
7227 <first : stat01: 198 5170054 19 19 20 d2d4
PauseEvent(): pausing 0
8404 <first : 20 23 316 8236518 g1f3 d7d5 e2e3 e7e6 c2c4 g8f6 d2d4 f8e7 f1d3 d5c4 d3c4 e8g8 e1g1 c7c5 d4c5 e7c5 b1c3 c5d6 a2a3 a7a6 b2b4 b7b5 c4e2
What needs to be done to get winboard to communicate pause to the engine?
User avatar
hgm
Posts: 28353
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Pause calculation / analysis engines

Post by hgm »

Are you sure you sent feature pause=1 at startup, to let the GUI know you support the command?
D Sceviour
Posts: 570
Joined: Mon Jul 20, 2015 5:06 pm

Re: Pause calculation / analysis engines

Post by D Sceviour »

hgm wrote: Fri May 03, 2019 6:39 pm Are you sure you sent feature pause=1 at startup, to let the GUI know you support the command?
Sure, that was done.

Code: Select all

625 <first : feature name=1 usermove=0 pause=1
625 >first : accepted name
625 >first : accepted usermove
626 >first : accepted pause
User avatar
hgm
Posts: 28353
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Pause calculation / analysis engines

Post by hgm »

Is this during analysis? I think I abused the pause button during analysis for move exclusion.
D Sceviour
Posts: 570
Joined: Mon Jul 20, 2015 5:06 pm

Re: Pause calculation / analysis engines

Post by D Sceviour »

hgm wrote: Fri May 03, 2019 10:57 pm Is this during analysis?
Yes.
I think I abused the pause button during analysis for move exclusion.
Therefore, pause cannot be used during analysis. :shock:

That is disappointing. Analysis is the main use that Rapakei the creator of this post was looking for. I cannot see any other use for pause. What is move exclusion? Can it be fixed or fooled?
Rapakei
Posts: 12
Joined: Fri Mar 08, 2019 5:18 pm
Full name: Raph Eijkenboom

Re: Pause calculation / analysis engines

Post by Rapakei »

D Sceviour wrote: Sat May 04, 2019 1:25 am
hgm wrote: Fri May 03, 2019 10:57 pm Is this during analysis?
Yes.
I think I abused the pause button during analysis for move exclusion.
Therefore, pause cannot be used during analysis. :shock:

That is disappointing. Analysis is the main use that Rapakei the creator of this post was looking for. I cannot see any other use for pause. What is move exclusion? Can it be fixed or fooled?

My cousin told me that that option is possible but from Komodo and / or Houdini but Stockfish? My cousin doesn't know how to do that either. My laptop is too weak for an engine to analyze faster. That is why I am looking for a break in between without losing the analysis. Because if I just click Stockfish on Chessbase pause and then click again later, analysis will be lost and then have to start all over again.
User avatar
hgm
Posts: 28353
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Pause calculation / analysis engines

Post by hgm »

D Sceviour wrote: Sat May 04, 2019 1:25 amThat is disappointing. Analysis is the main use that Rapakei the creator of this post was looking for.
True. But not with a WB engine, and UCI engines cannot be be paused anyway. I did this long time ago when there even weren't any WB engines that supported this. In fact, IIRC, WinBoard itself did not support it, and the P button only served to pause the auto-stepping of a loaded game. In hindsight it might not have been a very good idea, so I probably should undo it in the next WinBoard release.
I cannot see any other use for pause. What is move exclusion? Can it be fixed or fooled?
Move exclusion is when you want to suppress searching of a selected set of moves from the root. E.g. those the engine likes at low depth, but which you know to be a strategic mistake that leads to disaster much later. Then the engine doesn't have to switch PV when the score of that move finally collapses.

But by now there are plenty of other methods to exclude moves implemented; you can for instance play a bunch keeping Ctrl pressed, which should be as good as switching to Pause during them, for people that have two hands.
D Sceviour
Posts: 570
Joined: Mon Jul 20, 2015 5:06 pm

Re: Pause calculation / analysis engines

Post by D Sceviour »

hgm wrote: Sat May 04, 2019 3:43 pm ... P button only served to pause the auto-stepping of a loaded game.
But by now there are plenty of other methods to exclude moves implemented; you can for instance play a bunch keeping Ctrl pressed, which should be as good as switching to Pause during them, for people that have two hands.
If this is true, then the user documentation should at least be updated to let the user know the intended use of pause.
User avatar
Ovyron
Posts: 4558
Joined: Tue Jul 03, 2007 4:30 am

Re: Pause calculation / analysis engines

Post by Ovyron »

hgm wrote: Fri May 03, 2019 11:29 am Saving the hash and restarting the analysis after reloading it is not the same as continuing the analysis undisturbed.
Depends on the implementation. Jeremy Bernstein's Persistent Hash implementation for Stockfish TCEC6 was the same as continuing the analysis undisturbed (except scores from future analyzed positions could improve the analysis (except one could propagate back wrong scores of positions that were 0.00 due to 3-fold repetition and such)...).
Your beliefs create your reality, so be careful what you wish for.