Page 1 of 1

evaluation after leaf node and quiescent search.

PostPosted: 28 Sep 2011, 01:40
by bhupendra
Hi,

I have a question regarding better evaluation of leaf nodes.

I have the following board position in my alpha-beta at depth 1:

Code: Select all
r---r---
pppppRpp
-
-
-
-
PPPPP-PP
R-------


At depth 0, lets say my engine finds that Rf8 is good 4 black.
Now as this is the leaf node I enter into quiescent search and
find that there are two capture moves RxR followed by blacks
move RxR. This is a quite position (no more captures) thus I
evaluate and find that black is in a better position as he has
the control of the open file.

At depth -1 white could have played Rf1 and still have the control
over the open file after the exchanges.

- How to best handle this situation?
- or handling this situation in any way would lower the no. of ply's that
i can search and thus lowering the engine strength even more?
- should i not care as this is terminal node in search and the better move
would be found later when the moves are played on the board?
- would this alter the decision of "best move" of the by the engine?

thanks,
Bhupendra

Re: evaluation after leaf node and quiescent search.

PostPosted: 28 Sep 2011, 10:08
by H.G.Muller
In the leaf node you would also try to stand pat, and the evaluation for that would presumably be better for white than trading, as black does not have full control over the open file in that position. That white can regain full control of the file through a non-capture is beyond your ability to see. You cannot expect to see things beyond the horizon. The only solution is to search deeper.

Re: evaluation after leaf node and quiescent search.

PostPosted: 28 Sep 2011, 14:29
by bhupendra
So either I extend the search or include non capturing moves for a capturing piece in quiescent search.

Thanks!

Re: evaluation after leaf node and quiescent search.

PostPosted: 28 Sep 2011, 19:26
by Harald Lüßen
So either I extend the search or include non capturing moves for a capturing piece in quiescent search.

Not exactly.
The quiescence search is a recursive function that should only do these things:
- Do not move, stand pat and evaluate the position
- Try (good) capture moves, call qsearch again and get that evaluation (*)
Try these moves in MVV/LVA order (google, search or ask what that means.)
- Do not try non-capture moves. The qsearch would 'explode'.
- Under certain conditions an advanced program may try checking moves. (Do not try this now)
- Use the best of stand pat and the explored moves as a result.

(*) Good captures can be found with the static exchange evaluation (SEE) algorithm.
If you do not know this just try all capture moves.

Another point: You said you would have to extend the search to solve
the original situation, at least one half move search depth more. That is right.
With a full search of 1. ... Rf8 2. Rf3 ... and a qsearch here
the better white move will be found. This is an example of the horizon effect
with a very near horizon of 1 half move depth of full search.
But better do not call this deeper search an 'extension'.
Extensions are a dynamic method that is used for some rare special moves during
the search that is not needed here.
Better learn what you can find about 'iterative deepening'.
That is what is needed here. In the first iteration you will
search 1 half move depth and find a (silly) move.
Then you do a deeper full search 2 half moves deep and find a better move.
And so on until the time is over, the max depth is reached or any other trigger stops the search.
Do not look for 'internal iterative deepening' (IID). That is another beast
that you will use when your program matures.

Harald

Re: evaluation after leaf node and quiescent search.

PostPosted: 29 Sep 2011, 01:14
by bhupendra
Thanks Harald!!!

I get it now, so standing pat means that i evaluate the leaf node and if it doesnt break alpha, then only i go into quiescent.
I think i can easily incorporate MVV/LVA in my prog. From what i've read, SEE looks like a tough nut to crack right now as i do not calculate enough information in my search.
When i put quiescent in, the prog strength actually went down (in the middle game) as the search depth reduced (to 5/6 ply) from my prev. version (6/7 ply). But the quality of moves it selects is better than prev. version along with the increase in strength in the end game (although it stll cant check mate w/rook against a lone king :D).

-bhupendra