Author: Mikael Bäckman
Date: 09:07:17 11/21/04
Hi!
Today I found a silly bug in my engine, a bug which might exists in other
engines as well.
The recapture extension is (too) simple to implement: Test if the current move
and the previous move have the same to-square and are captures of equal value,
if so, we have a recapture.
So I had code looking like this:
if ((To(curVar[ply-1]) == To(pMove->flags)) &&
(values[Capture(curVar[ply-1])] == values[Capture(pMove->flags)])) {
ext += FULLPLY;
}
I didn't check if the move actually was a capture since I assumed that two
subsequent moves to the same square must be a capture.
The problem with this is that when I nullmove, I store a 0 into my current
variation array (curVar[]) and the nullmove of course isn't a capture, so the
above 'if' fails.
In my engine, 0 is also the index for the A1-square, so I ended up extending
every move to A1 after a nullmove.
a3 d5 Ra2 null Ra1<extend> e5 Ra2 Nf6 Ra1<extend> and so on. :)
/Mikael
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.