Repository navigation
AIMA4e Search - #431
AIMA4e Search#431
Conversation
|
@norvig Please have a look. |
| ((LinkedList<Node>) frontier).add(nodeFactory.newRootNode(problem.initialState())); | ||
| // reached ← a set of states; initially empty | ||
| HashSet<S> reached = new HashSet<>(); | ||
| // solution ← failure |
There was a problem hiding this comment.
I don't like this style, where the comments duplicate the code. I think it is good to have the pseudocode in a block comment, but then the Java implementation should stand by itself. Any Java programmer knows what reached = new HashSet<>(); means; we don't need to duplicate that in the comments.
There was a problem hiding this comment.
@norvig
Sure, sir, I will have these duplicate comments removed. I added them just because of the older versions. I will have them removed.
|
@norvig
|
|
@norvig |
|
Looks good! |
This PR adds the generic search algorithm to the AIMA4e branch. For testing, the generic search is extended as bfs and dfs. It is then applied to the Romania problem.