Added new function to my AI. (master function)