Giter Club home page Giter Club logo

pathfinding_a-star's Introduction

Pathfinding using A* Algorithm

A mini-game visualization of A* Algorithm in Python 3 using PyGame. Requirement: Pygame, pygame-menu

Free Run

Visualization of A* algorithm. Start, Destination and obstacles can be manually created.

  • Clicking Left Mouse Button for the first time creates the starting grid.
  • Clicking Left Mouse Button for the second time creates the destination grid.
  • Clicking Left Mouse Button for the third time creates barrier grid.
  • Right Mouse Button removes cells created.
  • Escape button resets all grid.
  • Press SPACEBAR after creating all the cells to draw the path

Google Map

A Sample visualization of Google Map. A section of map is created using SnazzyMap. Then I have used my utility program PathDrawer to create paths in grid format. Then the A* algorithm is used to find the shortest path in the map.

How to Run:

  • Clicking Left Mouse Button for the first time creates the starting grid.
  • Clicking Left Mouse Button for the second time creates the destination grid.
  • Escape button resets all grid.
  • Press SPACEBAR to draw the path

Note:

  • Requires pyGame and pygame-menu module.
  • Paths can be straight line as well as diagonal.
  • Contains global variables which, I understand, are very bad. :/
  • Beginner level code. Not in coding standards.
  • Might have some bugs. Haven't done any QA. Let me know if you find any.

Credits: PyGame pygame-menu Map data ©2019 Google

pathfinding_a-star's People

Contributors

akshayhari avatar

Stargazers

Athul Mathew avatar beerus avatar

Watchers

 avatar Athul Mathew avatar

Forkers

toshihiroryuu

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.