I'm trying to add some logic to my engine to handle drawish endgames better. For example KNNK is a draw, but zurichess evaluates it at +9. My hope is to teach the engine to exchange down when it can.
I added table (code below) saying which endgames are drawish (>90% probability based on endgame table bases). For these endgames I devide the score by 8 so now instead of +9 KNNK evaluates as ~1.
This however did not improve the play. Is there anything I'm missing, or is there a better way to handle drawish endgames?
Code: Select all
// drawishEndgames maps an endgame to a mask
// of Color representing whether it can hold a draw if it is to move.
var drawishEndgames = map[uint64]Color{
KK: White | Black,
KKN: White | Black,
KNK: White | Black,
KKB: White | Black,
KBK: White | Black,
KBKB: White | Black,
KNKN: White | Black,
KBKN: White | Black,
KNKB: White | Black,
KNNK: White | Black,
KKNN: White | Black,
KNNKB: White | Black,
KBKNN: White | Black,
KNNKN: White | Black,
KNKNN: White | Black,
KNNKR: White | Black,
KRKNN: White | Black,
}