Author: K. Burcham
Date: 14:49:53 11/21/03
Go up one level in this thread
On November 21, 2003 at 17:38:51, Dann Corbit wrote: >On November 21, 2003 at 17:26:09, K. Burcham wrote: > >>On November 21, 2003 at 17:24:24, Dann Corbit wrote: >> >>>On November 21, 2003 at 17:14:57, K. Burcham wrote: >>> >>>>On November 21, 2003 at 17:02:13, Dann Corbit wrote: >>>> >>>>>On November 21, 2003 at 16:48:10, K. Burcham wrote: >>>>> >>>>>> >>>>>> >>>>>>I think you could answer this for me Dann. >>>>>> >>>>>>When we set hash at 64 megs and the program ends up needing more than this, is >>>>>>it your understanding that the program keeps the same assigned addresses on the >>>>>>ram as the original hash setting and just writes over the top of it? >>>>>>OR >>>>>>Do you think that as the program needs more than 64 megs it fills this and >>>>>>starts assigning new addresses in ram separate from original hash setting and >>>>>>does not write over the top of the original 64 megs and then will fill as much >>>>>>ram as the operating system will allow it to? >>>>> >>>>>What you are describing is called a hash collision. Let's take a ridiculous >>>>>example that will hopefully make it clear. >>>>> >>>>>Suppose that we allocate a total of 4 hash slots, each consuming 20 bytes of >>>>>RAM. So our hash table uses 80 bytes. We map chess positions by a final hash >>>>>of h64bit % 4, to move the hash into slots 0, 1, 2 or 3. Now, as soon as we >>>>>have a 5th position to store in our hash table it will have to write over top of >>>>>some other position (assuming that we don't chain to a secondary table or use >>>>>some other work-around). >>>>> >>>>>So I will have to decide on a replacement scheme. One simple scheme is to >>>>>always replace. >>>>> >>>>>No matter how big the hash table is, if the program thinks long enough it will >>>>>eventually get filled. >>>>> >>>>>Now, a hash miss is not important. It just means that we have to recalculate >>>>>the position instead of using the hash value. The danger with hash tables is a >>>>>hash collision, where the total hash information (typically the hash slot itself >>>>>and some key in the position) are identical, but the position is not. >>>>> >>>>>However, in practice this is very rare. If you use a 64 bit hash, it is so rare >>>>>that you can completely ignore it without any worry. Even with 32 bits, it >>>>>won't affect play much. >>>> >>>>OK, I think I understand. you are saying if we set the hash at 64 megs and the >>>>program uses 94 megs then the program will write over the top of the original 64 >>>>megs hash setting, and we will lose 30 megs of the original info. although I >>>>think the 30 megs that was last entered would be more accurate for that point in >>>>the game or position. >>>> >>>>do you agree with this? >>> >>>The program can't use more hash than you specify. So if you specify a smaller >>>amount than is needed for searching without collisions, then collisions will >>>occur. >>> >>>It's really not a worry. If you have 32 megs of hash or more, the additional >>>memory won't add a whole lot anyway. >> >>is the word collision the same as writing over the top of? > >Yes. The same. Usually, that is what is done. Sometimes, a program will look >at information about the position to decide whether to keep the old one or the >new one. But simple replacement is often used. ok, now that I understand this better, then here is what I was leading up to. I noticed in some earlier tournaments that Johan de Koning set his hash very low compared to other programmers, and also read below CM settings at CM site: Johan de Koning Engine: The King Create a copy of the Chessmaster personality that has a larger transposition table. By going to "Game -> Set Up Personality", loading the Chessmaster personality, and changing the default 4MB transposition table (also called a hash table) to something larger (such as 16MB, if your computer has enough RAM) will allow Chessmaster to use more memory for searching and storing chess positions, increasing the strength of play. For tournament time controls, we suggest a value of 16 or 32MB as being optimum. (See below for the question detailing the proper use of the "Transposition Table" personality setting). If you are going to be playing games that mainly use tournament time controls (such as 40 moves in 120 minutes), then a setting of 32MB is optimum, assuming your computer has enough RAM. If you are going to be playing mainly blitz or bullet games (10 minutes or less), then you don't need anything more than the default of 4MB for the transposition table. If you are going to be using Chessmaster mainly for lengthy analysis, then you should use as large a value as Chessmaster will let you -- 64MB is quite common for this purpose. for some reason it seems that Johan thinks that CM strength is strong even though we have said that the program writes over the top of the 32 or 64 megs that some will set for CM. It seems I am missing something here in having a better understanding of this. kburcham
This page took 0.01 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.