printing PV and score | bench 4118297
This commit is contained in:
1 parent
674e769783
commit
6d6fababdb
4 files changed
+43
-3
No files matched your search
@@ -1,6 +1,10 @@
|
||||
#pragma once
|
||||
#include "board.h"
|
||||
#include "uci.h"
|
||||
#include <vector>
|
||||
#include "move.h"
|
||||
|
||||
constexpr int maxDepth = 64;
|
||||
|
||||
extern U64 nodes;
|
||||
extern bool benchStarted;
|
||||
@@ -25,6 +29,33 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
class PVLine {
|
||||
private:
|
||||
int length[maxDepth] = {};
|
||||
Move table[maxDepth][maxDepth] = {};
|
||||
public:
|
||||
void SetLength(int ply) {
|
||||
length[ply] = ply;
|
||||
}
|
||||
|
||||
void SetMove(int ply, Move move) {
|
||||
table[ply][ply] = move;
|
||||
|
||||
for (int i = ply + 1; i < length[ply + 1]; i++) {
|
||||
table[ply][i] = table[ply+1][i];
|
||||
}
|
||||
|
||||
length[ply] = length[ply + 1];
|
||||
}
|
||||
|
||||
void Print(int n) {
|
||||
for (int i = 0; i < length[n]; i++) {
|
||||
table[n][i].PrintMove();
|
||||
std::cout << ' ';
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
SearchResults PVS(Board board, int depth, int alpha, int beta);
|
||||
void SearchPosition(Board &board, SearchParams params);
|
||||
void StopSearch();
|
||||
|
||||
Reference in new issue
Block a user