[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [pygame] Does anyone have a python implementation of A*?
Fredrik Aronsson <d98aron@dtek.chalmers.se>:
>
> Hi!
>
> Me and a friend implemented dijkstra shortest path both in Python and in C
> for a school project. (A difficult VRP problem). The C implementation was
> about 100 times faster than the Python one. This type of
> algorithms with heavy calculations and nested loops seems to be a lot
> faster in C.
> Just a hint...
I've been thinking about some shortest-path algorithms in Numeric. I
guess that would speed things up considerably -- and you'll probably
have Numeric installed if you're running PyGame anyway, so...
(And I don't think a Python implementation of Dijkstra's algorithm
would have to be _that_ much slower than a C implementation. I guess
it depends on what "Python weaknesses" you're able to eliminate :)
>
> /Fredrik
--
Magnus Lie Hetland The Anygui Project
http://hetland.org http://anygui.org
____________________________________
pygame mailing list
pygame-users@seul.org
http://pygame.seul.org