Author: Dan Newman
Date: 02:20:36 04/04/00
Go up one level in this thread
On April 03, 2000 at 19:53:41, KarinsDad wrote: >On April 03, 2000 at 16:49:22, Dan Newman wrote: > >>On April 03, 2000 at 10:56:08, KarinsDad wrote: >> >>>On April 03, 2000 at 05:00:20, Jan Pernicka wrote: >>> >>>>On March 31, 2000 at 14:17:12, KarinsDad wrote: >>>> >>>>> >>>>>Could someone please explain how they implement their SEE function, when they >>>>>use it, and what they use it for? >>>>> >>>>>Or possibly a good web site that explains it. >>>>> >>>>>Any help is appreciated. >>>> >>>> Excuse me, could someone explain to me in several sentences what is >>>> SEE function good for? Thanks >>>> Jan >>> >>> >>>Good luck. >>> >>>That is what my original post asks for and I did not receive any good answers. >>> >>>KarinsDad :) >> >>In Shrike I use the SEE everywhere to order the captures before I try them. >>I don't use the SEE to do actual evaluation but do use it to prune losing >>captures in the quiescence search and to delay trying losing captures in >>the full width search. Currently I put losing captures at the tail end. >> >>Implemention. In my SEE I do some initial stuff to record the results of >>the first capture which is fixed by the move in question. Then I create >>a bunch of bitboards containing the remaining pieces that bear on the square >>in question. Then I cycle through them "capturing" with less valuable pieces >>first, more valuable later, alternating between sides. As I'm doing this I >>knock out pieces that bear on the square but are blocked. I also determine >>if pieces bearing on the square become unblocked and put them back in their >>respective bitboards so that they will be found on a later pass. (The >>machinery is fairly complicated and does a bit more than described above.) >>All the while an array is being filled out with the current balance. After >>all the attacking pieces of one side or the other are exhuasted and captured, >>I quit making passes. At that point I "mini-max" the values in that array >>to determine where one side or the other can simply stop and retain the best >>advantage. The score at this point is the score returned by the SEE. >> >>-Dan. > >Thanks Dan. How do you min-max? > >For example, a knight is on the square and protected by a rook. Two rooks in a >battery attack it. Rxn rxR Rxr wins a knight. However, after Rxn, the attacking >side is winning a knight. After rxR, the defending side is winning a rook for a >knight. After Rxr, the attacking side again is winning a knight. > >Since it flip flops, how do you know when to stop? Is it when your capture no >longer wins for you (regardless of what your opponent's capture just won for >him)? > >KarinsDad :) First, I run out all the captures w/o stopping to create an array with running totals (what I called current balance, above)--with the total from the view point of the side that makes the capture: Rxn 300 white is up 300 rxR 200 black is up 200 Rxr 300 white is up 300 again where N=300, R=500. Then, starting at the tail end, I "minimax" up through that array using the following bit of code: while( ns ) { if( seelist[ns] > -seelist[ns-1] ) seelist[ns-1] = -seelist[ns]; ns--; } (The running totals were maintained in seelist[]; ns starts out set to the number of entries-1) Then I return seelist[0]. I find that I don't really understand that bit of code above and have to work it out with pen and paper (on several examples) to see what it does... -Dan.
This page took 0 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.