forked from LeelaChessZero/lc0
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add searchmethod class (LeelaChessZero#1734)
The idea is to create a class SearchMethod which will make the process described in LeelaChessZero#1734 modular. The user can just specify 1. Strategy for the selection of the move to play, 2. Strategy for the selection of the move to explore, 3. Strategy for the result propagation, 4. Strategy for the recalculation of node value. It will allow wider experimentation with search by, for example, using NN for some of the choices made.
- Loading branch information
1 parent
2146388
commit 5699dfd
Showing
2 changed files
with
98 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
/* | ||
This file is part of Leela Chess Zero. | ||
Copyright (C) 2018-2019 The LCZero Authors | ||
Leela Chess is free software: you can redistribute it and/or modify | ||
it under the terms of the GNU General Public License as published by | ||
the Free Software Foundation, either version 3 of the License, or | ||
(at your option) any later version. | ||
Leela Chess is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU General Public License for more details. | ||
You should have received a copy of the GNU General Public License | ||
along with Leela Chess. If not, see <http://www.gnu.org/licenses/>. | ||
Additional permission under GNU GPL version 3 section 7 | ||
If you modify this Program, or any covered work, by linking or | ||
combining it with NVIDIA Corporation's libraries from the NVIDIA CUDA | ||
Toolkit and the NVIDIA CUDA Deep Neural Network library (or a | ||
modified version of those libraries), containing parts covered by the | ||
terms of the respective license agreement, the licensors of this | ||
Program grant you additional permission to convey the resulting work. | ||
*/ | ||
|
||
#include "mcts/searchmethod.h" | ||
|
||
#include <algorithm> | ||
#include <array> | ||
#include <chrono> | ||
#include <cmath> | ||
#include <iomanip> | ||
#include <iostream> | ||
#include <iterator> | ||
#include <sstream> | ||
#include <thread> | ||
|
||
#include "mcts/node.h" | ||
#include "neural/cache.h" | ||
#include "neural/encoder.h" | ||
#include "utils/fastmath.h" | ||
#include "utils/random.h" | ||
#include "utils/spinhelper.h" | ||
|
||
namespace lczero { | ||
|
||
} // namespace lczero |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
/* | ||
This file is part of Leela Chess Zero. | ||
Copyright (C) 2018 The LCZero Authors | ||
Leela Chess is free software: you can redistribute it and/or modify | ||
it under the terms of the GNU General Public License as published by | ||
the Free Software Foundation, either version 3 of the License, or | ||
(at your option) any later version. | ||
Leela Chess is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU General Public License for more details. | ||
You should have received a copy of the GNU General Public License | ||
along with Leela Chess. If not, see <http://www.gnu.org/licenses/>. | ||
Additional permission under GNU GPL version 3 section 7 | ||
If you modify this Program, or any covered work, by linking or | ||
combining it with NVIDIA Corporation's libraries from the NVIDIA CUDA | ||
Toolkit and the NVIDIA CUDA Deep Neural Network library (or a | ||
modified version of those libraries), containing parts covered by the | ||
terms of the respective license agreement, the licensors of this | ||
Program grant you additional permission to convey the resulting work. | ||
*/ | ||
|
||
#pragma once | ||
|
||
#include <array> | ||
#include <condition_variable> | ||
#include <functional> | ||
#include <optional> | ||
#include <shared_mutex> | ||
#include <thread> | ||
|
||
#include "chess/callbacks.h" | ||
#include "chess/uciloop.h" | ||
#include "mcts/node.h" | ||
#include "mcts/params.h" | ||
#include "mcts/stoppers/timemgr.h" | ||
#include "neural/cache.h" | ||
#include "neural/network.h" | ||
#include "syzygy/syzygy.h" | ||
#include "utils/logging.h" | ||
#include "utils/mutex.h" | ||
|
||
namespace lczero { | ||
} // namespace lczero |