Author: Robert Hyatt
Date: 18:37:56 08/18/02
Go up one level in this thread
On August 18, 2002 at 17:18:43, Zach Wegner wrote: >I am very new to chess programming on the whole, and have started programming a >chess engine. I have chosen bitboards as the board representation mostly because >everyone seems to agree it is the best. Now that I have started to go deeper in >the move generation and search functions, I ran into a problem. I have a >bitboard that has all of the side to moves' places that they can move to plus >bitboards for the captures they can make and the squares they attack. >Now, in the search function, I have no clue as to how the computer knows which >piece goes to the square they can move to. If someone could give me an example >or exlpian it really well, I would be much happier. >Thanks, >Zach I am not sure what you are exactly doing above. But in general, for a specific piece, you produce a bitboard that has a 1 on every square that piece can move to given the current board position. Since you already know where the piece is at the moment, that is the <from> square. If you find the ordinal number of a specific 1 bit in the above bitmap, that will give you one <to> square...
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.