Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upAdded Iterative Deepening Depth First Search #2637
Conversation
| def ids(graph, start, goal): | ||
| # dfs helper function to perform depth limited dfs | ||
| def dfs(graph, start, goal, depth, path): |
| """ | ||
| if any of the above dfs runs do not give path, | ||
| then it means node does not exist and return -1 | ||
| """ |
dhruvmanila
Oct 3, 2020
Member
Don't mix docstring with comments.
Use """ ... """ for docstrings and # ... for comments
| """ | ||
| A sample map of Romania | ||
| (Taken from Chapter 3 of Russell & Norvig. Artificial Intelligence) | ||
| """ |
| path.append(start) | ||
| if start == goal: | ||
| return path | ||
| for i in graph[start]: |
dhruvmanila
Oct 3, 2020
Member
What is i in here?
Please use appropriate names for the variables as mentioned in CONTRIBUTING.md
Describe your change:
Checklist:
Fixes: #{$ISSUE_NO}.