Giter VIP home page Giter VIP logo

astar-visualization's Introduction

A* Visualization


astar-visualization is just a simple tool to visualize the A* Pathfinding Algorithm and I built it in an attempt to learn the ropes of Golang. Below is a gif of the tool in action: (2x Speed)

A* Visualization

Instructions

  • Click & drag around to create walls/obstacles.
  • Click the CHOOSE SOURCE or CHOOSE DESTINATION button and click on any cell to mark them as the source/destination.
  • Click RUN to run the visualization. If you run without choosing a source and destination, the visualization will not run.
  • Click RESET at the end of the visualization to reset the board.

The visualization considers a diagonal step as a valid step. Keep that in mind when drawing obstacles as it may appear that the algorithm is bypassing the walls/obstacles.

To Run (Ubuntu)

astar-visualization is built with fyne, a cross-platform GUI library and hence can run on Linux, Windows & MacOS. However, I have only tested it on Ubuntu 19.10 and will provide instructions for the same.

Make sure you have gcc & golang(Version 1.11+) installed. Then run the following.

sudo apt install libgl1-mesa-dev xorg-dev
git clone [email protected]:parkerqueen/astar-visualization.git
cd astar-visualization
go run main.go

If you wish to run on Windows or MacOS or any other flavor of Linux, you can visit fyne's getting started to install all the prerequisites for it. Once done, you can clone the repository and use go run main.go to run the tool.

Issues

  • Final help text of resetting the board is sometimes not displayed correctly.

astar-visualization's People

Contributors

parkerqueen 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.