Code Monkey home page Code Monkey logo

astar's People

Contributors

andrewcsmith avatar benjamin-l avatar mboeh avatar tyoverby avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

astar's Issues

no documentation exists

Hi, I'm evaluating pathfinding libraries. I like that this one seems to support caching of path analysis for multiple queries, but I can't figure out how to use the library.

For example, I have no idea what TwoDSearchProblem::get is supposed to return -- the only unit test returns None or Some(0), so I'm not sure what the effect of the u32 is.

Another thing I'd like to know is if there is any support for max distance in pathing. Without it, I believe that infinite loops would be trivial (by trying to path to an inaccessible location). Is there a way to limit the distance of a search?

Return VecDeque segfaults when dropping

This could just be a need for documentation, but one of my adjacency functions started with an empty Vec and pushed new elements as it found them. I spent a chunk of time trying to trace down a segfault bug, because typed-arena transmuted the memory to extend its lifetime.

I'm still not sure how to avoid segfaults, because it seems that anything that is called as an argument to alloc cannot grow after initialization. Would it be possible to document the pieces of memory that can't grow, or perhaps there's a better solution where the Rust compiler could check them?

Edit: read the rust-lang community post for the reasons for this crash

Remove Clone bound on N

Inside of Node, wrap the "state" around a RefCell<Option< >> so that you can "move" out of it during path construction.

ReusableSearchProblem should not provide a heuristic method.

If I understand correctly, ReusableSearchProblem is meant to be usable for several searches with possibly different end nodes, so it doesn't seem to make sense that it can estimate the distance from a given node to the end.

Maybe ReusableSearchProblem should have a method
fn heuristic(&self, &N, &N) -> C
instead that gives a lower bound for the distance between two nodes.

Alternatively, astar_r could take a heuristic function as an argument.

If you agree with either of these, I'm happy to implement it.

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.