Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Nodes per second

Author: Robert Hyatt

Date: 05:11:47 04/02/98

Go up one level in this thread


On April 01, 1998 at 13:14:43, Bruce Moreland wrote:

>
>On April 01, 1998 at 03:21:58, Andreas De Troy wrote:
>
>>[I wrote a similar post a few days ago in rec.games.chess.computer, but
>>it did not show up there (at least I did not see it), so I repost it
>>now.]
>>
>>I am working on My First ChessProgram and I wonder how you people count
>>these nps (nodes per second). I see that Nimzo98 claims 200 000 nps on a
>>Pentium 200 and when I compare this to *my* current program I cannot
>>imagine how I could ever reach, say, half of this number. I got
>>typically between 45 000 and 70 000 nps with material evaluation only.
>
>First remember that NPS, while it is an easy number to measure, doesn't
>necessarily have an exact correspondance with Elo.  It makes little
>sense to optimize for it in absence of other factors.  For instance, if
>you can order your moves better, so that you search 20% fewer nodes to
>get to depth D, but each node takes 10% longer to search, you'd be a
>fool not to do this even though everyone would say you've gotten slower.
>
>But on the other hand, when people start out, they all go slow by any
>metric.
>
>Nimzo probably does very little evaluation at the tips.  You might want
>to compare yourself to something more normal, like perhaps Crafty.
>
>If you stay interested in this subject, you will probably end up
>rewriting every time-critical function in your program a few times, this
>will make you go faster.
>
>>So how do you count this? I saw in Crafty the "nodes++"-statement at the
>>beginning of the ab-search and the q-search, and that's how I count too.
>>But maybe you should count the number of generated moves instead? (The
>>number would be much higher then.)
>
>If your car has a speedometer that measures miles per hour, it doesn't
>go faster if you put a new one in that measures kilometers per hour.
>
>>And a few days ago I saw in a message from KK that hashing influenced
>>this number too so my second question is: are the hits counted, or
>>aren't they?
>
>In my opinion, they are counted.  One natural way to write a search
>would be as follows:
>
>search( ... )
>{
>    nodes++;
>    if ( ... ttable match ... )
>        return value_from_ttable;
>    while (more_candidates) {
>        ...
>        search();
>        ...
>    }
>    return value_from_search;
>}
>
>It might be possible to moe the transposition table probe, so that it is
>not at the top of search, but rather it is executed right before you
>recurse into search:
>
>search( ... )
>{
>    nodes++;
>    while (more_candidates) {
>        ...
>        if ( ... no ttable match ... ) {
>            search();
>            ...
>        } else
>            nodes++;
>        ...
>    }
>    return value_from_search;
>}
>
>In order to get the same node counts for the exact same work, I inserted
>a new "nodes++" statement in the above, and I think it would be "fair"
>to do this.
>
>bruce


I interpreted his "hash" question differently.  I thought he meant to
count the nodes the hash hit *eliminated*.  Since I don't know how many
nodes this represents, and since I don't store node counts (below a
node)
in the hash table, I couldn't do this at present... and am not sure I'd
really want to...  but it *might* be more accurate...



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.