Author: Steve Maughan
Date: 11:20:59 09/01/99
Go up one level in this thread
Bas Facinating stuff!! A couple of quick questions >>> >>>All these methods can see if a piece is attacked by another piece very fast, >>>without scanning the board. > >You can download the source of KnightCap. I have no idea how complicated that >source is. KnightCap keeps a "real" attackmap, which is harder (and I think >slower) than keeping a "pseudo" attackmap. Here is how I do it: > >Suppose your want to "know" at any moment by which pieces a square is >pseudo-attacked. Pseudo attacks are simply blocked AND non blocked attacks by >sliding pieces and attacks by non sliding pieces. How would you do Check detection with only pseudo attacks? I assume you would test for a pseudo attacker of a king. If one does not exist then InCheck=false. Otherwise, if one does exist then if it is NOT a sliding piece then InCheck=true. If it is a sliding piece then do the hard work of checking to see if there is a block. Is this sort of correct? >If you want to do SEE you have all attackers neatly sorted already at any time >and can just pop em out with lastone(). You HAVE to have a fast lastone of >course, preferably one that relies on a single CPU instruction (intel has that). > >Critical: a fast lastone and a fast way to update (sliding) attacks. > I understand what SEE is but what do you mean by lastone()? Do you mean the last bit set? >I hope this all made sense. Disclaimer: I have not seen many other programs do >this. So draw your own conclusions. > Doesn't Commet do something similar? Interesting discussion! > >Regards, >Bas Hamstra.
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.