A* implementation + debug stat logger in stat.js