diff options
| author | Charlie Blake | 2018-06-10 00:30:55 +0100 |
|---|---|---|
| committer | GitHub | 2018-06-10 00:30:55 +0100 |
| commit | d82642305dbcf53262ff41705a41c6e7c1591161 (patch) | |
| tree | b2bbe8c0aadaec16280f020e55eb55955be43d3f /src/main/solver/solver.h | |
| parent | Merge pull request #58 from thecharlesblake/fin (diff) | |
| parent | Finish refactoring game state class (diff) | |
| download | metasol-d82642305dbcf53262ff41705a41c6e7c1591161.tar.gz metasol-d82642305dbcf53262ff41705a41c6e7c1591161.zip | |
Merge pull request #59 from thecharlesblake/paper-tidy-up
Paper tidy up
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; |
