Pause calculation / analysis engines

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

Moderators: Harvey Williamson, bob, hgm

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
D Sceviour
Posts: 554
Joined: Mon Jul 20, 2015 3:06 pm
Contact:

Re: Pause calculation / analysis engines

Post by D Sceviour » Fri May 03, 2019 11:10 am

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: 554
Joined: Mon Jul 20, 2015 3:06 pm
Contact:

Re: Pause calculation / analysis engines

Post by D Sceviour » Fri May 03, 2019 1:15 pm

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: 25059
Joined: Fri Mar 10, 2006 9:06 am
Location: Amsterdam
Full name: H G Muller
Contact:

Re: Pause calculation / analysis engines

Post by hgm » Fri May 03, 2019 4:39 pm

Are you sure you sent feature pause=1 at startup, to let the GUI know you support the command?
Get rid of the shit: vote for SHID!

D Sceviour
Posts: 554
Joined: Mon Jul 20, 2015 3:06 pm
Contact:

Re: Pause calculation / analysis engines

Post by D Sceviour » Fri May 03, 2019 4:42 pm

hgm wrote:
Fri May 03, 2019 4: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: 25059
Joined: Fri Mar 10, 2006 9:06 am
Location: Amsterdam
Full name: H G Muller
Contact:

Re: Pause calculation / analysis engines

Post by hgm » Fri May 03, 2019 8:57 pm

Is this during analysis? I think I abused the pause button during analysis for move exclusion.
Get rid of the shit: vote for SHID!

D Sceviour
Posts: 554
Joined: Mon Jul 20, 2015 3:06 pm
Contact:

Re: Pause calculation / analysis engines

Post by D Sceviour » Fri May 03, 2019 11:25 pm

hgm wrote:
Fri May 03, 2019 8: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 4:18 pm
Full name: Raph Eijkenboom

Re: Pause calculation / analysis engines

Post by Rapakei » Sat May 04, 2019 8:25 am

D Sceviour wrote:
Fri May 03, 2019 11:25 pm
hgm wrote:
Fri May 03, 2019 8: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: 25059
Joined: Fri Mar 10, 2006 9:06 am
Location: Amsterdam
Full name: H G Muller
Contact:

Re: Pause calculation / analysis engines

Post by hgm » Sat May 04, 2019 1:43 pm

D Sceviour wrote:
Fri May 03, 2019 11:25 pm
That 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.
Get rid of the shit: vote for SHID!

D Sceviour
Posts: 554
Joined: Mon Jul 20, 2015 3:06 pm
Contact:

Re: Pause calculation / analysis engines

Post by D Sceviour » Sat May 04, 2019 2:20 pm

hgm wrote:
Sat May 04, 2019 1: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: 4399
Joined: Tue Jul 03, 2007 2:30 am

Re: Pause calculation / analysis engines

Post by Ovyron » Wed May 08, 2019 9:12 pm

hgm wrote:
Fri May 03, 2019 9: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.

Post Reply