Author: Dan Homan
Date: 08:54:55 01/24/99
Go up one level in this thread
On January 24, 1999 at 11:11:55, Hugh Cumper wrote: >This may be very simple matter to the old pros. When I first wrote a chess >program I created a stack of boards for lookahead and copied the current board >each time I wanted to look further ahead, discarding it again to go back up. I >suppose I did that because I started writing programs for games like Kalah where >the board is small and moves are relatively epensive to take back. Recently I >have seen programs the have one board and store unmake move information in >addition to move information so the move can be retracted. I am trying to think >which is more efficient but I can't decide. Has anyone worked this out >theoretically or practically? I do exactly what you do: copying the board and discarding it when I am done with that node. Both methods are fast. I've been told that "unmake" is the fastest thing to do on PCs, but I found that the two techniques were equally fast with my program (on both PCs and a DEC Alpha). I chose copying because it was simpler to code and I didn't seem to lose any speed. - Dan P.S. For reference, my program (EXchess) searches ~140 Knps on my 400 MHz Celeron under Linux (egcs 1.0.3). I actually do a number of sub-optimal things in the program that slow it down. My eval is clumsy (and slow) and my move generation is not mailbox, 0x88, bitboard, or GNU's copy system, but rather a simple set of while() and for() loops over the board with a simple logic test for edge of the board detection. If/when I speed these things up, my results on position copying vs. unmake might change.
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.