s -= (8*taxicab(king1,king2) + 2*distance(Nsq,king2) +
distance(Bsq,king2));
s += KingEnding[king1];
return (s);
This seems to work fine now. I've tested a few KBNK positions and
with self play, gnu is able to mate itself in less than 35 moves most
of the time.
Regards.
Kong Sian