Skip to content

Commit

Permalink
Prune initial state if bound=0.
Browse files Browse the repository at this point in the history
  • Loading branch information
jendrikseipp committed Sep 12, 2024
1 parent 3a32742 commit 2ffb77c
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions src/search/search_algorithm.cc
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,17 @@ void SearchAlgorithm::set_plan(const Plan &p) {
void SearchAlgorithm::search() {
initialize();
utils::CountdownTimer timer(max_time);
while (status == IN_PROGRESS) {
status = step();
if (timer.is_expired()) {
log << "Time limit reached. Abort search." << endl;
status = TIMEOUT;
break;
if (bound == 0) {
log << "Initial state is pruned because the g-bound is 0." << endl;
status = FAILED;
} else {
while (status == IN_PROGRESS) {
status = step();
if (timer.is_expired()) {
log << "Time limit reached. Abort search." << endl;
status = TIMEOUT;
break;
}
}
}
// TODO: Revise when and which search times are logged.
Expand Down

0 comments on commit 2ffb77c

Please sign in to comment.