 in competitive two-player games, the killer heuristic is a technique for improving the efficiency of alpha-beta pruning, which in turn improves the efficiency of the minimax algorithm. this algorithm has an exponential search time to find the optimal next move, so general methods for speeding it up are very useful. alpha-beta pruning works best when the best moves are considered first. this is because the best moves are the ones most likely to produce a cutoff, a condition where the game playing program knows that the position it is considering could not possibly have resulted from best play by both sides and so need not be considered further. i.e. the game playing program will always make its best available move for each position. it only needs to consider the other player's possible responses to that best move, and can skip evaluation of responses to (worse) moves it will not make. the killer heuristic attempts to produce a cutoff by assuming that a move that produced a cutoff in another branch of the game tree at the same depth is likely to produce a cutoff in the present position, that is to say that a move that was a very good move from a different (but possibly similar) position might also be a good move in the present position. by trying the killer move before other moves, a game playing program can often produce an early cutoff, saving itself the effort of considering or even generating all legal moves from a position. in practical implementation, game playing programs frequently keep track of two killer moves for each depth of the game tree (greater than depth of 1) and see if either of these moves, if legal, produces a cutoff before the program generates and considers the rest of the possible moves. if a non-killer move produces a cutoff, it replaces one of the two killer moves at its depth. this idea can be generalized into a set of refutation tables. a generalization of the killer heuristic is the history heuristic. the history heuristic can be implemented as a table that is indexed by some characteristic of the move, for example "from" and "to" squares or piece moving and the "to" square. when there is a cutoff, the appropriate entry in the table is incremented, such as by adding dÂ² or 2d where d is the current search depth. this information is used when ordering moves. == external links == *informed search in complex games by mark winands, https://dke.maastrichtuniversity.nl/m.winands/documents/informed_search.pdf
Game_artificial_intelligence Heuristics Optimization_algorithms_and_methods