Author: Sune Fischer
Date: 01:29:19 06/15/03
Go up one level in this thread
On June 14, 2003 at 23:52:36, Russell Reagan wrote: >On June 14, 2003 at 18:59:16, Sune Fischer wrote: > >>Goes without saying if you only use it for incheck. >>Incheck can be done by incrementally checking only for the moving piece and the >>piece it may uncover (x-ray). No attack table can beat that. > >I never thought of this. How would you do that? Use either a 64 x 64 array, or >the 256 element array (like the 0x88 attack array) to determine if a piece that >moved from a square could have exposed the king to check? Makes sense. Well it can be optimized a lot for 0x88, I suspect so much that it hardly shows up on the profile. Consider for instance a black move from c8 to d8 with the white king on g2, from those squares no checks are possible. >I wonder >how this would compare to the illegal move detection of allowing the king to be >captured and taking back the moves. I don't like this method at all. There are two (big) problems with it. First of all you need to do an expensive gen_captures() before you can tell if the position is legal. If only a very very small amount of the moves were illegal then it might still be faster than incheck(), but the problem is that a big percentage of the moves will in fact be illegal, maybe 80% of the moves do not evade a check. So everytime you are checked and your movelist contains 50 moves, of which only 5-7 are legal as check evaders, you need to gen_captures() on 40+ moves just to find they are illegal! That is unless you just get lucky and quickly fail high on one of the legal ones, but still you see why it painfully expensive. Secondly you need to know you are in check so you can _extend_. >>I think if you don't have attack tables you will end up going through hoops to >>avoid the expensive attack calls, just look at the grief over a simple incheck >>:) > >I like Gerd's and Steffan's method of using the bitboard filling routines. Of >course, you have to write them in MMX assembler and be careful how you use them, >or your program crawls. When Opteron gets more compiler support those routines >will fly, I think. Yeah can't wait for the 64 bit compilers. :) These methods are interesting, it would be nice if we could reduce the update of the three rotated occupied boards, but to my knowledge rotated is still a wee bit faster. -S.
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.