more objective-c to python conversion in aicontroller