Author: Sune Fischer
Date: 14:31:55 12/06/01
Go up one level in this thread
On December 06, 2001 at 15:48:05, Severi Salminen wrote: >>Yes but this it the problem anyone with a strong engine has. >>Too much information is carried around in the make and unmake funktions to make >>it fast in the perft test. >>Most would have to redesign large parts of their code to compete with these >>times, so it is not really a meaningfull test in that regard. > >And in real life the engine should be fast generating moves and make the "hard >work" in make() unmake(). Usually you have to make only the first move and then >you'll get a cutoff. If you optimize using perft, you'll go probably wrong >because in perft you make ALL the moves. Yes, that too. >>It is, but what about checking if the squares are attacked, this is not so easy, >>it is _the_ problem of move generation IMO. >>Therefore I am switching to a different set of move rutines once castling is >>over. > >What do you mean by "switching to a different..."? You just have to test if the >side to move has castling rights left. If not, then you don't have to check if >squares are attacked. One if() statement only. I have special move functions for the pawns and kings, then I have one makemove() for the rest. When the kings are done with the castling I switch so the kings also uses the standard makemove(). It is only one "if" and a few local variables I save, but I have a feeling that it is a bit faster to call the same function often rather than dispersing the calls to many functions. It is just a feeling, but why not make the switch when I already have the faster function running. >Severi
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.