Author: Tord Romstad
Date: 02:16:28 12/01/03
Go up one level in this thread
On December 01, 2003 at 04:16:46, Russell Reagan wrote: >As Uri pointed out, you don't have to check that every move is legal, but that >means that you have to have some information about pins ready to go, or >efficiently computable. IIRC, Uri has attack tables, and Gerd uses the bitboard >filling routines (KoggeStone), so they can detect pins pretty fast. If you used >an 0x88-like system, a pseudo-legal generator is probably faster because the >check to see if the move was legal is almost zero most of the time. Then again, >Tord uses this kind of system, and he has a legal generator, so maybe he can >tell us if there are some tricks he uses to keep legal move generation fast. As I have already said, my main trick is to make the rest of the program so slow that the time spent on move generation is no longer noticable. :-) I call the evaluation function at all interior nodes. Among other things, the evaluation function finds all pinned pieces, and for each pinned piece, the direction in which it is pinned. For pinned pieces, I only generate moves along this direction. For king moves, I simply check whether the destination square is attacked by the opponent (which is almost free because I have complete attack information for all squares after calling the evaluation function). The only special cases that remain are castling and en passent, which do not occur very often. Tord
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.