Skip to content

Commit

Permalink
hotfix 2 o inimigo agora é outro
Browse files Browse the repository at this point in the history
  • Loading branch information
yaansz committed Oct 31, 2021
1 parent 3ef91a1 commit f660549
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 12 deletions.
2 changes: 1 addition & 1 deletion blind_search/algorithms/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def dfs(initial_state, limit=-1):
if neighbor.depth > max_depth:
max_depth = neighbor.depth

if limit > 0 and neighbor.depth <= limit:
if (limit < 0) or (limit > 0 and neighbor.depth <= limit):
stack.append(neighbor)
explored.add(neighbor.key)

Expand Down
4 changes: 2 additions & 2 deletions blind_search/res/bfs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ Max_Depth : 31
Final_Frontier : 32
Max_Frontier : 24053
Scanned : 181440
Elapsed_Time : 2.333125591278076 s
RAM_Usage : 62.172 kb
Elapsed_Time : 2.547363519668579 s
RAM_Usage : 62.168 kb
17 changes: 10 additions & 7 deletions blind_search/res/dfs.txt

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions blind_search/res/idfs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ Max_Depth : 31
Final_Frontier : 0
Max_Frontier : 26
Scanned : 312296
Elapsed_Time : 3.231236457824707 s
RAM_Usage : 13.852 kb
Elapsed_Time : 3.9806690216064453 s
RAM_Usage : 13.844 kb

0 comments on commit f660549

Please sign in to comment.