Author: Uri Blass
Date: 03:16:52 12/20/02
Go up one level in this thread
On December 20, 2002 at 05:33:30, Richard Pijl wrote: >On December 20, 2002 at 05:19:18, Uri Blass wrote: > >>On December 20, 2002 at 04:33:13, Gerd Isenberg wrote: >> >>>On December 20, 2002 at 04:12:20, Uri Blass wrote: >>> >>>>On December 20, 2002 at 03:37:09, Gerd Isenberg wrote: >>>> >>>>>On December 19, 2002 at 18:49:56, Dann Corbit wrote: >>>>> >>>>>>On December 19, 2002 at 18:47:22, Joshua Haglund wrote: >>>>>> >>>>>>>Anyone know of a good site(s) for the programming of a (legal) move generator? >>>>>> >>>>>>You'll find a lot more help looking for a pseudo-legal move generator. I don't >>>>>>think anyone makes a strictly legal move generator (maybe Uri does...) >>>>> >>>>>I do it in IsiChess and i guess a lot of bitboarders too. >>>>> >>>>>Gerd >>>> >>>>I do not think that it is something special for bitboarders. >>>>I do it without bitboards. >>>> >>>>Uri >>> >>>Yes, sorry Uri. >>> >>>I thought detecting pinned pieces is a bitboard domain, but of course it's >>>independent of the data structure representing the board. >>> >>>Gerd >> >>detecting pinned pieces is something that I do without bitboard and it can be >>improved(also without bitboard) but maybe bitboard can help better. > >Reading your post I think it will. >> >>I will explain what I do in this post and explain my ideas of doing it better. >> >>today I have an array pin[64] that tells me for every square if the piece in it >>is pinned to the king. >> >>pin[i] is used only when there is a piece of the side to move in square i(in >>other cases pin[i] is not used so right for today I do not care if the value is >>wronf). >>pin[i]=-1 means that the piece is not pinned. >>pin[i]=0 means that the piece is pinned to the same file >>pin[i]=1 means that the piece is pinned to the same rank >>pin[i]=2 or pin[i]=3 means that the piece is pinned in diagnols. > >Or use 4 bitboards. One for each pin direction and how I do things like if pin[sq]<=0 when I generate moves of a pawn in square sq and I want to check that it is not pinned in direction that prevents it to move in the same file? I need to check 2 bitboards(if the piece is pinned and not pinned from file direction) Is it faster than if pin[sq]<=0? Maybe I should add more bitboards but in that case I am not sure if calculating the array is not faster than calculating the bitboards and I think that I can care about the problem of knowing the pinned pieces also without bitboard by having some array pininfo[64] that gives me information about the square of the pinned pieces. Maybe I should have move generator for every pin direction and I can avoid this check if I know in the beginning that pin[sq]<=0 for all sq(today I only avoid it only when I know that pinnumber[ply]=0 that means no pinned pieces). I do not say that bitboards cannot help but I do not see a simple idea that is clearly better and it is not clear for me if bitboard are faster for me than no bitboard. bitboards may help to check the square of the pinned pieces but remembering the information in an array can also help. Uri
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.