Some code I'm using to initialize my AI controller.