From 164fc16bcf0d239ffe94096647d629703db94682 Mon Sep 17 00:00:00 2001 From: Angello Astorga <aastorg2@illinois.edu> Date: Sun, 30 Jan 2022 20:04:15 -0500 Subject: [PATCH] merging --- dtree_synth.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dtree_synth.py b/dtree_synth.py index 023740f..f6066a1 100644 --- a/dtree_synth.py +++ b/dtree_synth.py @@ -22,6 +22,7 @@ def load_positive_examples(file_name: str) -> List[Tuple[float, ...]]: truth_samples_seq = [(t, [s for s in raw_samples if not any(np.isnan(s))]) for t, raw_samples in truth_samples_seq] # Convert from sampled states and percepts to positive examples for learning + return [ s for _, samples in truth_samples_seq for s in samples ] @@ -82,6 +83,7 @@ def synth_dtree(positive_examples, teacher, num_max_iterations: int = 10): past_candidate_list.append(candidate_dnf) # QUERYING TEACHER IF THERE ARE NEGATIVE EXAMPLES print(f"number of paths: {len(candidate_dnf)}") + negative_examples = [] for candidate in candidate_dnf: result = teacher.check(candidate) @@ -112,7 +114,10 @@ def synth_dtree(positive_examples, teacher, num_max_iterations: int = 10): print("we are done!") return past_candidate_list + #if k == 2: + # exit(0) print("Reached max iteration %d." % num_max_iterations) + return [] -- GitLab