#include <learn/knowledge_base.hpp>
|
| | KnowledgeBase (std::string path=default_path()) |
| | ~KnowledgeBase () |
| bool | ok () const |
| std::vector< int > | choose_variants (const BoardFeatures &f, int n, int k, std::uint64_t seed) const |
| | Bandit: returns k variant indices out of n, the historically best first, the rest by Thompson sampling on Beta(1 + wins, 1 + plays - wins) for this feature bucket (seeded, deterministic).
|
| void | record_run (const BoardFeatures &f, const std::string &board_name, const std::vector< int > &variants_run, int best_variant, int routed, int connections, double seconds) |
| std::vector< FailedConnection > | failed_connections (std::uint64_t board_hash) const |
| void | record_failures (std::uint64_t board_hash, const std::vector< FailedConnection > &failed) |
Definition at line 34 of file knowledge_base.hpp.
◆ KnowledgeBase()
| tmk::learn::KnowledgeBase::KnowledgeBase |
( |
std::string | path = default_path() | ) |
|
|
explicit |
◆ ~KnowledgeBase()
| tmk::learn::KnowledgeBase::~KnowledgeBase |
( |
| ) |
|
◆ choose_variants()
| std::vector< int > tmk::learn::KnowledgeBase::choose_variants |
( |
const BoardFeatures & | f, |
|
|
int | n, |
|
|
int | k, |
|
|
std::uint64_t | seed ) const |
Bandit: returns k variant indices out of n, the historically best first, the rest by Thompson sampling on Beta(1 + wins, 1 + plays - wins) for this feature bucket (seeded, deterministic).
◆ default_path()
| std::string tmk::learn::KnowledgeBase::default_path |
( |
| ) |
|
|
static |
◆ failed_connections()
| std::vector< FailedConnection > tmk::learn::KnowledgeBase::failed_connections |
( |
std::uint64_t | board_hash | ) |
const |
◆ ok()
| bool tmk::learn::KnowledgeBase::ok |
( |
| ) |
const |
◆ record_failures()
| void tmk::learn::KnowledgeBase::record_failures |
( |
std::uint64_t | board_hash, |
|
|
const std::vector< FailedConnection > & | failed ) |
◆ record_run()
| void tmk::learn::KnowledgeBase::record_run |
( |
const BoardFeatures & | f, |
|
|
const std::string & | board_name, |
|
|
const std::vector< int > & | variants_run, |
|
|
int | best_variant, |
|
|
int | routed, |
|
|
int | connections, |
|
|
double | seconds ) |
The documentation for this class was generated from the following file: