static eval in every node?

Discussion of chess software programming and technical issues.

Moderators: bob, hgm, Harvey Williamson

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
Post Reply
zenpawn
Posts: 296
Joined: Sat Aug 06, 2016 6:31 pm
Location: United States

static eval in every node?

Post by zenpawn » Fri Jun 09, 2017 3:53 pm

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: 3824
Joined: Fri Mar 10, 2006 4:23 am
Location: http://www.arasanchess.org

Re: static eval in every node?

Post by jdart » Fri Jun 09, 2017 6:06 pm

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: 209
Joined: Fri Jul 10, 2015 7:23 pm
Location: Russia

Re: static eval in every node?

Post by Kotlov » Fri Jun 09, 2017 8:51 pm

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 » Fri Jun 09, 2017 9:08 pm

Do you mean TT in qs?

User avatar
JVMerlino
Posts: 1003
Joined: Wed Mar 08, 2006 9:15 pm
Location: San Francisco, California

Re: static eval in every node?

Post by JVMerlino » Sat Jun 10, 2017 2:00 am

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: 296
Joined: Sat Aug 06, 2016 6:31 pm
Location: United States

Re: static eval in every node?

Post by zenpawn » Sat Jun 10, 2017 9:19 am

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: 296
Joined: Sat Aug 06, 2016 6:31 pm
Location: United States

Re: static eval in every node?

Post by zenpawn » Sat Jun 10, 2017 9:20 am

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: 293
Joined: Thu Mar 16, 2006 6:39 pm

Re: static eval in every node?

Post by Cardoso » Tue Jun 13, 2017 4:22 pm

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.

Post Reply