Author: Robert Hyatt
Date: 07:31:05 02/02/01
Go up one level in this thread
On February 02, 2001 at 07:07:15, Severi Salminen wrote: >>cull means to "throw out". IE a normal move generator will either (a) generate >>all moves and then cull or throw out non-captures; (b) have a special move >>generator that loops to generate moves and each time the target square is empty, >>the move is not produced. But it takes time to loop over the empty squares. > >I don't know if any bitboard approach loops over empty squares, other than those >which are important (IE to which a piece may move to). Right. But an 0x88 implementation does. Because for slider pieces, it has to see how far it can slide before it contacts an enemy piece (if it does hit on an enemy piece). > >>I have two functions. One starts with the valid set of target squares as all >>empty squares. That generates all moves that are non-captures. The second >>function starts with the valid set of target squares as the squares occupied >>by opponent pieces, which generates only captures. With bitmaps, if a piece >>can move to 12 non-capturing squares, I loop exactly 12 times. If the same >>piece can capture only one piece, I loop exactly once to generate the >>captures... I don't look at empty squares, I don't notice empty squares, >>etc. > >This is what I do (I believe we are doing things in the same way): In >gen_captures() I check where a piece can move to, then AND that bitboard with >all opposing pieces and then extract those bits out. In gen_non_captures I take >also squares where a piece might go and then AND it with bitboard that has empty >squares set on. > >Severi
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.