Author: Miguel A. Ballicora
Date: 08:46:09 02/02/01
Go up one level in this thread
On February 02, 2001 at 00:57:30, David Rasmussen wrote: >On February 01, 2001 at 18:43:58, Robert Hyatt wrote: > >>On February 01, 2001 at 15:26:43, David Rasmussen wrote: >> >>>On February 01, 2001 at 10:37:04, Robert Hyatt wrote: >>> >>>> >>>>You can look at my code named "GenerateCheckEvasions()" but the idea is >>>>this (simplified and maybe wrong): >>>> >>>>1. If I am checked by a single piece, capture it. >>>> >>>>2. If I am checked by a single sliding piece, interpose. >>>> >>>>3. If I am checked by either 1 or two pieces, move the king out of the check. >>>> >>>>for 3, you might think that I have to check for legality after generating a >>>>king move, but it isn't needed. If the checking piece is a slider, I have to >>>>move in any direction but +/- the checking direction. Bitmaps handle all of >>>>this easily, so that I can produce moves that I _know_ are legal. >>> >>>OK, I am aware of the idea of a CheckEvasions() function. I just didn't see >>>anybody talking about checking moves only. I assumed you meant you were able to >>>generate _all_ moves legally, somehow. >> >> >>No, sorry. Although it is probably possible to do so by bitboard tricks >>dealing with diagonals/ranks/files passing through the king's square.. > >Yes, but can it be done without losing performance, or even with a performance >gain overall? I guess we don't know. I know, it hurts performance (at least for me). This was the first thing I programmed. A move generator with bitboards that produced all legal moves without making/unmaking. That is, pins etc. were all checked statically. Since my first goal was to have a PGN reader, I figured that it was useful to have a move generator that I can trust every move is legal since it would simplify the code after that. Besides, I had fun figuring out how to do it. When I started to make a chess program I used that move generator. Overall it is slower than generating pseudolegal moves and reject them when I try to use them in the search (after an in_check() test). Then again, this is not a perfect example because my program gaviota is slow everywhere... Regards, Miguel
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.