Fixed AI (the bot seems to be working now).