Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Project in Python

  1. Aug 27, 2007 #1
    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.
     
  2. jcsd
  3. Aug 27, 2007 #2

    mgb_phys

    User Avatar
    Science Advisor
    Homework Helper

    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.
     
  4. Aug 27, 2007 #3

    chroot

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    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
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?



Similar Discussions: Project in Python
  1. Chess with Python (Replies: 2)

  2. Is Python the future? (Replies: 10)

  3. Python installation (Replies: 10)

Loading...