Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Unmake move v copy the board

Author: Frank Schneider

Date: 23:21:37 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 think it depends on your program and the boardrepresentation. Gromit uses
copy+update and >1KB is copied every move (which is maybe too much). When I
decided to do it that way (on an Amiga) I only considered clockcycles, but
on a PC the low memory-bandwidth is the real problem. Since Gromits evaluation
and searchheuristics use most of the processortime I never tried
update+take back, because I guess it would give me less than 10% speedup,
probably beeing slower than copy+update.

There are some advantages of copy+update:
- it is easy to program
- it is easier to do some 'clever' things that would be difficult to take back
- you can compare the current position with previous positions in the searchtree

An alternative would use a mix of copied and static datastructures.

Frank




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.