Would you like to play a game? New AI teaches itself the rules