Author: Heiner Marxen
Date: 14:17:34 03/05/04
Go up one level in this thread
On March 05, 2004 at 16:33:36, Volker Böhm wrote: >Hi, > >I am currently redesigning my board representation. In Move Generation I´ll >write something like > >for every pawn > generate & weight & store it´s moves > >to get every pawn I don´t whant to walk through the board. Currently I am >storing piece lists for every kind of piece. But this makes the do und undo move >a little too costy as I have to search through the piece list to find the right >one. If for example I hit a piece I have to scan through the piece list, remove >the piece and fill the hole from the end. > >I´am thinking about storing the piece-list-index in the board to find the right >position of the piece in the piece-list quickly. That could get a little >speed-up. Yes, I do exactly that. >But I haven´t a good idea to keep the order of the piece list identical if I >do/undo a hit move. I do not reuse formerly used slots in the piece list, just mark them as void. When the pieces comes back into life by move undo, I just reuse the old slot, which I happen to have stored in every move struct. But with different lists for each piece type you will have to be careful with promotions. I do not have different piece lists for the different kinds of chessmen, just one for white and one for black. >What are you for example doing to get every pawn in move generation? I don't do that: I enumerate the pieces of the side to move, and handle them in the order they come, whatever their type is. >Thanks Volker Since I don't do a playing program but rather a mate prover (Chest) you should take my views with a grain of salt. Chest is an exceptionally slow searcher. Cheers, Heiner
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.