Fleet  0.0.9
Inference in the LOT
FullMCTSNode.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "MCTSBase.h"
4 
12 template<typename this_t, typename HYP>
13 class FullMCTSNode : public MCTSBase<this_t,HYP> {
15  using Super::Super; // get constructors
16 
17  using data_t = typename HYP::data_t;
18 
19 
20  virtual generator<HYP&> search_one(HYP& current) override {
21 
22  if(DEBUG_MCTS) DEBUG("MCTS SEARCH ONE ", this, "\t["+current.string()+"] ", (unsigned long) this->nvisits);
23 
24  auto c = this->descend_to_evaluable(current); //sets current and returns the node.
25  c->process_evaluable(current);
26  co_yield current;
27  }
28 
29 };
30 
#define DEBUG_MCTS
Definition: MCTSBase.h:3
virtual this_t * descend_to_evaluable(HYP &current)
This goes down the tree, sampling children until it finds an evaluable (building a full tree) ...
Definition: MCTSBase.h:326
Definition: generator.hpp:21
Definition: MCTSBase.h:41
void DEBUG(FIRST f, ARGS... args)
Print to std:ccout with debugging info.
Definition: IO.h:73
Definition: FullMCTSNode.h:13
std::atomic< unsigned int > nvisits
Definition: MCTSBase.h:59