Author: h.g.muller
Date: 04:46:04 02/10/06
Go up one level in this thread
if(bestscore == -1)
bestscore = -negamax(24-color, 0)/2;
should have been
if(bestscore == -2)
bestscore = -negamax(24-color, 0)/2;
But that would not interfere with the required function, which was only supposed
to work correctly for positions that were mate-in-ones. This bug would only
become apparent if you present it stalemate-in-one positions, which are then
mistaken for checkmates.
I introduced the bug in the last 10 minutes of the 70, while the problem proper
was already solved, but I tested it could see mate-in-twos as well. To my
dismay, it couldn't, and the reason was that I rewarded King capture and
checkmate by scores 1 and -1, which did not age. So it could not see the
difference between moves that lost his king immediately, and moves that lost it
in 3 plies, and considered both illegal. The result was that mated in 2 would be
seen as a stalemate if you were not in check.
This is why I changed the king-capture score to 2, and divide by 2 if checkmate
is detected to give it a score of 1. Moves that can not avoid a checkmate can
then be distingushed from illegal moves. But I forgot to make the 1 -> 2 change
in this place... :-(
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.