The current count is done in an in-between state where there can be no nodes in queue as we get start out but do not enter its successors. Therefore, the check should be done just before we expand the node.
But that can conflict with the lazy nipping, The approach I am thinking about is to cache the lower bound before closing the node, but it would generate calls for getLowerBound() as number of nodes closed, including all the ones that aren't actually expanded.
The current count is done in an in-between state where there can be no nodes in queue as we get start out but do not enter its successors. Therefore, the check should be done just before we expand the node.
But that can conflict with the lazy nipping, The approach I am thinking about is to cache the lower bound before closing the node, but it would generate calls for getLowerBound() as number of nodes closed, including all the ones that aren't actually expanded.