diff options
Diffstat (limited to 'src/main/solver/solver.h')
| -rw-r--r-- | src/main/solver/solver.h | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/main/solver/solver.h b/src/main/solver/solver.h index 5eda894..21b8d6e 100644 --- a/src/main/solver/solver.h +++ b/src/main/solver/solver.h @@ -14,13 +14,13 @@ class solver { public: - enum class sol_state {solved, unsolvable, cutoff}; + enum class sol_state {solved, unsolvable, timed_out}; global_cache cache; struct node { - node(node*, game_state::move); + node(node*, move); node* parent; - const game_state::move move; + const move mv; std::vector<node> children; }; @@ -28,26 +28,26 @@ public: ~solver(); sol_state run(boost::optional<std::atomic<bool> &> = boost::none); - sol_state run_with_cutoff(boost::optional<std::atomic<bool> &>, - boost::optional<uint> = boost::none); void print_solution() const; + void print_solution_info() const; int get_states_searched() const; - int get_final_depth() const; const node& get_search_tree() const; - int get_backtrack_count(); private: bool revert_to_last_node_with_children(); - void add_children(std::vector<game_state::move>&); - void add_child(game_state::move); - std::vector<game_state::move> get_next_moves(); + void add_children(std::vector<move>&); + void add_child(move); + std::vector<move> get_next_moves(); const game_state init_state; game_state state; + int states_searched; + int unique_states_searched; int backtracks; - uint depth; + int dominance_moves; + int depth; node root; node* current_node; |
