Ad
  • Custom User Avatar

    Thanks for the tip. I was wondering about my heuristic. I know that Heuristic algorithms need to give an answer that is below the actual path length, but I forgot that there will be occasions in this Kata where the actual cost is zero!

    Following your tip I removed the heuristic, and also needed to do a little optimisation of my "find the lowest cost" search. It's still overkill, but at least it's working.

  • Custom User Avatar

    Hmm. I have an A* solution that is nice and quick, and passes the vast majority of tests, but occasionally fails to produce the right answer, and when it fails the given answer is always 2 higher than the correct answer!

    I've been going crazy trying to work out what the common factor is on the failed tests. Why would it always be 2 out?!