Perft(7) challenge position #5

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

Mark
Posts: 216
Joined: Thu Mar 09, 2006 9:54 pm

Re: How bad is it?

Post by Mark »

Excellent! Thanks to Paul & Syed for checking my result.
User avatar
sje
Posts: 4675
Joined: Mon Mar 13, 2006 7:43 pm

64 bit signature false positive rate is now circa 1.6*10^-6

Post by sje »

64 bit signature false positive rate is now circa 1.6*10^-6 (1/620,000)

5 cases were located from 31 work units; each work unit has 100,000 unique positions.

Fully verified work units (26):
400-408 411-412 414 416 419 421-426 428 430-432 435 437

Work units with at least one false positive (5):
409-410 413 415 417
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: How bad is it?

Post by bob »

sje wrote:A retrieved move legality check may not be so simple if it's a full legality test vs a pseudolegality test. Testing a retrieved en passant move including moving into check might not be very trivial at all. A psuedolegal move which won't crash one program might quite well crash another.

Delaying a legality test just means more wasted processing time if the move turns out to be bogus.

A retrieved move legality test should be omitted when using 128 bit signatures, at least until other more useful tests are performed. A false positive 128 bit match might happen only once ever 300 million years or so, and so there are other problems due to cosmic rays which would be more profitable to test. For example, running each and every calculation three times and taking the majority result.
As I mentioned, it depends on what you have to avoid. I generate pseudo-legal moves anyway. I only worry about making a move where the moving piece is not on the source, and the captured piece is not on the destination, since unmaking such a move will create a piece.

I can play hundreds of games without detecting an illegal move, using 64 bit values. So they are rare. I test to avoid a crash. I would test with 128 bit signatures, as it will STILL crash...
jwes
Posts: 778
Joined: Sat Jul 01, 2006 7:11 am

Re: How bad is it?

Post by jwes »

bob wrote:
sje wrote:A retrieved move legality check may not be so simple if it's a full legality test vs a pseudolegality test. Testing a retrieved en passant move including moving into check might not be very trivial at all. A psuedolegal move which won't crash one program might quite well crash another.

Delaying a legality test just means more wasted processing time if the move turns out to be bogus.

A retrieved move legality test should be omitted when using 128 bit signatures, at least until other more useful tests are performed. A false positive 128 bit match might happen only once ever 300 million years or so, and so there are other problems due to cosmic rays which would be more profitable to test. For example, running each and every calculation three times and taking the majority result.
As I mentioned, it depends on what you have to avoid. I generate pseudo-legal moves anyway. I only worry about making a move where the moving piece is not on the source, and the captured piece is not on the destination, since unmaking such a move will create a piece.

I can play hundreds of games without detecting an illegal move, using 64 bit values. So they are rare. I test to avoid a crash. I would test with 128 bit signatures, as it will STILL crash...
Would it cause a problem if the side to move is on check and the move from the hash table does not escape check?
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: How bad is it?

Post by bob »

jwes wrote:
bob wrote:
sje wrote:A retrieved move legality check may not be so simple if it's a full legality test vs a pseudolegality test. Testing a retrieved en passant move including moving into check might not be very trivial at all. A psuedolegal move which won't crash one program might quite well crash another.

Delaying a legality test just means more wasted processing time if the move turns out to be bogus.

A retrieved move legality test should be omitted when using 128 bit signatures, at least until other more useful tests are performed. A false positive 128 bit match might happen only once ever 300 million years or so, and so there are other problems due to cosmic rays which would be more profitable to test. For example, running each and every calculation three times and taking the majority result.
As I mentioned, it depends on what you have to avoid. I generate pseudo-legal moves anyway. I only worry about making a move where the moving piece is not on the source, and the captured piece is not on the destination, since unmaking such a move will create a piece.

I can play hundreds of games without detecting an illegal move, using 64 bit values. So they are rare. I test to avoid a crash. I would test with 128 bit signatures, as it will STILL crash...
Would it cause a problem if the side to move is on check and the move from the hash table does not escape check?
In Crafty, since I use pseudo-legal moves anyway, I don't see how. The only issue, as I mentioned, is "spontaneously creating pieces". Most egregious case is castling when there is no king or rook on the right squares. Making/unmaking said move will leave a new king back at e1/e8 and possibly a new rook at a1/a8, which will cause all sorts of problems...
User avatar
sje
Posts: 4675
Joined: Mon Mar 13, 2006 7:43 pm

64 bit signature false positive rate is now circa 1.32*10^-6

Post by sje »

64 bit signature false positive rate is now circa 1.32*10^-6 (1/760,000)

5 cases were located from 38 work units; each work unit has 100,000 unique positions.

Fully verified work units (33):
400-408 411-412 414 416 419 421-428 430-439 445

Work units with at least one false positive (5):
409-410 413 415 417