Giter Site home page Giter Site logo

A* test fails about graph HOT 4 CLOSED

gonum avatar gonum commented on July 16, 2024
A* test fails

from graph.

Comments (4)

UserAB1236872 avatar UserAB1236872 commented on July 16, 2024

Since it's getting the right cost, I wonder if it's simply writing the
predecessors incorrectly.

On Tue, Feb 4, 2014 at 3:41 PM, Sonia Keys [email protected] wrote:

New A* test against Dijkstra shows incorrect result. See commit 0c533c00c533c0a76b7baebe984c59093bd1a9beaaf22deon branch tests.

(Correct) path by Dijkstra is [5 4 2] with path length 21. Path returned
by A* is [5 6 3 4 2] with path length 21.

Note [5 6 3 2] is also length 21. That would be a valid answer showing the
test should be improved, but [5 6 3 4 2] is incorrect.

Reply to this email directly or view it on GitHubhttps://github.com//issues/3
.

from graph.

UserAB1236872 avatar UserAB1236872 commented on July 16, 2024

I was doing some weird stuff in one of the steps in A*, I fixed it, but now it gets the wrong right path. ([2,3,6,5] instead of [2,4,5])

from graph.

UserAB1236872 avatar UserAB1236872 commented on July 16, 2024

I confirmed that for both the path start=2;goal=5 and the reciprocal path start=5;goal=2 we now get a valid path. I'll leave this open until the test itself is fixed.

from graph.

soniakeys avatar soniakeys commented on July 16, 2024

I changed test data so there are not alternate paths with the same cost. Tests pass nicely now.

from graph.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.