Author: Randall Jouett
Date: 00:24:55 06/21/02
Go up one level in this thread
Howdy, Russell/Gang, On June 20, 2002 at 04:48:49, Russell Reagan wrote: >As far as I know, this is how the 16x16 board is layed out: > >XXXXXXXXXXXXXXXX >XXXXXXXXXXXXXXXX >XXXXOOOOOOOOXXXX >XXXXOOOOOOOOXXXX >XXXXOOOOOOOOXXXX >XXXXOOOOOOOOXXXX >XXXXOOOOOOOOXXXX >XXXXOOOOOOOOXXXX >XXXXOOOOOOOOXXXX >XXXXOOOOOOOOXXXX >XXXXXXXXXXXXXXXX >XXXXXXXXXXXXXXXX > >The O's are the board, and the X's are the illegal squares. I don't know how >this differs much from a 12x12, or a 12x10 board, but if Christophe says so, >then I have no reason to believe it's not true. I agree with him. Also note that the actual board location is now on a 32-bit boundary. That is, if he is using one board location is equal to one byte :^). Indexing this array would probably be much faster (depending on the architecture of the CPU), because the actual board now lies on a even-byte boundary. So, rolling and unrolling a loop in this situation would probably haul some serious butt! In Also, with a couple of well-placed pointers, accessing the actual board is rather trivial. Not only that, but now he doesn't have to do wacked-out addtions to variables or pointers (slowing things down), making the programming much, much easier to read and write. Hmmm. This Christophe (sic?) dude must be an old assembly hack or something :^). >To test if a square is out of bounds, you would just set the X's to -1 or 0 or >whatever value you choose to stand for "out of bounds". So you could say: > >#define OUT_OF_BOUNDS -1 > >// ... > >if(squares[x][y] != OUT_OF_BOUNDS) > MakeMove(x,y); > >That's pretty simple, but maybe you get the idea. If you just use an 8x8 array, >you'd have to test more and it would be a little slower. Unless Christophe has >some secret that none of the rest of us know about, I don't think this is very >important as long as you choose one that is reasonably efficient. Well, I'm not sure, but I think that I might have figured out what he's doing??? :^). Maybe not, but I think I might have hit my hammer close the the nail?? :^). BTW, this also gives me an idea! I'm not sure if it is a good one, but, nevertheless, I think I'll mention it and see what others have to say :^). I wonder if you could use the unused-squares for position scoring at a particular depth/ply and use this additional info for unique hash values? Wouldn't this save time over generating random numbers? (Shrug.) Off the top of my small head, I would think that this scheme might also help avoid hash collisions a bit better than random generation. OTOH, I've only written a chess program that used alpha-beat pruning and a few other heuristics, so what do I know about hash tables and chess? Pretty much nothing, actually :^). Actually, I need to think this idea through, and I agree with Bob Hyatt when he says that this information needs to be discussed in open forum as was done years ago during the ACM events. Well, I also agree with Stallman, too :^). Best Regards, and type at you folks later! Randall "NOP" Jouett Amateur Radio: AB5NI I eat spaghetti code out of a bit-bucket while sitting at a hashtable! mailto: rules@bellsouth.net
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.