Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Programmers Question: Hashing and Alpha/Beta bounds

Author: Vincent Diepeveen

Date: 18:48:05 06/06/05

Go up one level in this thread


On June 06, 2005 at 13:10:20, Johannes wrote:

>Hello!
>While working on my chess engine I've come across two problems which I dont know
>how to deal with correctly:

>1. After retrieving a hash entry, can I do the following:
>
>    if (tt_flag == UBOUND) beta = MIN(beta, tt_merit);

>It has worked for me fine, but is in my opinion theoretically unsound.

Well perhaps there is other bugs bigger in your engine and the odds that it
results in a bug is small, yet not neglectible. The bug will happen and smack
you in the face in some important tournament.

So just don't ever improve beta by the hashtable score. It's a very dubious
thing to do. Avoiding taking risks is better than assuming risk is not there.

This where not doing it will not slow you down at all. In fact if you get some
speedup of doing it now, then that means there is some other efficiency problem
in your program now!

So it's free to take no risk in this case. Then i argue: why taking the risk?

To quote my ex-team member Eric de Haan, a chessplayer who without any insight
in tactics still could beat titled players, "be scared and take no risks".

>2. How to deal with a result from a node where alpha and beta have collided? Ths
>happens rarely, but can happen due to altering of bounds because of a hash
>entry. What can I do if i want to store the result from such a node? It is
>neither a LBOUND nor a UBOUND, right?
>I hope some of the more experienced chess programmers can help me with these...

But in diep i have 3 types in my hashtable
  a) <= alfa
  b) >= beta
  c) > alfa & < beta

type c will always give a true bound. but obviously alfa gets improved when
getting the true score. so i store alfa first before i start the search of this
position. in that way org_alfa will not have a collission with the improved alfa
later on when trying to store in hashtable.

Vincent

p.s.
feel free to ask me that question at some chat window of mine in german or
dutch, for now i'll have to look up the word 'collided' in my english dictionary
and i'm gonna close CCC for a while again. My hit'n run action is over by now :)

msn diepchess@hotmail.com / icq 40882246 / aim diepchess (do not email at msn
adress there, i never read email ever there)


>thanks
>johannes



This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.