Author: Sean Empey
Date: 18:21:06 03/01/00
Go up one level in this thread
On March 01, 2000 at 20:40:48, John Coffey wrote: >On March 01, 2000 at 17:03:44, William Bryant wrote: > > >>Break down your move generator into two functions, one that generates captures >>and promotions, and one that generates only non-captures. Hopefully, one >>of the captures will generate a cutoff and the non-captures will not have >>to be generated at all. >> > >It is hard for me to imagine how this can be done at all? Seems like generating >the captures would also require you to generate the non-captures. > >I assume that the only way this can be done is with bitboards? > >John Bitboards are not necessary to do this. You just create two functions.(you can do it with 1, but for simplistic sakes we will use two here) Function 1) GenerateNonCaptures() Function 2) GenerateCaptures() When you generate the moves you only look for moves that will capture. If they don't. You simply exclude them.(that's what function 2 does.) If you want to generate only non-Captures, you call function 1. There are lot's of ways of generating moves. Whatever the way, you basically need to Distinguish between captures and non-captures. Good move ordering is important.(Quiesce is another spot where generating captures is important). This is just an example of how you could do it. As the problem seems to be with the concept of generating only captures vs all moves for the given position. Have you tried looking at some source code from another program?. That might be a good place to get working code examples.
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.