add pvs(), aka Principal Variation Search

This commit is contained in:
2023-07-11 22:18:41 +02:00
parent af1f5db507
commit 9932a64c97
6 changed files with 435 additions and 29 deletions

View File

@@ -14,7 +14,20 @@
#ifndef EVAL_H
#define EVAL_H
#include "position.h"
#include <limits.h>
#include "chessdefs.h"
#include "piece.h"
#define EVAL_MAX \
KING_VALUE + \
QUEEN_VALUE * 9 + \
ROOK_VALUE * 2 + \
BISHOP_VALUE * 2 + \
KNIGHT_VALUE * 2
#define EVAL_MIN (-EVAL_MAX)
#define EVAL_INVALID INT_MIN
eval_t eval_material(pos_t *pos, bool color);
eval_t eval_mobility(pos_t *pos, bool color);