All Projects → SumiMakito → A-star

SumiMakito / A-star

Licence: MIT license
A*(A-star) pathfinding algorithm in C++

Programming Languages

C++
36643 projects - #6 most used programming language
CMake
9771 projects

A-star

A* pathfinding algorithm (a.k.a. A* search algorithm) written in C++

This is an widely used pathfinding and searching algorithm; learn more about A* at Wikipedia.

OpenCV is not necessarily required, provided that you have found another way to convert input images into arrays which have the same format used in the example.

Since there might still be some problems in my implementation, so please feel free to give me any advice!

Map samples

Map 50px 1 Map 50px 2 Map 50px 3
Map 50px 1 Map 50px 2 Map 50px 3

Previews

DO NOT use images below as input images, they have been scaled up for better visual effect.

Input Output (Original) Output (Improved, see #1)
Input Output Output
Input Output Output
Input Output Output

Special thanks

Thanks @HjalteBested for pointing out the problem and giving me some useful advice on how to improve the algorithm in the issue #1.

License

Beloved MIT

MIT License

Copyright (c) 2017 Makito Sumi

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].