easy-hard moves (again)

Discussion of chess software programming and technical issues.

Moderator: Ras

ZirconiumX
Posts: 1361
Joined: Sun Jul 17, 2011 11:14 am
Full name: Hannah Ravensloft

Re: easy-hard moves (again)

Post by ZirconiumX »

Bob, I'm pretty sure you don't have a crystal ball.

In my view, you won't know you will fail low until you fail low. You *may* be able to track moves which*might* fail low, but in my view it would not be worth the effort.

Matthew:out
bob wrote:
Uri Blass wrote:
bob wrote:
Uri Blass wrote:
bob wrote:Apparently the position diagram was broken. The white queen is missing. Here is another try:

[d] 5r1k/6p1/1n2Q2p/4p3/8/7P/PP4PK/R1B1q3 w - - 0 1
I saw no missing queen.

It is the same position and it seems that both Bxh6 and Bf4 draw so Bxh6 is not the only non losing move.
The diagram in YOUR post had no queen, I assumed it was the same as mine.

In any case, my original point still stands. Qxb6 looks easy at first. One does NOT want to play that move however. And later, there is another move that becomes "easy" but my current (and the suggested window approach) would not recognize a move that only looks easy as the search gets deeper..
I did not see a missing queen in the diagram in my post
and I can see both queens in all posts.

I also disagree with you that another move became easy after Qxb6 failed low.

Bxh6 is not easy unless you can be sure that it is not worse than Bf4
and both Bxh6 and Bf4 seem to lead to a draw(houdini3 showed 0.00 at depth 30 in the analysis after Bf4).
You can't see the forest for the trees. Forget about Bf4 and pretend it doesn't exist. Qxb6 is "easy" for a few iterations, then it fails low. Then Bxh6 is discovered to lead to a forced draw or better, and nothing else comes close. Bxh6 qualifies as "easy" here. But choose ANY position where there appears to be an easy move, until enough depth shows it to be bad, and where there is one "good move" once you get deep enough to see it... I'd like for that to be recognized as "easy" as well. And if possible (and I don't see a solution for this at all) I'd like to recognize that the original "easy" move is not "easy" before it actually fails low, because it might not fail low before my "easy move" time limit has elapsed and I make the move based on it being "easy".
tu ne cede malis, sed contra audentior ito
ZirconiumX
Posts: 1361
Joined: Sun Jul 17, 2011 11:14 am
Full name: Hannah Ravensloft

Re: easy-hard moves (again)

Post by ZirconiumX »

Actually, I think it is possible, but not pretty.

Let's go into theory, here.

Assume perfect move ordering. You go down to the leftmost frontier (alphabeta depth 1) node, and call AB. You have a parameter called expect, which shows what we expect to happen, i.e. whether we expect this node to be easy or not. After the standard beta cutoff, we check expect. If expect was set to EASY_MOVE, and it didn't cause a cutoff, then we set a flag called panic, and return a very high value (higher than beta ckuld possibly be, but lower than mate) called IGNORE. If panic was set, we allocate more time, set expect to zero, clear panic and search again.

As I said, not pretty.

Matthew:out
tu ne cede malis, sed contra audentior ito
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: easy-hard moves (again)

Post by bob »

ZirconiumX wrote:Bob, I'm pretty sure you don't have a crystal ball.

In my view, you won't know you will fail low until you fail low. You *may* be able to track moves which*might* fail low, but in my view it would not be worth the effort.

Matthew:out
I don't agree. As a human, I can personally recognize moves and categorize them as "easy, don't need much time" or "normal, I'll give a careful think here." or "difficult, here I need to 'tank' for a while and figure out what is really going on and how I need to respond." Seems intuitive that this should be doable for the computer. We already do primitive "easy move" quick searches. Hsu and group did a "hard move" estimation in deep blue (but did not publish specifics).



bob wrote:
Uri Blass wrote:
bob wrote:
Uri Blass wrote:
bob wrote:Apparently the position diagram was broken. The white queen is missing. Here is another try:

[d] 5r1k/6p1/1n2Q2p/4p3/8/7P/PP4PK/R1B1q3 w - - 0 1
I saw no missing queen.

It is the same position and it seems that both Bxh6 and Bf4 draw so Bxh6 is not the only non losing move.
The diagram in YOUR post had no queen, I assumed it was the same as mine.

In any case, my original point still stands. Qxb6 looks easy at first. One does NOT want to play that move however. And later, there is another move that becomes "easy" but my current (and the suggested window approach) would not recognize a move that only looks easy as the search gets deeper..
I did not see a missing queen in the diagram in my post
and I can see both queens in all posts.

I also disagree with you that another move became easy after Qxb6 failed low.

Bxh6 is not easy unless you can be sure that it is not worse than Bf4
and both Bxh6 and Bf4 seem to lead to a draw(houdini3 showed 0.00 at depth 30 in the analysis after Bf4).
You can't see the forest for the trees. Forget about Bf4 and pretend it doesn't exist. Qxb6 is "easy" for a few iterations, then it fails low. Then Bxh6 is discovered to lead to a forced draw or better, and nothing else comes close. Bxh6 qualifies as "easy" here. But choose ANY position where there appears to be an easy move, until enough depth shows it to be bad, and where there is one "good move" once you get deep enough to see it... I'd like for that to be recognized as "easy" as well. And if possible (and I don't see a solution for this at all) I'd like to recognize that the original "easy" move is not "easy" before it actually fails low, because it might not fail low before my "easy move" time limit has elapsed and I make the move based on it being "easy".
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: easy-hard moves (again)

Post by bob »

ZirconiumX wrote:Actually, I think it is possible, but not pretty.

Let's go into theory, here.

Assume perfect move ordering. You go down to the leftmost frontier (alphabeta depth 1) node, and call AB. You have a parameter called expect, which shows what we expect to happen, i.e. whether we expect this node to be easy or not. After the standard beta cutoff, we check expect. If expect was set to EASY_MOVE, and it didn't cause a cutoff, then we set a flag called panic, and return a very high value (higher than beta ckuld possibly be, but lower than mate) called IGNORE. If panic was set, we allocate more time, set expect to zero, clear panic and search again.

As I said, not pretty.

Matthew:out
First, assuming perfect move ordering is dangerous. Typically we get the best move first about 90% of the time. 10% of the time we are going to get confused because we might not be searching the best move first and get scores back that will later be refuted...

Second, how do you come up with "I think this move will be easy"? That's the crux of the problem I am working on...
ZirconiumX
Posts: 1361
Joined: Sun Jul 17, 2011 11:14 am
Full name: Hannah Ravensloft

Re: easy-hard moves (again)

Post by ZirconiumX »

Why don't you perform a singular extension search at root? Either Hsu-style or Ippolit-style.

Matthew:out
tu ne cede malis, sed contra audentior ito
User avatar
Evert
Posts: 2929
Joined: Sat Jan 22, 2011 12:42 am
Location: NL

Re: easy-hard moves (again)

Post by Evert »

bob wrote: If you search it, it also leads to a draw score...

Bh6 is a little more forcing, due to the threat on g7. But clearing the back rank is the key to make the queen move.
Indeed. I didn't find it particularly easy to see (either by eye or by analysis), but I only tested with Jazz, which finds Bxh6 very quickly and doesn't see Bf4 at all. Of course, Jazz isn't that strong, but based on that I'd certainly qualify Bxh6 as "easier" than Bf4. ;)
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: easy-hard moves (again)

Post by bob »

ZirconiumX wrote:Why don't you perform a singular extension search at root? Either Hsu-style or Ippolit-style.

Matthew:out
I have not seen any "singular extension search at root" in impolite. Hsu's I understand as I did that in Cray Blitz. But that doesn't help. It is essentially the same thing that has already been suggested, as well as tried by me a couple of months back. But that only helps for "easy" type moves. I also want "hard" moves recognized, which is, so far "hard" to do. :)
User avatar
Evert
Posts: 2929
Joined: Sat Jan 22, 2011 12:42 am
Location: NL

Re: easy-hard moves (again)

Post by Evert »

I just tried this in Jazz and it seems to be a minor regression. It looks very good if you watch games where it gets triggered in positions where there is an "obvious" good move (like a re-capture), but those are fairly rare anyway (only a few per game). The saving in time clearly doesn't outweigh the inaccuracy of moving too quickly in some positions.

Shame though, since I quite like the idea. :(
Laszlo Gaspar
Posts: 64
Joined: Thu Mar 09, 2006 11:07 am
Location: Budapest, Hungary

Re: easy-hard moves (again)

Post by Laszlo Gaspar »

Hello,

What if you consider only moves which are reestablishing the material balance and you don't want to win something. Or if the move of the opponent was expected and you have a prepared - and singular - answer (so both are in the previous PV).
Regards,
László
dchoman
Posts: 171
Joined: Wed Dec 28, 2011 8:44 pm
Location: United States

Re: easy-hard moves (again)

Post by dchoman »

Laszlo Gaspar wrote: ... Or if the move of the opponent was expected and you have a prepared - and singular - answer (so both are in the previous PV).

This suggestion is great! If you are storing the 'singular' status of the response in the hash table, then the response can be instantaneous as you already know it is singular at the previous search depth - 2.

It's funny, but this got me thinking about the opposite situation: what if the opponent's move is not expected in the PV? In that situation, I don't think there can be an 'easy move'. If the opponent blundered, you are going to win anyway, so no need to rush the search. If the opponent saw a deep threat, you want to find it too. So maybe expecting the opponent's move in the PV is a necessary condition for an 'easy' move?

- Dan