[pygame] A* pathfinding demo

This is the place to post any code that you want to share with the community. Only completed scripts should be posted here.

[pygame] A* pathfinding demo

Postby Mekire » Mon Jun 24, 2013 2:46 am

I recently recoded this program from scratch. It is just a demo showing the A* algorithm. Users can choose from three types of agent movement (rook, queen, and knight), and can set there start point, end point, and any intervening barriers. Animation can be toggled on and off. To get a realistic estimate of the solve time animation must be off.

Image


One of the main things I did in this recode was completely separate the astar algorithm from the GUI code. This should theoretically allow me to integrate it as is, in other programs.

The code can be downloaded as a zip.
Or you can browse the git repo online.

Any comments or advice on how to improve the algorithm would be appreciated,
-Mek
User avatar
Mekire
 
Posts: 988
Joined: Thu Feb 07, 2013 11:33 pm
Location: Amakusa, Japan

Re: [pygame] A* pathfinding demo

Postby micseydel » Mon Jun 24, 2013 4:54 am

Cool! And kudos for separating interface and implementation, I don't imagine you'll regret it.
Join the #python-forum IRC channel on irc.freenode.net!

Please do not PM members regarding questions which are meant to be discussed publicly. The point of the forum is so that others can benefit from it. We don't want to help you over PMs or emails.
User avatar
micseydel
 
Posts: 1385
Joined: Tue Feb 12, 2013 2:18 am
Location: Mountain View, CA


Return to Completed Scripts

Who is online

Users browsing this forum: sritsseo and 2 guests