HN2new | past | comments | ask | show | jobs | submit | ichinaski's commentslogin

> # If we just got to the goal node, build and return the path.

  if adjacent == goal_node: 
    return build_path(goal_node)
If you want to ensure the path is optimal, you'll have to wait until you 'expand' the goal node, as there might exist goal states in the open set with lower costs.


Fixed. It's a copy-paste artifact from Part I, where the algorithm is looking for a path, not the optimal path, so it didn't matter. Thanks!


In order to catch up with language, I also decided to write a Graph library in Go[1]. Since this seems to be a quite common application, is there any more mature, bigger project implementing these same ideas? A similar concept in the Python community is python-graph[2].

[1] https://github.com/ichinaski/grapho

[2] https://code.google.com/p/python-graph/


There are dozens (if not dozens of dozens) of graph-manipulation libraries in python, but the most full-featured one is probably networkx.


"c$ - change (replace) to the end of line"

I find 'C' simpler for that command.


Why doesn't 'Y' behave similarly? I've never understood this inconsistency in the default key bindings:

'c$' OR 'C' = change to end of line

'd$' OR 'D' = cut to end of line

'y$' = yank to end of line

'cc' = change entire line

'dd' = cut entire line

'yy' OR 'Y' = yank entire line



In order to understand recursion, one must first understand recursion.


AI Algorithms, Data Structures, and Idioms in Prolog, Lisp, and Java: http://wps.aw.com/wps/media/objects/5771/5909832/PDF/Luger_0...


Now I only need a VI plugin for this IDE.


ideavim is your friend


That is fantastic, thanks! Idea just became my default IDE.


Same here with Chrome's Vimium. Once the URL is excluded, it works fine.


Doh, I was wondering why I could only move in 'insert' mode. Guess I was entering Vimiums insert mode rather than the game.



This one is brilliant: Mathematics for Computer Science.

http://www.cs.princeton.edu/courses/archive/spr10/cos433/mat...


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: