Page 2 of 2

Re: Single legal move - what to do?

Posted: Thu Aug 13, 2009 7:52 pm
by Bill Rogers
This does not make any sense to me. If at the root you are in check and have only one legal move then you have no choice but to make that move. If during the search you make that move then you might be able to extend your search to as many plys as possible if the board allows it.
Bill

Re: Single legal move - what to do?

Posted: Thu Aug 13, 2009 10:31 pm
by tvrzsky
Bill Rogers wrote:This does not make any sense to me. If at the root you are in check and have only one legal move then you have no choice but to make that move. If during the search you make that move then you might be able to extend your search to as many plys as possible if the board allows it.
Bill
Oops, I was not correct in my statement because I have not worked on my program almost one year so I am not aware what it does anymore ... In fact 2 ply extension applies in the case that total amount of extensions in the current variant to the point is less than 5 plies, otherwise extension is only one ply.
And why? This is the way to avoid some pathological cases - mostly positions where queen can give series of checks and search tree blows up out of control.

Re: Single legal move - what to do?

Posted: Sat Aug 15, 2009 12:19 am
by bob
jwes wrote:If there is a single legal move at the root, you could just make the move and start pondering.
The only minor issue is to find something to ponder if you don't do some sort of an abbreviated search before playing the only legal move...

Re: Single legal move - what to do?

Posted: Sat Aug 15, 2009 9:17 am
by Rein Halbersma
bob wrote:
jwes wrote:If there is a single legal move at the root, you could just make the move and start pondering.
The only minor issue is to find something to ponder if you don't do some sort of an abbreviated search before playing the only legal move...
Why do that abbreviated search *before* making the legal move? Doing it on your opponents time makes more sense. And people doing 'ponder the position' don't have to make any adjustments :)

Re: Single legal move - what to do?

Posted: Sat Aug 15, 2009 3:49 pm
by plattyaj
Rein Halbersma wrote:Why do that abbreviated search *before* making the legal move? Doing it on your opponents time makes more sense. And people doing 'ponder the position' don't have to make any adjustments :)
Bob didn't say you did it before you made the move ... Schola does it first thing in the ponder code if it doesn't have a move from the PV.

Andy.

Re: Single legal move - what to do?

Posted: Sat Aug 15, 2009 3:58 pm
by bob
Rein Halbersma wrote:
bob wrote:
jwes wrote:If there is a single legal move at the root, you could just make the move and start pondering.
The only minor issue is to find something to ponder if you don't do some sort of an abbreviated search before playing the only legal move...
Why do that abbreviated search *before* making the legal move? Doing it on your opponents time makes more sense. And people doing 'ponder the position' don't have to make any adjustments :)
First, I didn't say you had to do it before. I simply said you might want to unless you have some other way to choose a move to ponder.

As far as "ponder the position" goes, the idea is flawed and there are better ways to ponder, period, than to use a methodology that offers minimal help with time.

Re: Single legal move - what to do?

Posted: Sat Aug 15, 2009 4:00 pm
by bob
plattyaj wrote:
Rein Halbersma wrote:Why do that abbreviated search *before* making the legal move? Doing it on your opponents time makes more sense. And people doing 'ponder the position' don't have to make any adjustments :)
Bob didn't say you did it before you made the move ... Schola does it first thing in the ponder code if it doesn't have a move from the PV.

Andy.
Personally, in Crafty I do a hash probe first. If I get a hit with a best move, I ponder that (assuming I have no PV second move for whatever reason). If the hash probe fails, I then do a search (1/10th the usual time) to find a move to ponder.

While in book there are other tricks I use to avoid "doing nothing" while in book.