Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Measuring NPS...

Author: Robert Hyatt

Date: 10:23:01 11/18/02

Go up one level in this thread


On November 18, 2002 at 11:27:43, Sune Fischer wrote:

>On November 18, 2002 at 10:50:02, Robert Hyatt wrote:
>
>>On November 18, 2002 at 09:25:37, Omid David Tabibi wrote:
>>
>>>On November 17, 2002 at 22:31:31, Robert Hyatt wrote:
>>>
>>>>On November 17, 2002 at 21:12:53, Joel wrote:
>>>>
>>>>>Hey All,
>>>>>
>>>>>Thankyou to everyone who responded to my query regarding 'extracting bits from a
>>>>>bitboard'. I think I will use some preprocessor code and use the bsf/bsr method,
>>>>>otherwise falling back on my old method (I can play around with this part
>>>>>later).
>>>>>
>>>>>My next question that follows is how do you guys measure nodes per second. I can
>>>>>think of a quite a few ways of doing it myself, but I would prefer implementing
>>>>>it in a way which lets me very confidently compare my results with others.
>>>>>
>>>>>Thanks,
>>>>>Joel
>>>>
>>>>
>>>>Every time you recursively call Search() or Quiesce(), increment a counter
>>>>by one.  That is counting nodes searched.  Divide that by time used and you
>>>>get a useful NPS value.
>>>
>>>But when you reach depth == 0, don't increment the node counter, since this node
>>>will be counted as a quiescence node upon calling quiesc(). (if you do, this
>>>node will be counted twice!)
>>
>>
>>Not in my code.  If I enter search, that is a node.  If I call quiesce, I call
>>it _from_ search
>>and _only_ after making a move.  There is no way in a normal alpha/beta search
>>to enter
>>search and from there go to quiesce() without making a move.  If you are doing
>>that you
>>are wasting time with an extra procedure call and its overhead...
>
>
>Not necessarily. I do that, but before calling qsearch I get the chance to check
>for draw, see if there is a hash or egtb table hit or if I should do some
>further extensions (ie. this way I don't enter qsearch when in check!). I don't
>do any of this in qsearch.

I don't enter quiesce() if in check either, however I also avoid tacking on the
procedure call overhead.  If you want to do all that, just move it down in your
search code to just before you call quiesce.  You get the _same_ effect, without
an extra procedure call thrown in.

>
>In Crafty you basicly have two straight moves in a row, only a stand pat score
>is calculated. In my program evaluation and making moves are the most expensive
>parts (because of incremental attack info), so I like to do as much with it as
>possible before going to the next move + evaluation.
>
>If nothing else at least it simplifies the code a great deal :)
>
>-S.



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.