HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
Dicklesworthstone
visual_astar_python
Python2024–2024
Dicklesworthstone / visual_astar_python

visual_astar_python

Generate Cool-Looking Mazes and Animations Illustrating the A* Pathfinding Algorithm

2Distinct people
2Mentions
0Explicit recommenders
176GitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Generate Cool-Looking Mazes and Animations Illustrating the A* Pathfinding Algorithm

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 12:54:37 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by hour2 dated mentions

Observed mentions: 2024-08-05 15:56:01 UTC to 2024-08-05 17:46:35 UTC.

012024-08-05 15:00:00 UTC to 2024-08-05 16:00:00 UTC (exclusive): 1 mentions; 1 submissions, 0 commentsAug 5, 15:002024-08-05 16:00:00 UTC to 2024-08-05 17:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 commentsAug 5, 16:002024-08-05 17:00:00 UTC to 2024-08-05 18:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 commentsAug 5, 17:00

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
Aug 5, 15:002024-08-05 15:00:00 UTC2024-08-05 16:00:00 UTC110
Aug 5, 16:002024-08-05 16:00:00 UTC2024-08-05 17:00:00 UTC000
Aug 5, 17:002024-08-05 17:00:00 UTC2024-08-05 18:00:00 UTC101

What Hacker News says

2 sources
eigenvalue·Aug 5, 2024Submission

Show HN: Visual A* pathfinding and maze generation in Python

I was fascinated reading through another recent HN submission about a highly efficient implementation of A* in Lisp, which got me thinking about how I could do something similar in Python. However, these kinds of pathfinding algorithms really need complex terrain/mazes with interesting obstructions to showcase what they can do and how they work. So, I started thinking about how I could generate cool and diverse random "mazes" (they aren't really mazes, but I'm not sure what the best term is). I got a bit carried away thinking of lots of different cool ways to generate these mazes, such as cellular automata, fractals, Fourier transforms, etc. Then it turned out that many of the generated mazes weren't actually solvable, so I spent some time coming up with various strategies to test and validate the generated mazes and then modify them so t
Read the rest
hey would work better for this purpose. I spent a fair amount of effort trying to optimize the performance as much as possible using tools like Numba where applicable, but I also got tired of the code bringing my very powerful machine to its knees. So, I tried to make it play nice with the rest of the system while also saturating a big computer with tons of CPU cores. This was done using concurrent futures with some tweaks, like using a Semaphore and lowering the CPU priority. People might find this project interesting just for these performance-tuning features. I also spent a lot of time trying to make beautiful-looking animations that show multiple randomly generated mazes side by side, where you can see A* "races" as it tries to solve all the mazes at the same time, showing the current progress. When a solution is found, it is traced out on the screen. It's actually not that easy to get really slick/beautiful looking results straight out of Matplotlib, but if you use custom fonts and tweak a lot of parameters, it starts to look pretty polished. Now you can just run this on a spare Linux machine and come back in a few hours to have a bunch of cool-looking animations to check out. By changing the grid sizes, you can get very different-looking effects, although larger grids can take a lot of compute power to render. Anyway, I hope you guys like it! I'm happy to answer any questions. I'm sure there are still some bugs, but it has been running pretty well for me and generating lots of cool-looking animations. Note: I know that the pulsating title at the top in the demo video is annoying— I already slowed this way down in the code but didn't want to wait for it to regenerate the video.
135 points · Open discussion

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.