Author: Robert Hyatt
Date: 06:42:26 12/29/00
Go up one level in this thread
On December 29, 2000 at 06:52:51, Steve Maughan wrote: >Currently in my program I generate all of the moves then loop through looking >for the hash move, giving it a 'high' move order score went found. This works >well and is simple to implement. It would be (much) better to not generate all >of the other maoves and simply take the hash move and play it first, generating >all the other moves if a cutoff is not forthcoming. > >This give rise to a problem - how can I be sure that the hash move is legal? Test it. This is what I do. Make sure the moving piece is on the from square, the captured piece is on the to square, and you should be ok. I don't generate moves until I have tried the hash move, then I generate just captures and try the good ones, then I do the same trick and try killers before I try to generate the non-captures. And I have to test them for legality as well... > >It could be the case that I have a hash collision - yes I use a 64 bit key but >it's still possible - and no doubt it would happen in the final round of the >World Championships just as I was about to slaughter Shredder 8 (;-)) yes in my >dreams I know!!). > >I guess I have a series of options: > >1) Ignore the possibility and realise that I'll never get to the last round of >the WMCCC. >2) Perform a full legal move check (expensive!) >3) Check that the piece to move is on the expected square >4) Do (3) and check that the destination square is reasonable for the piece to >move but don't bother about checking for sliding peices being blocked. That will work fine. Just be sure that the move you try won't corrupt your data structures. IE don't try O-O without the king and rook on the right squares. Or you end up with two kings or two rooks for that side. Etc. > >At the moment I'm favouring (4) as this could be accomplished with a simple >lookup table. > >What do others do? Any advice appreciated! > >Regards, > >Steve Maughan > >PS I use a x88 structure.
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.