GithubHelp home page GithubHelp logo

winghar / a-star-search-algorithm Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 553 KB

A visual implementation of the A-Star Search Algorithm conducted in Python using Manhattan traversal.

Python 100.00%

a-star-search-algorithm's Introduction

A-Star-Search-Algorithm

A visual implementation of the A-Star Search Algorithm conducted in Python using Manhattan traversal.

This A* Search Algorithm is implemented using Python and Pygame. In order to run it, please install both. The algorithm utilizes Manhattan distance which is linear traversal. This means it will always go either right or left but never diagonal. To begin the algorithm, your first button press indicates the starting node and the second button press indicates the target node. Once selected, you can click or drag the left mouse button over the grid and place 'black obstacle nodes' around to obstruct the path from the start to the target. Once you are satisfied, you can hit spacebar to begin the program and watch the algorithm!

A* Search Algorithm

The A* Search Algorithm is an effective searching algorithm which finds the shortest path utilizing two parameters, g(n) and h(n). H(n) is the heuristic and g(n) is the edge cases. The formula used is F(n) = G(n) + H(n). F(n) is the total number of edge cases required to go from the starting node to the final node. G(n) is the number of edge cases from one node to to the next. H(n) is the estimated number of edge cases to go from the starting node to the ending node.

a-star-search-algorithm's People

Contributors

winghar avatar

Stargazers

 avatar

Watchers

 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.