Author: Robert Hyatt
Date: 06:10:32 06/21/00
Go up one level in this thread
On June 21, 2000 at 07:00:56, Gian-Carlo Pascutto wrote: >On June 20, 2000 at 21:58:33, Robert Hyatt wrote: > >>If I wasn't clear, let me know... > >It was very clear, but I have two additional questions: > >a) If you emit a signature for every move, your temporary >files will get VERY big, right? Yes they will. I truncate my book lines at 60 plies, although some build books for crafty that include the entire game. But for 60 plies, 1.5M games, the temp signature files add up to 1,500,000 * 60 * 9 (9 is 8 bytes for the signature, 1 byte for flags like ? ! and win/lose/draw. It takes roughly 1 gig for the temp files, although there are +many+ duplicate positions that get collapsed into one at 'merge' time. > >b) Related to (a), how do you sort a 300MB file on a 16MB system >within reasonable time. (i.e. the sorting in chuncks) This is >probably something that every Computer Science person knows, but I'm >not one of them ;) I sort 'em in chunks. I allocate a big buffer, fill it, then call 'qsort()' to sort that chunk. I write it out to disk, clear the buffer, and then do another chunk. If you watch crafty building a book, you will see "....." displayed, 1 dot every couple of seconds or so. Occasionally rather than a "." you will see a "S". That is a "chunk sort" indicator. > >-- >GCP
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.