From 4ae4a8a0832048d37e2593afa8f33f629fdae20e Mon Sep 17 00:00:00 2001 From: thecharlesblake Date: Thu, 8 Mar 2018 22:42:35 +0000 Subject: Add ID search to solver for short sols --- src/main/solver/solver.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/main/solver/solver.h') diff --git a/src/main/solver/solver.h b/src/main/solver/solver.h index 2a024ac..b1455e5 100644 --- a/src/main/solver/solver.h +++ b/src/main/solver/solver.h @@ -14,6 +14,7 @@ class solver { public: + enum class sol_state {solved, unsolvable, cutoff}; global_cache cache; struct node { @@ -26,9 +27,13 @@ public: explicit solver(const game_state&); ~solver(); - bool run(boost::optional &> = boost::none); + sol_state run(boost::optional &> = boost::none); + sol_state run_with_cutoff(boost::optional &>, + boost::optional = boost::none); + void print_solution() const; int get_states_searched() const; + int get_final_depth() const; const node& get_search_tree() const; private: @@ -40,6 +45,7 @@ private: const game_state init_state; game_state state; int states_searched; + uint depth; node root; node* current_node; -- cgit v1.2.1