Mate Killer Move

Code, algorithms, languages, construction...
Post Reply
thevinenator
Posts: 68
Joined: Tue Jun 02, 2015 11:02 pm
Real Name: Vince

Mate Killer Move

Post by thevinenator » Thu Feb 02, 2017 4:00 am

one implementation (typical?) of killer moves it to use a 2 slot container (based on ply). when a beta cutoff occurs, the move that caused the cutoff is compared against the first slot and if it isn't already there, the killer in slot 1 is put into slot 2 and the new killer is put into slot 1.

enter the mate-killer....

what to do if a mate-killer is found? if the method above is used, the killer could be pushed out before it can be used. what is a better strategy?
"An Engine's strength flows from the Search. But beware, pruning, extensions, reductions; the dark side of the Search are they. Once you start down the dark path, it will dominate and consume you, as it has to so many developers before.” -- Yoda

H.G.Muller
Posts: 190
Joined: Sun Jul 14, 2013 10:00 am
Real Name: H.G. Muller

Re: Mate Killer Move

Post by H.G.Muller » Thu Feb 02, 2017 11:44 am

I never used mate killers with normal chess, but I thought that engines that do remember them separately from other killers.

I did use a mate-finding heuristic in my engine CrazyWa, which is an engine for games with piece drops (such as Crazyhouse and Shogi). This was more like a counter-move heuristic than conventional killer, however, because the purpose was to not allow mating combinations to be pushed over the horizon by spite checks. In games with drops this is a very common motive: you sacrifice a number of pieces to destroy the enemy King fortress, and make a mate threat against which no defense is possible, but which doesn't deliver check. Then the opponent can delay the inevitable by checking you through dropping all the sacrificed material, until he finally runs out of checks, and you can conclude the checkmate. But if you bump into the horizon anywhere before the mate, the position looks good to him, because the spite checks only give back material he gained in the first place.

So the idea was to remember the entire sequence of moves that forces the mate in case the opponent did not play any spite check. Which actually is a tree, because the opponent can have choice in how to defend. So any cut moves with a mate score will be stored in a table indexed by the previous opponent move. This table in consulted in QS, and if the move found in it is legal, it will always be searched, even when it is a non-capture. Usually such moves are checks, so that all evasions are searched, even in QS. This would go on until the mate is reached. So forced mates that consist of a series of checks can never be pushed over the horizon by an unrelated series of spite checks against the other King.

Post Reply