Author: Frank Phillips
Date: 04:45:46 01/17/99
Go up one level in this thread
On January 16, 1999 at 19:00:58, Dan Newman wrote: >Posted by Frank Phillips on January 16, 1999 at 06:40:05: > >>I have vague thoughts of moving on from mailbox[] to 0x88 and would be >>grateful for a bit more detail on the second part of Bruce’s 0x88 message >>(Jan 12, message number 39133) about masks, particularly how to use them >>(bfBishop | bfQueen for instance)? >> > >The idea is to make an array of bitmaps which can be indexed by the >difference in 0x88 coordinates of two squares. This index is in >the range of -119 to 119 since on-board 0x88 coords range from 0 to >119. This means the array must have at least 239 entries (I ususally >"round" this up to 240 with the idea that that might improve alignment >of data...). You can then index the array like this: > > array[coord2-coord1+119] > >What I usually do is set a pointer equal to array+119 and then [SNIP] Thanks Dan. My first and current attempt started as a rip of TSCP but as grown like topsy as I have added stuff and my understanding has increased – usually in that order. I am looking for a reason to start again and stop me constantly fiddling with what I have. So it is either plunging into bitboards (doubtful) or 0x88 as the motivation for a complete redesign. I do wonder what sort of speedup 0x88 might bring. The biggest I managed so for was after someone here (Werener I think) pointed out that his program spent most of its time testing for check and I changed my approach from finding each piece and seeing if it attacked to king, to working out from the king square along diagonals, files and ranks, and testing whether knights and pawns where located knight and pawn moves away. Obvious, and quicker since most paths to king are usually blocked. Currently the program spends about 10% of its time in the in_check function and about 10% generating captures. I pre-calculate moves at intialisation, so move generation involves an array lookup, nextsquare[piece][direction][sq], and an if() statement to check if it is –1 and therefore off the board. Still aspiring to beat that pansy (as someone here called it) GNUchess though : ))
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.