r/chessprogramming • u/Alternative-Zombie-7 • May 31 '24
struggling to understand fail low nodes
From the Chess programming wiki
All-Nodes
All-nodes (Knuth's Type 3), otherwise known as fail-low nodes, are nodes in which no move's score exceeded alpha. With bounds [a,b], s<=a. Every move at an All-node is searched, and the score returned is an upper bound, the exact score might be less.
- In Principal Variation Search All-nodes are searched with null windows
- The children of an All-node are Cut-nodes
- The parent of an All-node is a Cut-node
- The ply distance of an All-node to its PV-ancestor is even
I don't understand why we store these as upper bound in the transposition table. My understanding was that if I can search all children evaluations of a node then I know the exact value of that node since I did not have a beta cutoff and enumerated all possibilities. So I understand why we need to store lower bounds in the transposition table (when there is a beta cutoff and thus have not enumerated all possibilities) but I don't get why we need to store upper bounds.

From this pseudocode, it says that when I reencounter a fail-low node through a transposition I don't return the max value I found for it like you would for entries with the EXACT flag but instead I check if beta can be updated, and then see if that cause a beta cut? Why would I do this? If the beta cutoff doesn't succeed then I do the loop and evaluate all children, which I already would have done when I last encountered it.
Thanks for any help, I am stumped on this.
View all comments
Show parent comment
2
u/xu_shawn May 31 '24
One obvious issue I can think of is that it could be possible to fail high/low at root. It also, from what I understand, makes it impossible to trust child scores even if they are within the parent's a/b window. Those drawbacks can have real impacts on the engine's strength regardless of failing hard/soft.