This commit is contained in:
2022-12-23 23:57:29 +01:00
parent 87adca7e66
commit cb0fcc4702
14 changed files with 208 additions and 52 deletions

View File

@@ -9,15 +9,16 @@
namespace Search {
const int kPosInfinity = std::numeric_limits<int>::max();
const int kNegInfinity = std::numeric_limits<int>::min();
struct Node {
explicit Node(const Move move) : move(move) {
explicit Node(const Move &move) : move(move) {
}
Node(Node &node) : move(node.move) {
next = std::move(node.next);
value = node.value + 10;
value = node.value;
}
std::unique_ptr<Node> next;
Move move;
@@ -30,7 +31,7 @@ struct RootNode {
int value = kNegInfinity;
};
int search(Node *node, const Board &board, unsigned depth);
int search(Node *node, const Board &board, unsigned depth, int alpha, int beta);
PrincipalVariation start(const Board &board);
int evaluate(const Board &board);
}