refactor: Rename moveHistory to posKeyHistory
This commit is contained in:
parent
3345cf0c74
commit
6022591e99
|
@ -110,7 +110,7 @@ int Thread::search()
|
|||
if (rootPos->get_phase() == Phase::moving) {
|
||||
Key key = rootPos->key();
|
||||
|
||||
for (auto i : moveHistory) {
|
||||
for (auto i : posKeyHistory) {
|
||||
if (key == i)
|
||||
{
|
||||
repetition++;
|
||||
|
@ -122,16 +122,16 @@ int Thread::search()
|
|||
}
|
||||
|
||||
#if defined(UCI_DO_BEST_MOVE) || defined(QT_GUI_LIB)
|
||||
moveHistory.push_back(key);
|
||||
posKeyHistory.push_back(key);
|
||||
#endif // UCI_DO_BEST_MOVE
|
||||
|
||||
//sync_cout << "moveHistory Size = " << moveHistory.size();
|
||||
//sync_cout << "posKeyHistory Size = " << posKeyHistory.size();
|
||||
//std::cout << sync_endl;
|
||||
assert(moveHistory.size() < 256);
|
||||
assert(posKeyHistory.size() < 256);
|
||||
}
|
||||
|
||||
if (rootPos->get_phase() == Phase::placing) {
|
||||
moveHistory.clear();
|
||||
posKeyHistory.clear();
|
||||
}
|
||||
#endif // THREEFOLD_REPETITION
|
||||
|
||||
|
@ -213,7 +213,7 @@ int Thread::search()
|
|||
|
||||
extern ThreadPool Threads;
|
||||
|
||||
vector<Key> moveHistory;
|
||||
vector<Key> posKeyHistory;
|
||||
|
||||
Value search(Position *pos, Sanmill::Stack<Position> &ss, Depth depth, Depth originDepth, Value alpha, Value beta, Move &bestMove)
|
||||
{
|
||||
|
|
|
@ -45,7 +45,7 @@ void clear();
|
|||
#include "tt.h"
|
||||
|
||||
#ifdef THREEFOLD_REPETITION
|
||||
extern vector<Key> moveHistory;
|
||||
extern vector<Key> posKeyHistory;
|
||||
#endif
|
||||
|
||||
#endif // #ifndef SEARCH_H_INCLUDED
|
||||
|
|
|
@ -40,7 +40,7 @@ extern vector<string> setup_bench(Position *, istream &);
|
|||
|
||||
#ifdef THREEFOLD_REPETITION
|
||||
extern int repetition;
|
||||
extern vector<Key> moveHistory;
|
||||
extern vector<Key> posKeyHistory;
|
||||
#endif // THREEFOLD_REPETITION
|
||||
|
||||
namespace
|
||||
|
@ -73,7 +73,7 @@ void position(Position *pos, istringstream &is)
|
|||
|
||||
#ifdef THREEFOLD_REPETITION
|
||||
repetition = 0;
|
||||
moveHistory.clear();
|
||||
posKeyHistory.clear();
|
||||
#endif // THREEFOLD_REPETITION
|
||||
|
||||
pos->set(fen, Threads.main());
|
||||
|
@ -82,7 +82,7 @@ void position(Position *pos, istringstream &is)
|
|||
while (is >> token && (m = UCI::to_move(pos, token)) != MOVE_NONE) {
|
||||
pos->do_move(m);
|
||||
#ifdef THREEFOLD_REPETITION
|
||||
moveHistory.push_back(pos->key());
|
||||
posKeyHistory.push_back(pos->key());
|
||||
#endif // THREEFOLD_REPETITION
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue