-
Notifications
You must be signed in to change notification settings - Fork 23
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
Assignments from Neil #11
base: gh-pages
Are you sure you want to change the base?
Conversation
Looks pretty good! A code cell would be nice in the "hello-world" notebook though, to sanity-check the environment. |
@JoeOsborn How is a6db5b4 |
…future merge issues
@JoeOsborn Got the switch A* working as far as I can tell (assignment 2) Edit: Not anymore |
@skreem: Epic. |
" #new_cost = cost_so_far[current] + 1\n", | ||
" new_cost = current.cost + 1\n", | ||
" \n", | ||
" if not successor in visited or new_cost < current.cost:\n", |
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.
This or
isn't quite right, and turns this into if not in visited or false
since (current.cost+1)
is never less than current.cost
. You want to compare against the cost of the member of visited which is equivalent to successor
. This could lead to finding suboptimal paths since the node equivalent to successor
may be tagged with a higher cost but never replaced.
No description provided.