Author: Bruce Moreland
Date: 02:47:17 08/20/99
Go up one level in this thread
On August 20, 1999 at 05:29:55, James Robertson wrote: >On August 20, 1999 at 05:08:06, Bruce Moreland wrote: >>For instance, if the score is mate in 6, store it as >= mate in 300 or whatever. > >I am not completely sure I understand. Say I find a position is +mate in 6, >would I score it with the flag 'lower bound' and a score of mate in 300, instead >of an 'exact' flag with a score of +mate in 6? Yes. I think there are probably better ways to do this but I don't care. Once I got past a few dumb bugs, I never had to worry about this code again. I know for absolute sure that I'm not messing up this value when I store it or retrieve it. >>There are some dumb cases like if you are failing high or failing low, where you >>may have to just laugh and not store anything. > >Err.... I don't understand here either. How would I decide not to store >anything? How about failing high on -mate in 7. You can't store that as <= -mate in 300, because maybe the score is 0 or 32 or +mate in 3 or something. The best you could do is store it as >= -mate in 1, which you may as well not store, since that is like saying >= -infinity. There is a little bit of code to write here, but I don't think it will make you slow down too much. You just have to have a few "if" statements in your hash table store routine and then everything else works perfectly, and you may be able to rip some potentially buggy code out of your hash table probe routine. >>This won't hurt performance, I think, and will guarantee that you can never get >>a bogus mate score bug ever. >> >>If the bound is not enough to cause a cutoff, chances are that you are either >>winning big or losing big, so who cares. > >For me, it is a major struggle just to figure out how this whole hash thing >works with alpha-beta. I _think_ I get the gist of what is happening, but may be >completely off. Does this mean that if we look up +mate 300 (actaully it is >+mate in 6, but we adjusted it) is < beta, then we are winning so much it >doesn't matter? If you get an exact score of 17, you could store it in the hash table as >= 17 or <= 17 or >= -3 or some other statement that is weaker than "exactly 17" while still being true as long as the exact score is 17. You don't do this because you have some specific information, that the score is exactly 17, so you can store this information at full strength and make some assumptions based upon this information. When you weaken what you put in the hash table, you might find yourself doing some extra work, if alpha and beta are such that mate in 3 used to be good enough, but >= mate in 300 isn't good enough any more. But if alpha and beta are that far away from zero, I'm not sure that it matters if you have to do extra work in these cases. What I'm saying is that if you are trying to cut off, >= mate in 300 is almost always just as good as mate in 6. The difference is that you don't have an exact score taken from the hash table ending up in your PV, it will either cause a cutoff, which won't end up in the PV, or cause a search in order to get the right score. bruce
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.