Author: Dan Newman
Date: 00:51:14 07/08/98
Go up one level in this thread
On July 07, 1998 at 21:26:42, Tom Kerrigan wrote: >This is actually the system I use in Stobor and I think it works quite nicely. > >The problem I encountered is that when a piece is captured, a pointer to that >piece in the piece list is saved instead of the type of piece (presumably). Yeah, that's is what I do too--then it's a simple matter of stuffing the pointer back into the board when I undo the move. >This is, of course, wonderful if the piece stays in the piece list. However, if >you want to use this sort of piece list during the search AND to keep track of >the actual game, you can't delete entries from the list. This is a >less-than-elegant solution. > >Cheers, >Tom I actually don't shorten the piece list in most of the other chess programs I've written--to do so only makes the program a little faster. But I thought I'd do it on my latest, just to squeeze out that extra few percent. The main problem I guess is in taking back a move *after* you've shortened the list--the algorithm that worked in the search no longer works here since the pointer to the captured piece now points to the wrong piece. So my idea is to simply reset the board to the starting position and run through all but the last one or two game moves to do a takeback--not very elegant I guess. -Dan.
This page took 0.01 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.