-
Notifications
You must be signed in to change notification settings - Fork 432
Adds 4e algorithms. #86
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
Conversation
|      _solution_ ← cutoff | ||
|      __else__ | ||
|        __for__ _child_ __in__ successors(_parent_) __do__ | ||
|          __if__ _child_ is a goal __then__ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@norvig
In the rest of the chapter, we check if a state is a goal state or not. However, in this algorithm, we have applied the test directly on a node. The test is applied as follows in the rest of the algorithms:
for child in successors(parent) do
s ← child.state
if s is a goal then
and then the rest of the code. Please have a look into this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it should be child.state here too.
|  _solution_ ← failure | ||
|  __while__ _frontier_ is not empty __do__ | ||
|    _parent_ ← the first node in _frontier_ | ||
|    __for__ _child_ __in__ successors(_parent_) __do__ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@norvig
The successors function defined earlier in the draft takes problem and parent as its arguments. Please have a look.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, we should probably be consistent, and thorough, and use problem as an argument to successors everywhere.
|
Looks good! |
Adds algorithms from 4th edition chapters, numbered 3 and 4.