Author: Russell Reagan
Date: 14:13:02 12/04/02
Go up one level in this thread
On December 04, 2002 at 04:39:05, Sune Fischer wrote: >Nice :) Thank you. I got the idea about using the > operator to resolve a number from Gerd, so that credit goes to him. Then it dawned on me that you don't need to keep working with the 64-bit value. >I also got thinking, most of the time we don't really need the least significant >bit, we just need one bit - any bit! Good point. It could be even better than you think. For example, when the time comes when we can get rid of the board array in bitboard programs, and efficiently determine what piece is on a given square from the bitboards alone, it would be sufficient to use the b & -b trick to get a bitboard with the lowest bit set, and you could simply use that as a "from mask" for the piece being moved. But since we have the board array, you need an index, not just a 64-bit mask. >Should give a larger class of solutions for the problem, but whether it is >possible to make a faster algorithm I don't know. I think it's certainly possible. Look at all of the cleverness that people have come up with, with "magic" numbers and bitwise tricks, and so on. Russell
This page took 0.01 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.