|
| | MyMCTS (MyMCTS &&) |
| |
| virtual generator< MyHypothesis & > | playout (MyHypothesis ¤t) override |
| | This gets called on a child that is unvisited. Typically it would consist of filling in h some number of times and saving the stats. More...
|
| |
| | MCTSBase () |
| |
| | MCTSBase (MyHypothesis &start, MyMCTS *par, size_t w) |
| |
| | MCTSBase (MyHypothesis &start, double ex, data_t *d) |
| |
| | MCTSBase (const MyMCTS &m) |
| |
| | MCTSBase (MyMCTS &&m) |
| |
| void | operator= (const MCTSBase &m) |
| |
| void | operator= (MCTSBase &&m) |
| |
| void | print (MyHypothesis from, std::ostream &o, const int depth, const bool sort) |
| |
| void | print (MyHypothesis &start, const bool sort=true) |
| |
| void | print (MyHypothesis &start, const char *filename, const bool sort=true) |
| |
| void | add_sample (const float v) |
| |
| virtual generator< MyHypothesis &> | run_thread (Control &ctl, MyHypothesis h0) override |
| |
| virtual void | process_evaluable (MyHypothesis ¤t) |
| | If we can evaluate this current node (usually: compute a posterior and add_sample) More...
|
| |
| virtual void | add_children (MyHypothesis ¤t) |
| | This gets called before descending the tree if we don't have all of our children. NOTE: This could add all the children (default) or be overwritten to add one, or none. More...
|
| |
| virtual int | sample_child_index (MyHypothesis ¤t) |
| |
| virtual MyMCTS * | descend_to_childless (MyHypothesis ¤t) |
| | This goes down the tree to a node with no children (OR evaluable) More...
|
| |
| virtual MyMCTS * | descend_to_evaluable (MyHypothesis ¤t) |
| | This goes down the tree, sampling children until it finds an evaluable (building a full tree) More...
|
| |
| virtual generator< MyHypothesis &> | run_thread (Control &ctl, Args... args)=0 |
| |
| | ThreadedInferenceInterface () |
| |
| unsigned long | next_index () |
| | Return the next index to operate on (in a thread-safe way). More...
|
| |
| size_t | nthreads () |
| | How many threads are currently run in this interface? More...
|
| |
| void | run_thread_generator_wrapper (size_t thr, Control &ctl, Args... args) |
| | We have to wrap run_thread in something that manages the sync with main. This really just synchronizes the output of run_thread with run below. NOTE this makes a copy of x into the local next_x, so that when the thread keeps running, it doesn't mess anything up. We may in the future block the thread and return a reference, but its not clear that's faster. More...
|
| |
| generator< MyHypothesis &> | run (Control ctl, Args... args) |
| | Set up the multiple threads and actually run, calling run_thread_generator_wrapper. More...
|
| |
| generator< MyHypothesis &> | unthreaded_run (Control ctl, Args... args) |
| |
| | BaseNode (size_t n=0, MyMCTS *p=nullptr, size_t i=0) |
| | Constructor of basenode – sizes children to n. More...
|
| |
| | BaseNode (const MyMCTS &n) |
| |
| | BaseNode (MyMCTS &&n) |
| |
| void | operator= (const MyMCTS &t) |
| |
| void | operator= (const MyMCTS &&t) |
| |
| void | make_root () |
| | Make a node root – just nulls the parent. More...
|
| |
| virtual | ~BaseNode () |
| |
| virtual std::string | string (bool usedot=true) const |
| |
| virtual std::string | my_string () const |
| |
| virtual bool | operator== (const MyMCTS &n) const |
| |
| NodeIterator | begin () const |
| |
| NodeIterator | end () const |
| |
| virtual bool | operator!= (const MyMCTS &n) const |
| |
| void | reserve_children (const size_t n) |
| |
| decltype(children) & | get_children () |
| |
| decltype(children) const & | get_children () const |
| |
| MyMCTS & | child (const size_t i) |
| |
| const MyMCTS & | child (const size_t i) const |
| |
| void | fill (size_t n, Args... args) |
| |
| size_t | nchildren () const |
| |
| MyMCTS * | left_descend () const |
| |
| size_t | depth () const |
| |
| void | fix_child_info () |
| |
| void | check_child_info () const |
| |
| MyMCTS & | operator[] (const size_t i) |
| |
| const MyMCTS & | operator[] (const size_t i) const |
| |
| void | set_child (const size_t i, MyMCTS &n) |
| |
| void | set_child (const size_t i, MyMCTS &&n) |
| |
| void | push_back (MyMCTS &n) |
| |
| void | push_back (MyMCTS &&n) |
| |
| virtual bool | is_root () const |
| | Am I a root node? I am if my parent is nullptr. More...
|
| |
| MyMCTS * | root () |
| | Find the root of this node by walking up the tree. More...
|
| |
| MyMCTS * | get_via (std::function< bool(MyMCTS &)> &f) |
| | Return a pointer to the first node satisfying predicate f, in standard traversal; nullptr otherwise. More...
|
| |
| virtual size_t | count () const |
| | How many nodes total are below me? More...
|
| |
| virtual size_t | count (const MyMCTS &n) const |
| | How many nodes below me are equal to n? More...
|
| |
| virtual bool | is_terminal () const |
| | Am I a terminal? I am if I have no children. More...
|
| |
| virtual size_t | count_terminals () const |
| |
| virtual MyMCTS * | get_nth (int n, std::function< int(const MyMCTS &)> &f) |
| |
| virtual MyMCTS * | get_nth (int n) |
| |
| T | sum (std::function< T(const MyMCTS &)> &f) const |
| |
| T | sum (T(*f)(const MyMCTS &)) const |
| |
| bool | all (std::function< bool(const MyMCTS &)> &f) const |
| |
| void | map (const std::function< void(MyMCTS &)> &f) |
| |
| void | show (size_t t=0) const |
| |