From 4cd25c8cfdb015950e60100b896409580de250c9 Mon Sep 17 00:00:00 2001 From: Nishanth Kumar Date: Tue, 5 Dec 2023 16:13:21 -0500 Subject: [PATCH] should be good! (#1596) --- predicators/approaches/active_sampler_learning_approach.py | 6 +++++- predicators/settings.py | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/predicators/approaches/active_sampler_learning_approach.py b/predicators/approaches/active_sampler_learning_approach.py index 4de4eb8511..3ada097f1e 100644 --- a/predicators/approaches/active_sampler_learning_approach.py +++ b/predicators/approaches/active_sampler_learning_approach.py @@ -104,7 +104,11 @@ def _create_explorer(self) -> BaseExplorer: preds = self._get_current_predicates() # Pursue the task goal during exploration periodically. n = CFG.active_sampler_learning_explore_pursue_goal_interval - pursue_task_goal_first = (self._online_learning_cycle % n == 0) + pursue_task_goal_first = False + if self._online_learning_cycle < \ + CFG.active_sampler_learning_init_cycles_to_pursue_goal or ( + self._online_learning_cycle % n == 0): + pursue_task_goal_first = True explorer = create_explorer( CFG.explorer, preds, diff --git a/predicators/settings.py b/predicators/settings.py index b3fe92e663..f91edc4bfe 100644 --- a/predicators/settings.py +++ b/predicators/settings.py @@ -602,6 +602,7 @@ class GlobalSettings: active_sampler_explorer_replan_frequency = 100 active_sampler_explorer_planning_progress_max_tasks = 10 active_sampler_explorer_planning_progress_max_replan_tasks = 5 + active_sampler_learning_init_cycles_to_pursue_goal = 1 # grammar search invention parameters grammar_search_grammar_includes_givens = True