Page 1 of 1

static eval in every node?

Posted: Fri Jun 09, 2017 5:53 pm
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?

Re: static eval in every node?

Posted: Fri Jun 09, 2017 8:06 pm
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

Re: static eval in every node?

Posted: Fri Jun 09, 2017 10:51 pm
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.

Re: static eval in every node?

Posted: Fri Jun 09, 2017 11:08 pm
by flok
Do you mean TT in qs?

Re: static eval in every node?

Posted: Sat Jun 10, 2017 4:00 am
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.

Re: static eval in every node?

Posted: Sat Jun 10, 2017 11:19 am
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.

Re: static eval in every node?

Posted: Sat Jun 10, 2017 11:20 am
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.

Re: static eval in every node?

Posted: Tue Jun 13, 2017 6:22 pm
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.