Author: Robert Hyatt
Date: 07:35:20 01/22/02
Go up one level in this thread
On January 21, 2002 at 11:52:28, Russell Reagan wrote: >I'm thinking about using different position representation in my program. >Currently I have a 64 byte array for the squares and a few other variables for >side to move and the rest. I contemplated going to a 256 byte array (16x16) and >using a 2 row border around the 8x8 board. This is ok as it will help detect knight jumps off the board. But 0x88 is even better in that regard and has been around forever... > >This seemed like it would help speed up and make easier the edge detection, but >then I began to think about other areas of my program, such as simply looping >through the board. Before I just used a for loop from 0 to 63, but with a 16x16 >board you'd have to do a column increment and a row increment with a multiply or >an addition of the width of the board, so it seems that in that area it might be >slower. I've thought of several other fixes for each of these methods and each >one has areas where it seems a little faster and another area where it would be >slower. Anyone have any advice as far as chess position representation, or >simply how to approach these kinds of problems? 16 is a power of 2, so shifting left 4 bits avoids the multiply... 0x88 uses this as well as the board is 8 rows of 16 values with the last 8 on each row being unused... > >Also, does anyone know how to view the C/C++ with ASM view in MSVC++? I've >reached a view in the program before where it had the C/C++ statement, then the >ASM below it, but I can't figure out how I got to this anymore. > >Thanks, >Russell
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.