Author: Frederik Tack
Date: 15:40:25 11/14/05
Go up one level in this thread
On November 12, 2005 at 20:40:38, Joseph Tadeusz wrote: >On November 12, 2005 at 05:48:14, Frederik Tack wrote: > >>You just let the opponent capture the king which results for me in a 30% >performance increase. > > >Does your incheck function use the common approach of substituting the king with >a piece and reverse attacking the checking pieces? > >That is a very fast method. > > >There are many advantages to always knowing the check status. It is not a coding problem with my incheck function i have. It is pretty fast. I use the attackbitboard for each piece from the king's position and 'and' them with the corresponding enemy piece bitboard. As soon as i find a non-zero result, the king is in check. As i see from other reports, 30% speed loss is not that uncommon when switching from pseudo-legal to legal move generation. It's just that it seems such a waste to execute this function for every position while stalemate only occurs during end game. As i understand now, there are no other easy ways to detect stalemate, so i think i'll just go with my original idea wich is to swich to legal move generation as soon as the position is recognised as an endgame where stalemate might occur.
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.