mirror of
https://github.com/opelly27/Stockfish.git
synced 2026-05-20 15:37:47 +00:00
Add primitive MCTS search.
This commit is contained in:
committed by
Stéphane Nicolet
parent
a44b1115c4
commit
9094255f50
@@ -118,6 +118,28 @@ using ValueAndPV = std::pair<Value, std::vector<Move>>;
|
||||
ValueAndPV qsearch(Position& pos);
|
||||
ValueAndPV search(Position& pos, int depth_, size_t multiPV = 1, uint64_t nodesLimit = 0);
|
||||
|
||||
namespace MCTS {
|
||||
|
||||
struct MctsContinuation {
|
||||
std::uint64_t numVisits;
|
||||
Value value;
|
||||
float actionValue;
|
||||
std::vector<Move> pv;
|
||||
};
|
||||
|
||||
ValueAndPV search_mcts(
|
||||
Position& pos,
|
||||
std::uint64_t nodes,
|
||||
Depth leafDepth,
|
||||
float explorationFactor);
|
||||
|
||||
std::vector<MctsContinuation> search_mcts_multipv(
|
||||
Position& pos,
|
||||
std::uint64_t numPlayouts,
|
||||
Depth leafDepth,
|
||||
float explorationFactor);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
} // namespace Stockfish
|
||||
|
||||
Reference in New Issue
Block a user