crafty enhancement?

Discussion of chess software programming and technical issues.

Moderator: Ras

Cardoso
Posts: 363
Joined: Thu Mar 16, 2006 7:39 pm
Location: Portugal
Full name: Alvaro Cardoso

crafty enhancement?

Post by Cardoso »

Hi everyone, specially Bob.

here's a small tip to use in iterate.c

in a fail low at the root (value <= root_alpha) make:
root_beta=value+1;
in a fail high at the root (value >= root_beta) make:
root_alpha=value-1;

choose some positions that fail low/high at an iteration say > 15 and you should see a drop in node count.
Am I thinking correctly?

best regards,
Alvaro
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: crafty enhancement?

Post by bob »

Cardoso wrote:Hi everyone, specially Bob.

here's a small tip to use in iterate.c

in a fail low at the root (value <= root_alpha) make:
root_beta=value+1;
in a fail high at the root (value >= root_beta) make:
root_alpha=value-1;

choose some positions that fail low/high at an iteration say > 15 and you should see a drop in node count.
Am I thinking correctly?

best regards,
Alvaro
I am not sure that is better. What if the true score just happens to be root_alpha or root_beta?

You will fail high on the first search, getting root_beta back. Then you fail high on the re-search, getting root_alpha-1 back, and you _still_ don't know the true score.

There is another issue. If you fail high, and raise root alpha, you can end up doing 3 searches. The first search (the one that fails high) does so because it finds a deep draft hash entry (LOWER) that causes the fail high somewhere in the tree. Now you re-search and raise beta, and suddenly you discover that the same hash entry is now useless because the current beta value is > that "LOWER" bound you found in the table. And if you can't search deeply enough, you will ffail low this time around, and then have to do _another_ search to get a real score. But that score==alpha or score==beta case is a problem in and of itself.