static eval in every node?

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

zenpawn
Posts: 349
Joined: Sat Aug 06, 2016 8:31 pm
Location: United States

static eval in every node?

Post by zenpawn »

In the past I have tried futility pruning using a basic material eval plus margin, but from reading the chessprogramming wiki and threads here, it seems folks might be doing a full eval for things like futility pruning, reverse futility pruning, and even whether to try a null move. Does this mean the savings from these methods outweigh the cost of doing a static eval in every node?
jdart
Posts: 4366
Joined: Fri Mar 10, 2006 5:23 am
Location: http://www.arasanchess.org

Re: static eval in every node?

Post by jdart »

Yes.

Most of the nodes are at the terminal or near-terminal edges of the search anyway, and for most of the q-search nodes you need a static eval anyway, for the cutoff test. So you are already going to do a lot of evals and adding more higher up in the tree is not that much more expensive. And doing it enables a lot of pruning and other decisions that can shrink the tree.

You can consider doing a partial (lazy) eval where possible, but can be tricky to pull off since there are multiple uses for an eval score and not all would have the same tolerance for error.

--Jon
User avatar
Kotlov
Posts: 266
Joined: Fri Jul 10, 2015 9:23 pm
Location: Russia

Re: static eval in every node?

Post by Kotlov »

zenpawn wrote:In the past I have tried futility pruning using a basic material eval plus margin, but from reading the chessprogramming wiki and threads here, it seems folks might be doing a full eval for things like futility pruning, reverse futility pruning, and even whether to try a null move. Does this mean the savings from these methods outweigh the cost of doing a static eval in every node?
Hashing best move is better idea.
flok

Re: static eval in every node?

Post by flok »

Do you mean TT in qs?
JVMerlino
Posts: 1357
Joined: Wed Mar 08, 2006 10:15 pm
Location: San Francisco, California

Re: static eval in every node?

Post by JVMerlino »

jdart wrote:Yes.

Most of the nodes are at the terminal or near-terminal edges of the search anyway, and for most of the q-search nodes you need a static eval anyway, for the cutoff test. So you are already going to do a lot of evals and adding more higher up in the tree is not that much more expensive. And doing it enables a lot of pruning and other decisions that can shrink the tree.

You can consider doing a partial (lazy) eval where possible, but can be tricky to pull off since there are multiple uses for an eval score and not all would have the same tolerance for error.

--Jon
And if you have hash for eval you can save a decent amount of time.
zenpawn
Posts: 349
Joined: Sat Aug 06, 2016 8:31 pm
Location: United States

Re: static eval in every node?

Post by zenpawn »

jdart wrote:Yes.

Most of the nodes are at the terminal or near-terminal edges of the search anyway, and for most of the q-search nodes you need a static eval anyway, for the cutoff test. So you are already going to do a lot of evals and adding more higher up in the tree is not that much more expensive. And doing it enables a lot of pruning and other decisions that can shrink the tree.

You can consider doing a partial (lazy) eval where possible, but can be tricky to pull off since there are multiple uses for an eval score and not all would have the same tolerance for error.

--Jon
Thank you. With that assurance, I'm going to retry futility pruning with a real eval. I also tried reverse futility at depths 1 and 2, but it wasn't an improvement.
zenpawn
Posts: 349
Joined: Sat Aug 06, 2016 8:31 pm
Location: United States

Re: static eval in every node?

Post by zenpawn »

JVMerlino wrote:And if you have hash for eval you can save a decent amount of time.
I do have this, so that's good.
Cardoso
Posts: 362
Joined: Thu Mar 16, 2006 7:39 pm
Location: Portugal
Full name: Alvaro Cardoso

Re: static eval in every node?

Post by Cardoso »

And if you have hash for eval you can save a decent amount of time.
Except if you have a multi-threaded engine and plan to run it using many threads, you could have a problem with increased memory traffic and cache coherency. The more threads you add the more costly it gets.