Implementing a best-first search algorithm using the most rudimentary heuristic ever