example: add a path finding algorithm visualizer using gg (#20060)

This commit is contained in:
Yuyi_Hao 2023-12-29 02:49:28 +05:30 committed by GitHub
parent 2dce525d90
commit 680b0d463a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 533 additions and 0 deletions

View file

@ -0,0 +1,33 @@
# A* path finding algorithm visualizer
This is a simple visualizer for an A* path finding algorithm written in V.
# Quick start
```console
# to run:
$ v run aStar.v
# to just compile:
$ v aStar.v
# then to run:
$ ./aStar
```
# Controls
- `q` : To quit the application
- `c`: clear the grid and start from new one
- `space`: initialize path finding algorithm
# Demo
![Demo image of the algorithm](screenshot.png)
# 🔴🔴🔴🔴 Area of improvments 🔴🔴🔴🔴🔴
- 🚧 Under Construction: We are using heap, but that is not correctly
implemented, since instead of O(log(n)) it takes O(n). For that reason,
having a bigger grid size, will break the application.
- 🌱 Growth Opportunity: make it responsive.