Skip to content

AIMA4e Search #431

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 16 commits into from
Aug 4, 2018
Merged

AIMA4e Search #431

merged 16 commits into from
Aug 4, 2018

Conversation

samagra14
Copy link
Collaborator

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.

@samagra14
Copy link
Collaborator Author

@norvig Please have a look.
Should I remove Tree search and graph search from AIMA4e or should they coexist alongside generic search?

@samagra14 samagra14 changed the title Generic search AIMA4e Search Jul 15, 2018
HashSet<S> reached = new HashSet<>();
// solution ← failure
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@norvig
Sure, sir, I will have these duplicate comments removed. I added them just because of the older versions. I will have them removed.

@samagra14
Copy link
Collaborator Author

@norvig
This PR concludes all the modified algorithms.

  1. I have removed a lot of unwanted interfaces(for eg SearchController etc).
  2. Implemented informed search from scratch as opposed to extending uniform cost search.
  3. AndOrGraphSearch and the algorithms after that have not been modified in the draft and hence I have not modified their implementation. All other algorithms have been modified.
    5 Removed unwanted comments.
  4. In a few algorithms, I have kept the older testSuite as it was quite exhaustive.
    Please review this PR.

@samagra14
Copy link
Collaborator Author

@norvig
Is there anything else that needs to be corrected and/or added in this PR?

@norvig
Copy link
Contributor

norvig commented Aug 4, 2018

Looks good!

@norvig norvig merged commit a2b3bb0 into aimacode:AIMA4e Aug 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants