Complete AI skeleton code