Giter VIP home page Giter VIP logo

pathfinding-visualization's Introduction

Pathfinding Visualization

A pathfinding visualizer created in python, which uses A* search algorithm to find the shortest path from the start and end nodes location. Once the start and end nodes are chosen, the user is allowed to create walls between the start and end nodes.

Instructions

To use the visualizer, download the files and make sure the pygame library is installed. Once everything is clear run the "pathfinding main.py". Once the GUI has appear with the left mouse button choose the position of the start and end nodes. Then, you can create walls between the nodes by pressing and holding left mouse button and basically drawing walls around the entire grid. If you messed up or do not like certain walls you can click or hold the right mouse button to erase the unwanted wall. Otherwise, you can press the R key on your keyboard to reset the grid or press the spacebar to start the A* search algorithm.

Keys:

  • Left mouse button: chooses the start and end nodes positions, then creates walls.
  • Right mouse button: deletes any node
  • R key: resets the grid
  • Spacebar: starts the algorithm (when both start and end node are chosen)

Requirements

  • Python 3.7 or up
  • Pygame

Future improvements:

  • Adding recursive backtracking algorithm to generate a maze of walls in between the start and end nodes

pathfinding-visualization's People

Contributors

ckheav avatar

Watchers

James Cloos avatar  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.