Detail evaluation within quiescence search

Discussion of chess software programming and technical issues.

Moderators: hgm, Harvey Williamson, bob

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
User avatar
SMIRF
Posts: 91
Joined: Wed Mar 26, 2014 3:29 pm
Location: Buettelborn/Hessen/Germany
Contact:

Detail evaluation within quiescence search

Post by SMIRF » Sun Feb 22, 2015 1:42 pm

This moment I am preparing for to write a quiescene search for my growing new chessprogram. Is it recommended to subtract and sum up only the values of all captured material or also to follow the changes of deeper detail evaluations?

jdart
Posts: 3803
Joined: Fri Mar 10, 2006 4:23 am
Location: http://www.arasanchess.org

Re: Detail evaluation within quiescence search

Post by jdart » Sun Feb 22, 2015 2:12 pm

Values from the quiescence search are propagated upward, possibly to the root of the search, so you have to have an accurate eval there.

However, you can try to compute material first and cut off if that is outside the window by some margin (aka "lazy eval"). Cut off nodes are not propagated so this is safe.

--Jon

User avatar
SMIRF
Posts: 91
Joined: Wed Mar 26, 2014 3:29 pm
Location: Buettelborn/Hessen/Germany
Contact:

Re: Detail evaluation within quiescence search

Post by SMIRF » Sun Feb 22, 2015 2:34 pm

Maybe I have not been sufficiently precise in my question. There is the chance at every node to add a detail evaluation to the material balance to gain a more positional evaluation.

But despite of the fact, that I would have such a detail evaluation relative cheaply at hands I doubt, that using it would make sense, because of its fluctuation between pre and post to any move.

jdart
Posts: 3803
Joined: Fri Mar 10, 2006 4:23 am
Location: http://www.arasanchess.org

Re: Detail evaluation within quiescence search

Post by jdart » Sun Feb 22, 2015 3:07 pm

Like I said, when you return a score that is in bounds, including from the quiescence search, it should include all your evaluation. If you have adjustments to material for example a "trade down" bonus, include it.

For cutoff you can be sloppier - for example futility cutoff can be done on material only.

--Jon

User avatar
SMIRF
Posts: 91
Joined: Wed Mar 26, 2014 3:29 pm
Location: Buettelborn/Hessen/Germany
Contact:

Re: Detail evaluation within quiescence search

Post by SMIRF » Sun Feb 22, 2015 3:34 pm

The deatail evaluation will fluctuate because of the positional changings through every move. Thus e.g. after exchanging knights the material balance has been stable, but the detail evaluation probably would have changed. Using the detail evaluation might have caused a cutoff in between, whereas ignoring it would have not.

Thus would it not be better to preserve the optimal quiescence path found without the detail information, then redoing that path and making a detail evalution at the leaf node?

Or would it be sufficient and simpler to combine the initial detail evaluation with the reachable material balance by negating the constant original detail evaluation and propagating it that way through the quiescence search? Because the goal seems to be to evaluate the original node.

User avatar
Evert
Posts: 2923
Joined: Fri Jan 21, 2011 11:42 pm
Location: NL
Contact:

Re: Detail evaluation within quiescence search

Post by Evert » Sun Feb 22, 2015 4:15 pm

I'm afraid I don't understand the question.

The point of the quiescence search is to resolve any tension by trying if any sequence of capture moves can improve on a null-move (which is the ultimate quiet move). So you do the full eval and use that to raise alpha. Then you do a capture search. If at any point you end up with alpha>=beta, you take the cut-off.

Where you can be cheap is by doing futility pruning of (SEE) losing captures. You can also do futility pruning if you are so far behind that no capture you can make will equalise. There you do not take into account the full eval change of the move.

So any score you return is always based on the full evaluations, but pruning decisions are based on much cruder material considerations. In the end, quiescence search isn't going to be perfectly accurate, it's an approximation. Nothing you can do will change that.

User avatar
SMIRF
Posts: 91
Joined: Wed Mar 26, 2014 3:29 pm
Location: Buettelborn/Hessen/Germany
Contact:

Re: Detail evaluation within quiescence search

Post by SMIRF » Sun Feb 22, 2015 4:38 pm

During quiescence search (mostly) only capture moves will be inspected. But the fluctuation of merely detail evaluation which would occur when also following non capture moves is completely ignored.

Thus, why during the recursive evaluation of capture moves then the fluctuation of the detail evaluation should be used?

It could not be avoided, that possibly a not investigated non capture would lead to a better detail evaluation than the best quiescence path. Thus using detail evaluation within the quiescence search cannot lead to more precision.

Where am I wrong within my thoughts?

User avatar
cdani
Posts: 2104
Joined: Sat Jan 18, 2014 9:24 am
Location: Andorra
Contact:

Re: Detail evaluation within quiescence search

Post by cdani » Sun Feb 22, 2015 5:05 pm

The final evaluation that go back to the node previous to quiescence, and that can reach the root node, is the evaluation after all the quiescence moves, so it must be accurate, aka complete. So is for this that is used. Is this you question?

User avatar
SMIRF
Posts: 91
Joined: Wed Mar 26, 2014 3:29 pm
Location: Buettelborn/Hessen/Germany
Contact:

Re: Detail evaluation within quiescence search

Post by SMIRF » Sun Feb 22, 2015 5:25 pm

cdani wrote:... So is for this that is used. Is this you question?
No, I seem to have very big difficulties to explain my point.

The moment when the decision is made to call quiescence(), then only (in major cases) material exchanges should be investigated and not quiet moves. For me it does not seem to make sense, to ignore possible fluctuations whithin possible quiet moves, but to take those from captures into the evaluation.

My idea is, to use the detail evaluation from the root of quiescence and use it approriately through the whole quiescence search +/- , because any more precision would be an illusion. Moreover it could change the possible outcome, when the alpha-beta window later would be modified and the same node would be evaluated a second time, and fluctuating sub node detail evaluations would lead to different cuts.

Stan Arts
Posts: 179
Joined: Fri Feb 14, 2014 9:53 pm
Location: the Netherlands

Re: Detail evaluation within quiescence search

Post by Stan Arts » Sun Feb 22, 2015 5:33 pm

Essentially you'd detail evaluate where positions are still non-quiet, at the leaves.

Because captures often have huge effect on positional scoring and you wouldn't have an accurate score to propagate back to the root if a capture sequence from Qsearch does make it or refutes something towards the PV, Which seems to happen very often. So that when the sequence comes into scope of the leafnode or the last node you do detail evaluation at, the score would suddenly swing a lot.

Capture a big knight or move/trade a big knight for a pointless pawn somewhere you'd still give +1.00 , trade queens when a king is exposed to give a huge swing in king safety, capture a passed pawn, etc. To refute the leaf node score. You'd have no idea of them.

Ofcourse it's true that any quiet move could also improve the score a lot but those are much harder to predict, while capture/trade sequences are simply extremely common and forcing in chess.

Another point is that few Qsearch lines make it past the first node, so would likely not give you much of a speed up in the first place.
But in any case, try it!

Post Reply