PDA

View Full Version : Project in Python


arunbg
Aug27-07, 01:32 PM
Hi,
I'm planning on doing a college project in the Python programming language. I have only started learning it.
The project is a simulation of a Cop Chase. The human player controls the getaway car, while the cops are controlled by the computer using strategy written in the program(something like basic AI).
The chase occurs in a custom built graph which models roads in a city.

What I want to know is if Python can be used effectively to design programs of this nature.
I am also a bit unsure of the interpreted nature of the language as well, since all languages I am familiar with use compilers.
Any tips or suggestions are much appreciated.

mgb_phys
Aug27-07, 02:47 PM
Python is fine. In fact it is an excellent choice since you can spend more time designing the logic instead of writing data structures and findning memory leaks.

The speed will probably be fine, the only time interpreted is a problem is doing very large numbers of calculations - there are a number of maths addons for python (eg numpy) if you find you are having to do large amounts of matrix inversions for instance to solve the problem.

chroot
Aug27-07, 03:35 PM
It sounds like an ideal application for Python. I strongly doubt that this program is going to be that numerically-intensive, but well-written Python is on par with C++ in many situations.

You'll quickly find that the interpreted nature of Python will make your task much easier, in fact.

- Warren