A chess engine powered by Rust, running on Lichess with Python. You can play against it here if it is currently online.
It uses Monte Carlo tree search as the core search algorithm. Instead of performing playouts at leaf nodes like a Pure MCTS algorithm would, it uses an evaluation function to give a value to the node. In addition to this value, it will also calculate a prior value for all possible child nodes of the current node. It uses these values in a modified UCT formula:
Where:
-
q is the expected value for the current node, calculated as the average value of itself and its explored children,
-
p is the prior value for the current node,
-
c is a constant search temperature to affect the exploration/exploitation trade-off,
-
N is the total visit count of the parent node,
-
n is the visit count of the current node.
When n = 0, the second term of the equation is replaced by an arbitrarily high value so all branches will be explored once at a minimum.
The next branch to search is calculated by finding the unexplored leaf node that maximizes the output of the formula.
The current evaluation function is a simple piece value calculation with a few minor modifications. The current prior evaluation function is an even simpler difference in number of pieces.