From 20236b6e7f16fc736fcf96f8f655bbcd09b59133 Mon Sep 17 00:00:00 2001 From: Charlie Blake Date: Wed, 20 Jun 2018 11:19:21 +0100 Subject: Change sol output to csv and refactor results dir --- src/main/solver/solver.h | 15 ++++++++++++++- 1 file changed, 14 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 14dedc5..3aa0d95 100644 --- a/src/main/solver/solver.h +++ b/src/main/solver/solver.h @@ -24,17 +24,30 @@ public: boost::optional cache_state; // Optional, as dominance moves aren't cached }; + struct solution_info { + int states_searched; + int unique_states_searched; + int backtracks; + int dominance_moves; + uint64_t states_removed_from_cache; + lru_cache::item_list::size_type cache_size; + lru_cache::item_list::size_type cache_bucket_count; + int max_depth; + int depth; + }; + friend std::ostream& operator<< (std::ostream&, const solution_info&); + explicit solver(const game_state&, uint64_t); sol_state run(boost::optional &> = boost::none); void print_solution() const; - void print_solution_info() const; int get_states_searched() const; int get_unique_states_searched() const; int get_cache_size() const; int get_states_rem_from_cache() const; const std::vector get_frontier() const; + solution_info get_solution_info(); private: bool revert_to_last_node_with_children(boost::optional = boost::none); -- cgit v1.2.1