Author: Uri Blass
Date: 09:04:49 12/06/01
Go up one level in this thread
On December 06, 2001 at 11:46:52, Severi Salminen wrote: >>>I AM THE KING OF THE WORLD!!!! ...no?... >>> >>No >>You are not > >Oh damn! Well, it felt SOOOOO good for these 2 minutes ;) > >>My task was not to calculate perft with make and unmake move but to calculate >>perft. > >I don't really understand. The perft (as "defined" in crafty) does a complete >search to a certain depth making and unmaking all the legal moves. So if you do >perft 1 in initial position you should be making and unmaking 20 moves. And if >your legality check needs making an unmaking then you obviously have to >make/unmake more moves but this is about desing. But basically perft N updates >the Board structure to every legal position at depth N. And we must both do the >same to compare figures. The problem for me is not updating the board but updating infornmation of squares that are attacked. > >>legality check is not done in my makemove and I guess that legality check is >>done in your makemove. > >In a way, yes. I first make a move and then check if my king was left in check >and if this is the case, I unmake the move as it is illegal. Do you check >legality in move generation? That might not be a good idea (see below). If the king is not in check then I check if the piece is pinned by my pin array and if the piece is not pinned I generate it's moves. The only exceptions are king moves or castling and in this case I use my attack array to find if the move is legal. If the king is in check I have a special function to generate moves. > >>The main problem is that my makemove update the attack arrays and it is needed >>for generating the next ply moves because my gen function generate only legal >>moves not like your program. > >Hmm, this might not be a good idea as in normal search you will end up doing >allways too much work: when you generate the last moves in quiescence search, >you generate some useless info for next ply move generation, which you don't >need as you will call eval(). I think that I may need it for the extension rule and evaluation. BTW: what are these attack arrays? Some info on >who is attacking who? For every square I have information about the directions that it is attacked by white and the directions that it is attacked by black This information is saved in one 32 bit number when 16 bits are for the directions that are attacked by white and 16 bits are for the direction that are attacked by black. same applies if you do legality check in move generation >stage: you most likely will need that info only for the first move you try (if >you have good move ordering scheme): In 95% of cases you fail high after the >first tried move, so you didn't have to know if other moves were legal or not. No I may need to know the number of legal moves to decide how much to extend. >It is very possible that I speak too much as I really don't know anything about >your engine but these things were something I have had to go through with my >engine. > >Severi I also do not know nothing about my engine because at this stage I have no engine and only a move generator and ideas. 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.