counting nodes vs counting evaluations

Discussion of chess software programming and technical issues.

Moderator: Ras

bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: counting nodes vs counting evaluations

Post by bob »

Rebel wrote:
bob wrote:
Rebel wrote:When I run mine I typically get:

Code: Select all

Nodes Searched       : 65.426.495  (0:24) average  2.732M  p/s
Evaluation called    : 14.009.203         average  0.583M  p/s

Does your engine behave in a similar way?
Are you doing endpoint / q-search evaluations or do you call it internally also? I do only q-search evaluations..
Internally also.
Here's my numbers (I don't count evals so had to add a quick fix):

nodes=8753973650(8.8B)
evals=3373776750(3.4B)
time=1:33.6 (93.6s)
nps=93.5M
So your ratio is 888/348 = 2.5
Mine 654/140 = 4.6

My way of counting: a node is every evaluation whether full or fast. Fast includes (succeeded) lazy eval and (succeeded) futility pruning where there is no need to do a full (expensive) eval.
I just added eval++ at the very top of eval. If you do it on internal nodes, how can evals be less than total nodes searched???
User avatar
Bloodbane
Posts: 154
Joined: Thu Oct 03, 2013 4:17 pm

Re: counting nodes vs counting evaluations

Post by Bloodbane »

Code: Select all

Nodes: 121970155
Evaluations: 41003991
Nodes/Evaluations: 2.9745922781
I don't use lazy eval, but I increment the node count whenever a move is considered for making (even if pruned or illegal), or made (even null move).
Functional programming combines the flexibility and power of abstract mathematics with the intuitive clarity of abstract mathematics.
https://github.com/mAarnos
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: counting nodes vs counting evaluations

Post by bob »

Karlo Bala wrote:
Joost Buijs wrote:Like Bob I also added an evaluation counter and this is the result from a 22 ply search at the start position.

Code: Select all


info depth 22 score cp 31 time 48038 nodes 613958104 nps 12780675 tbhits 0 evaluations 588208482

What surprises me is that there is a difference between the number of nodes and the number of evaluations, this is something I don't understand.
It can be a bug, certainly something to look at.

Edit: When I do a null-move I don't call the evaluation function, but I just negate the value from the previous node, this is probably the reason.
Hash hits ?!
For the small difference given (26M out of 600M searched) hash hits could easily do that, given 3% or so useful hash hits that would bypass calling the eval...

but Ed's difference was more than that by a huge amount.
lauriet
Posts: 199
Joined: Sun Nov 03, 2013 9:32 am

Re: counting nodes vs counting evaluations

Post by lauriet »

Hi Ed,
I'm confused why you ask a question like this. You are one of the legends of chess programming with a super program.
Wouldn't you know why you engine does this ???
I wish I had 1/10 of your chess programming experience and understanding.

Regards
Laurie
Dann Corbit
Posts: 12777
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Re: counting nodes vs counting evaluations

Post by Dann Corbit »

lauriet wrote:Hi Ed,
I'm confused why you ask a question like this. You are one of the legends of chess programming with a super program.
Wouldn't you know why you engine does this ???
I wish I had 1/10 of your chess programming experience and understanding.

Regards
Laurie
I think Ed just wanted to know if his ratio is very similar to other engines.