Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: SEE Function

Author: Tony Werten

Date: 05:05:47 04/04/00

Go up one level in this thread


On April 04, 2000 at 05:20:36, Dan Newman wrote:

>
>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

Ok in this case it works. But suppose the sequence is:

    Qxn    300
    rxQ   -600
    RxR   -100    ( R was on same line as Q, so couldn't take first )

>
>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)

seelist[0]=300
seelist[1]=-600
seelist[2]=-100

ns=2: if (-100)>600 not the case
ns=1: if (-600)>-300 not the case

>
>Then I return seelist[0].

wich would be 300 while the score should be -100

Am I missing something here ?

Tony

>
>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.