i don't have an advanced ai example but here are some advantages of python:
  • automatic memory management
  • powerful built-in dynamic data structures (lists, dictionaries, sets,...)
  • powerful string handling
  • the huge python standard library with modules for almost everything you could ever need (web access,...)
  • no long compile times (you can even change the program while it is running.)
  • object orientation (which means that you can subclass Entity() and create different entity types for example, you can use Vector() objects like v1 + (2 * (v2 * -v1)) * v2 instead of having to use the cumbersome vec_ commands, skills aren't necessary because you can just assign an unlimited number of arbitrary properties to entities,...)


disadvantages of python:
  • it is slower than C but in most of my tests it has been fast enough (one case that could be a bit problematic is particle callbacks. calling tenthousands of them per frame is a bit slow with python. such problems can be solved by moving the bottleneck to C though (which is quite easy with tools like cython). for example there could be some predefined particle callbacks in C (they always look very similar anyway) and python just controls their parameters.)


there are projects like google's unladen-swallow or pypy which aim to make python faster.