Author: Robert Hyatt
Date: 07:45:52 08/28/04
Go up one level in this thread
On August 28, 2004 at 08:24:44, Pham Hong Nguyen wrote: >> >>Where would it lose? Costs me no more to generate moves in two chunks (captures >>and non-captures) than it costs to generate all at one whack... > >Whenever the furnction for generating non-capter is called, it is a loss, >compared with the function of generating all move per call. > >The reasons are: >- Generate all moves in one function is usually faster than do that in two >functions. We can avoid to scan many things twice (list of pieces, for example). I don't "scan" anything with bitboards, which is the point... >I am not sure about generator for bitboard, but for mailbox board, I can avoid >one time for scanning empty cells. Certainly. But I have always qualified my generate in two blocks algorithm as making sense for bitboard programs, because of how easy it is to generate only captures in the q-search, and once you have that, it is just as easy to use it in the normal search since the great majority of moves that cause beta cutoffs (refutations) are captures of the piece moved on the previous ply. >- We can save time for pruning hash move, killer moves from the list of >non-capture moves. That has little cost. It has to be done for either all-at-once or two-block algorithms. >- We can save time for checking the legalities of hash move, killer moves by >having all moves. How would that happen? Most generate "pseudo-legal moves". Searching killer and hash moves prior to move generation is a definite winner... > > >> And not having >>to deal with non-captures in the q-search certainly saves time. > >That should not be a problem by using two functions :) > The point is that non-captures are in your move list. You then have to skip over them. I don't have that problem. Nor do I generate the memory traffic to produce a list of moves where I will ignore _most_ of them because they are non-captures... For non-bitboard programs it is a non-issue, because generating captures does require looping over empty squares. For bitboards it does not, and that makes it pay off... >Pham
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.