diff options
| author | Charlie Blake | 2018-07-26 10:34:37 +0100 |
|---|---|---|
| committer | GitHub | 2018-07-26 10:34:37 +0100 |
| commit | 67a805eb61428f1601e2cf45dd3380f93189ad86 (patch) | |
| tree | 86d3b0eb65395404f0e9e252b7b5384aed8cba2e /src/main/input-output/input/command_line_helper.cpp | |
| parent | Merge pull request #78 from thecharlesblake/add-canfield (diff) | |
| parent | Update gen results script to work with changes (diff) | |
| download | metasol-67a805eb61428f1601e2cf45dd3380f93189ad86.tar.gz metasol-67a805eb61428f1601e2cf45dd3380f93189ad86.zip | |
Merge pull request #80 from thecharlesblake/fix-timing-bug
Fix timing bug
Diffstat (limited to 'src/main/input-output/input/command_line_helper.cpp')
| -rw-r--r-- | src/main/input-output/input/command_line_helper.cpp | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/src/main/input-output/input/command_line_helper.cpp b/src/main/input-output/input/command_line_helper.cpp index 67224d2..5a66aa6 100644 --- a/src/main/input-output/input/command_line_helper.cpp +++ b/src/main/input-output/input/command_line_helper.cpp @@ -43,7 +43,7 @@ command_line_helper::command_line_helper() ("solvability", po::value<int>(), "calculates the solvability " "percentage of the supplied solitaire game, given a limit for the number of seeds. Must supply " "either 'random', 'benchmark', 'solvability' or list of deals to be solved.") - ("timeout", po::value<uint64_t>(), "adds a per-game timeout to the solvability percentage generation") + ("timeout", po::value<uint64_t>(), "adds a timeout to searches") ("resume", po::value<vector<int>>()->multitoken(), "resumes the solvability percentage calculation from a " "previous run. Must be supplied with the solvability option. " "Syntax: [sol unsol intract in-progress-1 in-progress-2 ...]") @@ -52,8 +52,8 @@ command_line_helper::command_line_helper() ("streamliners", po::value<string>(), "Applies streamliners to the search. Options include 'none', 'both', 'suit-symmetry'," " 'auto-foundations', and 'smart-solvability'. Defaults to 'none', unless '--solvability' is" - " also supplied, in which case defaults to 'smart-solvability'. 'smart-solvability' mode is only" - " available with '--solvability', and runs first with both streamliners and a 10% timeout. If this" + " also supplied, in which case defaults to 'smart-solvability'. 'smart-solvability' mode" + " runs first with both streamliners and a 10% timeout. If this" " is unsuccessful (unsolvable or timeout), then runs again without streamliners.") ("benchmark", "outputs performance statistics for the solver on the " "supplied solitaire game. Must supply " @@ -152,14 +152,7 @@ bool command_line_helper::parse(int argc, const char* argv[]) { if (s == "auto-foundations" ) streamliners = streamliner_opt::AUTO_FOUNDATIONS; else if (s == "suit-symmetry") streamliners = streamliner_opt::SUIT_SYMMETRY; else if (s == "both") streamliners = streamliner_opt::BOTH; - else if (s == "smart-solvability") { - if (solvability == -1) { - print_streamliner_solvability_error(); - return false; - } else { - streamliners = streamliner_opt::SMART; - } - } + else if (s == "smart-solvability") streamliners = streamliner_opt::SMART; else if (s == "none") streamliners = streamliner_opt::NONE; else { print_streamliner_error(s); @@ -260,10 +253,6 @@ void command_line_helper::print_streamliner_error(const string& str) { " 'auto-foundations', and 'smart-solvability'"); } -void command_line_helper::print_streamliner_solvability_error() { - LOG_ERROR ("Smart streamliner mode can only be used with '--solvability'"); -} - const vector<string> command_line_helper::get_input_files() { return input_files; } |
