public void PruneTest2() { var tree = new Node(10, true) { { "a", new Node(5, false) }, { "b", new Node(7, false) { { "a", new Node(6, true) }, { "b", new ENode() }, } } }; var ai = new MinimaxWithAlphaBetaPruning <string>(2); ai.GetBestMove(tree); }
private void CheckMinimaxWithPruning(Node node, string expected, int ply = 2) { var ai = new MinimaxWithAlphaBetaPruning <string>(ply); Assert.AreEqual(expected, ai.GetBestMove(node), "Minimax with pruning failed"); }