GithubHelp home page GithubHelp logo

wxh220 / astar-algorithm Goto Github PK

View Code? Open in Web Editor NEW

This project forked from einarueland/astar-algorithm

0.0 0.0 0.0 17.37 MB

A* (Astar / A Star) search algorithm. Easy to use

License: BSD 2-Clause "Simplified" License

MATLAB 100.00%

astar-algorithm's Introduction

A* (Astar / A Star) search algorithm. Easy to use

Can handle any heigth and width of occupancy grid? YES

Possible to specify multiple goal nodes? YES

Fast and efficient? YES

Possible to specify connecting distance to other nodes? YES (in other words the algorithm is not restriced to 8-directions)

In the version 1.0 there are no nested functions, subfunctions, plotters, or any other mess in the actual pathfinder script. Version2 is a bit faster, but possibly a bit harder to understand.

DOI


Algorithm has simple inputs: An occupancy grid. A goal Matrix, the start node and preffered connecting distance. The zip file includes an example on the use of the script

The Connecting Distance determines the connections from each node to neighbooring cells. This means that the algorithm is not restriced to 4 or 8-directions (which often is the case in other implementations). In general a longer connecting distance require some more computation time.

See the following examples for Connecting Distance varying between 1, 4 and 8;

In the above example, the A-Star algorithm needed to explore most cells. Efficiency can be improved by using the 2-sided solver as seen here;

Multiple goal nodes can be specified. In the below example, there is 4 different goal cells.

An example of use of provided method is the use in Frontier Based Exploration where the "robot" search for the nearest unexplored cell:

See example video here

By modifying the weight map for traversing cells, one can penalize paths that are near objects, and generally create smoother paths:


This code was written for a project, which I have written a paper about: http://proceedings.asmedigitalcollection.asme.org/proceeding.aspx?articleid=2655682 This paper provides some more details on the code, and how it can be applied in a practical example. If you use the code for academic work/publishing I will appreciate if you could cite the above paper.

astar-algorithm's People

Contributors

einarueland avatar

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.