fixed ucinewgame command, makefile bug in linux
This commit is contained in:
1 parent
4b1ce8f8ea
commit
8e6b8db124
4 files changed
+12
-17
No files matched your search
@@ -42,6 +42,6 @@ $(OBJ_DIR):
|
||||
# Clean up build artifacts
|
||||
.PHONY: clean
|
||||
clean:
|
||||
$(RM) $(OBJ_DIR) 2>nul || $(DEL) $(OBJ_DIR)\* $(OBJ_DIR) 2>nul
|
||||
$(RM) $(EXE)$(EXE_EXT) 2>nul || $(DEL) $(EXE)$(EXE_EXT) 2>nul
|
||||
$(RM) $(OBJ_DIR) || $(DEL) $(OBJ_DIR)\* $(OBJ_DIR)
|
||||
$(RM) $(EXE)$(EXE_EXT) || $(DEL) $(EXE)$(EXE_EXT)
|
||||
$(MAKE)
|
||||
+2
-2
@@ -55,8 +55,8 @@ public:
|
||||
}
|
||||
|
||||
void Clear() {
|
||||
length[maxDepth] = {};
|
||||
table[maxDepth][maxDepth] = {};
|
||||
length[maxDepth - 1] = {};
|
||||
table[maxDepth - 1][maxDepth - 1] = {};
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
+8
-12
@@ -1,7 +1,6 @@
|
||||
#pragma once
|
||||
#include "board.h"
|
||||
#include "search.h"
|
||||
#include <vector>
|
||||
|
||||
// 2[colors] * 6[pieces] * 64[squares]
|
||||
extern U64 zKeys[2][6][64];
|
||||
@@ -30,24 +29,21 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
// 256 MB
|
||||
constexpr U64 maxHash = (256 * 1000000) / sizeof(TTEntry);
|
||||
constexpr U64 defaultHash = (5 * 1000000) / sizeof(TTEntry);
|
||||
|
||||
// 5 MB
|
||||
inline int hashSize = (5 * 1000000) / sizeof(TTEntry);
|
||||
inline U64 hashSize = defaultHash;
|
||||
|
||||
constexpr int invalidEntry = 111111;
|
||||
|
||||
class TTable {
|
||||
private:
|
||||
std::vector<TTEntry> table;
|
||||
std::array<TTEntry, maxHash> table;
|
||||
public:
|
||||
TTable() {
|
||||
table.reserve(hashSize);
|
||||
}
|
||||
|
||||
void Resize(int size) {
|
||||
table.resize(size);
|
||||
}
|
||||
|
||||
void Clear() {
|
||||
table.clear();
|
||||
table.fill(TTEntry{});
|
||||
}
|
||||
|
||||
TTEntry* GetRawEntry(U64 &hashKey) {
|
||||
|
||||
@@ -165,7 +165,6 @@ void ParseGo(Board &board, std::string &command) {
|
||||
static void SetOption(std::string &command) {
|
||||
if (command.find("Hash") != std::string::npos) {
|
||||
hashSize = (ReadParam("value", command) * 1000000) / sizeof(TTEntry);
|
||||
TT.Resize(hashSize);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user