A data type for game trees, as used in decision theory and game theory, along with purely functional standard algorithms for searching the tree using alpha-beta pruning.

Can be used as the basis of an AI for two-player zero-sum games, such as chess.

Currently the algorithms available are Negamax, Alpha-beta, Principal Variation Search and Negascout.

The first two are for demonstration only (a unit test shows that all four yield the same results). the later two should give equivalent performance to each other.

Sample timings are available at my blog,.

There are no frills at the moment, such as iterative deepening, quiesence search, transition tables, history lists, killer moves. Some of these will be added later, and so the API might change. Others might prove to be impractical in a purely functional setting. i don't know until I try.

Likewise parallel algorithms might be tried in the future.