Skip to content

Commit f660549

Browse files
committed
hotfix 2 o inimigo agora é outro
1 parent 3ef91a1 commit f660549

File tree

4 files changed

+15
-12
lines changed

4 files changed

+15
-12
lines changed

blind_search/algorithms/search.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ def dfs(initial_state, limit=-1):
7676
if neighbor.depth > max_depth:
7777
max_depth = neighbor.depth
7878

79-
if limit > 0 and neighbor.depth <= limit:
79+
if (limit < 0) or (limit > 0 and neighbor.depth <= limit):
8080
stack.append(neighbor)
8181
explored.add(neighbor.key)
8282

blind_search/res/bfs.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ Max_Depth : 31
77
Final_Frontier : 32
88
Max_Frontier : 24053
99
Scanned : 181440
10-
Elapsed_Time : 2.333125591278076 s
11-
RAM_Usage : 62.172 kb
10+
Elapsed_Time : 2.547363519668579 s
11+
RAM_Usage : 62.168 kb

blind_search/res/dfs.txt

Lines changed: 10 additions & 7 deletions
Large diffs are not rendered by default.

blind_search/res/idfs.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ Max_Depth : 31
77
Final_Frontier : 0
88
Max_Frontier : 26
99
Scanned : 312296
10-
Elapsed_Time : 3.231236457824707 s
11-
RAM_Usage : 13.852 kb
10+
Elapsed_Time : 3.9806690216064453 s
11+
RAM_Usage : 13.844 kb

0 commit comments

Comments
 (0)