Skip to content

Conversation

@neiljohari
Copy link

No description provided.

@JoeOsborn
Copy link
Owner

Looks pretty good! A code cell would be nice in the "hello-world" notebook though, to sanity-check the environment.

@neiljohari
Copy link
Author

@JoeOsborn How is a6db5b4

@neiljohari
Copy link
Author

neiljohari commented Jul 15, 2016

@JoeOsborn Got the switch A* working as far as I can tell (assignment 2)

Edit: Not anymore

@chern
Copy link
Contributor

chern commented Jul 15, 2016

@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",
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants