Author: Alessandro Damiani
Date: 11:25:50 08/07/04
Go up one level in this thread
On August 07, 2004 at 14:16:46, Stuart Cracraft wrote:
>On August 07, 2004 at 13:40:16, Dan Honeycutt wrote:
>
>>On August 07, 2004 at 13:00:31, Stuart Cracraft wrote:
>>
>>>So I heard a lot about SEE from a lot of people
>>>and was fortunate enough to receive some good code
>>>from Alessandro. I implemented and tested it with
>>>many test cases and in all cases it gave the
>>>expected return from the exchange ok.
>>>
>>>Then with some other help I implemented this in
>>>the capture search.
>>>
>>>This program has some things that make SEE() not
>>>give a good result, in fact slightly worse (fewer
>>>nodes in same time) -- no speedup.
>>>
>>>1) evaluator is material and pc/sq lookup only
>>>2) routine to find attackers/defenders (to give to see)
>>> is not much faster or slower than makemv()
>>>3) I order all moves partly with MVV/LVA but do not
>>> discard directly on that unless the alpha/beta/pvs
>>> says to disard/cutoff.
>>>
>>>With these, the program did not speedup with SEE
>>>and slowed down. The program is PVS with null move.
>>>
>>>So that is the story -- I will leave the code in
>>>for a future day and future need.
>>>
>>>If someone with #1 and #2 got a good speedup from SEE,
>>>let me know. I am doing something wrong in that case.
>>>Or if you think there is some other way SEE can be used
>>>advantageously, let me know. Currently I only have it
>>>in the capture search since that's where I heard it had
>>>the most effect.
>>>
>>>Stuart
>>
>>
>>Stuart:
>>What captures are you discarding in qsearch? ie
>>
>>if (see < 0) discard_capture;
>>if (see + standpat < alpha) discard_capture;
>>if (see + standpat + margin < alpha) discard_capture;
>>
>>You may want to tinker with this some. For me the third one with a margin of a
>>pawn or 2 works best.
>>
>>Dan H.
>
>Here is current quiescence with see()
>
>int quiesce(alpha,beta)
>{
> if (repetitioncount()==2 || 50moverule()) return(0); // draw
> if (incheck()) return(mainsearch(depth=1,alpha,beta)); // check extension
> base = value = eval(); // evaluate
> if (value >= beta) return beta; // cutoff
> if (value > alpha) alpha = value // establish value
> generate capture moves; // get all captures, just captures
> while another capture move available
> {
> value = base + see(destination_square_of_this_capture);
> if (value > alpha) {
> if (value > beta) value = beta;
> makemv();
> if (!incheck()) value = -quiesce(...,-value,-alpha);
> unmakemv();
> }
> if (value >= beta) return beta;
> if (value > alpha) { alpha = value; set this as best capture}
> }
> return(alpha);
>}
An illegal move gets a wrong value, it should be:
makemv();
if (incheck()) {
value = -INFINITY
}
else {
value = -quiesce(...,-value,-alpha);
}
unmakemv();
assuming that your incheck() here is meant to be incheck(me) before changing the
side to move.
Alessandro
This page took 0.01 seconds to execute
Last modified: Thu, 15 Apr 21 08:11:13 -0700
Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.