@@ -38,8 +38,8 @@ def __get_all_pddl_from_data(self):
3838
3939 def __plot_data (self , times , total_nodes , plot_title ):
4040 data = dict ()
41- for i in range ( len ( total_nodes ) ):
42- data [total_nodes [ i ] ] = times [i ]
41+ for i , val in enumerate ( total_nodes ):
42+ data [val ] = times [i ]
4343 nodes_sorted = sorted (list (data .keys ()))
4444 times_y = []
4545 for node_opened in nodes_sorted :
@@ -105,8 +105,7 @@ def __gather_data_astar(
105105 return [0 ], [0 ], has_multiple_files_tested
106106 if path :
107107 return [total_time ], [opened_nodes ], has_multiple_files_tested
108- else :
109- return [0 ], [0 ], has_multiple_files_tested
108+ return [0 ], [0 ], has_multiple_files_tested
110109
111110 def plot_astar_data (self , heuristic_key = "goal_count" , domain = "" , problem = "" ):
112111 if bool (not problem ) != bool (not domain ):
@@ -149,8 +148,7 @@ def __gather_data_bfs(self, domain_path="", problem_path=""):
149148 path , total_time , opened_nodes = apla .breadth_first_search ()
150149 if path :
151150 return [total_time ], [opened_nodes ], has_multiple_files_tested
152- else :
153- return [0 ], [0 ], has_multiple_files_tested
151+ return [0 ], [0 ], has_multiple_files_tested
154152
155153 def plot_bfs (self , domain = "" , problem = "" ):
156154 title = "BFS Statistics"
@@ -193,8 +191,7 @@ def __gather_data_dfs(self, domain_path="", problem_path=""):
193191 path , total_time , opened_nodes = apla .depth_first_search ()
194192 if path :
195193 return [total_time ], [opened_nodes ], has_multiple_files_tested
196- else :
197- return [0 ], [0 ], has_multiple_files_tested
194+ return [0 ], [0 ], has_multiple_files_tested
198195
199196 def plot_dfs (self , problem = "" , domain = "" ):
200197 title = "DFS Statistics"
@@ -237,8 +234,7 @@ def __gather_data_dijkstra(self, domain_path="", problem_path=""):
237234 path , total_time , opened_nodes = apla .dijktra_best_first_search ()
238235 if path :
239236 return [total_time ], [opened_nodes ], has_multiple_files_tested
240- else :
241- return [0 ], [0 ], has_multiple_files_tested
237+ return [0 ], [0 ], has_multiple_files_tested
242238
243239 def plot_dijkstra (self , problem = "" , domain = "" ):
244240 title = "Dijkstra Statistics"
0 commit comments